texlive[64742] Master/texmf-dist: ifoddpage (17oct22)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 18 22:54:09 CEST 2022


Revision: 64742
          http://tug.org/svn/texlive?view=revision&revision=64742
Author:   karl
Date:     2022-10-18 22:54:09 +0200 (Tue, 18 Oct 2022)
Log Message:
-----------
ifoddpage (17oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/ifoddpage/ifoddpage.pdf
    trunk/Master/texmf-dist/source/latex/ifoddpage/ifoddpage.dtx
    trunk/Master/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/ifoddpage/DEPENDS.txt
    trunk/Master/texmf-dist/doc/latex/ifoddpage/README.txt

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/ifoddpage/README

Added: trunk/Master/texmf-dist/doc/latex/ifoddpage/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ifoddpage/DEPENDS.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/ifoddpage/DEPENDS.txt	2022-10-18 20:54:09 UTC (rev 64742)
@@ -0,0 +1 @@
+soft ydoc  # for compiling the package documentation only


Property changes on: trunk/Master/texmf-dist/doc/latex/ifoddpage/DEPENDS.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/ifoddpage/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ifoddpage/README	2022-10-18 20:52:44 UTC (rev 64741)
+++ trunk/Master/texmf-dist/doc/latex/ifoddpage/README	2022-10-18 20:54:09 UTC (rev 64742)
@@ -1,18 +0,0 @@
-LaTeX package 'ifoddpage'
-~~~~~~~~~~~~~~~~~~~~~~~~
-Copyright (c) 2011 by Martin Scharrer <martin at scharrer-online.de>
-WWW: http://latex.scharrer-online.de/
-CTAN: http://www.ctan.org/pkg/ifoddpage
-Code repository: https://bitbucket.org/martin_scharrer/ifoddpage
-
-This LaTeX package provides a \ifoddpage conditional to determine if the current page is odd or even.
-The macro \checkoddpage must be used direct before to check the page number using a label.
-Two compiler runs are therefore required to achieve correct results.
-In addition the conditional \ifoddpageoronside is provided which is also true in oneside mode where 
-all pages use the odd page layout.
-
-This package got inspired from the 'changepage' package which provides (and uses) the same macros (\checkoddpage and
-\ifoddpage) for its main function of changing the page design mid-way in the document.  Both packages can be used
-together, but the 'ifoddpage' should be loaded last in this case, otherwise the \ifoddpageoroneside conditional will
-stop working.
-

Added: trunk/Master/texmf-dist/doc/latex/ifoddpage/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ifoddpage/README.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/ifoddpage/README.txt	2022-10-18 20:54:09 UTC (rev 64742)
@@ -0,0 +1,18 @@
+LaTeX package 'ifoddpage'
+~~~~~~~~~~~~~~~~~~~~~~~~~
+Copyright (c) 2011-2022 by Martin Scharrer <martin.scharrer at web.de>  
+License: LaTeX Project Public License, v1.3 or later: http://www.latex-project.org/lppl.txt  
+Repository: https://github.com/MartinScharrer/ifoddpage  
+Issues: https://github.com/MartinScharrer/ifoddpage/issues  
+
+This LaTeX package provides a \ifoddpage conditional to determine if the current page is odd or even.
+The macro \checkoddpage must be used direct before to check the page number using a label.
+Two compiler runs are therefore required to achieve correct results.
+In addition the conditional \ifoddpageoronside is provided which is also true in oneside mode where 
+all pages use the odd page layout.
+
+This package got inspired from the 'changepage' package which provides (and uses) the same macros (\checkoddpage and
+\ifoddpage) for its main function of changing the page design mid-way in the document.  Both packages can be used
+together, but the 'ifoddpage' should be loaded last in this case, otherwise the \ifoddpageoroneside conditional will
+stop working.
+


Property changes on: trunk/Master/texmf-dist/doc/latex/ifoddpage/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/ifoddpage/ifoddpage.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/ifoddpage/ifoddpage.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/ifoddpage/ifoddpage.dtx	2022-10-18 20:52:44 UTC (rev 64741)
+++ trunk/Master/texmf-dist/source/latex/ifoddpage/ifoddpage.dtx	2022-10-18 20:54:09 UTC (rev 64742)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 %<=*COPYRIGHT>
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin at scharrer-online.de>
-%% ----------------------------------------------------------------------
+%% Copyright (c) 2011-2022 by Martin Scharrer <martin.scharrer at web.de>
+%% -------------------------------------------------------------------
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
 %% of this license or (at your option) any later version.
@@ -24,10 +24,10 @@
 %<*driver>
 \ProvidesFile{ifoddpage.dtx}[%
 %<=*DATE>
-    2016/04/23
+    2022/10/18
 %<=/DATE>
 %<=*VERSION>
-    v1.1
+    v1.2
 %<=/VERSION>
     DTX file for ifoddpage package]
 \documentclass{ydoc}
@@ -65,6 +65,7 @@
 %
 % \changes{v1.0}{2011/09/13}{First version.}
 % \changes{v1.1}{2016/04/23}{Fixed misspelled macro name.}
+% \changes{v1.2}{2022/10/18}{Updated documentation.}
 %
 %
 % \DoNotIndex{\newcommand,\newenvironment}
@@ -71,8 +72,8 @@
 %
 % \GetFileInfo{ifoddpage.dtx}
 % \author{Martin Scharrer}
-% \email{martin at scharrer.me}
-% \repository{https://bitbucket.org/martin_scharrer/ifoddpage}
+% \email{martin.scharrer at web.de}
+% \repository{https://github.com/MartinScharrer/ifoddpage}
 % \maketitle
 %
 % \section{Introduction}
@@ -178,20 +179,36 @@
     Conditionals for odd/even page detection]
 %    \end{macrocode}
 %
-%
+% \begin{macro}{\c at checkoddpage}
+% Counter |checkoddpage| is needed to give each use of \Macro\checkoddpage an unique ID for
 %    \begin{macrocode}
 \newcount\c at checkoddpage
 %    \end{macrocode}
+% \end{macro}
 %
 % \begin{macro}{\thecheckoddpage}
+% Expands to the value of |checkoddpage|, i.e. ID of last used \Macro\checkoddpage.
 %    \begin{macrocode}
 \def\thecheckoddpage{\number\c at checkoddpage}
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\ifoddpage}
+% Conditional: true if used on odd page after \Macro\checkoddpage.
 %    \begin{macrocode}
 \newif\ifoddpage
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifoddpageoroneside}
+% Conditional: true if used on odd page after \Macro\checkoddpage.
+% Always true if used in a |oneside| document.
+%    \begin{macrocode}
 \newif\ifoddpageoroneside
+%    \end{macrocode}
+% \end{macro}
+%
+%    \begin{macrocode}
 \let\oddpage at checkpage\relax
 %    \end{macrocode}
 %
@@ -203,6 +220,8 @@
 %
 %
 % \begin{macro}{\oddpage at label}
+% Produces a LaTeX label using the |checkoddpage| counter.
+% An internal LaTeX macro is used for this.
 %    \begin{macrocode}
 \def\oddpage at label{%
     \@newl at bel{checkoddpage}%
@@ -213,6 +232,8 @@
 %
 %
 % \begin{macro}{\oddpage at checkpage}
+% Writes the oddpage label with the current page number to the AUX file,
+% so it can be read back during the following \LaTeX{} runs.
 %    \begin{macrocode}
 \def\oddpage at checkpage#1{%
     \@bsphack
@@ -224,6 +245,9 @@
 %
 %
 % \begin{macro}{\oddpage at page}
+% Returns the page number of the last \Macro\checkoddpage macro.
+% If there is no label for it defined in the AUX file, e.g.\ first compile run,
+% then the current page number is used instead as a fallback.
 %    \begin{macrocode}
 \def\oddpage at page{%
     \expandafter\ifx\csname checkoddpage@\thecheckoddpage\endcsname\relax
@@ -237,6 +261,13 @@
 %
 %
 % \begin{macro}{\checkoddpage}
+% User macro to check if the current page has an odd page number.
+% Increases |checkoddpage| counter to produce an unique ID for this macro usage.
+% Calls \Macro\oddpage at checkpage to produce a reference entry in the AUX file.
+% Then checks if the \Macro\oddpage at page is odd and sets
+% \Macro{ifoddpage} and \Macro{ifoddpageoroneside} accordantly.
+% Finally checks if the |twoside| setting is active and set \Macro{ifoddpageoroneside}
+% to |true| if so.
 %    \begin{macrocode}
 \DeclareRobustCommand\checkoddpage{%
     \stepcounter{checkoddpage}%
@@ -257,6 +288,7 @@
 %
 %
 % \begin{macro}{\@ifoddpage}
+% Wrapper around \Macro{ifoddpage}. Will expand to the next token if odd, to the second token if not.
 %    \begin{macrocode}
 \def\@ifoddpage{%
     \ifoddpage
@@ -270,6 +302,7 @@
 %
 %
 % \begin{macro}{\@ifoddpageoroneside}
+% Wrapper around \Macro{ifoddpageoroneside}. Will expand to the next token if odd, to the second token if not.
 %    \begin{macrocode}
 \def\@ifoddpageoroneside{%
     \iftwosideoddside

Modified: trunk/Master/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty	2022-10-18 20:52:44 UTC (rev 64741)
+++ trunk/Master/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty	2022-10-18 20:54:09 UTC (rev 64742)
@@ -1,5 +1,5 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin at scharrer-online.de>
-%% ----------------------------------------------------------------------
+%% Copyright (c) 2011-2022 by Martin Scharrer <martin.scharrer at web.de>
+%% -------------------------------------------------------------------
 %% This work may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3
 %% of this license or (at your option) any later version.
@@ -17,8 +17,8 @@
 %%
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{ifoddpage}[%
-    2016/04/23
-    v1.1
+    2022/10/18
+    v1.2
     Conditionals for odd/even page detection]
 \newcount\c at checkoddpage
 \def\thecheckoddpage{\number\c at checkoddpage}



More information about the tex-live-commits mailing list.