summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-05-13 22:08:58 +0000
committerKarl Berry <karl@freefriends.org>2014-05-13 22:08:58 +0000
commit3a476bf2d03a9baae83cf89ed7e996132b886d7a (patch)
tree558e16eb6c98ce526f43cbf0fbdce617d09dd03d /Master/texmf-dist/tex
parentf3c4fc4b9757adef6689b6241de2e9bd7da6ebf3 (diff)
modiagram (13may14)
git-svn-id: svn://tug.org/texlive/trunk@34010 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/modiagram/modiagram.sty87
1 files changed, 57 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/modiagram/modiagram.sty b/Master/texmf-dist/tex/latex/modiagram/modiagram.sty
index 4712b6e7e81..c4cc34e7c7c 100644
--- a/Master/texmf-dist/tex/latex/modiagram/modiagram.sty
+++ b/Master/texmf-dist/tex/latex/modiagram/modiagram.sty
@@ -28,12 +28,12 @@
% This work consists of the files modiagram.sty, modiagram_en.tex,
% README and the derived file modiagram_en.pdf.
% --------------------------------------------------------------------------
-\RequirePackage{ expl3 , xparse , l3keys2e , tikz , textgreek }
+\RequirePackage{ expl3 , xparse , l3keys2e , tikz , chemgreek }
\usetikzlibrary{calc,arrows}
\ProvidesExplPackage
{modiagram}
- {2013/04/28}
- {0.2c}
+ {2014/05/12}
+ {0.2d}
{easy creation of molecular orbital diagrams}
% --------------------------------------------------------------------------
@@ -203,11 +203,9 @@
% position the spin-up/spin-down el:
\cs_new_protected:Npn \__MOdiagram_AO_place_electron:nn #1#2
{
- \fp_set:Nn \l__MOdiagram_tmpa_fp { #2 }
- \fp_compare:nNnT { \l__MOdiagram_tmpa_fp } < { 0 }
+ \fp_compare:nNnT { #2 } < { 0 }
{ \msg_error:nn { MOdiagram } { electron-placement } }
- \fp_abs:N \l__MOdiagram_tmpa_fp
- \fp_compare:nNnT { \l__MOdiagram_tmpa_fp } > { 1 }
+ \fp_compare:nNnT { abs( #2 ) } > { 1 }
{ \msg_error:nn { MOdiagram } { electron-placement } }
\bool_if:nTF { #1 }
{ \tl_set:Nn \l__MOdiagram_AO_down_electron_tl { #2 } }
@@ -1593,7 +1591,8 @@
\IfNoValueTF { #1 }
{
\int_gincr:N \g__MOdiagram_AO_name_int
- \tl_set:Nn \l__MOdiagram_AO_name_tl { AO \int_use:N \g__MOdiagram_AO_name_int }
+ \tl_set:Nn \l__MOdiagram_AO_name_tl
+ { AO \int_use:N \g__MOdiagram_AO_name_int }
}
{ \tl_set:Nn \l__MOdiagram_AO_name_tl { #1 } }
\IfNoValueF { #4 }
@@ -1616,12 +1615,20 @@
\l__MOdiagram_AO_dim
)
{
- \bool_if:nT { \l__MOdiagram_AO_up_electron_bool || \l__MOdiagram_AO_x_up_electron_bool }
+ \bool_if:nT
+ {
+ \l__MOdiagram_AO_up_electron_bool ||
+ \l__MOdiagram_AO_x_up_electron_bool
+ }
{
\__MOdiagram_AO_place_electron:nx { 0 }
{ \tl_use:N \l__MOdiagram_AO_x_up_electron_tl }
}
- \bool_if:nT { \l__MOdiagram_AO_down_electron_bool || \l__MOdiagram_AO_x_down_electron_bool }
+ \bool_if:nT
+ {
+ \l__MOdiagram_AO_down_electron_bool ||
+ \l__MOdiagram_AO_x_down_electron_bool
+ }
{
\__MOdiagram_AO_place_electron:nx { 1 }
{ \tl_use:N \l__MOdiagram_AO_x_down_electron_tl }
@@ -1645,12 +1652,20 @@
\l__MOdiagram_AO_dim
)
{
- \bool_if:nT { \l__MOdiagram_AO_up_electron_bool || \l__MOdiagram_AO_y_up_electron_bool }
+ \bool_if:nT
+ {
+ \l__MOdiagram_AO_up_electron_bool ||
+ \l__MOdiagram_AO_y_up_electron_bool
+ }
{
\__MOdiagram_AO_place_electron:nx { 0 }
{ \tl_use:N \l__MOdiagram_AO_y_up_electron_tl }
}
- \bool_if:nT { \l__MOdiagram_AO_down_electron_bool || \l__MOdiagram_AO_y_down_electron_bool }
+ \bool_if:nT
+ {
+ \l__MOdiagram_AO_down_electron_bool ||
+ \l__MOdiagram_AO_y_down_electron_bool
+ }
{
\__MOdiagram_AO_place_electron:nx { 1 }
{ \tl_use:N \l__MOdiagram_AO_y_down_electron_tl }
@@ -1659,6 +1674,7 @@
{ \tl_use:N \l__MOdiagram_AO_py_electron_tl }
{ \tl_use:N \l__MOdiagram_AO_y_electron_color_tl }
} ;
+ % `o' expansion doesn't seem to make sense here:
\__MOdiagram_AO_get_orbital_y_label:o { \tl_use:N \l__MOdiagram_AO_name_tl y }
\__MOdiagram_node:n { inner~sep=0 , outer~sep=0 }
( \tl_use:N \l__MOdiagram_AO_name_tl z )
@@ -1668,12 +1684,20 @@
\l__MOdiagram_AO_dim
)
{
- \bool_if:nT { \l__MOdiagram_AO_up_electron_bool || \l__MOdiagram_AO_z_up_electron_bool }
+ \bool_if:nT
+ {
+ \l__MOdiagram_AO_up_electron_bool ||
+ \l__MOdiagram_AO_z_up_electron_bool
+ }
{
\__MOdiagram_AO_place_electron:nx { 0 }
{ \tl_use:N \l__MOdiagram_AO_z_up_electron_tl }
}
- \bool_if:nT { \l__MOdiagram_AO_down_electron_bool || \l__MOdiagram_AO_z_down_electron_bool }
+ \bool_if:nT
+ {
+ \l__MOdiagram_AO_down_electron_bool ||
+ \l__MOdiagram_AO_z_down_electron_bool
+ }
{
\__MOdiagram_AO_place_electron:nx { 1 }
{ \tl_use:N \l__MOdiagram_AO_z_down_electron_tl }
@@ -1682,7 +1706,8 @@
{ \tl_use:N \l__MOdiagram_AO_pz_electron_tl }
{ \tl_use:N \l__MOdiagram_AO_z_electron_color_tl }
} ;
- \__MOdiagram_AO_get_orbital_z_label:o { \tl_use:N \l__MOdiagram_AO_name_tl z }
+ \__MOdiagram_AO_get_orbital_z_label:o
+ { \tl_use:N \l__MOdiagram_AO_name_tl z }
}
\group_end:
}
@@ -1806,16 +1831,16 @@
\prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2pyright } { 2p$@y$ }
\prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2pzleft } { 2p$@z$ }
\prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2pzright } { 2p$@z$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 1sigma } { 1\textsigma$@s$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 1sigma* } { 1\textsigma$^*@s$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2sigma } { 2\textsigma$@s$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2sigma* } { 2\textsigma$^*@s$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2psigma } { 2\textsigma$@x$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2psigma* } { 2\textsigma$^*@x$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piy } { 2\textpi$@y$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piy* } { 2\textpi$^*@y$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piz } { 2\textpi$@z$ }
- \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piz* } { 2\textpi$^*@z$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 1sigma } { 1\chemsigma$@s$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 1sigma* } { 1\chemsigma$^*@s$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2sigma } { 2\chemsigma$@s$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2sigma* } { 2\chemsigma$^*@s$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2psigma } { 2\chemsigma$@x$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2psigma* } { 2\chemsigma$^*@x$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piy } { 2\chempi$@y$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piy* } { 2\chempi$^*@y$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piz } { 2\chempi$@z$ }
+ \prop_put:Nnn \l__MOdiagram_orbital_label_prop { 2piz* } { 2\chempi$^*@z$ }
}
}
\char_set_catcode_letter:N \@
@@ -2051,7 +2076,8 @@
\cs_generate_variant:Nn \__MOdiagram_tikzpicture:n { f }
\tex_endinput:D
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% --------------------------------------------------------------------------- %
Version history
2011/09/25 version 0.1 - first upload to CTAN
2011/10/27 version 0.2 - \atom, \molecule, \AO, \EnergyAxis only defined within
@@ -2064,12 +2090,13 @@ Version history
- default node names for the arbitrary AOs
- horizontal shift of electrons possible
- customization of atom- and molecule names possible
-2013/04/28 version 0.2c - fix: adapt to deprecated expl3 command
+2013/04/28 version 0.2c - fix: adapt to deprecated expl3 command
+2014/05/12 version 0.2d - fix: adapt to deprecated expl3 command
+ - change dependency from `textgreek' to `chemgreek'
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% TODO
+TODO
- 3s, 3p , 3sMO , 3pMO , 4s , sp3
- energy axis: ticks? at orbital heights?
- electron configuration
- localisation for the energy axis title using the translator package
-- Default-Einheit (bislang cm) ändern können? \ No newline at end of file
+- Default-Einheit (bislang cm) ändern können?