From 970ab76da64fc81430c87913150c65dad35e7665 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 6 Feb 2015 23:27:13 +0000 Subject: chess-problem-diagrams (6feb15) git-svn-id: svn://tug.org/texlive/trunk@36223 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/chess-problem-diagrams/diagram.dtx | 63 +++++++++++++--------- 1 file changed, 39 insertions(+), 24 deletions(-) (limited to 'Master/texmf-dist/source/latex/chess-problem-diagrams') diff --git a/Master/texmf-dist/source/latex/chess-problem-diagrams/diagram.dtx b/Master/texmf-dist/source/latex/chess-problem-diagrams/diagram.dtx index 5ed17ca94da..8b1f2ff4414 100644 --- a/Master/texmf-dist/source/latex/chess-problem-diagrams/diagram.dtx +++ b/Master/texmf-dist/source/latex/chess-problem-diagrams/diagram.dtx @@ -13,9 +13,9 @@ %% %% % \fi -% \def\fileversion{1.9} -% \def\docdate{2015/1/10} -% \CheckSum{4281} +% \def\fileversion{v1.11} +% \def\docdate{2015/1/30} +% \CheckSum{4285} % \changes{v0.1}{15 Februar 2004}{First Version} % \changes{v0.2}{23 Februar 2004}{Added the documentation for the % {\itshape information collecting} macros which may be used @@ -65,6 +65,10 @@ % \changes{v1.8.0}{27 November 2013}{Implemented issue '03f/f2a': Added code to display a legend around the board, controlled by the boolean 'legend'.} % \changes{v1.8.1}{17 August 2014}{Implemented issue '03f/83c': changed tex boolean solafterdiagram to latex boolean.} % \changes{v1.9}{10 Januar 2015}{Implemented issue '03f/932': Renamed boardfont to cpd@boardfont due to a naming collision with another chess package. Changed all font definitions to newcommand instead of def.} +% \changes{v1.10}{26 January 2015}{Fixed issue: 03f/658:om: diagram.sty: +% evaluation of options 11pt and 12pt does not work.} +% \changes{v1.11}{30 January 2015}{Fixed issue 03f/e20:om: diagram.sty: +% piecedefs should be written after twins and before remarks.} % % \DoNotIndex{\@arabic,\def,\@idxitem,\@ifnextchar,\@ifstar, % \@ne,\@ptsize,\ ,\advance,\AtEndOfPackage,\begin,\begingroup, @@ -963,12 +967,28 @@ % Specifies the preamble of our style file. % \begin{macrocode} %<*style> -\ProvidesPackage{diagram}[2015/01/10] -\DeclareOption{10pt}{\AtBeginDocument{}} -\DeclareOption{11pt}{\AtBeginDocument{\renewcommand{\DefaultDiagramSize}{\diagramxi}}} -\DeclareOption{12pt}{\AtBeginDocument{\renewcommand{\DefaultDiagramSize}{\diagramxii}}} +\ProvidesPackage{diagram}[2015/01/30] +% \end{macrocode} +% +% \begin{macro}{\DefaultDiagramSize} +% The \verb+\DefaultDiagramSize+ may be used in code to switch to the +% default diagram size. As this depends on the documents default font +% size we use the same option and execute \textit{10pt} as default. +% \begin{macrocode} +\newcommand*{\DefaultDiagramSize}{} +\DeclareOption{10pt}{\renewcommand*{\DefaultDiagramSize}{\diagramx}} +\DeclareOption{11pt}{\renewcommand*{\DefaultDiagramSize}{\diagramxi}} +\DeclareOption{12pt}{\renewcommand*{\DefaultDiagramSize}{\diagramxii}} \ExecuteOptions{10pt} +% \end{macrocode} +% \end{macro} + +% \begin{macrocode} \ProcessOptions +\AtBeginDocument{\DefaultDiagramSize} +% \end{macrocode} +% +% \begin{macrocode} \RequirePackage{ifthen} \RequirePackage{calc} \RequirePackage{pstricks} @@ -1605,15 +1625,6 @@ % \end{macro} % \end{macro} % -% To switch to the default diagram size we have the following command. This -% macro is executed in \verb+\begin{document}+ and is redefined when using -% document options \verb+11pt+ or \verb+12pt+. -% \begin{macro}{\DefaultDiagramSize} -% \begin{macrocode} -\newcommand{\DefaultDiagramSize}{\diagramx} -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\defaultelchfont} % |\defaultelchfont| is used to define the fontsize used to % typeset the diagrams depending on the documentsize. @@ -2091,6 +2102,7 @@ \ifx@twins\else% \@dia@twins% \fi% + \@dia@piecedefs% \@dia@remark% \ifthenelse{\boolean{@solafterdiagram}}{% \below@newline% @@ -2360,6 +2372,17 @@ \l@@klist% } +\def\@dia@piecedefs{% + \if@piecedefs% + \bgroup% + \@lefttrue% + \let\below@newline\newline% + \remfont\let\@action=\write@piecedefs% + \@parseTokenlist\piecedefs@tk;% + \egroup% + \fi% +} + \def\@dia@remark{% \if@remark% \bgroup% @@ -2369,14 +2392,6 @@ \egroup% \let\below@newline\newline% \fi% - \if@piecedefs% - \bgroup% - \@lefttrue% - \let\below@newline\newline% - \remfont\let\@action=\write@piecedefs% - \@parseTokenlist\piecedefs@tk;% - \egroup% - \fi% } \def\parse@params#1{% -- cgit v1.2.3