summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chess-problem-diagrams
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-05 00:43:11 +0000
committerKarl Berry <karl@freefriends.org>2012-05-05 00:43:11 +0000
commit89b1dfc56201edac22f15c19f5d07f82c73e32e1 (patch)
tree8607158a8c30722719df485e2530408d3dbc197d /Master/texmf-dist/tex/latex/chess-problem-diagrams
parent5b852adc46478e5d637ab87cc7045a9bf33a33d9 (diff)
chess-problem-diagrams (1may12)
git-svn-id: svn://tug.org/texlive/trunk@26206 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chess-problem-diagrams')
-rw-r--r--Master/texmf-dist/tex/latex/chess-problem-diagrams/diagram.sty35
1 files changed, 23 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/chess-problem-diagrams/diagram.sty b/Master/texmf-dist/tex/latex/chess-problem-diagrams/diagram.sty
index 099275c3e43..434fc40c7f6 100644
--- a/Master/texmf-dist/tex/latex/chess-problem-diagrams/diagram.sty
+++ b/Master/texmf-dist/tex/latex/chess-problem-diagrams/diagram.sty
@@ -82,6 +82,10 @@
\newcount\w@cnt
\newcount\b@cnt
\newcount\n@cnt
+\newboolean{showcity}
+\setboolean{showcity}{false}
+\newboolean{showacademictitle}
+\setboolean{showacademictitle}{true}
\newboolean{cpd@checkPieceCounts}
\newcounter{cpd@defWhitePieces}
\newcounter{cpd@defBlackPieces}
@@ -597,6 +601,10 @@
\aut@tk={#1}\auth@rtrue%
\ignorespaces%
}
+\def\ds@academictitle#1{\ifthenelse{\boolean{showacademictitle}}{#1~}{}\ignorespaces}
+\newcommand{\Dr}{\ds@academictitle{Dr.}}
+\newcommand{\Prof}{\ds@academictitle{Prof.}}
+\newcommand{\ProfDr}{\ds@academictitle{Prof.\,Dr.}}
\def\city#1{%
\city@tk={#1}\@citytrue%
\ignorespaces%
@@ -913,13 +921,15 @@
\def\p@rsecity#1; {\@show@city#1;\l@@klist}
\def\@dia@city{%
- \if@city%
- \bgroup%
- \cityfont\@notfirstfalse%
- \let\@action=\p@rsecity\@parseTokenlist\city@tk;%
- \par%
- \egroup%
- \fi%
+ \ifthenelse{\boolean{showcity}}{%
+ \if@city%
+ \bgroup%
+ \cityfont\@notfirstfalse%
+ \let\@action=\p@rsecity\@parseTokenlist\city@tk;%
+ \par%
+ \egroup%
+ \fi%
+ }{}%
}
\def\@dia@after{%
@@ -1156,6 +1166,7 @@
\help@a=\z@%
\let\@action=\parse@params\l@@klist#1\e@list%
}
+\newcommand{\solpar}{\par}
\def\@dia@solution{%
\bgroup%
\parindent\z@%
@@ -1172,12 +1183,12 @@
\let\@action=\@sol@writename%
\@parseTokenlist\aut@tk;}:%
\fi%
- \par%
+ \newline%
\fi%
}%
- \if@develop\if@judgement\the\judgement@tk\par\fi\fi%
- \the\sol@tk\par%
- \if@comment\the\comment@tk\par\fi%
+ \if@develop\if@judgement\the\judgement@tk\solpar\fi\fi%
+ \the\sol@tk\solpar%
+ \if@comment\the\comment@tk\solpar\fi%
\egroup%
}
\grid@width=0.6\p@
@@ -1935,7 +1946,7 @@
}
\def\ch@fig#1{%
\ifvmode\noindent\fi%
- \hbox{\chtextfont\lower.3\fontdimen\tw@\chtextfont\hbox{\char#1}}%
+ \hbox{\chtextfont\lower.1\fontdimen\tw@\chtextfont\hbox{\char#1}}%
}
\def\@dia@index{%
\@ifundefined{newindex}%