summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/csbulletin
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-02-21 00:27:57 +0000
committerKarl Berry <karl@freefriends.org>2017-02-21 00:27:57 +0000
commit25e38891adcaa4d3c862cda7b9093f0f4f71bd8a (patch)
treebb851971f3e7948b36230451ff80d09e58cc154d /Master/texmf-dist/tex/latex/csbulletin
parent2f9e984bb3ef9f5eec3cf91d020412f4bcf4a317 (diff)
csbulletin (20feb17)
git-svn-id: svn://tug.org/texlive/trunk@43277 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/csbulletin')
-rw-r--r--Master/texmf-dist/tex/latex/csbulletin/csbulacronym.sty4
-rw-r--r--Master/texmf-dist/tex/latex/csbulletin/csbulletin.cls218
2 files changed, 149 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/latex/csbulletin/csbulacronym.sty b/Master/texmf-dist/tex/latex/csbulletin/csbulacronym.sty
index 0273848e940..6663ebdbc8e 100644
--- a/Master/texmf-dist/tex/latex/csbulletin/csbulacronym.sty
+++ b/Master/texmf-dist/tex/latex/csbulletin/csbulacronym.sty
@@ -1,5 +1,5 @@
\ProvidesPackage{csbulacronym}[2008/04/27 Acronyms for CSTUG bulletin]
-\PackageInfo{csbulacronym}{$Id: csbulacronym.sty 16 2008-04-27 18:17:54Z zw $}
+\PackageInfo{csbulacronym}{$Id$}
%==================================================== TeX logos
\DeclareRobustCommand\CS[1]{\def\next{#1}\leavevmode{$\cal C$}\kern-.3em
@@ -8,6 +8,8 @@
\DeclareRobustCommand\CSTeX{\leavevmode{$\cal C$}\kern-.3em
\lower .67ex\hbox{$\cal S$}\kern-.145em\TeX}
\let\cstex\CSTeX
+\DeclareRobustCommand\csplain{\leavevmode{$\cal C$}\kern-.3em
+ \lower .67ex\hbox{$\cal S$}\kern-.145emplain}
\DeclareRobustCommand\CSLaTeX{\leavevmode{$\cal C$}\kern-.3em
\lower .67ex\hbox{$\cal S$}\LaTeX}
\let\cslatex\CSLaTeX
diff --git a/Master/texmf-dist/tex/latex/csbulletin/csbulletin.cls b/Master/texmf-dist/tex/latex/csbulletin/csbulletin.cls
index b6100abcc0f..a646f065fa4 100644
--- a/Master/texmf-dist/tex/latex/csbulletin/csbulletin.cls
+++ b/Master/texmf-dist/tex/latex/csbulletin/csbulletin.cls
@@ -1,5 +1,15 @@
-\ProvidesClass{csbulletin}[2008/08/05 CSTUG Bulletin class]
-\ClassInfo{csbulletin}{$Id: csbulletin.cls 29 2008-08-05 19:36:49Z zw $}
+\ProvidesClass{csbulletin}[2017/02/10 CSTUG Bulletin class]
+\ClassInfo{csbulletin}{$Id$}
+
+% Switch
+
+\newif\ifcsbul@nomargins
+\newif\ifcsbul@web
+\newif\ifcsbul@color
+
+% Empty macro for later use
+
+\def\NovyClanek{}
% Language attributes
@@ -30,9 +40,28 @@
\DeclareOption{executivepaper}{}
\DeclareOption{landscape}{}
+% Always at the new page
+
+\DeclareOption{newpage}{\let\NovyClanek\clearpage}
+
+% No margins (special use)
+
+\DeclareOption{nomargins}{\csbul@nomarginstrue}
+
+% Color
+
+\DeclareOption{web}{\PassOptionsToPackage{web}{csbulobalka}\csbul@webtrue}
+\DeclareOption{color}{\PassOptionsToPackage{color}{csbulobalka}\csbul@colortrue}
+\DeclareOption{twocolor}{\PassOptionsToPackage{twocolor}{csbulobalka}\csbul@colortrue}
+\DeclareOption{custom}{\PassOptionsToPackage{custom}{csbulobalka}\csbul@colortrue}
+
% Pass all global options to the "article" class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+
+% No margins if the first page given
+%\IfFileExists{\jobname.FirstPage}{\ExecuteOptions{nomargins}}{}
+
\ProcessOptions
\LoadClass[twoside]{article}
@@ -48,8 +77,10 @@
% To be deleted soon
\newif\if@html
+\ifpdf
\IfFileExists{microtype.sty}{\RequirePackage
[protrusion=false,expansion=true,stretch=8,shrink=24,step=4]{microtype}}{}
+\fi
\IfFileExists{array.sty}{\RequirePackage{array}}{}
@@ -62,7 +93,7 @@
\IfFileExists{SpecChar.sty}{\RequirePackage{SpecChar}\AddSpecial\-}{}
-\IfFileExists{csbulobalka.sty}{\RequirePackage{csbulobalka}}{}
+\IfFileExists{csbulobalka.sty}{\RequirePackage{csbulobalka}[2017/02/17]}{}
\ifx\mubytein\undefined
\newcount\mubytein
@@ -70,18 +101,22 @@
\newcount\mubytelog
\else
\IfFileExists{csbulutf8.sty}{\RequirePackage{csbulutf8}}{}
- \IfFileExists{encxvlna.sty}{\RequirePackage{encxvlna}}{}
\fi
% The next macros must be here, otherwise the PDF mode may report strange errors
\newtoks\cislo
\newtoks\rok
+\newtoks\doisufix\doisufix{\the\rok-\the\cislo/\thepage}
\newtoks\naklad
\newtoks\@uzaverka
\newtoks\pristi@uzaverka
\newtoks\obalka
+% Default
+
+\obalka{Anton\'{\i}n Strejc}%'
+
% \uzaverka DD.MM.RRRR<space or end-of-line>
\def\uzaverka #1.#2.#3 {\begingroup
@@ -165,12 +200,12 @@
% Newlines for titles and toc
-\DeclareRobustCommand\nl{\protect\p@nl}
-\def\p@nl{\unskip\\\ignorespaces}
-\DeclareRobustCommand\ln{\protect\p@ln}
-\let\p@ln\relax
-\DeclareRobustCommand\toc@nl{\let\p@nl\relax
- \def\p@ln{\unskip\\\ignorespaces}}
+\DeclareRobustCommand\TitleNewline{\\}
+\DeclareRobustCommand\TocNewline{\space}
+\AtBeginDocument{\addtocontents{toc}{\csbul@newlinedefs}}
+\DeclareRobustCommand\csbul@newlinedefs{%
+ \let\TitleNewline\space
+ \let\TocNewline\\}
%=========================================== Sizes etc.
@@ -252,15 +287,16 @@
\newenvironment{summary}{\ifhmode \par \fi
\begin{otherlanguage*}{english}
\setcounter{secnumdepth}{-1}\section{Summary:
- \zw@englishtitle}}{\ifhmode \par \fi\end{otherlanguage*}}
+ \zw@englishtitle}}{\ifhmode \par
+ \fi\end{otherlanguage*}\aftergroup\zw@summaryOK}
\renewcommand\@seccntformat[1]{\@nameuse{the#1}.\hspace{.5em}}
-\newcommand\StartPage[1][1]{\clearpage\setcounter{page}{#1}}
+\newcommand\StartPage[1][1]{\clearpage\setcounter{page}{#1}\zw@summaryOK}
\renewenvironment{abstract}{\narrower \small \noindent \ignorespaces}{\ifhmode \par \fi}
-\def\keywords:{\ifhmode \par \fi \smallskip \noindent\textbf{Key words:} \ignorespaces}
+\def\keywords:{\ifhmode \par \fi \medskip \noindent\textbf{Keywords:} \ignorespaces}
% ===================================================== New layout
@@ -269,8 +305,6 @@
\paperwidth 148mm
\paperheight 210mm
-\pdfpagewidth\paperwidth
-\pdfpageheight\paperheight
\headheight \z@
\headsep \z@
\textwidth 27cc
@@ -289,6 +323,11 @@
\advance\evensidemargin -1in
\parskip \z@
+\AtBeginDocument{\ifpdf
+ \pdfpagewidth\paperwidth \pdfpageheight\paperheight
+\else
+ \special{papersize=\the\paperwidth,\the\paperheight}\fi}
+
\newdimen\zw@bul@dim
\zw@bul@dim=148mm
\advance\zw@bul@dim -1in
@@ -299,8 +338,30 @@
\def\@oddfoot{\hfill \textrm{\thepage}}%
\def\@evenfoot{\textrm{\thepage}\hfill}}
+\def\ps@csbuldoi{%
+ \def\@oddhead{}\let\@evenhead\@oddhead
+ \def\@oddfoot{{\doiprefix \doi}\hfill \textrm{\thepage}}%
+ \def\@evenfoot{\textrm{\thepage}\hfill{\doiprefix \doi}}}
+
+\def\doiprefix{\footnotesize \textsc{doi:}\space}
+
+\def\ps@ODD{%
+ \def\@oddhead{}\let\@evenhead\@oddhead
+ \def\@oddfoot{\hfill \textrm{\thepage}}\let\@evenfoot\@oddfoot}
+
\pagestyle{csbul}
+\ifcsbul@nomargins
+ \oddsidemargin -1in
+ \evensidemargin -1in
+ \topmargin -1in
+ \pagestyle{empty}
+\fi
+
+% Dirty hax
+\def\ps@odd{\ps@csbul \let\@evenfoot\@oddfoot}
+\def\ps@even{\ps@csbul \let\@oddfoot\@evenfoot}
+
% ============================================ for use with minitoc
@@ -341,8 +402,9 @@
\let\pdf@title\relax
\let\signature\podpis
-\def\csbul@podepis{\ifx\p@dpis\relax \else
- \ifhmode \par \else \textwidth\lastskip \fi
+\def\csbul@podepis{\zw@nosummaryerror
+ \ifx\p@dpis\relax \else
+ \ifhmode \par \fi
\nobreak\medskip
\begin{flushright}\clubpenalty\@M \widowpenalty\@M \interlinepenalty\@M
\itshape\p@dpis
@@ -353,8 +415,20 @@
\AtEndDocument{\csbul@podepis}
+% Dirty hacking...
+\def\Podpis#1{\ifhmode \par \fi \nobreak \medskip
+ \begin{flushright}\clubpenalty\@M \widowpenalty\@M \interlinepenalty\@M
+ \itshape#1
+ \end{flushright}}
+
+\def\zw@nosummaryerror{\ClassWarningNoLine{csbulletin}{English summary is misssing!}}
+\def\zw@summaryOK{\let\zw@nosummaryerror\relax}
+
\def\titlepenalty{-100}
+% DOI removal
+\def\nodoi{\def\doi{}\let\doiprefix\doi}
+
\renewcommand\maketitle[1][\z@]{%
\vskip 3cc\vskip 0pt plus 5cc\penalty\titlepenalty
\vskip 0pt plus-5cc\vskip-\topskip
@@ -378,22 +452,72 @@
\hfill\ifautkn@wn\box\authb@x\fi
\vrule height 17pt width 0pt}}%
\nobreak\vglue 2cc plus 6dd minus 3dd \relax
- \ClanekToc
+ \thispagestyle{csbuldoi}\ClanekToc
\@afterindentfalse \@afterheading}
\def\ClanekToc{%
+ \ifx\zw@englishtitle\undefined
+ \ClassWarningNoLine{csbulletin}{English title not given, it must precede \protect\maketitle!}%
+ \let\zw@englishtitle\t@tle
+ \fi
\begingroup \let\footnote\@gobble
\ifautkn@wn
\def\PutAuthor{\protect\cl@nek{\auth@r}}
- \addcontentsline{toc}{clanek}{\protect\cl@nek{\auth@r}{\t@tle}}%
+ \addcontentsline{toc}{clanek}{\protect\cl@nek[\auth@r]{\t@tle}{\zw@englishtitle}}%
\ifx\pdf@title\relax \def\pdf@title{\protect\cl@nek{\auth@r}{\t@tle}}\fi
\else
\def\PutAuthor{}
- \addcontentsline{toc}{clanek}{\t@tle}%
+ \addcontentsline{toc}{clanek}{\protect\cl@nek{\t@tle}{\zw@englishtitle}}%
\ifx\pdf@title\relax \def\pdf@title{\t@tle}\fi
\fi
\secdef\@chapter\@schapter{\t@tle}% for minitoc
\endgroup}
+
+\newwrite\csbul@info
+\def\csbul@start@page#1{\begingroup
+ \let\@input\@gobble\@starttoc{toc}\endgroup
+ \setcounter{page}{#1}}
+
+% Default fake DOI
+\def\doi{10.5300/xxxx-x/zzz}
+
+% PDF clanek (include PDF, directory = optional argument, name without .pdf)
+
+\def\PDFclanek{\bgroup \catcode`\-12 \catcode`\_12 \csbul@PDFclanek}
+\newcommand*\csbul@PDFclanek[2][]{\egroup\clearpage
+ \ifcat$#1$
+ \def\csbul@fn{#2}
+ \immediate\write\@auxout{\string\CSBULpdf{#2}}
+ \else
+ \def\csbul@fn{#1/#2}
+ \immediate\write\@auxout{\string\CSBULpdf[#1]{#2}}
+ \fi
+ \immediate\openout\csbul@info\csbul@fn.info
+ \immediate\write\csbul@info{\noexpand\csbul@start@page{\thepage}}
+ \immediate\write\csbul@info{\noexpand\def\noexpand\doi{10.5300/\the\doisufix}}
+ \immediate\write\csbul@info{\ifcsbul@web\noexpand\csbul@webtrue\fi}
+ \immediate\write\csbul@info{\ifcsbul@color\noexpand\csbul@colortrue\fi}
+ \immediate\closeout\csbul@info
+ \addtocontents{toc}{\protect\@input{\csbul@fn.toc}}
+ \if@csbul@pdfinclude@ \csbul@PDF@clanek \fi}
+
+\def\csbul@PDF@clanek{\setcounter{section}{1}
+ \pdfximage{\csbul@fn.pdf}\edef\csbul@Npages{\the\pdflastximagepages}
+ \loop
+ \thispagestyle{empty}
+ \vbox to 0mm{\hsize \linewidth \vskip -\topmargin \vskip -\topskip \vskip -1in
+ \parindent \z@
+ \hbox to \hsize{%
+ \ifodd\c@page \hskip -\oddsidemargin \else \hskip -\evensidemargin\fi \hskip -1in
+ \includegraphics[page=\number\c@section]{\csbul@fn.pdf}\hss}\vss}\clearpage
+ \ifnum\value{section}<\csbul@Npages
+ \stepcounter{section}
+ \repeat}
+
+\newif\if@csbul@pdfinclude@
+
+\newcommand*\CSBULpdf[2][]{\global\@csbul@pdfinclude@true}
+
%
% Index
%
@@ -408,59 +532,7 @@
\def\printindex{%
\@input@{\bul@indexname.ind}%
\immediate\closeout\@indexfile}%
-%
-% Counters to reset
-%
-\def\csbul@zerocounters{%
-\setcounter{part}\z@
-\setcounter{section}\z@
-\setcounter{subsection}\z@
-\setcounter{subsubsection}\z@
-\setcounter{paragraph}\z@
-\setcounter{subparagraph}\z@
-\setcounter{equation}\z@
-\setcounter{figure}\z@
-\setcounter{table}\z@
-\setcounter{footnote}\z@
-\setcounter{mpfootnote}\z@
-\setcounter{secnumdepth}{-2}}
-
-\def\csbul@prefix{} % default for single article
-\def\csbul@redef#1 {\expandafter\let\csname csbul@#1\expandafter\endcsname\csname #1\endcsname
- \expandafter\def\csname #1\endcsname##1{\csname csbul@#1\endcsname{\csbul@prefix##1}}}
-\csbul@redef label
-\csbul@redef pageref
-\csbul@redef ref
-
-% Make the prefix
-
-\newcount\csbul@tempcnt
-
-\def\csbul@makeprefix{\global\advance\csbul@tempcnt\@ne
- \edef\csbul@prefix{CSBUL@@\number\csbul@tempcnt}}
-
-% Input
-
-\newcommand\Clanek[2][]{\csbul@makeprefix
- \begingroup
- \csbul@zerocounters
- \renewcommand\documentclass[2][CSBUL]{}%
- \renewcommand\usepackage[2][CSBUL]{}%
- \let\input\CSBULinput
- \renewenvironment{document}{\let\document\@notprerr\setmubytevalues}{\csbul@podepis}% ???
- \ifcat$#1$%
- \def\csbul@fn{#2}%
- \else
- \def\csbul@fn{#1/#2}\graphicspath{{#1/}}\def\csbul@input@path{#1/}%
- \fi
- \csbul@saved@input{\csbul@fn}
- \endgroup}
-% Input path
-
-\def\csbul@input@path{}
-\def\CSBULinput#1{\csbul@saved@input{\csbul@input@path #1}}
-\let\csbul@saved@input\input
%============================================= TUGboat -- obsah
@@ -501,3 +573,5 @@ java-scrip-to-vou java-scrip-to-v\'ych java-scrip-to-v\'ymi}
\AtBeginDocument{\pdfpageheight 210mm \pdfpagewidth 148mm \relax}
\AtBeginDocument{\edef\setmubytevalues{\noexpand\mubytein\the\mubytein
\noexpand\mubyteout\the\mubyteout \noexpand\mubytelog\the\mubytelog \relax}}
+
+\@input{\jobname.info}