Skip to content

Commit

Permalink
v5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cgnieder committed Jan 20, 2016
1 parent c7cf030 commit 98f714d
Show file tree
Hide file tree
Showing 29 changed files with 252 additions and 113 deletions.
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
the CHEMMACROS package v5.2 2015/10/14
the CHEMMACROS package v5.3 2016/01/13

comprehensive support for typesetting chemistry documents

Expand All @@ -9,7 +9,7 @@ Web: https://github.com/cgnieder/chemmacros/
http://www.mychemistry.eu/forums/forum/2430/
E-Mail: [email protected]
--------------------------------------------------------------------------
Copyright 2011-2015 Clemens Niederberger
Copyright 2011-2016 Clemens Niederberger

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
Expand Down
2 changes: 1 addition & 1 deletion chemmacros.module.acid-base.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
2 changes: 1 addition & 1 deletion chemmacros.module.all.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
8 changes: 4 additions & 4 deletions chemmacros.module.base.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down Expand Up @@ -259,11 +259,11 @@

% --------------------------------------------------------------------------
% a setup command:
\NewDocumentCommand \chemsetup { o m }
\NewDocumentCommand \chemsetup {om}
{
\IfNoValueTF {#1}
{ \keys_set:nn {chemmacros} {#2} }
{ \keys_set:nn { chemmacros / #1 } {#2} }
{ \keys_set:nn {chemmacros} {#2} }
{ \keys_set:nn {chemmacros/#1} {#2} }
}

\keys_define:nn {chemmacros}
Expand Down
2 changes: 1 addition & 1 deletion chemmacros.module.charges.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
2 changes: 1 addition & 1 deletion chemmacros.module.chemformula.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
35 changes: 18 additions & 17 deletions chemmacros.module.errorcheck.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down Expand Up @@ -77,33 +77,33 @@
\chemmacros_command_requires_module:Nn \orbital {orbital}

% reactions module
\chemmacros_environment_requires_module:nn {reaction} {reactions}
\chemmacros_environment_requires_module:nn {reaction*} {reactions}
\chemmacros_environment_requires_module:nn {reactions} {reactions}
\chemmacros_environment_requires_module:nn {reactions*} {reactions}
\chemmacros_command_requires_module:Nn \listofreactions {reactions}
\chemmacros_command_requires_module:Nn \AddRxnDesc {reactions}
\chemmacros_environment_requires_module:nn {reaction} {reactions}
\chemmacros_environment_requires_module:nn {reaction*} {reactions}
\chemmacros_environment_requires_module:nn {reactions} {reactions}
\chemmacros_environment_requires_module:nn {reactions*} {reactions}
\chemmacros_command_requires_module:Nn \listofreactions {reactions}
\chemmacros_command_requires_module:Nn \AddRxnDesc {reactions}

% redox module
\chemmacros_command_requires_module:Nn \ox {redox}
\chemmacros_command_requires_module:Nn \OX {redox}
\chemmacros_command_requires_module:Nn \ox {redox}
\chemmacros_command_requires_module:Nn \OX {redox}
\chemmacros_command_requires_module:Nn \redox {redox}

% scheme module
\chemmacros_environment_requires_module:nn {scheme} {scheme}
\chemmacros_command_requires_module:Nn \listschemename {scheme}
\chemmacros_command_requires_module:Nn \schemename {scheme}
\chemmacros_command_requires_module:Nn \listofschemes {scheme}
\chemmacros_environment_requires_module:nn {scheme} {scheme}
\chemmacros_command_requires_module:Nn \listschemename {scheme}
\chemmacros_command_requires_module:Nn \schemename {scheme}
\chemmacros_command_requires_module:Nn \listofschemes {scheme}

% spectroscopy module
\chemmacros_command_requires_module:Nn \NMR {spectroscopy}
\chemmacros_command_requires_module:Nn \NMR {spectroscopy}
\chemmacros_environment_requires_module:nn {experimental} {spectroscopy}

% thermodynamics module
\chemmacros_command_requires_module:Nn \state {thermodynamics}
\chemmacros_command_requires_module:Nn \state {thermodynamics}
\chemmacros_command_requires_module:Nn \enthalpy {thermodynamics}
\chemmacros_command_requires_module:Nn \entropy {thermodynamics}
\chemmacros_command_requires_module:Nn \gibbs {thermodynamics}
\chemmacros_command_requires_module:Nn \entropy {thermodynamics}
\chemmacros_command_requires_module:Nn \gibbs {thermodynamics}

% xfrac module
\chemmacros_command_requires_module:Nn \chemfrac {xfrac}
Expand All @@ -113,3 +113,4 @@
\tex_endinput:D

2015/10/14 - first version

2 changes: 1 addition & 1 deletion chemmacros.module.greek.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
2 changes: 1 addition & 1 deletion chemmacros.module.isotopes.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
115 changes: 69 additions & 46 deletions chemmacros.module.lang.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand All @@ -25,7 +25,7 @@
%
% The Current Maintainer of this work is Clemens Niederberger.
% --------------------------------------------------------------------------
\ChemModule{lang}{2015/07/21 language settings for chemmacros}
\ChemModule{lang}{2015/11/17 language settings for chemmacros}

\RequirePackage{translations}

Expand All @@ -44,20 +44,41 @@
% language is either chosen automatically or by option it is only available at
% begin document
\tl_new:N \l_chemmacros_language_tl
\tl_set:Nn \l_chemmacros_language_tl { english }
\tl_set:Nn \l_chemmacros_language_tl {english}
\tl_new:N \l__chemmacros_current_language_tl

% translate the key #1
\cs_new:Npn \chemmacros_translate:n #1
{
\bool_if:NTF \l__chemmacros_language_auto_bool
{ \GetTranslation{#1} }
{ \GetTranslationFor{\l_chemmacros_language_tl}{#1} }
{ \GetTranslation {#1} }
{ \GetTranslationFor {\l_chemmacros_language_tl} {#1} }
}

\DeclareExpandableDocumentCommand \ChemTranslate {m}
{ \chemmacros_translate:n {#1} }

\keys_define:nn {chemmacros}
{
language .value_required:n = true ,
language .code:n =
\tl_if_eq:nnTF {#1} {auto}
{ \bool_set_true:N \l__chemmacros_language_auto_bool }
{
\bool_set_false:N \l__chemmacros_language_auto_bool
\tl_set:Nn \l__chemmacros_current_language_tl {#1}
} ,
language .initial:n = auto
}

\ChemCompatibilityTo{5.2}
\keys_define:nn {chemmacros}
{
german .meta:n = { language = german } ,
ngerman .meta:n = { language = ngerman }
}
\EndChemCompatibility

\AtBeginDocument{
\bool_if:NTF \l__chemmacros_language_auto_bool
{
Expand All @@ -68,58 +89,60 @@
\tl_set_eq:NN
\l_chemmacros_language_tl
\l__chemmacros_current_language_tl
}
}
}

\keys_define:nn {chemmacros}
{
language .value_required:n = true ,
language .code:n =
\tl_if_eq:nnTF { #1 } { auto }
{ \bool_set_true:N \l__chemmacros_language_auto_bool }
{
\bool_set_false:N \l__chemmacros_language_auto_bool
\tl_set:Nn \l__chemmacros_current_language_tl { #1 }
} ,
% do we still need these?
german .meta:n = { language = german } ,
german .meta:n = { language = ngerman } ,
language .initial:n = auto
}

% --------------------------------------------------------------------------
\DeclareTranslationFallback {scheme-name} {Scheme}
\DeclareTranslation {German} {scheme-name} {Schema}
\DeclareTranslationFallback {scheme-name} {Scheme}
\DeclareTranslation {English} {scheme-name} {Scheme}
\DeclareTranslation {German} {scheme-name} {Schema}

\DeclareTranslationFallback {scheme-list} {List~ of~ Schemes}
\DeclareTranslation {German} {scheme-list} {Verzeichnis~ der~ Schemata}
\DeclareTranslationFallback {scheme-list} {List~ of~ Schemes}
\DeclareTranslation {English} {scheme-list} {List~ of~ Schemes}
\DeclareTranslation {German} {scheme-list} {Verzeichnis~ der~ Schemata}

% --------------------------------------------------------------------------
\DeclareTranslationFallback {K-acid} {\mathrm{a}}
\DeclareTranslation{German} {K-acid} {\mathrm{s}}
\DeclareTranslation{Dutch} {K-acid} {\mathrm{z}}
\DeclareTranslationFallback {K-acid} {\mathrm{a}}
\DeclareTranslation {English} {K-acid} {\mathrm{a}}
\DeclareTranslation {German} {K-acid} {\mathrm{s}}
\DeclareTranslation {Dutch} {K-acid} {\mathrm{z}}

\DeclareTranslationFallback {K-base} {\mathrm{b}}
\DeclareTranslationFallback {K-base} {\mathrm{b}}
\DeclareTranslation {English} {K-base} {\mathrm{b}}

\DeclareTranslationFallback {K-water} {\mathrm{w}}
\DeclareTranslationFallback {K-water} {\mathrm{w}}
\DeclareTranslation {English} {K-water} {\mathrm{w}}

% --------------------------------------------------------------------------
\DeclareTranslation{German}{phase-sld}{ f }
\DeclareTranslation{German}{phase-lqd}{ f\/l }
\DeclareTranslation {English} {phase-sld} {s}
\DeclareTranslation {German} {phase-sld} {f}

\DeclareTranslation {English} {phase-lqd} {l}
\DeclareTranslation {German} {phase-lqd} {f\/l}

\DeclareTranslation {English} {phase-gas} {g}
\DeclareTranslation {German} {phase-gas} {g}

\DeclareTranslation {English} {phase-aq} {aq}
\DeclareTranslation {German} {phase-aq} {aq}

% --------------------------------------------------------------------------
\DeclareTranslationFallback {list-of-reactions} { List~ of~ Reactions }
\DeclareTranslation{English} {list-of-reactions} { List~ of~ Reactions }
\DeclareTranslation{German} {list-of-reactions} { Reaktionsverzeichnis }
\DeclareTranslation{Italian} {list-of-reactions} { Elenco~ delle~ reazioni }
\DeclareTranslation{French} {list-of-reactions} { Table~ des~ r\'eactions }
\DeclareTranslation{Dutch} {list-of-reactions} { Lijst~ van~ reacties }
%
\DeclareTranslationFallback {reaction} { Reaction }
\DeclareTranslation{English} {reaction} { Reaction }
\DeclareTranslation{German} {reaction} { Reaktion }
\DeclareTranslation{Italian} {reaction} { Reazione }
\DeclareTranslation{French} {reaction} { R\'eaction }
\DeclareTranslation{Dutch} {reaction} { Reactie }
\DeclareTranslationFallback {list-of-reactions} {List~ of~ Reactions}
\DeclareTranslation {English} {list-of-reactions} {List~ of~ Reactions}
\DeclareTranslation {German} {list-of-reactions} {Reaktionsverzeichnis}
\DeclareTranslation {Italian} {list-of-reactions} {Elenco~ delle~ reazioni}
\DeclareTranslation {French} {list-of-reactions} {Table~ des~ r\'eactions}
\DeclareTranslation {Dutch} {list-of-reactions} {Lijst~ van~ reacties}

\DeclareTranslationFallback {reaction} {Reaction}
\DeclareTranslation {English} {reaction} {Reaction}
\DeclareTranslation {German} {reaction} {Reaktion}
\DeclareTranslation {Italian} {reaction} {Reazione}
\DeclareTranslation {French} {reaction} {R\'eaction}
\DeclareTranslation {Dutch} {reaction} {Reactie}

% --------------------------------------------------------------------------

\tex_endinput:D

2015/11/17 - remove options `german' and `ngerman', starting with v5.3
2 changes: 1 addition & 1 deletion chemmacros.module.mechanisms.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
2 changes: 1 addition & 1 deletion chemmacros.module.newman.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
9 changes: 7 additions & 2 deletions chemmacros.module.nomenclature.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down Expand Up @@ -521,6 +521,7 @@
\NewDocumentCommand \RemoveChemIUPACShorthand {m}
{ \chemmacros_remove_shorthand:N #1 }

\NewChemIUPACShorthand ^ \chemmacros_superscript:n
\NewChemIUPACShorthand | \chemmacros_break_point:
\NewChemIUPACShorthand - \chemmacros_break_point_hyphen:
\ChemCompatibilityFrom{5.1}
Expand All @@ -529,7 +530,10 @@
\NewChemIUPACShorthand [ \chemmacros_break_point_opening_bracket:
\NewChemIUPACShorthand ] \chemmacros_break_point_closing_bracket:
\EndChemCompatibility
\NewChemIUPACShorthand ^ \chemmacros_superscript:n
\ChemCompatibilityFrom{5.3}
\NewChemIUPAC \chemprime { \ensuremath {{}^{\prime}} }
\NewChemIUPACShorthand ' \chemprime
\EndChemCompatibility

\group_begin:
\chemmacros_activate_all_iupac_shorthands:
Expand Down Expand Up @@ -725,3 +729,4 @@
\chemmacros_make_iupac:
- \cip only italicizes elements of csv list
- fix bug in \RemoveChemIUPACShorthand
2016/01/02 - \chemprime
2 changes: 1 addition & 1 deletion chemmacros.module.orbital.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% If you have any ideas, questions, suggestions or bugs to report, please
% feel free to contact me.
% --------------------------------------------------------------------------
% Copyright 2011-2015 Clemens Niederberger
% Copyright 2011-2016 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
Expand Down
Loading

0 comments on commit 98f714d

Please sign in to comment.