Skip to content
Snippets Groups Projects
Commit 568cee64 authored by Uwe Aßmann's avatar Uwe Aßmann
Browse files

varylists with new macros fullsent and rawsent, with new compilation switches

parent c5f2a3c3
No related branches found
No related tags found
No related merge requests found
No preview for this file type
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% test file for varylist.sty, with examples
% @author Uwe Amann
% @version 0.2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper,12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{varylist}
\usepackage{xspace}
\usepackage{lipsum}
% creating some blind lipsum text fragments
\def\a{\lipsum[][1-2] }
\def\b{\lipsum[][3-4] }
\def\c{\lipsum[][5-6] }
\def\d{\lipsum[][7-8] }
\def\a{This is a nice reformulation of the text in the rawsent macro. \rawsent{\lipsum[][1-2] }}
\def\b{\fullsent{Well formulated sentences can be enclosed in the macro fullsent.} This is an item combining the macro fullsent with the raw sentence: \lipsum[][3-4] }
\def\c{\rawsent{\lipsum[][5-6] } Also, raw text may be inserted after the raw sentence.}
\def\d{\fullsent{Alternatively, nicely formulated sentences can be enclosed in the macro fullsent.} This is an item combining both fullsent and rawsent macros.\rawsent{\lipsum[][7-8] }}
% new environments for variable bullet lists
%\usepackage{varylist}
%\usepackage[fullsent,rawsent]{varylist}
\usepackage[fullsent]{varylist}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Morphing Sketches of Paragraphs into Real Text based on Variable Lists
\title{Morphing MORE Sketches of Paragraphs into Real Text based on Variable Lists
with the \LaTeX\ Style \texttt{enumitem.sty}}
\author{Uwe Amann}
\maketitle
......@@ -125,20 +128,107 @@
\end{varylist}
\RAWSENTENCEtrue
\section{How to Morph a Bullet List (from a Sketch Paper) to a Running Paragraph}
%%%%%%%%%%%%%%%%%%%%%%%%
\label{sec:variable-lists}
\def\a{The main result of this paper is a new method for generating cooking recipes
from Petri nets.}
\def\b{The cooking recipe is specified with a Petri net in which the places are characterized by a photo of the (partial) state (\emph{place photo}).}
\def\c{Cooking activities are modeled by transitions of the Petri net.}
\def\d{The end state is characterized by an end place and a photo of
the finished cooking process.}
\def\e{Our main observation is that a cooking process can be naturally
modeled by a SESEP (single entry - single exit place) petri
net. Cook with Petri!}
\def\a{The main result of this paper is a new method for generating cooking recipes from Petri nets.\rawsent{A new method for generating cooking recipes.}}
\def\b{The cooking recipe is specified with a Petri net in which the places are characterized by a photo of the (partial) state (\emph{place photo}).\rawsent{Specification with a PN.}}
\def\c{Cooking activities are modeled by transitions of the Petri net. \rawsent{Transitions are activities.}}
\def\d{The end state is characterized by an end place and a photo of the finished cooking process. \rawsent{Endstates are a photo.}}
\def\e{Our main observation is that a cooking process can be naturally modeled by a SESEP (single entry - single exit place) petri net. Cook with Petri! \rawsent{Start and end state result in a SESE PN.}}
Morphing can start with a paragraph sketch in enumerate-list form
\emph{(Outlined enumeration with labels):}
\vspace{1mm} \hrule
\ENUMtrue\SEPARATEPARtrue\LABELINGtrue
\begin{varylist}
\item \a
\item \b
\item \c
\item \d
\item \e
\end{varylist}
\hrule \vspace{2mm}
Alternatively, it may start with an itemized list
\emph{(Outlined bullet list with labels):}
\vspace{1mm} \hrule
\ENUMfalse\SEPARATEPARtrue\LABELINGtrue
\begin{varylist}
\item \a
\item \b
\item \c
\item \d
\item \e
\end{varylist}
\vspace{2mm}
\hrule
\vspace{2mm}
If \texttt{SEPARATEPAR} is set to false, the paragraph is inlined
\emph{(Inlined enumerated with labels):}
\vspace{1mm}
\hrule
\vspace{1mm}
\ENUMtrue
\SEPARATEPARfalse
\LABELINGtrue
\begin{varylist}
\item \a
\item \b
\item \c
\item \d
\item \e
\end{varylist}
\vspace{1mm}
\hrule \vspace{2mm}
If, additionally, \texttt{LABELING} is set to false, the labels vanish,
and the bullet list looks like running text
\emph{(Inlined running without labels):}
\vspace{2mm}
\hrule
\vspace{1mm}
\ENUMtrue
\SEPARATEPARfalse
\LABELINGfalse
\begin{varylist}
\item \a
\item \b
\item \c
\item \d
\item \e
\end{varylist}
\vspace{2mm}
\hrule
\RAWSENTENCEfalse
\section{How to Morph a Bullet List (from a Sketch Paper) to a Running Paragraph (without raw sentences)}
%%%%%%%%%%%%%%%%%%%%%%%%
\def\a{The main result of this paper is a new method for generating cooking recipes from Petri nets.\rawsent{A new method for generating cooking recipes.}}
\def\b{The cooking recipe is specified with a Petri net in which the places are characterized by a photo of the (partial) state (\emph{place photo}).\rawsent{Specification with a PN.}}
\def\c{Cooking activities are modeled by transitions of the Petri net. \rawsent{Transitions are activities.}}
\def\d{The end state is characterized by an end place and a photo of the finished cooking process. \rawsent{Endstates are a photo.}}
\def\e{Our main observation is that a cooking process can be naturally modeled by a SESEP (single entry - single exit place) petri net. Cook with Petri! \rawsent{Start and end state result in a SESE PN.}}
if the RAWSENTENCE switch is not set, the sections can be printed without raw text.
Morphing can start with a paragraph sketch in enumerate-list form
......
% varylist.sty
% varylists are configurable lists, based on the
% configuration switches for varylist, varyenumerate and varyitemize
% @author: Uwe Aßmann @date: 2023-12-13
% @author: Uwe Aßmann @date: 2023-12-14
\ProvidesPackage{varylist}[2023/12/12 v0.1 variable enum and item lists based on enumitem.sty]
\ProvidesPackage{varylist}[2023/12/12 v0.2 macros fullsent and
rawsent for final formulations and raw sentences]
\RequirePackage[inline]{enumitem}
\RequirePackage{comment}
\RequirePackage{xcolor}
\newif\ifENUM\ENUMtrue
\newif\ifSEPARATEPAR\SEPARATEPARfalse
\newif\ifLABELING\LABELINGtrue
\newif\ifFULLSENTENCE\FULLSENTENCEfalse
\newif\ifRAWSENTENCE\RAWSENTENCEfalse
\DeclareOption{enum}{\ENUMtrue}
\DeclareOption{par}{\SEPARATEPARtrue}
\DeclareOption{nolabels}{\LABELINGfalse}
\DeclareOption{fullsent}{\FULLSENTENCEtrue}
\DeclareOption{rawsent}{\RAWSENTENCEtrue}
\ProcessOptions
% this is a new environment on lists-in-a-paragraph-as-sentences.
\newlist{VErunninglist}{itemize*}{2}
\setlist[VErunninglist]{label=\hspace{-1mm}}
%\setlist[VErunninglist]{label=\xspace}
\def\rawsent#1{%
\ifRAWSENTENCE
\textcolor{brown}{\emph{\tiny({#1)}}}
\else
%
\fi
}
\def\fullsent#1{%
\ifFULLSENTENCE
\textcolor{blue}{#1}
\else
%
\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Variable enumerate list with several modes
\newenvironment{varyenumerate}{%
......@@ -29,6 +57,7 @@
\else
\begin{VErunninglist}
\fi
\fi
}{%%%%%%%%%%%%
\ifSEPARATEPAR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment