diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/cnltx/cnltx-tools.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/cnltx/cnltx-tools.sty | 129 |
1 files changed, 74 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/cnltx/cnltx-tools.sty b/Master/texmf-dist/tex/latex/cnltx/cnltx-tools.sty index 5b3ee29a4c9..3b53ee0ec44 100644 --- a/Master/texmf-dist/tex/latex/cnltx/cnltx-tools.sty +++ b/Master/texmf-dist/tex/latex/cnltx/cnltx-tools.sty @@ -8,7 +8,7 @@ % Web: https://github.com/cgnieder/cnltx/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- -% Copyright 2013-2014 Clemens Niederberger +% Copyright 2013-2015 Clemens Niederberger % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -34,45 +34,72 @@ \cnltx@create@bundle@message{tools}{WarningNoLine} \cnltx@create@bundle@message{tools}{Info} -% -------------------------------------------------------------------------- -\newcommand*\cnltx@name@first[1]{#1} -\newcommand*\cnltx@name@last[1]{\textsc{#1}} -\newcommand*\cnltx@name@base[1]{#1} - -\pgfkeys{ - cnltx/.cd, - last-name-format/.code = \def\cnltx@name@last##1{#1} , - first-name-format/.code = \def\cnltx@name@first##1{#1} , - name-format/.code = \def\cnltx@name@base##1{#1} -} +\cnltx@load@module{translations} -\newcommand*\cnltx@name@idx[1]{\index{#1@#1}} -\newrobustcmd*\cnltx@name@star[2][]{% - \ifblank{#1} - {\cnltx@name@base{\cnltx@name@last{#2}}} - {\cnltx@name@base{\cnltx@name@first{#1} \cnltx@name@last{#2}}}% -} -\newrobustcmd*\cnltx@name@nostar[2][]{% - \ifblank{#1} - {\cnltx@name@base{\cnltx@name@last{#2}}\cnltx@name@idx{#2}} - {% - \cnltx@name@base{\cnltx@name@first{#1} \cnltx@name@last{#2}}% - \cnltx@name@idx{#2, #1}% - }% -} -\def\cnltx@name{\@ifstar{\cnltx@name@star}{\cnltx@name@nostar}} - -\newrobustcmd*\cnltx@newname[3]{% - \csdef{\cnltx@stripbs#1@short}{\cnltx@name@base{#3}\cnltx@name@idx{#3, #2}}% - \csdef{\cnltx@stripbs#1@long}{\cnltx@name@base{#2 #3}\cnltx@name@idx{#3, #2}}% - \newrobustcmd*#1{% - \@ifstar - {\csuse{\cnltx@stripbs#1@short}} - {\csuse{\cnltx@stripbs#1@long}}% - }% -} +% -------------------------------------------------------------------------- +% \newcommand*\cnltx@name@first[1]{#1} +% \newcommand*\cnltx@name@last[1]{\textsc{#1}} +% \newcommand*\cnltx@name@base[1]{#1} + +% \pgfkeys{ +% cnltx/.cd, +% last-name-format/.code = \def\cnltx@name@last##1{#1} , +% first-name-format/.code = \def\cnltx@name@first##1{#1} , +% name-format/.code = \def\cnltx@name@base##1{#1} +% } + +% \newcommand*\cnltx@name@idx[2]{\index{#1@#2}} +% \newrobustcmd*\cnltx@name@star[2]{% +% \ifblank{#1} +% {\cnltx@name@base{\cnltx@name@last{#2}}} +% {\cnltx@name@base{\cnltx@name@first{#1} \cnltx@name@last{#2}}}% +% } +% \newrobustcmd*\cnltx@name@nostar[2]{% +% \ifblank{#1} +% {% +% \cnltx@name@base{\cnltx@name@last{#2}}% +% \cnltx@name@idx{#2}{\cnltx@name@base{\cnltx@name@last{#2}}}% +% } +% {% +% \cnltx@name@base{\cnltx@name@first{#1} \cnltx@name@last{#2}}% +% \cnltx@name@idx{#2, #1}{% +% \cnltx@name@base{\cnltx@name@last{#2}}, +% \cnltx@name@base{\cnltx@name@first{#1}}% +% }% +% }% +% } +% \newrobustcmd*\cnltx@name{\@ifstar{\cnltx@name@star}{\cnltx@name@nostar}} + +% \newrobustcmd*\cnltx@newname[3]{% +% \csdef{\cnltx@stripbs#1@short}{% +% \cnltx@name@base{\cnltx@name@last{#3}}% +% \cnltx@name@idx{#3, #2}{% +% \cnltx@name@base{\cnltx@name@last{#3}, \cnltx@name@first{#2}}% +% }% +% }% +% \csdef{\cnltx@stripbs#1@long}{% +% \cnltx@name@base{\cnltx@name@first{#2} \cnltx@name@last{#3}}% +% \cnltx@name@idx{#3, #2}{% +% \cnltx@name@base{\cnltx@name@last{#3}}, +% \cnltx@name@base{\cnltx@name@first{#2}}% +% }% +% }% +% \newrobustcmd*#1{% +% \@ifstar +% {\csuse{\cnltx@stripbs#1@short}} +% {\csuse{\cnltx@stripbs#1@long}}% +% }% +% } + +% \newrobustcmd*\newname{\cnltx@newname} + +% \newrobustcmd*\name{% +% \@ifstar +% {\@testopt{\cnltx@name@user*}{}} +% {\@testopt{\cnltx@name@user{}}{}}% +% } +% \def\cnltx@name@user#1[#2]#3{\cnltx@name#1{#2}{#3}} -\newrobustcmd*\newname{\cnltx@newname} % -------------------------------------------------------------------------- \PassOptionsToPackage{space=true}{accsupp} @@ -91,7 +118,10 @@ \AtBeginDocument{% \@ifpackageloaded{hyperref} {} - {\providecommand\texorpdfstring[2]{#1}}% + {% + \providecommand\nohyperpage[1]{#1}% + \providecommand\texorpdfstring[2]{#1}% + }% } \def\cnltx@acronym@format{\scshape} @@ -173,26 +203,11 @@ \newcommand*\cnltxlatin[1]{\textit{#1}} -\DeclareTranslationFallback{cnltx-i.e.}{\cnltxlatin{i.\,e}} -\DeclareTranslation{English}{cnltx-i.e.}{\cnltxlatin{i.\,e}} -\DeclareTranslation{German}{cnltx-i.e.}{d.\,h} - -\DeclareTranslationFallback{cnltx-e.g.}{\cnltxlatin{e.\,g}} -\DeclareTranslation{English}{cnltx-e.g.}{\cnltxlatin{e.\,g}} -\DeclareTranslation{German}{cnltx-e.g.}{z.\,B} - -\DeclareTranslationFallback{cnltx-cf.}{\cnltxlatin{cf}} -\DeclareTranslation{English}{cnltx-cf.}{\cnltxlatin{cf}} -\DeclareTranslation{German}{cnltx-cf.}{vgl} - -\DeclareTranslationFallback{cnltx-etc.}{\cnltxlatin{etc}} -\DeclareTranslation{English}{cnltx-etc.}{\cnltxlatin{etc}} -\DeclareTranslation{German}{cnltx-etc.}{etc} - \newabbr\ie{\GetTranslation{cnltx-i.e.}} \newabbr\eg{\GetTranslation{cnltx-e.g.}} \newabbr\cf{\GetTranslation{cnltx-cf.}} \newabbr\etc{\GetTranslation{cnltx-etc.}} +\newabbr\vs{\GetTranslation{cnltx-vs.}} \newabbr\zB{z.\,B} \newabbr\ZB{Z.\,B} @@ -219,4 +234,8 @@ HISTORY: 2013/09/10 v0.2 - first published version 2013/09/30 v0.7 - added abbreviations 2013/11/22 v0.9 - \bzw +2014/03/11 v0.11 - bug fixes in the \newname definitions + - new command \name + - use \cnltx@load@module +2014/??/?? v0.?? - \vs |