summaryrefslogtreecommitdiff
path: root/macros/generic/fenixpar/fenixpar.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/fenixpar/fenixpar.sty
Initial commit
Diffstat (limited to 'macros/generic/fenixpar/fenixpar.sty')
-rw-r--r--macros/generic/fenixpar/fenixpar.sty44
1 files changed, 44 insertions, 0 deletions
diff --git a/macros/generic/fenixpar/fenixpar.sty b/macros/generic/fenixpar/fenixpar.sty
new file mode 100644
index 0000000000..af3b272060
--- /dev/null
+++ b/macros/generic/fenixpar/fenixpar.sty
@@ -0,0 +1,44 @@
+% This is the file fenixpar.sty
+% Author: Javier A. M\'ugica de Rivera
+% This file is in the public domain.
+%
+\ifx\RequirePackage\undefined
+\def\tempa{\input fenixtok.sty}
+\else
+\def\tempa{\RequirePackage{fenixtok}}
+\fi
+\tempa
+
+\def\NewParType#1#2{\NewTypeoftok{everypar}{#1}{#2}}
+\def\NextParL#1{\NexteveryparL{#1}}
+\def\NextParR#1{\NexteveryparR{#1}}
+\let\NextPar\NextParL
+\def\AllParsL#1{\AlleveryparsL{#1}}
+\def\AllParsR#1{\AlleveryparsR{#1}}
+\def\EndPars#1{\Endeverypars{#1}}
+\let\AllPars\AllParsL
+%If you want to make \par a toks register and use fenixtok with it you
+%probably want to comment or modify this line:
+\def\nextpar#1{\fornexttokl{everypar}{#1}}
+
+% Next is an example:
+% \NewParType{asterisk}{\hbox to0pt{\hss$\ast$\kern6pt}}
+%
+% \NextPar{asterisk} This par will get an asterisk.\par
+% But this will not.
+%
+% \AllPars{asterisk} This par will get an asterisk.\par
+% And this one.\par
+% And all these.\par
+% ...
+% \EndPars{asterisk}
+%
+% To directly add code to the next par,
+% \nextpar{\hbox to0pt{\kern-2em \romannumeral\mycounter.\hss}}
+%
+% L and R stand for Left and Right. However, they cannot be used
+% to push letter-format macros in order to format the first letter
+% of the paragraph, unless you are a TeXhacker.
+%
+% See the file fenixtok for details.
+\endinput \ No newline at end of file