summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/chemnum/chemnum-codehelper.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/chemnum/chemnum-codehelper.tex')
-rw-r--r--Master/texmf-dist/doc/latex/chemnum/chemnum-codehelper.tex96
1 files changed, 88 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum-codehelper.tex b/Master/texmf-dist/doc/latex/chemnum/chemnum-codehelper.tex
index 3583603d3a5..0a1908dc3cc 100644
--- a/Master/texmf-dist/doc/latex/chemnum/chemnum-codehelper.tex
+++ b/Master/texmf-dist/doc/latex/chemnum/chemnum-codehelper.tex
@@ -3,7 +3,7 @@
% - a comprehensive approach for the numbering of chemical compounds - %
% ------------------------------------------------------------------------------------- %
% - Clemens NIEDERBERGER - %
-% - 2011/12/01 - %
+% - 2011/12/08 - %
% ------------------------------------------------------------------------------------- %
% - http://www.mychemistry.eu/ - %
% - contact@mychemistry.eu - %
@@ -40,8 +40,14 @@
%
% For creating examples with nice highlighting of code, and so
% on; based on the system used in the listings source (lstsample).
-\usepackage[final]{listings}
-\usepackage{framed}
+\RequirePackage[final]{listings}
+\RequirePackage{framed}
+\RequirePackage{xcolor}
+ \xdefinecolor{code}{rgb}{.6,.25,.15}
+ \xdefinecolor{key}{rgb}{0.02,0.48,0.18}
+ \xdefinecolor{myblue}{rgb}{0.02,0.04,0.48}
+ \xdefinecolor{myred}{rgb}{0.65,0.04,0.07}
+ \xdefinecolor{mygray}{rgb}{0.4,0.4,0.4}
\makeatletter
\lst@RequireAspects{writefile}
\newsavebox{\beispiel@box}
@@ -74,7 +80,7 @@
literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1,
moredelim=[is][\color{red!25!purple}]{!!}{!!},% Hervorhebung
moredelim=[is][\color{black}]{++}{++}, % Hervorhebung der Keywords rückgängig
- commentstyle={\color[named]{Gray}},
+ commentstyle={\color{mygray}},
keywordstyle=\color{code},
texcsstyle=[30]\color{code},
moretexcs=[30]
@@ -96,6 +102,7 @@
CNlabelsubnoref,
CNrefsub,
declarecompound,
+ color,
compound,
compoundprefix,
compoundsuffix,
@@ -103,6 +110,7 @@
includegraphics,
lstinline,
marker,
+ midrule,
penalty,
renewcommand,
schemename,
@@ -126,7 +134,7 @@
}%
}
\newcommand*\beispiel@input[1][\jobname.tmp]{%
- \catcode`\^^M=10\relax
+ \catcode`\^^M=5\relax
\small
\begingroup
\leavevmode
@@ -190,7 +198,7 @@
literate={ä}{{\"a}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 {Ä}{{\"A}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 {ß}{{\ss}}1,
moredelim=[is][\color{myred}]{!!}{!!},% Hervorhebung
moredelim=[is][\color{black}]{++}{++}, % Hervorhebung der Keywords rückgängig
- commentstyle={\color[named]{Gray}},
+ commentstyle={\color{mygray}},
keywordstyle=\color{code},
texcsstyle=[30]\color{code},
moretexcs=[30]
@@ -208,7 +216,7 @@
CNlabelsubnoref,
CNrefsub,
declarecompound,
- compound,
+ color,
compoundprefix,
compoundsuffix,
fcite,
@@ -221,4 +229,76 @@
theffbibliography,
uline
}
- }% \ No newline at end of file
+ }%
+
+\makeatletter
+\def\GetFileInfo#1{%
+ \def\filename{#1}%
+ \def\@tempb##1 ##2 ##3\relax##4\relax{%
+ \def\filedate{##1}%
+ \def\fileversion{##2}%
+ \def\fileinfo{##3}}%
+ \edef\@tempa{\csname ver@#1.sty\endcsname}%
+ \expandafter\@tempb\@tempa\relax? ? \relax\relax}
+\makeatother
+
+\ExplSyntaxOn
+\DeclareDocumentEnvironment { myquote } { o }
+ {
+ \quote
+ \small\sffamily
+ }
+ {
+ \IfNoValueF { #1 }
+ {
+ \par\noindent
+ \parbox { \linewidth } { \raggedleft \normalfont \itshape #1 }
+ }
+ \endquote
+ }
+
+\NewDocumentCommand \paket { sm }
+ {
+ \textsf { #2 }
+ \cs_if_exist:cF { paket @ #2 }
+ {
+ \cs_new_nopar:cpn { paket @ #2 } { }
+ \IfBooleanF { #1 }
+ { \footnote { CTAN: ~ \href { http://www.ctan.org/pkg/#2/ } { #2 } } }
+ }
+ \index { #2 @ \textsf { #2 } }
+ }
+
+\NewDocumentCommand \key { mg }
+ {
+ \textcolor{key}{ \texttt { #1 } }
+ \IfNoValueF { #2 } { \texttt { ~=~#2 } }
+ \index { #1 @ \textcolor{key}{ \texttt { #1 } } }
+ }
+
+\NewDocumentCommand \cmd { omoog }
+ {
+ \textcolor{code} { \texttt { \textbackslash #2 } }
+ \IfNoValueF { #3 } { \texttt { [ #3 ] } }
+ \IfNoValueF { #4 } { \texttt { [ #4 ] } }
+ \IfNoValueF { #5 } { \texttt { \{ #5 \} } }
+ \index
+ {
+ \IfNoValueTF { #1 } { #2 } { #1 }
+ @ \textcolor { code } { \texttt { \textbackslash #2 } }
+ }
+ }
+
+\NewDocumentCommand \secidx { som }
+ {
+ \IfBooleanTF { #1 }
+ { \index { \IfNoValueTF { #2 } { #3 } { #2 } @ \textbf { #3 } |) } }
+ { \index { \IfNoValueTF { #2 } { #3 } { #2 } @ \textbf { #3 } |( } }
+ }
+
+\NewDocumentCommand \ma { m }
+ { \texttt { \{ #1 \} } }
+
+\NewDocumentCommand \oa { m }
+ { \texttt { [ #1 ] } }
+\ExplSyntaxOff \ No newline at end of file