summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pfarrei
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-09 16:54:30 +0000
committerKarl Berry <karl@freefriends.org>2013-04-09 16:54:30 +0000
commit09fd9c9121cefeb7ebe015102a51a796e2d8a314 (patch)
treeb535dbaecec73e08d3b68c44c7fde7d6bcd99d52 /Master/texmf-dist/tex/latex/pfarrei
parentba6b0d9a71177f6c82fd81c79c42254dceca27ad (diff)
pfarrei (8apr13)
git-svn-id: svn://tug.org/texlive/trunk@29796 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pfarrei')
-rw-r--r--Master/texmf-dist/tex/latex/pfarrei/a5toa4.tex8
-rw-r--r--Master/texmf-dist/tex/latex/pfarrei/pfarrei.sty234
2 files changed, 230 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/pfarrei/a5toa4.tex b/Master/texmf-dist/tex/latex/pfarrei/a5toa4.tex
index 6fda799e025..feff6e1eb47 100644
--- a/Master/texmf-dist/tex/latex/pfarrei/a5toa4.tex
+++ b/Master/texmf-dist/tex/latex/pfarrei/a5toa4.tex
@@ -29,14 +29,14 @@
\begingroup
\def\revisiondate$#1: #2-#3-#4 #5${%
\gdef\pfarreirevisiondate{#2/#3/#4}%
- }\revisiondate$Date: 2013-03-10 15:19:06 +0100 (So, 10 M^^c3^^a4r 2013) $
+ }\revisiondate$Date: 2013-04-08 09:22:56 +0200 (Mo, 08. Apr 2013) $
\def\revision$#1: #2 #3${%
\gdef\pfarreirevision{#2}%
- }\revision$Revision: 20 $
+ }\revision$Revision: 33 $
\endgroup
\ProvidesFile{a5toa4.tex}
- [\pfarreirevisiondate\space r\pfarreirevision LaTeX2e package
- (for priests)]
+ [\pfarreirevisiondate\space r\pfarreirevision\space LaTeX2e package
+ (for pastors)]
\documentclass[a4paper,landscape]{article}
\usepackage{pfarrei}
\begin{document}
diff --git a/Master/texmf-dist/tex/latex/pfarrei/pfarrei.sty b/Master/texmf-dist/tex/latex/pfarrei/pfarrei.sty
index 34b5cba0a26..1bd50ed21d6 100644
--- a/Master/texmf-dist/tex/latex/pfarrei/pfarrei.sty
+++ b/Master/texmf-dist/tex/latex/pfarrei/pfarrei.sty
@@ -29,18 +29,22 @@
\begingroup
\def\revisiondate$#1: #2-#3-#4 #5${%
\gdef\pfarreirevisiondate{#2/#3/#4}%
- }\revisiondate$Date: 2013-03-10 15:19:06 +0100 (So, 10 M^^c3^^a4r 2013) $
+ }\revisiondate$Date: 2013-04-08 09:22:56 +0200 (Mo, 08. Apr 2013) $
\def\revision$#1: #2 #3${%
\gdef\pfarreirevision{#2}%
- }\revision$Revision: 20 $
+ }\revision$Revision: 33 $
\endgroup
\ProvidesPackage{pfarrei.sty}
- [\pfarreirevisiondate\space r\pfarreirevision LaTeX2e package
- (for priests)]
+ [\pfarreirevisiondate\space r\pfarreirevision\space LaTeX2e package
+ (for pastors)]
+\newcommand*{\ifbooklet}{}
+\let\ifbooklet\@secondoftwo
+\DeclareOption{booklet}{\let\ifbooklet\@firstoftwo}
+\DeclareOption{nobooklet}{\let\ifbooklet\@secondoftwo}
\ProcessOptions*
\RequirePackage{ifpdf}
\RequirePackage{pdfpages}
-\newcommand*{\AvToAiv}{%
+\newcommand*{\AvToAiv}[1][\OriginalFile]{%
\ifpdf\else
\PackageError{pfarrei}{PDF mode needed}{%
a5toa4 needs the direct PDF mode.\MessageBreak
@@ -49,12 +53,226 @@
}%
\input{x.tex}
\fi
- \@ifundefined{Booklet}{%
- \includepdf[pages=-,nup=2x1]{\OriginalFile}%
+ \ifbooklet{%
+ \includepdf[pages=-,booklet]{#1}%
}{%
- \includepdf[pages=-,booklet]{\OriginalFile}%
+ \includepdf[pages=-,nup=2x1]{#1}%
}%
}
+\newenvironment*{bookletpage}{%
+ \edef\reserved@a{bookletpage}%
+ \ifx\@currenvir\reserved@a
+ \PackageError{pfarrei}{`bookletpage' used as ordinary environment}{%
+ Please note, that `bookletpage' is a virtual environment
+ only.\MessageBreak
+ You should not use it directly as an environment, but use
+ `\string\bookletpage' at the\MessageBreak
+ begin code and `\string\endbookletpage' at the end code of a wrapper
+ environment.\MessageBreak
+ If you'll continue, expect several additional errors%
+ }%
+ \let\bookletpagebox\@tempboxa
+ \let\bookletpagestyle\@empty
+ \else
+ \expandafter\let\expandafter\bookletpagebox
+ \csname \@currenvir box\endcsname
+ \expandafter\let\expandafter\bookletpagestyle
+ \csname \@currenvir style\endcsname
+ \fi
+ \edef\reserved@a{%
+ \noexpand\begin{lrbox}{\bookletpagebox}
+ \noexpand\begin{minipage}[t][\textheight][t]{\textwidth}%
+ \begingroup
+ \def\noexpand\@currenvir{\@currenvir}%
+ \def\noexpand\@currenvline{\@currenvline}%
+ \noexpand\parskip=\the\parskip
+ \noexpand\parindent=\the\parindent
+ \noexpand\parfillskip=\the\parfillskip
+ }\reserved@a
+}{%
+ \endbookletpagebox
+ \printbookletpagebox
+}
+\def\endbookletpagebox{%
+ \par
+ \endgroup
+ \end{minipage}%
+ \end{lrbox}%
+ \global\setbox\bookletpagebox\box\bookletpagebox
+}
+\newcommand*\printbookletpagebox[1][\@currenvir]{%
+ \ifbooklet{%
+ \@ifundefined{bookletpagestyle}{}{%
+ \ifx\bookletpagestyle\@empty\else\thispagestyle{\bookletpagestyle}\fi%
+ }%
+ \clearpage\noindent\usebox\bookletpagebox\clearpage
+ }{%
+ \PackageInfo{pfarrei}{`#1' not printed}%
+ }%
+}
+\newsavebox\bookletfrontpagebox
+\newcommand*{\bookletfrontpagestyle}{empty}
+\newenvironment*{bookletfrontpage}{%
+ \bookletpage
+}{%
+ \endbookletpagebox
+ \clearpage
+ \ifbooklet{%
+ \ifnum\c@page>\@ne
+ \PackageError{pfarrei}{Booklet front page not first page}{%
+ The booklet font page should be the first page, but it seems, that it
+ is\MessageBreak
+ page no. \the\c@page. \space Maybe you should put it immediately after
+ `\string\begin{document}.%
+ Nevertheless, if you'll continue it will be printed here%
+ }%
+ \fi
+ \printbookletpagebox
+ }{%
+ \PackageInfo{pfarrei}{Booklet front page ignored}%
+ }%
+}
+\newsavebox\bookletemptypagebox
+\newcommand*{\bookletemptypagestyle}{empty}
+\newenvironment*{bookletemptypage}{%
+ \bookletpage
+}{%
+ \endbookletpagebox
+}
+\newsavebox\bookletbackpagebox
+\newcommand*{\bookletbackpagestyle}{empty}
+\newenvironment*{bookletbackpage}{%
+ \bookletpage
+}{%
+ \endbookletpagebox
+ \if@filesw\immediate\write\@mainaux{\string\printbookletbackpage}\fi
+}%
+\newcommand*{\printbookletbackpage}{}
+\newcommand*{\@printbookletbackpage}{%
+ \ifbooklet{%
+ \clearpage
+ \let\bookletpagestyle\bookletemptypagestyle
+ \ifvoid\bookletemptypagebox
+ \let\bookletpagebox\strutbox
+ \else
+ \let\bookletpagebox\bookletemptypagebox
+ \fi
+ \@tempcnta=\c@page
+ \divide\@tempcnta by 4
+ \multiply\@tempcnta by 4
+ \ifnum \@tempcnta=\c@page\else
+ \advance\@tempcnta by 4
+ \@whilenum \c@page<\@tempcnta\do{%
+ \printbookletpagebox
+ }%
+ \fi
+ \let\bookletpagestyle\bookletbackpagestyle
+ \let\bookletpagebox\bookletbackpagebox
+ \printbookletpagebox
+ }{%
+ \PackageInfo{pfarrei}{Booklet back page ignored}%
+ }%
+}
+\AtBeginDocument{\let\printbookletbackpage\@printbookletbackpage}
+\newcommand*{\motto}[1]{\gdef\@motto{#1}}
+\newcommand*{\@motto}{}
+\newcommand*{\titlepicture}[1]{\gdef\@titlepicture{#1}}
+\newcommand*{\@titlepicture}{}
+\providecommand*{\title}[1]{\gdef\@title{#1}}
+\providecommand*{\@title}{}
+\newcommand*{\parish}[1]{\gdef\@parish{#1}}
+\newcommand*{\@parish}{}
+\providecommand*{\date}[1]{\gdef\@date{#1}}
+\def\@date{}
+\newcommand*{\makebooklettitlepage}{%
+ \begin{bookletfrontpage}
+ \parskip.5\baselineskip
+ \parindent\z@
+ \parfillskip \z@ \@plus 1fil
+ \centering
+ \ifx\@motto\@empty\else{\Huge\@motto\par}\fi
+ \vfill
+ \ifx\@titlepicture\@empty\else\@titlepicture\par\fi
+ \vfill
+ \parskip\z@
+ \Huge
+ \@title\par
+ \@parish\par
+ \@date\par
+ \ifx\@title\@empty\ifx\@parish\@empty\ifx\@date\@empty\null\fi\fi\fi
+ \end{bookletfrontpage}
+}
+\let\samedoublepage@save@hbox\hbox
+\newenvironment*{samedoublepage}{%
+ \par
+ \let\hbox\vbox
+ \begin{lrbox}{\@tempboxa}%
+ \let\hbox\samedoublepage@save@hbox
+}{%
+ \end{lrbox}%
+ \let\hbox\samedoublepage@save@hbox
+ \@tempdima\ifdim\pagegoal=\maxdimen\textheight
+ \else\dimexpr\pagegoal-\pagetotal\fi
+ \ifdim \@tempdima
+ <\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax
+ \ifodd\c@page
+ \newpage
+ \@tempdima\textheight
+ \else \typeout{even page}%
+ \fi
+ \@whiledim \@tempdima
+ <\dimexpr\ht\@tempboxa+\dp\@tempboxa\relax\do{%
+ \splitmaxdepth\dp\strutbox
+ \splittopskip\topskip
+ \setbox\z@\vsplit\@tempboxa to \@tempdima
+ \showthe\dimexpr\ht\z@+\dp\z@\relax
+ \showthe\@tempdima
+ \usebox\z@
+ \newpage
+ \@tempdima\textheight
+ }%
+ \fi
+ \ifvoid\@tempboxa\else\usebox\@tempboxa\fi
+}
+\RequirePackage{keyval}
+\define@key{pfarrei.prayer}{response}{\def\prayer@response{#1}}
+\define@key{pfarrei.prayer}{responder}{\def\prayer@responder{#1:}}
+\define@key{pfarrei.prayer}{leader}{\def\prayer@leader{#1:}}
+\newcommand*{\prayer@responder}{}
+\newcommand*{\prayer@response}{}
+\newcommand*{\prayer@leader}{}
+\newcommand*{\setupprayer}{%
+ \setkeys{pfarrei.prayer}%
+}
+\newif\ifprayer@firstitem
+\newcommand*{\prayer@response@item}{%
+ \ifprayer@firstitem\else
+ \ifx\prayer@responder\@empty\else
+ \ifx\prayer@response\@empty\else
+ \prayer@save@item[\prayer@responder] \prayer@response
+ \fi
+ \fi
+ \fi
+}
+\newcommand*{\prayer@item}[1][\prayer@leader]{%
+ \prayer@response@item
+ \prayer@firstitemfalse
+ \prayer@save@item[{#1}]%
+}
+\newenvironment*{prayer}[1][]{%
+ \begin{description}
+ \begingroup
+ \def\@currenvir{prayer}%
+ \setupprayer{#1}%
+ \let\prayer@save@item\item
+ \let\item\prayer@item
+ \prayer@firstitemtrue
+ \let\noresponder\prayer@firstitemtrue
+}{%
+ \prayer@response@item
+ \endgroup
+ \end{description}
+}
\endinput
%%
%% End of file `pfarrei.sty'.