summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorPhilipp Gesang <gesang@stud.uni-heidelberg.de>2012-06-06 14:19:59 +0200
committerPhilipp Gesang <gesang@stud.uni-heidelberg.de>2012-06-06 14:19:59 +0200
commit7ec5a2db9aa8143cf47cdf2e59bba96aa2f80bae (patch)
tree73e22d79b0955bee38ea196796e82b16e3f20215 /tex
parent93ca075910a18a163ea5fb9bf92e6330625dc260 (diff)
downloadenigma-7ec5a2db9aa8143cf47cdf2e59bba96aa2f80bae.tar.gz
[package] plain and latex fixes; examples
Diffstat (limited to 'tex')
-rw-r--r--tex/latex/enigma/enigma.sty6
-rw-r--r--tex/plain/enigma/enigma.tex19
2 files changed, 19 insertions, 6 deletions
diff --git a/tex/latex/enigma/enigma.sty b/tex/latex/enigma/enigma.sty
index eee2cb5..e9ccee4 100644
--- a/tex/latex/enigma/enigma.sty
+++ b/tex/latex/enigma/enigma.sty
@@ -1,3 +1,7 @@
-\ProvidesPackage{enigma}[2012-02-20 21:16:13+0100 enigma]
+\ProvidesPackage
+ {enigma}
+ [2012/06/06 Enigma Document Encryption]
+\RequirePackage{luatexbase}
\input{enigma}
+\endinput
% vim:ft=tex:sw=2:ts=2:expandtab:tw=72
diff --git a/tex/plain/enigma/enigma.tex b/tex/plain/enigma/enigma.tex
index 625a38d..41d6b2d 100644
--- a/tex/plain/enigma/enigma.tex
+++ b/tex/plain/enigma/enigma.tex
@@ -1,4 +1,11 @@
-\input{luatexbase.sty}
+\expandafter\let\expandafter\x\csname ver@enigma.sty\endcsname
+\newif\ifenigmaisrunningplain
+\ifx\x\relax
+ \enigmaisrunningplaintrue
+ \input{luatexbase.sty}
+ \catcode`\@=11
+% \else latex
+\fi
\catcode`\_=11 % There’s no reason why this shouldn’t be the case.
\catcode`\!=11
%D Nice tool from luat-ini.mkiv. This really helps with those annoying
@@ -76,7 +83,7 @@
\edef\c!pre_linebreak_filter{pre_linebreak_filter}
\def\do_define_enigma#1{%
- \@EA\gdef\csname start\enigmaid\endcsname{%
+ \@EA\gdef\csname start\current_enigma_id\endcsname{%
\endgraf
\bgroup%
\directlua{%
@@ -90,7 +97,7 @@
end
}%
}%
- \@EA\gdef\csname stop\enigmaid\endcsname{%
+ \@EA\gdef\csname stop\current_enigma_id\endcsname{%
\endgraf
\directlua{
luatexbase.remove_from_callback(\!!bs\c!pre_linebreak_filter\!!es, \!!bs#1\!!es)
@@ -103,12 +110,14 @@
\def\defineenigma#1{%
\begingroup
\let\@EA\expandafter
- \edef\enigmaid{#1}%
- \@EA\do_define_enigma\@EA{\enigmaid}%
+ \edef\current_enigma_id{#1}%
+ \@EA\do_define_enigma\@EA{\current_enigma_id}%
\endgroup%
}
+
%D \stopdocsection
\catcode`\_=8 % \popcatcodes
\catcode`\!=12 % reserved according to source2e
+\ifenigmaisrunningplain\catcode`\@=12\fi
% vim:ft=tex:sw=2:ts=2:expandtab:tw=72