summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/jslectureplanner
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-07 22:15:29 +0000
committerKarl Berry <karl@freefriends.org>2015-07-07 22:15:29 +0000
commit1a2539bd1fc02074e7949e5e3055cca5084696cd (patch)
tree129408acfe41ed847639c9ce6a3e8e39c83dda9f /Master/texmf-dist/tex/latex/jslectureplanner
parent5d9209ba9e2cb67ce414ee626cddac1918d62d6e (diff)
jslectureplanner (7jul15)
git-svn-id: svn://tug.org/texlive/trunk@37792 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/jslectureplanner')
-rw-r--r--Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty22
1 files changed, 18 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty
index 4cc723ca8d4..e1a8298900e 100644
--- a/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty
+++ b/Master/texmf-dist/tex/latex/jslectureplanner/jslectureplanner.sty
@@ -21,8 +21,8 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\filedate{2015/02/27}
-\def\fileversion{1.0.1}
+\def\filedate{2015/07/07}
+\def\fileversion{1.0.2}
\def\filename{jslectureplanner.sty}
\NeedsTeXFormat{LaTeX2e}
@@ -157,12 +157,26 @@
\newcounter{breakunits}
\newcounter{loopcounter}
+%
+% HELPERS
+%
+
+% Helper command that uses etoolbox's \AtEndPreamble iff
+% we actually are in a preamble. If not, the argument is
+% output as is.
+\newcommand\js@AtEndPreambleIfInPreamble[1]{%
+ \ifx\@onlypreamble\@notprerr
+ #1
+ \else
+ \AtEndPreamble{#1}
+ \fi
+}
%
% PACKAGE OPTIONS
%
\define@key{lec}{lectype}{%
- \AtEndPreamble{%
+ \js@AtEndPreambleIfInPreamble{%
\ifcsundef{lectype@#1}{%
\PackageError{jslectureplanner}{Lecture type '#1' is not defined!}{%
Please consult the package manual for instructions how to define it}
@@ -175,7 +189,7 @@
\DeclareOptionX{type}{\setkeys{lec}{lectype=#1}}
\define@key{lec}{lecsem}{%
- \AtEndPreamble{%
+ \js@AtEndPreambleIfInPreamble{%
\ifcsundef{lecsemshort@#1}{%
\PackageError{jslectureplanner}{Semester type '#1' is not defined!}{%
Please consult the package manual for instructions how to define it}