diff options
author | Karl Berry <karl@freefriends.org> | 2015-01-11 22:25:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-01-11 22:25:35 +0000 |
commit | ffd0a5d337e9ff3c89109f208771ec70f599ebef (patch) | |
tree | 1dfea0d60d89adbe1b9489c034939d9112ba8cb0 /Master/texmf-dist/tex/latex/cnltx/cnltx-doc.cls | |
parent | ffc578485f0573fbef95749a3b239380be42da87 (diff) |
cnltx (11jan15)
git-svn-id: svn://tug.org/texlive/trunk@36025 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cnltx/cnltx-doc.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/cnltx/cnltx-doc.cls | 202 |
1 files changed, 80 insertions, 122 deletions
diff --git a/Master/texmf-dist/tex/latex/cnltx/cnltx-doc.cls b/Master/texmf-dist/tex/latex/cnltx/cnltx-doc.cls index 24ec5d1cada..0044576bab8 100644 --- a/Master/texmf-dist/tex/latex/cnltx/cnltx-doc.cls +++ b/Master/texmf-dist/tex/latex/cnltx/cnltx-doc.cls @@ -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 @@ -94,7 +94,7 @@ } -\RequirePackage{cnltx-tools,cnltx-example,cnltx-listings,translations} +\cnltx@load@modules{tools,names,example,listings,translations} \newcommand*\cnltx@caption@font{\normalfont\small\sffamily} \newcommand*\cnltx@captionlabel@font{\cnltx@caption@font\scshape} @@ -113,6 +113,9 @@ {\RequirePackage[T1]{fontenc}} {\RequirePackage{fontspec}} \RequirePackage[oldstyle]{libertine} + \ifboolexpr{not bool{xetex} and not bool{luatex}} + {} + {} \RequirePackage{libertinehologopatch} \RequirePackage[supstfm=libertinesups]{superiors} % libertine does not have superior letters: @@ -178,7 +181,7 @@ \setmonofont[ Scale = MatchLowercase , Ligatures = {NoCommon,NoRequired,NoContextual} - ]{Bitstream Vera Sans Mono} + ]{DejaVu Sans Mono} } \recalctypearea } @@ -199,13 +202,12 @@ \setkomafont{captionlabel}{\cnltx@captionlabel@font} }{} -\ifbool{cnltx@add@index}{ +\ifbool{cnltx@add@bib}{ \RequirePackage[ backend=biber, style=cnltx, - sortlocale=en_EN, - indexing=cite, - useprefix]{biblatex} + sortlocale=en_US, + indexing=cite]{biblatex} \addbibresource{cnltx.bib} \AtEndDocument{\printbibliography} }{} @@ -319,16 +321,16 @@ } \def\cnltx@write@author@email#1][\q@stop{% \ifblank{#1}{} - {\footnote{\href{mailto:#1}{#1}}}% + {\footnote{\email{#1}}}% } \protected\def\cnltx@get@first@and@second@name#1 #2\q@stop{% \ifblank{#2} {% - \cnltx@name[]{#1}% + \name*{#1}% \listgadd\cnltx@package@author@pdflist{#1}% } {% - \cnltx@name[#1]{\trim@spaces{#2}}% + \name*{#1 #2}% \listgadd\cnltx@package@author@pdflist{#1 \trim@spaces{#2}}% }% } @@ -596,6 +598,8 @@ \newrobustcmd*\expandable{\cnltx@expandable@ornot\cnltx@expandable} \newrobustcmd*\unexpandable{\cnltx@expandable@ornot\cnltx@unexpandable} +\newrobustcmd*\expandablesymbol{\textcolor{expandable}{\expandablesign}} +\newrobustcmd*\unexpandablesymbol{\textcolor{unexpandable}{\expandablesign}} \newrobustcmd*\cnltx@expandable@ornot[1]{% \let\cnltx@item\item @@ -608,14 +612,10 @@ \endgroup } \newcommand*\cnltx@expandable{% - \cnltx@expandable@note{% - \textcolor{expandable}{\expandablesign}% - }% + \cnltx@expandable@note{\expandablesymbol}% } \newcommand*\cnltx@unexpandable{% - \cnltx@expandable@note{% - \textcolor{unexpandable}{\expandablesign}% - }% + \cnltx@expandable@note{\unexpandablesymbol}% } \newcommand*\expandablesign{\textasteriskcentered} @@ -755,7 +755,7 @@ \ifbool{cnltx@package@email} {% \par\vskip.5cm\relax - \href{mailto:\cnltx@package@email}{\cnltx@package@email}% + \email{\cnltx@package@email}% }{}% \ifbool{cnltx@package@abstract} {% @@ -763,8 +763,10 @@ \cnltx@package@abstract }{}% \end{center} - \begin{multicols}{2}[\section*{\GetTranslation{cnltx-toc}}] - \cnltx@tableofcontents + \begin{multicols}{2}[{% + \pdfbookmark[1]{\GetTranslation{cnltx-toc}}{toc}% + \section*{\GetTranslation{cnltx-toc}} + }]\cnltx@tableofcontents \end{multicols}% } @@ -825,9 +827,15 @@ % -------------------------------------------------------------------------- % hyperlinks: \newrobustcmd*\CTANurl[2][macros/latex/contrib]{% - on \ctan\ as \code{#2}: \url{http://mirrors.ctan.org/#1/#2/}% + on \ctan\ as \cnltx@weblink@font{#2}: \url{http://mirrors.ctan.org/#1/#2/}% } +\newcommand*\cnltx@weblink@font[1]{\texttt{#1}} + +\newrobustcmd*\email[1]{\cnltx@weblink@font{\href{mailto:#1}{#1}}} +\newrobustcmd*\website[1]{\cnltx@weblink@font{\href{http://#1/}{#1}}} +\newrobustcmd*\securewebsite[1]{\cnltx@weblink@font{\href{https://#1/}{#1}}} + \newrobustcmd*\needpackage[2][macros/latex/contrib]{% \pkg{#2}\footnote{\CTANurl[#1]{#2}}% } @@ -858,113 +866,63 @@ }% } -% -------------------------------------------------------------------------- -% localization strings: -\DeclareTranslationFallback{cnltx-default}{Default} -\DeclareTranslation{English}{cnltx-default}{Default} -\DeclareTranslation{German}{cnltx-default}{Voreinstellung} - -\DeclareTranslationFallback{cnltx-required}{required} -\DeclareTranslation{English}{cnltx-required}{required} -\DeclareTranslation{German}{cnltx-required}{erforderlich} - -\DeclareTranslationFallback{cnltx-empty}{initially empty} -\DeclareTranslation{English}{cnltx-empty}{initially empty} -\DeclareTranslation{German}{cnltx-empty}{zun\"achst leer} - -\DeclareTranslationFallback{cnltx-toc}{Table of Contents} -\DeclareTranslation{English}{cnltx-toc}{Table of Contents} -\DeclareTranslation{German}{cnltx-toc}{Inhaltsverzeichnis} - -\DeclareTranslationFallback{cnltx-license}{% - Permission is granted to copy, distribute and/or modify this software under - the terms of the \LPPL\ (\lppl), version 1.3 or later - (\url{http://www.latex-project.org/lppl.txt}). The software has the status% -} -\DeclareTranslation{English}{cnltx-license}{% - Permission is granted to copy, distribute and/or modify this software under - the terms of the \LPPL\ (\lppl), version 1.3 or later - (\url{http://www.latex-project.org/lppl.txt}). The software has the status% -} -\DeclareTranslation{German}{cnltx-license}{% - Es ist erlaubt, diese Software unter den Bedingungen der \LPPL\ (\lppl), - Version 1.3 oder sp\"ater, zu kopieren und zu verteilen - (\url{http://www.latex-project.org/lppl.txt}). Sie hat den Status% -} - -\DeclareTranslationFallback{cnltx-introduced}{Introduced in version} -\DeclareTranslation{English}{cnltx-introduced}{Introduced in version} -\DeclareTranslation{German}{cnltx-introduced}{Eingef\"uhrt in Version} - -\DeclareTranslationFallback{cnltx-changed}{Changed in version} -\DeclareTranslation{English}{cnltx-changed}{Changed in version} -\DeclareTranslation{German}{cnltx-changed}{Ge\"andert in Version} - -\DeclareTranslationFallback{cnltx-f.}{f.} -\DeclareTranslation{English}{cnltx-f.}{f.} -\DeclareTranslation{German}{cnltx-f.}{f.} - -\DeclareTranslationFallback{cnltx-ff.}{ff.} -\DeclareTranslation{English}{cnltx-ff.}{ff.} -\DeclareTranslation{German}{cnltx-ff.}{ff.} - -\DeclareTranslationFallback{cnltx-maintainer}{current maintainer} -\DeclareTranslation{English}{cnltx-maintainer}{current maintainer} -\DeclareTranslation{German}{cnltx-maintainer}{aktueller Maintainer} - -\DeclareTranslationFallback{cnltx-maintainers}{current maintainers} -\DeclareTranslation{English}{cnltx-maintainers}{current maintainers} -\DeclareTranslation{German}{cnltx-maintainers}{aktuelle Maintainer} - \endinput % -------------------------------------------------------------------------- HISTORY: -2013/09/08 v0.1 - first working version -2013/09/10 v0.2 - added optional argument to \license - - \newname got moved to `cnltx-tools' - - added possibility for internationalization - - new macros \needpackage and \needclass - - option for formatting the document title -2013/09/12 v0.3 - new class options `add-index', `load-preamble+' and - `scrartcl' - - new options `index-prologue' and `index-space' - - new file `cnltx.ist' - - added \Module - - added optional ! to the \Default command - - add safety net: provide necessary commands in the aux-file - if they're not defined at begin document -2013/09/12 v0.3a - automatic preamble detects xelatex and lualatex and selects - the fonts accordingly -2013/09/15 v0.4 - possiblity to add an email address for each author, written - as footnote; they get symbols if the `load-preamble' - options is not used - - fixed bug in index setup mechanism - - added biblatex entry type `package' and biblatex style - `cnltx' -2013/09/20 v0.5 - new commands \expandable and \unexpandable - - new environment `cnltxquote', formatting via options - `quote-format' and `quote-author-format' - - changed scaling of `beramono' from `.83' to `.81' -- seems - a better fit in relation to Linux Libertine -2013/09/24 v0.6 - workaround for footnotes in minipages => libertine does not - have superior letters - - new options `abstract-format' and `abstract-width' -2013/09/30 v0.7 - added better microtype settings to the predefined preamble - - replaced \def's with \newcommand or \newrobustcmd -2013/10/04 v0.7a - renamed \cnltx@package@name@format into - \cnltxpackagenameformat - - added \cnltxpackagenameformat to the disabled pdfstring - commands - - added possibility to define a opitonal argument with - \newnote -2013/10/21 v0.8 - disable ligatures for teletype font - - extended preamble loading - * choice if fonts are loaded - * choice if microtype is loaded - - \visualizespaces and \visiblespace -2014/01/05 v0.10 - adapt to KOMA-Script v3.12 +2013/09/08 v0.1 - first working version +2013/09/10 v0.2 - added optional argument to \license + - \newname got moved to `cnltx-tools' + - added possibility for internationalization + - new macros \needpackage and \needclass + - option for formatting the document title +2013/09/12 v0.3 - new class options `add-index', `load-preamble+' and + `scrartcl' + - new options `index-prologue' and `index-space' + - new file `cnltx.ist' + - added \Module + - added optional ! to the \Default command + - add safety net: provide necessary commands in the aux-file + if they're not defined at begin document +2013/09/12 v0.3a - automatic preamble detects xelatex and lualatex and selects + the fonts accordingly +2013/09/15 v0.4 - possiblity to add an email address for each author, written + as footnote; they get symbols if the `load-preamble' + options is not used + - fixed bug in index setup mechanism + - added biblatex entry type `package' and biblatex style + `cnltx' +2013/09/20 v0.5 - new commands \expandable and \unexpandable + - new environment `cnltxquote', formatting via options + `quote-format' and `quote-author-format' + - changed scaling of `beramono' from `.83' to `.81' -- seems + a better fit in relation to Linux Libertine +2013/09/24 v0.6 - workaround for footnotes in minipages => libertine does not + have superior letters + - new options `abstract-format' and `abstract-width' +2013/09/30 v0.7 - added better microtype settings to the predefined preamble + - replaced \def's with \newcommand or \newrobustcmd +2013/10/04 v0.7a - renamed \cnltx@package@name@format into + \cnltxpackagenameformat + - added \cnltxpackagenameformat to the disabled pdfstring + commands + - added possibility to define a opitonal argument with + \newnote +2013/10/21 v0.8 - disable ligatures for teletype font + - extended preamble loading + * choice if fonts are loaded + * choice if microtype is loaded + - \visualizespaces and \visiblespace +2014/01/23 v0.10 - adapt to KOMA-Script v3.12 +2014/03/11 v0.11 - change biblatex locale from en_EN to en_US + - fix bug: wrong boolean used for option `add-bib' + - some translations are now provided by the `tools' module + and by the `cnltx' bibliography style + - use \cnltx@load@modules + - new commands \email, \website, \securewebsite + - \expandablesymbol, \unexpandablesymbol + % -------------------------------------------------------------------------- TODO: |