summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cnltx/cnltx-base.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/cnltx/cnltx-base.sty')
-rw-r--r--Master/texmf-dist/tex/latex/cnltx/cnltx-base.sty51
1 files changed, 42 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/cnltx/cnltx-base.sty b/Master/texmf-dist/tex/latex/cnltx/cnltx-base.sty
index 41d910c4bcc..9e434f56877 100644
--- a/Master/texmf-dist/tex/latex/cnltx/cnltx-base.sty
+++ b/Master/texmf-dist/tex/latex/cnltx/cnltx-base.sty
@@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/cnltx/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2013 Clemens Niederberger
+% Copyright 2013-2014 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -25,8 +25,8 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
-\def\cnltx@@date{2013/11/22}
-\def\cnltx@@version{v0.9}
+\def\cnltx@@date{2014/01/05}
+\def\cnltx@@version{v0.10}
\def\cnltx@@info{LaTeX tools and documenting facilities (CN)}
\ProvidesPackage{cnltx-base}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
\RequirePackage{pgfopts,etoolbox,ltxcmds,pdftexcmds}
@@ -222,10 +222,31 @@
#3%
}
-% --------------------------------------------------------------------------
+% test string equality, expandably:
+\newcommand\cnltx@ifstrequal[2]{%
+ \ifnum\pdf@strcmp{\unexpanded{#1}}{\unexpanded{#2}}=\z@
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
-% \newcount\pdflastximagepages
-% \def\pdfximage#1{\pdflastximagepages=\XeTeXpdfpagecount"#1"\relax}
+% a check for etoolbox's lists where items may contain braces:
+\newbool{cnltx@inlist}
+\newrobustcmd\cnltx@ifinlist@type[5]{%
+ \def\do##1{%
+ \boolfalse{cnltx@inlist}%
+ \ifstrequal{##1}{#2}
+ {\booltrue{cnltx@inlist}\listbreak}
+ {}%
+ }%
+ #1{#3}%
+ \ifbool{cnltx@inlist}
+ {#4}
+ {#5}%
+}
+\newrobustcmd*\cnltx@ifinlist{\cnltx@ifinlist@type\dolistloop}
+\newrobustcmd*\cnltx@ifinlistcs{\cnltx@ifinlist@type\dolistcsloop}
% --------------------------------------------------------------------------
% expansion helper
@@ -292,6 +313,9 @@
% expanding an environment argument or something:
\newcommand\cnltx@fullexpand@afterarg{\cnltx@expandargs(nx)}
+\providecommand*\expandtwice
+ {\unexpanded\expandafter\expandafter\expandafter}
+
% --------------------------------------------------------------------------
% tokenlist manipulation
\newcommand*\cnltx@stripbs{\expandafter\@gobble\string}
@@ -721,7 +745,8 @@
expandable => red ,
unexpandable => black ,
makeidxkey => cnltxgreen ,
- makeidxstring => black
+ makeidxstring => black ,
+ math => cnltxgreen
}
\definecolorscheme{blue}{
@@ -742,7 +767,8 @@
expandable => red ,
unexpandable => black ,
makeidxkey => cnltxyellow ,
- makeidxstring => black
+ makeidxstring => black ,
+ math => cnltxgreen
}
\definecolorscheme{formal}{
@@ -763,7 +789,8 @@
expandable => red ,
unexpandable => black ,
makeidxkey => black ,
- makeidxstring => black
+ makeidxstring => black ,
+ math => cnltxgreen
}
% set the default:
@@ -800,3 +827,9 @@ HISTORY:
\cnltx@gremove@once, \cnltx@gremove@all
- \cnltx@ifisnum now also returns <false> if the test
argument is `<num>!'
+2014/01/05 v0.10 - \expandtwice
+ - \cnltx@ifstrequal
+
+TODO:
+ `color-scheme' Option dokumentieren
+