summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/koma-script/doc/english/common-7.tex
blob: 4f17014ad69e0ba0397023540985595312dc31af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
% ======================================================================
% common-7.tex
% Copyright (c) Markus Kohm, 2001-2013
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX 
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in manifest.txt.
% ----------------------------------------------------------------------
% common-7.tex
% Copyright (c) Markus Kohm, 2001-2013
%
% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz,
% Version 1.3c, verteilt und/oder veraendert werden.
% Die neuste Version dieser Lizenz ist
%   http://www.latex-project.org/lppl.txt
% und Version 1.3c ist Teil aller Verteilungen von LaTeX
% Version 2005/12/01 oder spaeter und dieses Werks.
%
% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained"
% (allein durch den Autor verwaltet).
%
% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm.
% 
% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien.
% ======================================================================
%
% Paragraphs that are common for several chapters of the KOMA-Script guide
% Maintained by Markus Kohm
%
% ----------------------------------------------------------------------
%
% Absaetze, die mehreren Kapiteln der KOMA-Script-Anleitung gemeinsam sind
% Verwaltet von Markus Kohm
%
% ======================================================================

\KOMAProvidesFile{common-7.tex}
                 [$Date: 2013-12-13 12:11:01 +0100 (Fri, 13 Dec 2013) $
                  KOMA-Script guide (common paragraph: Detection of Odd and
                                     Even Pages)]
\translator{Markus Kohm\and Krickette Murabayashi}

% Date of translated German file: 2011/08/26

\makeatletter
\@ifundefined{ifCommonmaincls}{\newif\ifCommonmaincls}{}%
\@ifundefined{ifCommonscrextend}{\newif\ifCommonscrextend}{}%
\@ifundefined{ifCommonscrlttr}{\newif\ifCommonscrlttr}{}%
\@ifundefined{ifIgnoreThis}{\newif\ifIgnoreThis}{}%
\makeatother


\section{Detection of Odd and Even Pages}
\label{sec:\csname label@base\endcsname.oddOrEven}%
\ifshortversion\IgnoreThisfalse\IfNotCommon{maincls}{\IgnoreThistrue}\fi%
\ifIgnoreThis %+++++++++++++++++++++++++++++++++++++++++++++ nicht maincls +
What is described in
\autoref{sec:maincls.oddOrEven} applies, mutatis mutandis.
\else %------------------------------------------------------- nur maincls -
\BeginIndex{}{page>odd}%
\BeginIndex{}{page>even}%

In double-sided documents we distinguish left and right pages. Left pages
always have an even page number, right pages always have an odd page
number. % For this they are mostly called even and odd pages so they
        % are
Thus, they are most often referred to as even and odd pages
in this
\iffree{guide}{book}. %
\IfCommon{maincls}{This also means that the detection
  of a left or right page is same as detection of even and odd page
  numbers.

% Umbruchkorrekturtext
  \iftrue%
  There's no distinction in left and right pages in single-sided
  documents. Nevertheless there are pages with even or odd page numbers.%
  \fi}%
\IfCommon{scrlttr2}{Letters will be set single-side mostly. Nevertheless,
  printing letters with single-side layout using both paper sides or
  exceptionally generating real double-side letters it may be useful to know
  whether producing currently an even or odd page.}%

\begin{Declaration}
  \Macro{ifthispageodd}\Parameter{true part}\Parameter{false part}
\end{Declaration}%
\BeginIndex{Cmd}{ifthispageodd}%
If one wants to find out with {\KOMAScript} whether a text falls on an
even or odd page, one can use the \Macro {ifthispageodd} command. The
\PName{true part} argument is executed only if the command falls on an odd
page.  Otherwise the \PName{false part} argument is executed.

\begin{Example}
  Assume that you simply want to show whether a text will be placed onto an
  even or odd page. You may achieve that using
\begin{lstcode}[belowskip=-\baselineskip]
  This page has an \ifthispageodd{odd}{even} 
  page number.
\end{lstcode}
  which will result in the output
  \begin{quote}
    This page has an \ifthispageodd{odd}{even} page number.
  \end{quote}
\end{Example}

Because the \Macro{ifthispageodd} command uses a mechanism that is
very similar to a label and a reference to it, at least two {\LaTeX}
runs are required after every text modification. Only then the
decision is correct. In the first run a heuristic is used to make the
first choice.

At \autoref{sec:maincls-experts.addInfos},
\autopageref{desc:maincls-experts.cmd.ifthispageodd} experts may find more
information about the problems detecting left and right pages or even and odd
page number.%
%
\EndIndex{Cmd}{ifthispageodd}%
%
\EndIndex{}{page>odd}%
\EndIndex{}{page>even}
\fi %**************************************************** Ende nur maincls *


%%% Local Variables:
%%% mode: latex
%%% coding: us-ascii
%%% TeX-master: "../guide"
%%% End: