summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-11-16 10:51:37 +0000
committerNorbert Preining <preining@logic.at>2007-11-16 10:51:37 +0000
commita0556f51c14da4034ebba3a3967f525d4be2d127 (patch)
tree467768be8feb6a18b407d27f351888815c6944dc /Master/texmf-dist/tex/latex
parent2925ee6e742b7ddfa9f1bf3c75dd98b7d8ce0f36 (diff)
update chemscheme v1.3 from ctan
git-svn-id: svn://tug.org/texlive/trunk@5446 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/chemscheme/chemscheme.sty198
-rw-r--r--Master/texmf-dist/tex/latex/chemscheme/jawltxdoc.sty129
2 files changed, 276 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex/latex/chemscheme/chemscheme.sty b/Master/texmf-dist/tex/latex/chemscheme/chemscheme.sty
index 2f89ad65347..f26aca63ff7 100644
--- a/Master/texmf-dist/tex/latex/chemscheme/chemscheme.sty
+++ b/Master/texmf-dist/tex/latex/chemscheme/chemscheme.sty
@@ -6,84 +6,180 @@
%%
%% chemscheme.dtx (with options: `package')
%% ----------------------------------------------------------------
-%% The chemscheme package - Support for chemical schemes
+%% The chemscheme package --- Support for chemical schemes
%% Maintained by Joseph Wright
%% E-mail: joseph.wright@morningstar2.co.uk
-%% Released under the GNU General Public License
-%% See http://www.gnu.org/licenses/gpl.txt
+%% Released under the LaTeX Project Public License v1.3 or later
+%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
+%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{chemscheme}%
- [2007/08/05 v1.1 Support for chemical schemes]
-\RequirePackage{psfrag}
+ [2007/10/04 v1.3 Support for chemical schemes]
+\RequirePackage{psfrag,iflang}
\@ifclassloaded{memoir}{}
- {\RequirePackage{float}}
-\newif \ifCHEMSCH@chapter \CHEMSCH@chapterfalse
-\newif \ifCHEMSCH@bpchem \CHEMSCH@bpchemtrue
-\DeclareOption{chapter}{\global\CHEMSCH@chaptertrue}
-\DeclareOption{chemcompounds}{\global\CHEMSCH@bpchemfalse}
-\DeclareOption{bpchem}{}
+ {\RequirePackage{float,caption}}
+\newif \ifchemsch@bpchem \chemsch@bpchemfalse
+\DeclareOption{chemcompounds}{\chemsch@bpchemfalse}
+\DeclareOption{bpchem}{\chemsch@bpchemtrue}
+\DeclareOption{chapter}%
+ {\PackageInfo{chemscheme}%
+ {Ignoring obsolete option `chapter'}}
\ProcessOptions
\newcommand*{\schemename}{Scheme}
-\newcommand*{\listschemes}{List of Schemes}
-\ifCHEMSCH@chapter
- \ifx\chapter\@undefined
- \PackageWarning{chemscheme}%
- {No chapters in this document \MessageBreak%
- Ignoring `chapter' option}
- \@ifclassloaded{memoir}
- {\newfloat{scheme}{los}{\schemename}}
- {\newfloat{scheme}{tbp}{los}}
- \else
- \@ifclassloaded{memoir}
- {\newfloat[chapter]{scheme}{los}{\schemename}}
- {\newfloat{scheme}{tbp}{los}[chapter]}
- \fi
-\else
- \@ifclassloaded{memoir}
- {\newfloat{scheme}{los}{\schemename}}
- {\newfloat{scheme}{tbp}{los}}
-\fi
+\newcommand*{\listschemename}{List of Schemes}
+\@ifclassloaded{memoir}{%
+ \AtBeginDocument{%
+ \newfloat[chapter]{scheme}{los}{\schemename}
+ \kill@lastcounter{losdepth}
+ \renewcommand*{\thescheme}{\thechapter.\@arabic\c@scheme}
+ \addtodef{\@smemfront}{}{\counterwithout{scheme}{chapter}}
+ \addtodef{\@smemmain}{}{%
+ \ifartopt\else
+ \counterwithin{scheme}{chapter}
+ \fi}
+ \addtodef{\backmatter}{}{%
+ \ifartopt\else
+ \counterwithout{scheme}{chapter}%
+ \setcounter{scheme}{0}%
+ \fi}
+ \ifartopt
+ \counterwithout{scheme}{chapter}%
+ \fi
+ }
+}{%
+ \AtBeginDocument{%
+ \@ifundefined{chapter}{%
+ \newfloat{scheme}{tbp}{los}%
+ }{%
+ \newfloat{scheme}{tbp}{los}[chapter]
+ \@ifundefined{KOMAScriptVersion}{%
+ \renewcommand*{\thescheme}%
+ {\ifnum\c@chapter>\z@ \thechapter.\fi \@arabic\c@scheme}
+ }{}
+ \let\chemsch@orig@chapter\@chapter
+ \def\chemsch@chapter{%
+ \addtocontents{los}{\protect\addvspace{10\p@}}%
+ \chemsch@orig@chapter}
+ \let\@chapter\chemsch@chapter
+ }
+ }
+}
\@ifclassloaded{memoir}
- {\newlistof{listofschemes}{los}{\listschemes}}
+ {\AtBeginDocument{%
+ \newlistof{listofschemes}{los}{\listschemename}
+ \kill@lastcounter{losdepth}
+ \newlistentry[chapter]{scheme}{los}{0}
+ \cftsetindents{scheme}{0em}{2.3em}
+ \addtodef{\insertchapterspace}{}%
+ {\addtocontents{los}{\protect\addvspace{10pt}}}
+ \@ifundefined{c@losdepth}%
+ {\newcounter{losdepth}\setcounter{losdepth}{1}}{}%
+ }
+ }
{\floatname{scheme}{\schemename}
- \newcommand*{\listofschemes}[1][\listschemes]%
- {\listof{scheme}{#1}}}
+ \newcommand*{\listofschemes}{\listof{scheme}{\listschemename}}}
\newcommand*{\floatcontentscentre}%
- {\let\CHEMSCH@everyfloat\centering}
+ {\let\chemsch@everyfloat\centering}
\let\floatcontentscenter\floatcontentscentre
\newcommand*{\floatcontentsleft}%
- {\let\CHEMSCH@everyfloat\relax}
+ {\let\chemsch@everyfloat\relax}
\newcommand*{\floatcontentsright}%
- {\let\CHEMSCH@everyfloat\raggedleft}
-\let\CHEMSCH@floatboxreset\@floatboxreset
+ {\let\chemsch@everyfloat\raggedleft}
+\let\chemsch@floatboxreset\@floatboxreset
\floatcontentsleft
-\def\@floatboxreset{\CHEMSCH@everyfloat\CHEMSCH@floatboxreset}
-\newcommand{\chemschemerefmarker}{TMP}
-\newcommand{\chemschemerefformat}{\textsf}
-\ifCHEMSCH@bpchem
+\def\@floatboxreset{\chemsch@everyfloat\chemsch@floatboxreset}
+\newif \ifchemsch@babel \chemsch@babelfalse
+\@ifpackageloaded{babel}
+ {\chemsch@babeltrue}
+ {}
+\@ifclassloaded{memoir}
+ {}
+ {\@ifpackageloaded{babel}
+ {\IfLanguageName{french}
+ {\let\floatc@plain\FB@makecaption}
+ {\IfLanguageName{frenchb}
+ {\let\floatc@plain\FB@makecaption}
+ {}}}
+ {}}
+\AtBeginDocument{%
+ \@ifpackageloaded{babel}{%
+ \addto{\captionsngerman}{\renewcommand*{\schemename}{Schema}}
+ \addto{\captionsngerman}%
+ {\renewcommand*{\listschemename}{Schemenverzeichnis}}
+ \addto{\captionsgerman}{\renewcommand*{\schemename}{Schema}}
+ \addto{\captionsgerman}%
+ {\renewcommand*{\listschemename}{Schemenverzeichnis}}
+ \addto{\captionsfrench}%
+ {\renewcommand*{\schemename}{\scshape Sch\`eme}}
+ \addto{\captionsfrench}%
+ {\renewcommand*{\listschemename}{Table des sch\`emes}}
+ \addto{\captionsfrenchb}%
+ {\renewcommand*{\schemename}{\scshape Sch\`eme}}
+ \addto{\captionsfrenchb}%
+ {\renewcommand*{\listschemename}{Table des sch\`emes}}
+ \expandafter\selectlanguage\expandafter{\languagename}
+ \@ifclassloaded{memoir}
+ {}
+ {\IfLanguageName{french}
+ {\ifchemsch@babel\else
+ \let\floatc@plain\FB@makecaption
+ \fi}
+ {\IfLanguageName{frenchb}
+ {\ifchemsch@babel\else
+ \let\floatc@plain\FB@makecaption
+ \fi}
+ {}}}
+ {}
+ }{}
+}
+\newcommand*{\schemerefmarker}{TMP}
+\newcommand*{\schemerefformat}{\textsf}
+\ifchemsch@bpchem
\RequirePackage{bpchem}
- \let\CHEMSCH@label\CNlabel
+ \let\chemsch@label\CNlabel
\else
\RequirePackage{chemcompounds}
- \let\CHEMSCH@label\compound
+ \let\chemsch@label\compound
\fi
-\newcommand{\chemschemeref}[2]{%
- \psfrag{\chemschemerefmarker#1}[b][b]%
- {\chemschemerefformat{\CHEMSCH@label{#2}}}%
+\newcount\chemsch@num
+\newcommand*{\schemeref}{%
+ \advance\chemsch@num\@ne%
+ \@ifnextchar[%
+ {\chemsch@schemeref}
+ {\chemsch@schemeref[\schemerefmarker\the\chemsch@num]}
+}
+\def\chemsch@schemeref[#1]#2{%
+ \wlog{Replaing #1 by #2}%
+ \psfrag{#1}[b][b]%
+ {\schemerefformat{\chemsch@label{#2}}}%
}
-\ifCHEMSCH@bpchem
- \newcommand{\chemschemerefsub}[3]{%
- \psfrag{\chemschemerefmarker#1}[b][b]%
- {\chemschemerefformat{\CNlabelsub{#2}{#3}}}%
+\def\chemsch@schemerefsub[#1]#2#3{%
+ \psfrag{#1}[b][b]%
+ {\schemerefformat{\CNlabelsub{#2}{#3}}}%
+}
+\newcommand*{\chemschemeref}[1]{%
+ \schemeref[#1]%
+}
+\ifchemsch@bpchem
+ \newcommand*{\schemerefsub}{%
+ \advance\chemsch@num\@ne%
+ \@ifnextchar[%
+ {\chemsch@schemerefsub}
+ {\chemsch@schemerefsub[\schemerefmarker\the\chemsch@num]}
+ }
+ \newcommand*{\chemschemerefsub}[1]{%
+ \schemerefsub[#1]%
}
\else
- \newcommand{\chemschemerefsub}[3]{%
+ \newcommand*{\schemerefsub}[3][]{%
+ \advance\chemsch@num\@ne%
\PackageWarning{chemscheme}%
{`chemcompound' option active\MessageBreak
Command \protect\chemschemerefsub\space not used \MessageBreak
Please alter your source to \MessageBreak
\protect\chemschemeref}}
+ \newcommand*{\chemschemerefsub}[1]{\schemerefsub}%
\fi
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/chemscheme/jawltxdoc.sty b/Master/texmf-dist/tex/latex/chemscheme/jawltxdoc.sty
new file mode 100644
index 00000000000..e8cd1fa99ad
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/chemscheme/jawltxdoc.sty
@@ -0,0 +1,129 @@
+%%
+%% This is file `jawltxdoc.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% chemscheme.dtx (with options: `jawltxdoc')
+%% ----------------------------------------------------------------
+%% The chemscheme package --- Support for chemical schemes
+%% Maintained by Joseph Wright
+%% E-mail: joseph.wright@morningstar2.co.uk
+%% Released under the LaTeX Project Public License v1.3 or later
+%% See http://www.latex-project.org/lppl.txt
+%% ----------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{jawltxdoc}
+ [2007/10/04 v1.0a]
+\usepackage[T1]{fontenc}
+\usepackage[english,UKenglish]{babel}
+\usepackage[scaled=0.95]{helvet}
+\usepackage[version=3]{mhchem}
+\usepackage[final]{microtype}
+\usepackage{mathpazo,booktabs,array,url,graphicx,courier,unitsdef}
+\usepackage{upgreek,ifpdf,listings}
+\ifpdf
+ \usepackage{embedfile}
+ \embedfile[%
+ stringmethod=escape,%
+ mimetype=plain/text,%
+ desc={LaTeX docstrip source archive for package `\jobname'}%
+ ]{\jobname.dtx}
+\fi
+\usepackage{\jobname}
+\usepackage[numbered]{hypdoc}
+\newlength\LaTeXwidth
+\newlength\LaTeXoutdent
+\newlength\LaTeXgap
+\setlength\LaTeXgap{1em}
+\setlength\LaTeXoutdent{-0.15\textwidth}
+\def\typesetexampleandcode{%
+ \begin{list}{}{%
+ \setlength\itemindent{0pt}
+ \setlength\leftmargin\LaTeXoutdent
+ \setlength\rightmargin{0pt}
+ }
+ \item
+ \setlength\LaTeXoutdent{-0.15\textwidth}
+ \begin{minipage}[c]{\textwidth-\LaTeXwidth-\LaTeXoutdent-\LaTeXgap}
+ \lst@sampleInput
+ \end{minipage}%
+ \hfill%
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \end{list}
+}
+\def\typesetcodeandexample{%
+ \begin{list}{}{%
+ \setlength\itemindent{0pt}
+ \setlength\leftmargin{0pt}
+ \setlength\rightmargin{0pt}
+ }
+ \item
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \lst@sampleInput
+ \end{list}
+}
+\def\typesetfloatexample{%
+ \begin{list}{}{%
+ \setlength\itemindent{0pt}
+ \setlength\leftmargin{0pt}
+ \setlength\rightmargin{0pt}
+ }
+ \item
+ \lst@sampleInput
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \end{list}
+}
+\def\typesetcodeonly{%
+ \begin{list}{}{%
+ \setlength\itemindent{0pt}
+ \setlength\leftmargin{0pt}
+ \setlength\rightmargin{0pt}
+ }
+ \item
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \end{list}
+}
+\edef\LaTeXexamplefile{\jobname.tmp}
+\lst@RequireAspects{writefile}
+\newbox\lst@samplebox
+\lstnewenvironment{LaTeXexample}[1][\typesetexampleandcode]{%
+ \let\typesetexample#1
+ \global\let\lst@intname\@empty
+ \setbox\lst@samplebox=\hbox\bgroup
+ \setkeys{lst}{language=[LaTeX]{TeX},tabsize=4,gobble=2,%
+ breakindent=0pt,basicstyle=\small\ttfamily,basewidth=0.51em,%
+ keywordstyle=\color{blue},%
+ morekeywords={bibnote,citenote,bibnotetext,bibnotemark,%
+ thebibnote,bibnotename,includegraphics,schemeref,%
+ floatcontentsleft,floatcontentsright,floatcontentscentre,%
+ schemerefmarker,compound,schemerefformat,color,%
+ startchemical,stopchemical,chemical,setupchemical,bottext,%
+ listofschemes}}
+ \lst@BeginAlsoWriteFile{\LaTeXexamplefile}
+}{%
+ \lst@EndWriteFile\egroup
+ \setlength\LaTeXwidth{\wd\lst@samplebox}
+ \typesetexample%
+}
+\def\lst@sampleInput{%
+ \MakePercentComment\catcode`\^^M=10\relax
+ \small%
+ {\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
+ {\lst@ProcessTabulator}}%
+ \leavevmode \input{\LaTeXexamplefile}}%
+ \MakePercentIgnore%
+}
+\hyphenation{PDF-LaTeX}
+\endinput
+%%
+%% End of file `jawltxdoc.sty'.