Debian Codegraph @

texmf-dist/doc/latex/jumplines/jumplines_doc.tex

raw
1 %% Documentation for jumplines.sty
2 %%
3 %%
4 %%
5 %% -------------------------------------------------------------------------------------------
6 %% Copyright (c) 2015 by Dr. Christian Hupfer <christian dot hupfer at yahoo dot de>
7 %% -------------------------------------------------------------------------------------------
8 %%
9 %% This work may be distributed and/or modified under the
10 %% conditions of the LaTeX Project Public License, either version 1.3
11 %% of this license or (at your option) any later version.
12 %% The latest version of this license is in
13 %% http://www.latex-project.org/lppl.txt
14 %% and version 1.3 or later is part of all distributions of LaTeX
15 %% version 2005/12/01 or later.
16 %%
17 %% This work has the LPPL maintenance status `maintained'.
18 %%
19 %% This work consists of all files listed in README
20 %%
21
22 \documentclass[12pt,english]{ltxdoc}
23 \usepackage{scrlayer-scrpage}
24 \usepackage[lmargin=3cm,rmargin=3cm,a4paper]{geometry}
25 \usepackage{savesym}%
26 \usepackage{bbding}%
27 \savesymbol{Cross}%
28
29 \usepackage{blindtext}%
30 \usepackage{enumitem}%
31 \usepackage{datetime}%
32 \usepackage{imakeidx}%
33 \usepackage[babel,style=english]{csquotes}
34 \newcommand{\myquotes}[1]{\enquote{#1}}%
35
36 \usepackage{array}%
37
38 \usepackage[languages={spanish,french,ngerman,english}]{jumplines}
39
40 \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
41
42 \tcbuselibrary{documentation}
43 \tcbset{color command={blue}}
44
45
46 \newcommand{\tcolorboxdoclink}{http://mirrors.ctan.org/macros/latex/contrib/tcolorbox/tcolorbox.pdf}
47 \newcommand{\packagename}[1]{\fbox{\textcolor{blue}{\textbf{\ding{41}~#1}}}\index{Package!#1}}%
48 \newcommand{\classname}[1]{\fbox{\textcolor{brown}{\textbf{\Writinghand~#1}}}\index{Class!#1}}%
49
50 \newcommand{\handrightnote}{\tcbdocmarginnote{\ding{43}}}
51
52 \newtcolorbox{docCommandArgs}[1]{colbacktitle={blue},coltitle={white},title={Description of arguments of command \cs{#1}}}
53
54
55 \def\packageversion{0.2}%
56
57 \makeindex
58
59 \newcommand{\PackageDocName}{jumplines.sty}%
60
61
62 \hypersetup{breaklinks=true}
63
64 \begin{document}
65 \selectlanguage{english}
66 \mmddyyyydate
67
68
69 \setlength{\parindent}{0pt}
70
71 \thispagestyle{empty}%
72
73 \begin{center}
74 \begin{tcolorbox}[boxrule=1mm,arc=4mm,colback=yellow!30!white,width=0.8\textwidth]
75 \large \bfseries%
76 \begin{center}%
77 \begin{tabular}{C{0.7\textwidth}}%
78 \textsc{\PackageDocName} \tabularnewline
79 \tabularnewline
80 Providing teaser headline articles continued later on \tabularnewline
81 \tabularnewline
82 Version \packageversion \tabularnewline
83 \tabularnewline
84 \today \tabularnewline
85 \tabularnewline
86 \addtocounter{footnote}{2}
87 Author: Christian Hupfer\(^\mathrm{\fnsymbol{footnote}}\)% }{\makeatletter [email protected]}
88 \tabularnewline
89 \end{tabular}
90 \end{center}
91 \end{tcolorbox}
92 \makeatletter
93 \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
94 \footnotetext{[email protected]}%
95 \makeatother
96 \end{center}
97
98 \clearpage
99 \tableofcontents
100
101
102
103
104 \pagestyle{scrheadings}%
105 \setheadsepline{2pt}[\color{blue}]
106
107 \setcounter{footnote}{0}
108
109
110 \section{Introduction}
111
112 The aim of this package is to provide support for writing teaser articles which are common in newspapers, starting for example on the frontpage and are continued on another page, with some reference on which page this continuation happens.
113
114 \JumplineArticle[ArticleHeadline={Something to know},TeaserHeight=0.5in]{%
115 This is the first teaser, which is broken after some dummy text,\textcolor{blue}{\blindtext}\textcolor{red}{\blindtext}}%
116
117 \JumplineArticle[TeaserHeight=1.5in,ArticleHeadline={And another useless article}]{%
118 This is the second teaser headline, which is broken after some dummy text also\blindtext[1]}%
119
120 \ShipoutArticleTeasers%
121
122
123
124 \ShipoutArticleHangingArticles%
125
126
127 \section{Package options}%
128
129 As of version \packageversion~ the package has only the \oarg{languages} option so far. It is used to set the language of the articles. See section \ref{sec::language_support} for more information about the support for foreign languages.
130
131
132
133 \section{Requirements and incompatibilities}%
134
135 \subsection{Required packages}
136
137 \begin{itemize}
138 \item \packagename{etoolbox}%
139 \item \packagename{xkeyval}%
140 \item \packagename{xparse}%
141 \item \packagename{tcolorbox}%
142 \item \packagename{luacolor}%
143 \item \packagename{hyperref}%
144 \end{itemize}
145
146 Additionally, the features of \packagename{bookmark} package are used for more convenient bookmark generation if this package is loaded, otherwise it is restricted to the bookmarking capatibilities of \packagename{hyperref}.
147
148 \subsection{Incompatibilities}
149
150 This package does \textbf{not} work with floating contents \textbf{inside} of the articles, however, floats outside of such articles are possible. Although it's possible to use \packagename{wrapfig} and its \docAuxEnvironment{wrapfigure} environment, it's advisable to adapt the teaser box height manually since the wrapping works but is continued later on too.
151
152 \section{Documentation of Macros}
153 \begin{docCommand}{JumplineArticle}{\oarg{options}\marg{article content}}
154
155 This provides the main command for typesetting a jumpline article. All of the article content is specified in the (2nd) mandatory argument.
156
157 \begin{docCommandArgs}{JumplineArticle}%
158
159 \begin{enumerate}[label={\textcolor{blue}{\#\arabic*}}]
160 \item \oarg{options}:
161
162 \begin{docKey}{TeaserHeight}{=\meta{length value}}{2in}
163 Sets the cut off value for the height of the teaser -- this is not the height of the shown teaser itself, since this involves the teaser header box and some vertical spacings above and below the heading and the teaser content.
164
165 If the height of the article is smaller than the \refKey{TeaserHeight} value the full article is displayed then and not broken into two pieces.
166 \end{docKey}
167
168 \begin{docKey}{ArticleHeadline}{=\meta{arbitray text}}{no value}
169 This sets an article headline after the article number. Should be enclosed in a \brackets{}-pair
170 \end{docKey}
171
172 \begin{docKey}{TeaserHeaderOptions}{=\meta{options for the teaser header}}{breakable,leftlower=0pt,rightlower=0pt,boxrule=0pt,left=0pt,right=0pt, arc=0pt,auto outer arc,colbacktitle=black,coltitle=white,toptitle=2mm,bottomtitle=2mm}
173 This sets additional options for the display of the teaser header. All options are directly passed to the underlying \cs{tcolorbox}, see the \href{\tcolorboxdoclink}{\packagename{tcolorbox}} documentation on those options.
174 \end{docKey}
175
176 \begin{docKey}{ContinuedArticleHeaderOptions}{=\meta{options for the continued article header}}{breakable,leftlower=0pt,rightlower=0pt,boxrule=0pt,left=0pt,right=0pt, arc=0pt,auto outer arc,colbacktitle=black,coltitle=white,toptitle=2mm,bottomtitle=2mm}
177 This sets additional options for the display of the continued article header. All options are directly passed to the underlying \cs{tcolorbox}, see the \packagename{tcolorbox} documentation for this. This option has the same meaning to the continued article as \refKey{TeaserHeaderOptions} to the teaser of the same article.
178 \end{docKey}
179
180 \begin{docKey}{ContinuedOnTopskip}{=\meta{length}}
181 This key value holds the vertical spacing between the splitted teaser and the line \textit{Continued on}.
182 \end{docKey}
183
184 \begin{docKey}{ContinuedOnBottomskip}{=\meta{length}}
185 This key value holds the vertical spacing between the line \textit{Continued on} and the next possible teaser header.
186 \end{docKey}
187
188
189 \begin{docKey}{ArticleAuthor}{=\meta{}}{initially unset}
190 This sets a (list of) the author name(s) -- it will be displayed at the bottom of the teaser only, introduced by \myquotes{\textit{By}}.
191 \end{docKey}
192
193
194 \item \marg{article content}
195 This contains arbitrary content, as long no floating objects are involved.
196 \end{enumerate}
197 \end{docCommandArgs}
198
199 \end{docCommand}%
200
201
202 \begin{docCommand}{ShipoutArticleTeasers}{}
203 This places all teasers consecutively without interruption. If this is placed after \refCom{ShipoutArticleHangingArticles}, the teasers are placed after the lower parts of the articles however.
204 \end{docCommand}
205
206 \begin{docCommand}{ShipoutArticleHangingArticles}{}
207 This places all continued articles consecutively without interruption from this position. This macro should be placed \textbf{after} \refCom{ShipoutArticleHangingArticles}.
208 \end{docCommand}
209
210
211 \begin{docCommand}{listofarticle}{}
212 This introduces a table of the articles with reference to starting page of the teaser.
213 \end{docCommand}
214
215 \begin{docCommand}{listofcontarticle}{}
216 This introduces a table of the continued articles with reference to starting page of the continued article.
217 \end{docCommand}
218
219 \begin{docCommand}{listofarticlesname}{}
220 This command holds the name which is displayed as heading of the list of articles. Default value: \textbf{\listofarticlesname}
221 \end{docCommand}
222
223 \begin{docCommand}{listofcontinuedarticlesname}{}
224 This command holds the name which is displayed as heading of the list of continued articles. Default value: \textbf{\listofcontinuedarticlesname}
225 \end{docCommand}
226
227 \subsection{Counters}
228
229 The internal counter \docCounter{article} is used internal for counting issues of the articles -- it can't be changed as of version \packageversion.
230
231
232 \clearpage
233
234 \section{Language support}\label{sec::language_support}
235
236 The package uses \packagename{babel} in order to provide support for foreign languages. Default language is English, as of version \packageversion~ ngerman (New German) is the only other language which is used inside the package and command translations are given.
237
238
239
240
241
242
243 \section{To-Do list}
244
245 \begin{itemize}
246 \item More options for fine control of the behaviour of teasers and continued articles
247 \item Better height management of the articles/placement on pages
248 \item Better option handling
249 \item Improve support for languages other than English or German
250 \item Bookmarks
251 \item Better behaviour in multicol-environment
252 \item Improve documentation
253
254 \end{itemize}
255
256 If you
257
258 \begin{itemize}
259 \item find bugs
260 \item errors in the documentation
261 \item have suggestions
262 \item have feature requests
263 \item want provide or improve translations of the language specific items
264 \end{itemize}
265
266 don't hesitate and contact me via \makeatletter [email protected]\makeatother
267
268 \clearpage
269
270 \section{Acknowledgments}
271
272 I would like to express my gratitudes to the developpers of fine \LaTeX{} packages and of course
273 to the users at tex.stackexchange.com, especially to
274
275 \begin{itemize}
276 \item Enrico Gregorio
277 \item Joseph Wright
278 \item David Carlisle
279 \item Paulo Roberto Massa Cereda
280 \item Werner Doe ;-)
281 \end{itemize}
282
283 for their invaluable help on many questions on macros.
284
285 \vspace{2\baselineskip}
286 A special gratitude goes to Prof. Dr. Dr. Thomas Sturm for providing the wonderful \packagename{tcolorbox} package which was used to
287 write this documentation.
288
289 \clearpage
290
291
292 \clearpage
293
294 %%%% Index of commands
295
296 \printindex
297
298 \end{document}