| 1 |
% arara: pdflatex |
| 2 |
% arara: biber |
| 3 |
% arara: pdflatex |
| 4 |
% arara: pdflatex |
| 5 |
% -------------------------------------------------------------------------- |
| 6 |
% the ENdiagram package |
| 7 |
% |
| 8 |
% easy creation of potential energy curve diagrams |
| 9 |
% |
| 10 |
% -------------------------------------------------------------------------- |
| 11 |
% Clemens Niederberger |
| 12 |
% Web: https://www.bitbucket.org/cgnieder/endiagram |
| 13 |
% E-Mail: [email protected] |
| 14 |
% -------------------------------------------------------------------------- |
| 15 |
% If you have any ideas, questions, suggestions or bugs to report, please |
| 16 |
% feel free to contact me. |
| 17 |
% -------------------------------------------------------------------------- |
| 18 |
% Copyright 2011--2013 Clemens Niederberger |
| 19 |
% |
| 20 |
% This work may be distributed and/or modified under the |
| 21 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 22 |
% of this license or (at your option) any later version. |
| 23 |
% The latest version of this license is in |
| 24 |
% http://www.latex-project.org/lppl.txt |
| 25 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 26 |
% version 2005/12/01 or later. |
| 27 |
% |
| 28 |
% This work has the LPPL maintenance status `maintained'. |
| 29 |
% |
| 30 |
% The Current Maintainer of this work is Clemens Niederberger. |
| 31 |
% |
| 32 |
% This work consists of the files endiagram.sty, endiagram_en.tex, |
| 33 |
% README and the derived file endiagram_en.pdf. |
| 34 |
% -------------------------------------------------------------------------- |
| 35 |
\documentclass[load-preamble+]{cnltx-doc} |
| 36 |
\usepackage[utf8]{inputenc} |
| 37 |
\usepackage{endiagram} |
| 38 |
|
| 39 |
\setcnltx{ |
| 40 |
package = endiagram , |
| 41 |
title = \ENdiagram , |
| 42 |
authors = Clemens Niederberger , |
| 43 |
email = [email protected] , |
| 44 |
url = https://bitbucket.org/cgnieder/endiagram/ , |
| 45 |
add-cmds = { |
| 46 |
AddAxisLabel, |
| 47 |
ENcurve, ENsetup, |
| 48 |
MakeOrigin, ShowEa, ShowGain, |
| 49 |
ShowNiveaus |
| 50 |
} , |
| 51 |
add-envs = { MOdiagram } , |
| 52 |
add-silent-cmds = { |
| 53 |
arrow, |
| 54 |
calory, ch, chemfig, chemsetup, color, command, |
| 55 |
DeclareChemIUPAC, draw, |
| 56 |
fontfamily, |
| 57 |
iso, |
| 58 |
joule, |
| 59 |
kilo, |
| 60 |
lewis, libertineLF, |
| 61 |
mole, |
| 62 |
node, |
| 63 |
per, |
| 64 |
schemestart, schemestop, selectfont, setatomsep, sisetup, |
| 65 |
tert, tikz, transitionstatesymbol |
| 66 |
} |
| 67 |
} |
| 68 |
|
| 69 |
\newpackagename\ENdiagram{endiagram} |
| 70 |
|
| 71 |
\defbibheading{bibliography}{\addsec{References}} |
| 72 |
|
| 73 |
\usepackage{chemmacros,chemfig,ragged2e} |
| 74 |
|
| 75 |
\usepackage{acro} |
| 76 |
\acsetup{short-format=\scshape} |
| 77 |
\DeclareAcronym{su}{ |
| 78 |
short = su , |
| 79 |
long = standard unit |
| 80 |
} |
| 81 |
\DeclareAcronym{CTAN}{ |
| 82 |
short = ctan , |
| 83 |
long = Comprehensive \TeX{} Archive Network |
| 84 |
} |
| 85 |
\DeclareAcronym{MWE}{ |
| 86 |
short = mwe , |
| 87 |
long = minimal working example |
| 88 |
} |
| 89 |
|
| 90 |
\begin{filecontents}{\jobname.bib} |
| 91 |
@book{brueckner, |
| 92 |
author = {Reinhard Br\"uckner}, |
| 93 |
title = {Reaktionsmechanismen}, |
| 94 |
publisher = {Springer-Verlag Berlin Heidelberg}, |
| 95 |
edition = {3.\,Auflage, 2.\,korrigierter Nachdruck}, |
| 96 |
year = {2009}, |
| 97 |
isbn = {978-3-8274-1579-0} |
| 98 |
} |
| 99 |
@package{pkg:tikz, |
| 100 |
author = {Till Tantau and Mark Wibrow and Christian Feuersänger}, |
| 101 |
title = {Ti\textbf{\textit{k}}Z/pgf}, |
| 102 |
sorttitle = {TikZ}, |
| 103 |
version = {2.10}, |
| 104 |
date = {2010-20-25}, |
| 105 |
url = {http://sourceforge.net/projects/pgf/}, |
| 106 |
urldate = {2013-04-18} |
| 107 |
} |
| 108 |
@package{pkg:siunitx, |
| 109 |
author = {Joseph Wright}, |
| 110 |
title = {siunitx}, |
| 111 |
version = {2.5q}, |
| 112 |
date = {2013-03-11}, |
| 113 |
url = {mirror.ctan.org/macros/latex/contrib/siunitx/} |
| 114 |
} |
| 115 |
\end{filecontents} |
| 116 |
|
| 117 |
% \setlength{\marginparwidth}{1.5\marginparwidth} |
| 118 |
|
| 119 |
\newcommand*\TikZ{Ti\textit{k}Z} |
| 120 |
|
| 121 |
\begin{document} |
| 122 |
|
| 123 |
\section{Licence and Requirements} |
| 124 |
\license |
| 125 |
|
| 126 |
\ENdiagram\ needs the \bnd{l3kernel}~\cite{bnd:l3kernel} and the package |
| 127 |
\pkg{xparse}. \pkg{xparse} is part of the |
| 128 |
\bnd{l3packages}~\cite{bnd:l3packages} bundle. \ENdiagram\ also needs |
| 129 |
\TikZ~\cite{pkg:pgf} and \pkg{siunitx}~\cite{pkg:siunitx}. |
| 130 |
|
| 131 |
Basic knowledge of \TikZ/pgf is recommended. |
| 132 |
|
| 133 |
\section{Caveat} |
| 134 |
This package is in an experimental state. There is lots of code to clean up |
| 135 |
and there are many loose ends to be tied together until I'll be satisfied to |
| 136 |
publish this package as stable. However, as the unofficial release on my blog |
| 137 |
has gotten quite some interest\footnote{$\ge 400$ downloads} I decided to |
| 138 |
publish this experimental version on the \CTAN{} nonetheless. |
| 139 |
|
| 140 |
If you detect any bugs -- and I guess you will -- please write me a short email |
| 141 |
with a \ac{MWE} showing the undesired behaviour or report on issue on |
| 142 |
\url{https://www.bitbucket.org/cgnieder/endiagram}. |
| 143 |
|
| 144 |
\section{Setup} |
| 145 |
|
| 146 |
There are two kinds of options: choice options where you can choose one of the |
| 147 |
values separated with \code{|}; an underlined value is a default value that is |
| 148 |
used, if no value is given. The others need a value of a certain type like a |
| 149 |
number (\meta{num}), arbitrary input (\meta{text}), \TikZ\ options |
| 150 |
(\meta{tikz}) \etc. |
| 151 |
|
| 152 |
As a rule commands are only defined inside the \env{endiagram} environment. |
| 153 |
|
| 154 |
Options can also be set up with this command: |
| 155 |
\begin{commands} |
| 156 |
\command{ENsetup}[\oarg{module}\marg{options}] |
| 157 |
The setup command. |
| 158 |
\end{commands} |
| 159 |
|
| 160 |
\begin{sourcecode} |
| 161 |
\ENsetup{option1 = value1, option2 = value2} |
| 162 |
\ENsetup{module/option = value} |
| 163 |
\ENsetup[module]{option = value} |
| 164 |
\end{sourcecode} |
| 165 |
|
| 166 |
Options that belong to a module are specific to a command. The command |
| 167 |
\cs*{command} they belong to can \emph{only} have the options marked with |
| 168 |
\module*{command} in his argument \oarg{options}. |
| 169 |
|
| 170 |
All other options can also be set globally as package options. These are |
| 171 |
options which do \emph{not} belong to a module like for example the |
| 172 |
\option{draft} option (see page~\pageref{key:debug}): |
| 173 |
\begin{sourcecode} |
| 174 |
\usepackage[draft]{endiagram} |
| 175 |
\end{sourcecode} |
| 176 |
|
| 177 |
\section{The Curve -- \cs*{ENcurve}} |
| 178 |
The potential energy curves are drawn inside the \env{endiagram} |
| 179 |
environment using the command \cs{ENcurve}. |
| 180 |
\begin{environments} |
| 181 |
\environment{endiagram}[\oarg{options}] |
| 182 |
The basic environment for the potential energy curves |
| 183 |
\end{environments} |
| 184 |
\begin{commands} |
| 185 |
\command{ENcurve}[\oarg{options}\Marg{\meta{level1},\meta{level2},\meta{level3}}] |
| 186 |
The basic command for drawing the actual curve. |
| 187 |
\end{commands} |
| 188 |
The command needs a comma separated list of relative energy levels. |
| 189 |
\cs{ENcurve}\Marg{1,4,0} means the maximum is four times higher above the end |
| 190 |
level than the starting level. |
| 191 |
|
| 192 |
\begin{example}[side-by-side] |
| 193 |
\begin{endiagram} |
| 194 |
\ENcurve{1,4,0} |
| 195 |
\end{endiagram} |
| 196 |
\end{example} |
| 197 |
|
| 198 |
\cs{ENcurve} can read any number of values but needs \emph{at least three}. |
| 199 |
Less values will cause an error. |
| 200 |
\begin{example} |
| 201 |
\begin{endiagram} |
| 202 |
\ENcurve{1,5,2.5,4,0} |
| 203 |
\end{endiagram} |
| 204 |
\quad |
| 205 |
\begin{endiagram}[scale=.7] |
| 206 |
\ENcurve{1,7,2.5,6,3,4,0} |
| 207 |
\end{endiagram} |
| 208 |
\end{example} |
| 209 |
|
| 210 |
\subsection{Properties} |
| 211 |
\subsubsection{Scaling} |
| 212 |
|
| 213 |
Values given to \cs{ENcurve} are multiples of \ENdiagram's \ac{su}. As a default |
| 214 |
it is set to \SI{.5}{cm} but can be changed using an option. There are other ways |
| 215 |
to influence the size of the diagram, too. |
| 216 |
\begin{options} |
| 217 |
\keyval{unit}{length}\Default{.5cm} |
| 218 |
The standard unit for \cs{ENcurve} and some other commands. This document |
| 219 |
refers to it with \ac{su}. \label{key:unit} |
| 220 |
\keyval{scale}{factor}\Default{1} |
| 221 |
A scaling factor that allows scaling the diagram. |
| 222 |
\end{options} |
| 223 |
|
| 224 |
A changed \ac{su}: |
| 225 |
\begin{example}[side-by-side] |
| 226 |
\begin{endiagram}[unit=2em] |
| 227 |
\ENcurve{1,4,0} |
| 228 |
\end{endiagram} |
| 229 |
\end{example} |
| 230 |
|
| 231 |
Scaled by the factor \code{1.5}: |
| 232 |
\begin{example}[side-by-side] |
| 233 |
\begin{endiagram}[scale=1.5] |
| 234 |
\ENcurve{1,4,0} |
| 235 |
\end{endiagram} |
| 236 |
\end{example} |
| 237 |
|
| 238 |
\subsubsection{Influencing the position relative to the axes} |
| 239 |
|
| 240 |
The \option{offset} options control the length and position of the horizontal |
| 241 |
axis relative to the curve. |
| 242 |
\begin{options} |
| 243 |
\keyval{offset}{num}\Default{0} |
| 244 |
\meta{num} is a multiple of the \ac{su} (see page~\pageref{key:unit}). |
| 245 |
\keyval{r-offset}{num}\Default{0} |
| 246 |
\meta{num} is a multiple of the \ac{su}. |
| 247 |
\keyval{l-offset}{num}\Default{0} |
| 248 |
\meta{num} is a multiple of the \ac{su}. |
| 249 |
\end{options} |
| 250 |
|
| 251 |
The default behaviour for comparison: |
| 252 |
\begin{example}[side-by-side] |
| 253 |
\begin{endiagram} |
| 254 |
\ENcurve{1,4,0} |
| 255 |
\end{endiagram} |
| 256 |
\end{example} |
| 257 |
|
| 258 |
\option{l-offset} controls the distance of the start of the $x$ axis to the |
| 259 |
start of the curve: |
| 260 |
\begin{example}[side-by-side] |
| 261 |
closer to the $y$ axis:\par |
| 262 |
\begin{endiagram}[l-offset=-1] |
| 263 |
\ENcurve{1,4,0} |
| 264 |
\end{endiagram} |
| 265 |
\end{example} |
| 266 |
|
| 267 |
\option{r-offset} controls the ``protruding'' of the $x$ axis after the curve: |
| 268 |
\begin{example}[side-by-side] |
| 269 |
$x$ axis extended to the right:\par |
| 270 |
\begin{endiagram}[r-offset=1] |
| 271 |
\ENcurve{1,4,0} |
| 272 |
\end{endiagram} |
| 273 |
\end{example} |
| 274 |
|
| 275 |
\option{offset} changes both values equally: |
| 276 |
\begin{example}[side-by-side] |
| 277 |
$x$ extended to the left and the right:\par |
| 278 |
\begin{endiagram}[offset=1] |
| 279 |
\ENcurve{1,4,0} |
| 280 |
\end{endiagram} |
| 281 |
\end{example} |
| 282 |
|
| 283 |
\subsubsection{Increment between the levels} |
| 284 |
|
| 285 |
With the option \option{step} the default increment between the levels can be |
| 286 |
changed: |
| 287 |
\begin{options} |
| 288 |
\keyval{step}{num}\Module{ENcurve}\Default{2} |
| 289 |
\meta{num} is a multiple of the \ac{su} (see page~\pageref{key:unit}). |
| 290 |
\end{options} |
| 291 |
|
| 292 |
\begin{example} |
| 293 |
\begin{endiagram} |
| 294 |
\ENcurve{1,4,0} |
| 295 |
\end{endiagram} |
| 296 |
\quad |
| 297 |
\begin{endiagram} |
| 298 |
\ENcurve[step=3]{1,4,0} |
| 299 |
\end{endiagram} |
| 300 |
\end{example} |
| 301 |
|
| 302 |
Sometimes a certain level should be shifted against the others. This is |
| 303 |
possible using an optional argument to the value of that level: |
| 304 |
\begin{commands} |
| 305 |
\command{ENcurve}[\Marg{\meta{level}\oarg{offset},...}] |
| 306 |
\meta{offset} is a multiple of the \ac{su} (see page~\pageref{key:unit}) |
| 307 |
and is set to \code{0} as default. The level will be shifted to the right |
| 308 |
(positive values) or left (negative values). |
| 309 |
\end{commands} |
| 310 |
\begin{example} |
| 311 |
\begin{endiagram} |
| 312 |
\ENcurve{1,4,0} |
| 313 |
\end{endiagram} |
| 314 |
\quad |
| 315 |
\begin{endiagram} |
| 316 |
\ENcurve{1,4[.5],0} |
| 317 |
\end{endiagram} |
| 318 |
\quad |
| 319 |
\begin{endiagram} |
| 320 |
\ENcurve{1,4[-.5],0} |
| 321 |
\end{endiagram} |
| 322 |
\end{example} |
| 323 |
|
| 324 |
\subsubsection{The shape} |
| 325 |
|
| 326 |
The option \option{looseness} changes the shape of the curve: |
| 327 |
\begin{options} |
| 328 |
\keyval{looseness}{value}\Module{ENcurve}\Default{.5} |
| 329 |
should be a number between \code{0} and \code{1}. |
| 330 |
\end{options} |
| 331 |
|
| 332 |
\begin{example} |
| 333 |
\begin{endiagram} |
| 334 |
\ENcurve[looseness=0]{0,3,1} |
| 335 |
\end{endiagram} |
| 336 |
\quad |
| 337 |
\begin{endiagram} |
| 338 |
\ENcurve{0,3,1}% corresponds looseness=.5 |
| 339 |
\end{endiagram} |
| 340 |
\quad |
| 341 |
\begin{endiagram} |
| 342 |
\ENcurve[looseness=1]{0,3,1} |
| 343 |
\end{endiagram} |
| 344 |
\end{example} |
| 345 |
|
| 346 |
\subsubsection{Ending minima} |
| 347 |
|
| 348 |
Sometimes potential energy curves are drawn with local minima at the start and |
| 349 |
the end of the cuve. The option \option{minima} en- or disables them: |
| 350 |
\begin{options} |
| 351 |
\keybool{minima}\Module{ENcurve}\Default{false} |
| 352 |
Draw local minima at the ends of the curve. |
| 353 |
\end{options} |
| 354 |
|
| 355 |
\begin{example}[side-by-side] |
| 356 |
\begin{endiagram} |
| 357 |
\ENcurve[minima]{1,4,0} |
| 358 |
\end{endiagram} |
| 359 |
\end{example} |
| 360 |
|
| 361 |
\subsubsection{\TikZ{} style} |
| 362 |
|
| 363 |
The style of the curve can be changed using \TikZ{} options: |
| 364 |
\begin{options} |
| 365 |
\keyval{tikz}{tikz}\Module{ENcurve}\Default |
| 366 |
Valid are options that can be used with \cs*{draw}. |
| 367 |
\end{options} |
| 368 |
\begin{example}[side-by-side] |
| 369 |
\begin{endiagram} |
| 370 |
\ENcurve[tikz={red,dotted}]{0,3,1} |
| 371 |
\end{endiagram} |
| 372 |
\end{example} |
| 373 |
|
| 374 |
\subsection{The Axes} |
| 375 |
|
| 376 |
There are also possibilities to customize the axes. |
| 377 |
\begin{options} |
| 378 |
\keychoice{axes}{xy,y,y-l,y-r,x,all,false}\Default{xy} |
| 379 |
Number and type of axes. |
| 380 |
\keyval{x-axis}{tikz}\Default |
| 381 |
\TikZ{} options to the $x$ axis. |
| 382 |
\keyval{y-axis}{tikz}\Default |
| 383 |
\TikZ{} options to the $y$ axis. |
| 384 |
\keychoice{x-label}{below,right}\Default{below} |
| 385 |
Position of the $x$ axis label. |
| 386 |
\keychoice{y-label}{above,left}\Default{left} |
| 387 |
Position of the $y$ axis label. |
| 388 |
\keyval{x-label-pos}{value}\Default{.5} |
| 389 |
Position of the $x$ axis label when \keyis{x-label}{below} is set. |
| 390 |
\keyval{y-label-pos}{value}\Default{.5} |
| 391 |
Position of the $y$ axis label when \keyis{y-label}{left} is set. |
| 392 |
\keyval{x-label-offset}{length}\Default{0pt} |
| 393 |
Distance between label and $x$ axis. |
| 394 |
\keyval{y-label-offset}{length}\Default{0pt} |
| 395 |
Distance between label and $y$ axis. |
| 396 |
\keyval{x-label-angle}{angle}\Default{0} |
| 397 |
Angle which rotates the $x$ axis label counter clockwise. |
| 398 |
\keyval{y-label-angle}{angle}\Default{0} |
| 399 |
Angle which rotates the $y$ axis label counter clockwise. |
| 400 |
\keyval{x-label-text}{text}\Default{\$\cs*{xi}\$} |
| 401 |
$x$ axis label. |
| 402 |
\keyval{y-label-text}{text}\Default{\$E\$} |
| 403 |
$y$ axis label. |
| 404 |
\end{options} |
| 405 |
|
| 406 |
No axes: |
| 407 |
\begin{example}[side-by-side] |
| 408 |
\begin{endiagram}[axes=false] |
| 409 |
\ENcurve{1,4,0} |
| 410 |
\end{endiagram} |
| 411 |
\end{example} |
| 412 |
|
| 413 |
All axes: |
| 414 |
\begin{example}[side-by-side] |
| 415 |
\begin{endiagram}[axes=all] |
| 416 |
\ENcurve{1,4,0} |
| 417 |
\end{endiagram} |
| 418 |
\end{example} |
| 419 |
|
| 420 |
Only the $x$ axis: |
| 421 |
\begin{example}[side-by-side] |
| 422 |
\begin{endiagram}[axes=x] |
| 423 |
\ENcurve{1,4,0} |
| 424 |
\end{endiagram} |
| 425 |
\end{example} |
| 426 |
|
| 427 |
Changed labels: |
| 428 |
\begin{example}[side-by-side] |
| 429 |
\begin{endiagram}[x-label-text=\footnotesize reaction coordinate] |
| 430 |
\ENcurve{1,4,0} |
| 431 |
\end{endiagram} |
| 432 |
\end{example} |
| 433 |
|
| 434 |
Different positions of the labels: |
| 435 |
\begin{example} |
| 436 |
\begin{endiagram}[ |
| 437 |
x-label=right, |
| 438 |
y-label=above] |
| 439 |
\ENcurve{1,4,0} |
| 440 |
\end{endiagram} |
| 441 |
\quad |
| 442 |
\begin{endiagram}[ |
| 443 |
x-label-pos=.7, |
| 444 |
y-label-pos=.7, |
| 445 |
y-label-angle=-90, |
| 446 |
y-label-offset=5pt] |
| 447 |
\ENcurve{1,4,0} |
| 448 |
\end{endiagram} |
| 449 |
\end{example} |
| 450 |
|
| 451 |
Crazy setup: |
| 452 |
\begin{example}[side-by-side] |
| 453 |
\begin{endiagram}[x-axis={draw=blue,dashed,font=\color{green}}] |
| 454 |
\ENcurve{1,4,0} |
| 455 |
\end{endiagram} |
| 456 |
\end{example} |
| 457 |
|
| 458 |
\subsection{Debugging Information} |
| 459 |
|
| 460 |
For precise adjustments of details -- particularly with the options and |
| 461 |
commands described in the next sections -- some information is useful that is |
| 462 |
hidden normally. These options enable access: |
| 463 |
\begin{options} |
| 464 |
\keybool{debug}\Default{false} |
| 465 |
Enable debug mode of \ENdiagram. \label{key:debug} |
| 466 |
\keybool{draft}\Default{false} |
| 467 |
An alias to \option{debug}. |
| 468 |
\keybool{final}\Default{true} |
| 469 |
The opposite of \option{draft}. |
| 470 |
\end{options} |
| 471 |
|
| 472 |
\begin{example} |
| 473 |
\begin{endiagram}[debug] |
| 474 |
\ENcurve{1,4,0} |
| 475 |
\end{endiagram} |
| 476 |
\quad |
| 477 |
\begin{endiagram}[debug,unit=2em] |
| 478 |
\ENcurve[step=3,minima]{1,4,0} |
| 479 |
\end{endiagram} |
| 480 |
\end{example} |
| 481 |
Shown are a grid, the origin and the coordinates and names of the levels. |
| 482 |
Depending on the commands you're using you get more information. It is |
| 483 |
described with the commands they belong to. |
| 484 |
|
| 485 |
\section{The Levels} |
| 486 |
\subsection{The \cs*{ShowNiveaus} Command} |
| 487 |
The command \cs{ShowNiveaus} draws horizontal lines to the levels: |
| 488 |
\begin{commands} |
| 489 |
\command{ShowNiveaus}[\oarg{options}] |
| 490 |
Draw a visual hint of the different niveaus. |
| 491 |
\end{commands} |
| 492 |
|
| 493 |
\begin{example}[side-by-side] |
| 494 |
\begin{endiagram} |
| 495 |
\ENcurve{3,4,0} |
| 496 |
\ShowNiveaus |
| 497 |
\end{endiagram} |
| 498 |
\end{example} |
| 499 |
|
| 500 |
\subsection{Customization} |
| 501 |
|
| 502 |
A number of options allow fine-tuning: |
| 503 |
\begin{options} |
| 504 |
\keyval{length}{num}\Module{ShowNiveaus}\Default{1} |
| 505 |
The length of the lines. \meta{num} is a multiple of the \ac{su} (see |
| 506 |
page~\pageref{key:unit}). |
| 507 |
\keyval{shift}{num}\Module{ShowNiveaus}\Default{0} |
| 508 |
Shift to the right (positive values) or the left (negative values). |
| 509 |
\meta{num} is a multiple of the \ac{su}. |
| 510 |
\keyval{tikz}{tikz}\Module{ShowNiveaus}\Default |
| 511 |
\TikZ options to modify the style of the lines. |
| 512 |
\end{options} |
| 513 |
|
| 514 |
Longer lines: |
| 515 |
\begin{example}[side-by-side] |
| 516 |
\begin{endiagram} |
| 517 |
\ENcurve{3,4,0} |
| 518 |
\ShowNiveaus[length=2] |
| 519 |
\end{endiagram} |
| 520 |
\end{example} |
| 521 |
|
| 522 |
Without option \option{shift} the lines are centered to the extrema , \ie, |
| 523 |
they protrude by half of the value specified with option \option{length}. |
| 524 |
\begin{example} |
| 525 |
\begin{endiagram} |
| 526 |
\ENcurve{3,4,0} |
| 527 |
\ShowNiveaus[shift=.5] |
| 528 |
\end{endiagram} |
| 529 |
\quad |
| 530 |
\begin{endiagram} |
| 531 |
\ENcurve{3,4,0} |
| 532 |
\ShowNiveaus[length=2,shift=1] |
| 533 |
\end{endiagram} |
| 534 |
\end{example} |
| 535 |
Maybe the examples in the next section will make it more clear why option |
| 536 |
\option{shift} can be useful. |
| 537 |
|
| 538 |
\subsection{Choose Levels Explicitly} |
| 539 |
|
| 540 |
If you don't want to draw a line to every level you can use this option: |
| 541 |
\begin{options} |
| 542 |
\keychoice{niveau}{\Marg{\meta{id1},\meta{id2}}}\Module{ShowNiveaus} |
| 543 |
The \meta{id} is the name of the level as shown by the \option{debug} |
| 544 |
option, see page~\pageref{key:debug}. |
| 545 |
\end{options} |
| 546 |
|
| 547 |
The debug information helps in choosing the right level. The names of the |
| 548 |
levels follow the scheme \code{N-\meta{number of curve}-\meta{number of |
| 549 |
level}}. |
| 550 |
\begin{example} |
| 551 |
\begin{endiagram}[debug] |
| 552 |
\ENcurve{3,4,0} |
| 553 |
\end{endiagram} |
| 554 |
\quad |
| 555 |
\begin{endiagram} |
| 556 |
\ENcurve{3,4,0} |
| 557 |
\ShowNiveaus[niveau=N1-2] |
| 558 |
\end{endiagram} |
| 559 |
\end{example} |
| 560 |
|
| 561 |
Every level can have a different color, length and shift: |
| 562 |
\begin{example}[side-by-side] |
| 563 |
\begin{endiagram} |
| 564 |
\ENcurve{3,4,0} |
| 565 |
\ShowNiveaus[length=2,tikz=red,niveau=N1-2] |
| 566 |
\ShowNiveaus[niveau=N1-1,shift=-.5] |
| 567 |
\ShowNiveaus[niveau=N1-3,shift=.5] |
| 568 |
\end{endiagram} |
| 569 |
\end{example} |
| 570 |
|
| 571 |
\section{The Energy Gain} |
| 572 |
\subsection{The \cs*{ShowGain} Command} |
| 573 |
|
| 574 |
The command \cs{ShowGain} enables you the show the energy gain or loss of the |
| 575 |
reaction. It is always the difference between the first and the last level. |
| 576 |
\begin{commands} |
| 577 |
\command{ShowGain}[\oarg{options}] |
| 578 |
Draw a visual hint of the energy gain. |
| 579 |
\end{commands} |
| 580 |
|
| 581 |
\begin{example}[side-by-side] |
| 582 |
\begin{endiagram} |
| 583 |
\ENcurve{3,4,0} |
| 584 |
\ShowGain |
| 585 |
\end{endiagram} |
| 586 |
\end{example} |
| 587 |
|
| 588 |
\subsection{Customization} |
| 589 |
|
| 590 |
The command has options to modify the appearance. |
| 591 |
\begin{options} |
| 592 |
\keyval{tikz}{tikz}\Module{ShowGain}\Default{<->} |
| 593 |
\TikZ{} options for the vertical line. |
| 594 |
\keyval{connect}{tikz}\Module{ShowGain}\Default{dashed,help lines} |
| 595 |
\TikZ{} options for the connecting line. |
| 596 |
\keybool{connect-from-line}\Module{ShowGain}\Default{false} |
| 597 |
The connecting line starts either at the maximum/minimum or at the line |
| 598 |
drawn by \cs{ShowNiveaus}. This option works with the default values but |
| 599 |
otherwise can lead to unwanted results. To avoid that you can either set |
| 600 |
\cs{ShowGain} \emph{before} \cs{ShowNiveaus} or you need to choose another |
| 601 |
way. |
| 602 |
\keyval{offset}{num}\Module{ShowGain}\Default{0} |
| 603 |
Shifts the vertical line to the right (positive value) or the left |
| 604 |
(negative value). \meta{num} is a multiple of \ac{su} (see |
| 605 |
page~\pageref{key:unit}). |
| 606 |
\keychoice{label}{\default{true},false,\meta{text}}\Module{ShowGain}\Default{false} |
| 607 |
Use the default label (\code{true}) or an own label |
| 608 |
(\meta{text}).\label{key:showgain_label} |
| 609 |
\keychoice{label-side}{right,left}\Module{ShowGain}\Default{right} |
| 610 |
The side of the vertical line on which the label should be placed. |
| 611 |
\keyval{label-pos}{<value>}\Module{ShowGain}\Default{.5} |
| 612 |
Position at the line. \code{0} means at the height of $H_1$, \ie, the |
| 613 |
starting level, \code{1} means at the height of $H_2$, \ie, the ending |
| 614 |
level. |
| 615 |
\keyval{label-tikz}{<tikz>}\Module{ShowGain}\Default |
| 616 |
\TikZ{} options for the label. |
| 617 |
\end{options} |
| 618 |
|
| 619 |
\begin{example}[side-by-side] |
| 620 |
\begin{endiagram} |
| 621 |
\ENcurve{3,4,0} |
| 622 |
\ShowGain[connect={dotted,red},offset=2] |
| 623 |
\end{endiagram} |
| 624 |
\end{example} |
| 625 |
|
| 626 |
Using the \option{label} option: |
| 627 |
\begin{example} |
| 628 |
\begin{endiagram} |
| 629 |
\ENcurve{3,4,0} |
| 630 |
\ShowGain[label] |
| 631 |
\end{endiagram} |
| 632 |
\begin{endiagram} |
| 633 |
\ENcurve{0,4,3} |
| 634 |
\ShowGain[label] |
| 635 |
\end{endiagram} |
| 636 |
\end{example} |
| 637 |
|
| 638 |
\begin{example}[side-by-side] |
| 639 |
\begin{endiagram} |
| 640 |
\ENcurve{3,4,0} |
| 641 |
\ShowGain[label=exothermic] |
| 642 |
\end{endiagram} |
| 643 |
\end{example} |
| 644 |
|
| 645 |
Connecting lines and levels are overlapping: |
| 646 |
\begin{example}[side-by-side] |
| 647 |
\begin{endiagram} |
| 648 |
\ENcurve{3,4,0} |
| 649 |
\ShowNiveaus |
| 650 |
\ShowGain[connect=red] |
| 651 |
\end{endiagram} |
| 652 |
\end{example} |
| 653 |
|
| 654 |
A possible solution: |
| 655 |
\begin{example}[side-by-side] |
| 656 |
\begin{endiagram} |
| 657 |
\ENcurve{3,4,0} |
| 658 |
\ShowNiveaus |
| 659 |
\ShowGain[connect-from-line,connect=red] |
| 660 |
\end{endiagram} |
| 661 |
\end{example} |
| 662 |
|
| 663 |
Better would be to set \cs{ShowNiveaus} \emph{after} \cs{ShowGain}, |
| 664 |
particularly if you're not using the default settings. |
| 665 |
\begin{example} |
| 666 |
\begin{endiagram} |
| 667 |
\ENcurve{3,4,0} |
| 668 |
\ShowNiveaus[niveau=N1-1] |
| 669 |
\ShowGain[connect={red,dotted}] |
| 670 |
\end{endiagram} |
| 671 |
\begin{endiagram} |
| 672 |
\ENcurve{3,4,0} |
| 673 |
\ShowGain[connect={red,dotted}] |
| 674 |
\ShowNiveaus[niveau=N1-1] |
| 675 |
\end{endiagram} |
| 676 |
\end{example} |
| 677 |
|
| 678 |
\subsection{Debugging Information} |
| 679 |
Using the \option{debug} option (see page~\pageref{key:debug}) gives you |
| 680 |
further information: |
| 681 |
\begin{example}[side-by-side] |
| 682 |
\begin{endiagram}[debug] |
| 683 |
\ENcurve{3,4,0} |
| 684 |
\ShowGain |
| 685 |
\end{endiagram} |
| 686 |
\end{example} |
| 687 |
|
| 688 |
\section{The Activation Energy} |
| 689 |
\subsection{The \cs*{ShowEa} Command} |
| 690 |
This command is similar to the commands \cs{ShowNiveaus} and \cs{ShowGain}. |
| 691 |
\begin{commands} |
| 692 |
\command{ShowEa}[\oarg{options}] |
| 693 |
Draw a visual hint af the activation energy. |
| 694 |
\end{commands} |
| 695 |
|
| 696 |
It enables to show the activation energy: |
| 697 |
\begin{example}[side-by-side] |
| 698 |
\begin{endiagram} |
| 699 |
\ENcurve{2,4,0} |
| 700 |
\ShowEa |
| 701 |
\end{endiagram} |
| 702 |
\end{example} |
| 703 |
|
| 704 |
The default behaviour shows the difference between the \emph{first} maximum |
| 705 |
after a \emph{previous} minimum to that minimum: |
| 706 |
\begin{example}[side-by-side] |
| 707 |
\begin{endiagram} |
| 708 |
\ENcurve{2,0,4} |
| 709 |
\ShowEa |
| 710 |
\end{endiagram} |
| 711 |
\end{example} |
| 712 |
|
| 713 |
This also holds if there is more than one maximum. How you choose a different |
| 714 |
one is described in the next section. |
| 715 |
\begin{example}[side-by-side] |
| 716 |
\begin{endiagram} |
| 717 |
\ENcurve{1,5,2.5,4,0} |
| 718 |
\ShowEa |
| 719 |
\end{endiagram} |
| 720 |
\end{example} |
| 721 |
|
| 722 |
\subsection{Choose Level Explicitly} |
| 723 |
The default behaviour is all right if there is only one maximum. If there are |
| 724 |
more one might want to choose a different one. The following options allow |
| 725 |
that. |
| 726 |
\begin{options} |
| 727 |
\keychoice{max}{first,all}\Module{ShowEa}\Default{first} |
| 728 |
Show the difference to the first maximum or to all maxima. |
| 729 |
\keychoice{from}{\Marg{(\meta{coordinate1})to(\meta{coordinate2})}}\Module{ShowEa} |
| 730 |
Specify the coordinates that should be connected. You can either use the |
| 731 |
coordinates \code{(\meta{x},\meta{y})} or the name \code{(\meta{name})} of |
| 732 |
the node. |
| 733 |
\end{options} |
| 734 |
|
| 735 |
Using \keyis{max}{all}: |
| 736 |
\begin{example}[side-by-side] |
| 737 |
\begin{endiagram} |
| 738 |
\ENcurve{1,5,2.5,4,0} |
| 739 |
\ShowEa[max=all] |
| 740 |
\end{endiagram} |
| 741 |
\end{example} |
| 742 |
|
| 743 |
Since in most cases this won't be what you want you can specify the |
| 744 |
coordinates yourself. The option \option{debug} (see |
| 745 |
page~\pageref{key:debug}) may help. |
| 746 |
\begin{example} |
| 747 |
\begin{endiagram}[debug] |
| 748 |
\ENcurve{1,5,2.5,4,0} |
| 749 |
\ShowEa |
| 750 |
\end{endiagram} |
| 751 |
\quad |
| 752 |
\begin{endiagram} |
| 753 |
\ENcurve{1,5,2.5,4,0} |
| 754 |
\ShowEa[from={(0,1) to (6,4)}] |
| 755 |
\end{endiagram} |
| 756 |
|
| 757 |
\begin{endiagram} |
| 758 |
\ENcurve{1,5,2.5,4,0} |
| 759 |
\ShowEa[from={(N1-1) to (N1-3)}] |
| 760 |
\end{endiagram} |
| 761 |
\quad |
| 762 |
\begin{endiagram} |
| 763 |
\ENcurve{1,5,2.5,4,0} |
| 764 |
\ShowEa[from={(N1-5) to (N1-4)}] |
| 765 |
\end{endiagram} |
| 766 |
\end{example} |
| 767 |
In every case the position of the vertical line is determined by the \emph{first} |
| 768 |
coordinate. |
| 769 |
|
| 770 |
\subsection{Customization} |
| 771 |
Again there are a number of options to customize the appearance. |
| 772 |
\begin{options} |
| 773 |
\keyval{tikz}{tikz}\Module{ShowEa}\Default{<->} |
| 774 |
\TikZ{} options for the vertical line. |
| 775 |
\keyval{connect}{tikz}\Module{ShowEa}\Default{dashed,help lines} |
| 776 |
\TikZ{} options for the horizontal line. |
| 777 |
\keychoice{label}{\default{true},false,\meta{text}}\Module{ShowEa}\Default{false} |
| 778 |
Use the default label ($E_{\mathrm{a}}$) or an own |
| 779 |
label.\label{key:showea_label} |
| 780 |
\keychoice{label-side}{right,left}\Module{ShowEa}\Default{right} |
| 781 |
The side of the vertical line where the label should appear. |
| 782 |
\keyval{label-pos}{value}\Module{ShowEa}\Default{.5} |
| 783 |
Determines the vertical position of the label relative to the vertical line. |
| 784 |
\code{0} means at the lower end, \code{1} means at the upper end. |
| 785 |
\keyval{label-tikz}{tikz}\Module{ShowEa}\Default |
| 786 |
\TikZ options for the label. |
| 787 |
\end{options} |
| 788 |
|
| 789 |
\begin{example}[side-by-side] |
| 790 |
\begin{endiagram} |
| 791 |
\ENcurve[step=4]{1,6,0} |
| 792 |
\ShowEa[label,label-pos=.3] |
| 793 |
\end{endiagram} |
| 794 |
\end{example} |
| 795 |
|
| 796 |
\begin{example}[side-by-side] |
| 797 |
\begin{endiagram} |
| 798 |
\ENcurve{1,5,2.5,4,0} |
| 799 |
\ShowEa[ |
| 800 |
from = {(N1-1) to (N1-3)}, |
| 801 |
connect = {draw=none}, |
| 802 |
label = endoth.] |
| 803 |
\ShowEa[ |
| 804 |
from = (N1-3) to (N1-5), |
| 805 |
label = exoth., |
| 806 |
label-pos = .7] |
| 807 |
\ShowGain[label=exoth.] |
| 808 |
\end{endiagram} |
| 809 |
\end{example} |
| 810 |
|
| 811 |
\subsection{Debugging Information} |
| 812 |
The \option{debug} option gives you further information. |
| 813 |
\begin{example} |
| 814 |
\begin{endiagram}[debug] |
| 815 |
\ENcurve{1,5,2,3,0} |
| 816 |
\ShowEa[max=all] |
| 817 |
\end{endiagram} |
| 818 |
\quad |
| 819 |
\begin{endiagram}[debug] |
| 820 |
\ENcurve{1,5,2,3,0} |
| 821 |
\ShowEa[from={(0,1) to (6,3)}] |
| 822 |
\end{endiagram} |
| 823 |
\end{example} |
| 824 |
|
| 825 |
\section{Several Curves in one Diagram} |
| 826 |
It's easy to draw several curves. You only need to use \cs{ENcurve} more than |
| 827 |
once. |
| 828 |
\begin{example} |
| 829 |
\begin{endiagram} |
| 830 |
\ENcurve[tikz=blue]{1,4,0} |
| 831 |
\ENcurve[tikz=red]{1,2.5,0} |
| 832 |
\draw[blue] (5,5) -- ++(1,0) node[black,right] {without enzyme}; |
| 833 |
\draw[red] (5,4) -- ++(1,0) node[black,right] {with enzyme}; |
| 834 |
\end{endiagram} |
| 835 |
\end{example} |
| 836 |
|
| 837 |
The commands \cs{ShowNiveaus}, \cs{ShowGain} and \cs{ShowEa} always relate to |
| 838 |
the curve set at last. This means you can use them selectively. |
| 839 |
\begin{example}[side-by-side] |
| 840 |
\begin{endiagram} |
| 841 |
\ENcurve[tikz=blue]{1,4,0} |
| 842 |
\ShowEa[tikz={blue,<->}] |
| 843 |
\ENcurve[tikz=red]{1,2.5,0} |
| 844 |
\end{endiagram} |
| 845 |
|
| 846 |
\begin{endiagram} |
| 847 |
\ENcurve[tikz=blue]{1,4,0} |
| 848 |
\ENcurve[tikz=red]{1,2.5,0} |
| 849 |
\ShowEa[tikz={red,<->}] |
| 850 |
\end{endiagram} |
| 851 |
\end{example} |
| 852 |
|
| 853 |
Using more than one curves explains the multiple numbering of the level names: |
| 854 |
\begin{example}[side-by-side] |
| 855 |
% the names of the levels (N1-1) |
| 856 |
% and (N1-3) are hidden behind |
| 857 |
% (N2-1) and (N2-3), resp. |
| 858 |
\begin{endiagram}[debug] |
| 859 |
\ENcurve{1,4,0} |
| 860 |
\ENcurve{1,2.5,0} |
| 861 |
\end{endiagram} |
| 862 |
|
| 863 |
\begin{endiagram} |
| 864 |
\ENcurve[tikz=blue]{1,4,0} |
| 865 |
\ENcurve[tikz=red]{1,2.5,0} |
| 866 |
\draw[<->] (N1-2) -- (N2-2) ; |
| 867 |
\end{endiagram} |
| 868 |
\end{example} |
| 869 |
|
| 870 |
Of course it's possible to choose different options for different curves. |
| 871 |
This means you can use curves with a different number of maxima. |
| 872 |
\begin{example}[side-by-side] |
| 873 |
\begin{endiagram} |
| 874 |
\ENcurve[step=4]{1,6,0} |
| 875 |
\ENcurve[ |
| 876 |
tikz={densely dotted}] |
| 877 |
{1,4[1],2.5,3[-1],0} |
| 878 |
\end{endiagram} |
| 879 |
\end{example} |
| 880 |
|
| 881 |
\section{Usage of \TikZ} |
| 882 |
Since the \env{endiagram} environment only is a \env*{tikzpicture} environment |
| 883 |
(well, more or less) you can use \TikZ{} commands inside it. This means you |
| 884 |
can easily add additional information to the diagram. |
| 885 |
\begin{example} |
| 886 |
% needs the package `chemmacros' |
| 887 |
\begin{endiagram} |
| 888 |
\ENcurve{1,5,2,3,0} |
| 889 |
\ShowNiveaus[length=2,niveau={N1-2,N1-3,N1-4}] |
| 890 |
\node[above,xshift=4pt] at (N1-2) {[\"UZ1]$^{\transitionstatesymbol}$} ; |
| 891 |
\node[below] at (N1-3) {ZZ} ; |
| 892 |
\node[above,xshift=4pt] at (N1-4) {[\"UZ2]$^{\transitionstatesymbol}$} ; |
| 893 |
\end{endiagram} |
| 894 |
\quad |
| 895 |
\begin{endiagram} |
| 896 |
\ENcurve{2,3,0} |
| 897 |
\draw[<-,red] (N1-2) -- ++(2,1) node[right] {transition state} ; |
| 898 |
\end{endiagram} |
| 899 |
\end{example} |
| 900 |
|
| 901 |
\subsection{The Origin} |
| 902 |
The nodes \code{(origin-l)} and \code{(origin-r)} are set at the end of the |
| 903 |
environment. This means they are \emph{not} available inside the |
| 904 |
\env{endiagram} environment. If you want to use them you either need to look |
| 905 |
up their coordinates using the \option{debug} option (see |
| 906 |
page~\pageref{key:debug}) \ldots |
| 907 |
|
| 908 |
\begin{example} |
| 909 |
\begin{endiagram}[y-label=above] |
| 910 |
\ENcurve{1,3[.5],0} |
| 911 |
\draw[dashed,help lines] |
| 912 |
(N1-2) -- (N1-2 -| -1.5,-1) |
| 913 |
node[left,black] {max} ; |
| 914 |
\end{endiagram} |
| 915 |
\end{example} |
| 916 |
\ldots\ or use this option: |
| 917 |
\begin{options} |
| 918 |
\keyval{tikz}{tikz}\Default |
| 919 |
\TikZ{} options for the \env{endiagram} environment. |
| 920 |
\end{options} |
| 921 |
With it you can pass arbitrary \TikZ{} options to the internal \code{tikzpicture} |
| 922 |
environment. |
| 923 |
\begin{example}[side-by-side] |
| 924 |
\begin{endiagram}[ |
| 925 |
y-label = above, |
| 926 |
tikz = {remember picture}] |
| 927 |
\ENcurve{1,3[.5],0} |
| 928 |
\end{endiagram} |
| 929 |
\tikz[remember picture,overlay]{ |
| 930 |
\draw[dashed,help lines] |
| 931 |
(N1-2) -- (N1-2 -| origin-l) |
| 932 |
node[left,black] {max} ; |
| 933 |
} |
| 934 |
\end{example} |
| 935 |
|
| 936 |
There is an easier way, though: you can use the following command \emph{after} |
| 937 |
drawing all curves: |
| 938 |
\begin{commands} |
| 939 |
\command{MakeOrigin} |
| 940 |
Helper command to make the origin of the coordinate system |
| 941 |
known.\label{cmd:makeorigin} |
| 942 |
\end{commands} |
| 943 |
|
| 944 |
\begin{example}[side-by-side] |
| 945 |
\begin{endiagram}[y-label = above] |
| 946 |
\ENcurve{1,3[.5],0} |
| 947 |
\MakeOrigin |
| 948 |
\draw[dashed,help lines] |
| 949 |
(N1-2) -- (N1-2 -| origin-l) |
| 950 |
node[left,black] {max} ; |
| 951 |
\end{endiagram} |
| 952 |
\end{example} |
| 953 |
|
| 954 |
\section{Axes Ticks and Labels} |
| 955 |
\subsection{Automatic Ticks} |
| 956 |
|
| 957 |
The $y$ axes can get ticks automatically. |
| 958 |
\begin{options} |
| 959 |
\keychoice{ticks}{y,\default{y-l},y-r,none}\Default{none} |
| 960 |
Adds ticks to the specified axes. |
| 961 |
\keyval{ticks-step}{num}\Default{1} |
| 962 |
\meta{num} is a multiple of the \ac{su}. \keyis{ticks-step}{2} means that |
| 963 |
only every second tick is added. |
| 964 |
\end{options} |
| 965 |
\ENsetup{ |
| 966 |
AddAxisLabel/font=\libertineLF |
| 967 |
} |
| 968 |
|
| 969 |
\begin{example} |
| 970 |
\ENsetup{ticks,y-label=above} |
| 971 |
\begin{endiagram} |
| 972 |
\ENcurve{1,5,2.5,4,0} |
| 973 |
\end{endiagram} |
| 974 |
\quad |
| 975 |
\begin{endiagram}[ticks-step=2] |
| 976 |
\ENcurve{1,5,2.5,4,0} |
| 977 |
\end{endiagram} |
| 978 |
\end{example} |
| 979 |
These ticks obey the \option{energy-unit} option, see |
| 980 |
section~\ref{sec:reale_werte}. |
| 981 |
|
| 982 |
\subsection{The \cs*{AddAxisLabel} Command} |
| 983 |
% TODO auf Unterschied zwischen den Ticks produziert durch AddAxisLabel und |
| 984 |
% Option ticks hinweisen |
| 985 |
To be able to add labels to the ticks there is the command |
| 986 |
\begin{commands} |
| 987 |
\command{AddAxisLabel}[\oarg{options}\Marg{(\meta{point1})[\meta{opt.\@ |
| 988 |
label}];(\meta{point2});...}] |
| 989 |
Add axis labels to points. |
| 990 |
\command{AddAxisLabel}[\sarg\oarg{options}\Marg{\meta{level1}[\meta{opt.\@ |
| 991 |
label}];\meta{level2};...}] |
| 992 |
Add axis labels to levels. |
| 993 |
\end{commands} |
| 994 |
As you can see there are two variants. The first one awaits a list of |
| 995 |
coordinates in the \TikZ{} sense. The second awaits $y$ values. Every of |
| 996 |
these values has an optional argument with which you can specify the label. |
| 997 |
|
| 998 |
The first variant also draws lines between the points specifiad and the $y$ |
| 999 |
axis. Internally this command calls \cs{MakeOrigin}, see |
| 1000 |
page~\pageref{cmd:makeorigin}, which means it should be used \emph{after} |
| 1001 |
drawing all curves. |
| 1002 |
|
| 1003 |
Example for the second variant: |
| 1004 |
\begin{example} |
| 1005 |
\begin{endiagram}[y-label=above] |
| 1006 |
\ENcurve{1,3,2} |
| 1007 |
\AddAxisLabel*{1;2;3} |
| 1008 |
\end{endiagram} |
| 1009 |
\begin{endiagram}[y-label=above] |
| 1010 |
\ENcurve{1,3,2} |
| 1011 |
\AddAxisLabel*{1[10];2[20];3[30]} |
| 1012 |
\end{endiagram} |
| 1013 |
\end{example} |
| 1014 |
|
| 1015 |
Example for the first variant: |
| 1016 |
\begin{example}[side-by-side] |
| 1017 |
\begin{endiagram}[y-label=above] |
| 1018 |
\ENcurve{1,3,2} |
| 1019 |
\AddAxisLabel{(N1-1)[$H_1$];(N1-3)[$H_2$]} |
| 1020 |
\end{endiagram} |
| 1021 |
\end{example} |
| 1022 |
|
| 1023 |
The optional arguments can also get \TikZ{} options. The description should read: |
| 1024 |
\begin{commands} |
| 1025 |
\command{AddAxisLabel}[\oarg{options}\Marg{(\meta{point1})[\meta{opt.\@ |
| 1026 |
label},\meta{tikz}];(\meta{point2});...}] |
| 1027 |
Add axis labels to points. |
| 1028 |
\command{AddAxisLabel}[\sarg\oarg{options}\Marg{\meta{level1}[\meta{opt.\@ |
| 1029 |
label},\meta{tikz}];\meta{level2};...}] |
| 1030 |
Add axis labels to levels. |
| 1031 |
\end{commands} |
| 1032 |
|
| 1033 |
\begin{example} |
| 1034 |
\begin{endiagram}[y-label=above] |
| 1035 |
\ENcurve{1,3,2} |
| 1036 |
\AddAxisLabel*{1[10];2[20,{draw,fill=green!15}];3[30]} |
| 1037 |
\end{endiagram} |
| 1038 |
\begin{endiagram}[y-label=above] |
| 1039 |
\ENcurve{1,3,2} |
| 1040 |
\AddAxisLabel{(N1-1)[$H_1$];(N1-3)[$H_2$,{draw,font=\color{red},fill=green!15}]} |
| 1041 |
\end{endiagram} |
| 1042 |
\end{example} |
| 1043 |
|
| 1044 |
\subsection{Customization} |
| 1045 |
|
| 1046 |
You have several options to customize the labels: |
| 1047 |
\begin{options} |
| 1048 |
\keychoice{axis}{y-l,y-r,x}\Module{AddAxisLabel}\Default{y-l} |
| 1049 |
Choose which axis gets the labels. |
| 1050 |
\keyval{connect}{tikz}\Module{AddAxisLabel}\Default{dashed,help lines} |
| 1051 |
Change the style of the lines. |
| 1052 |
\keyval{font}{commands}\Module{AddAxisLabel}\Default |
| 1053 |
You can add commands like \cs*{footnotesize} and/or \cs*{color}\Marg{red} |
| 1054 |
to format the label text. |
| 1055 |
\end{options} |
| 1056 |
|
| 1057 |
\begin{example} |
| 1058 |
\begin{endiagram}[y-label=above] |
| 1059 |
\ENcurve{1,3,2} |
| 1060 |
\AddAxisLabel{(2,3)[\"UZ]} |
| 1061 |
\end{endiagram} |
| 1062 |
\begin{endiagram}[y-label=above,x-label=right] |
| 1063 |
\ENcurve{1,3,2} |
| 1064 |
\AddAxisLabel[axis=x,connect=dotted]{(2,3)[\"UZ]} |
| 1065 |
\end{endiagram} |
| 1066 |
\begin{endiagram}[axes=all,y-label=above] |
| 1067 |
\ENcurve{1,3,2} |
| 1068 |
\AddAxisLabel[axis=y-r,connect=red]{(2,3)[\"UZ]} |
| 1069 |
\end{endiagram} |
| 1070 |
\end{example} |
| 1071 |
|
| 1072 |
\section{Actual Values}\label{sec:reale_werte} |
| 1073 |
\subsection{The Basics} |
| 1074 |
|
| 1075 |
If you want to have a more quantitative diagram or use actual values for the |
| 1076 |
energies you can use these options: |
| 1077 |
\begin{options} |
| 1078 |
\keyval{energy-unit}{unit}\Default |
| 1079 |
The unit of the energy scale. A unit in the \pkg{siunitx} sense. |
| 1080 |
\keyval{energy-step}{num}\Default{1} |
| 1081 |
Determines which increment on the energy scale corresponds to the |
| 1082 |
\ac{su}. |
| 1083 |
\keyval{energy-zero}{num}\Default{0} |
| 1084 |
Shifts the origin of the energy scale by \meta{num} in multiples of the |
| 1085 |
energy scale. |
| 1086 |
\keyval{energy-unit-separator}{anything}\Default{/} |
| 1087 |
Separates the $y$ axes label from the unit. |
| 1088 |
\keyval{energy-round}{num}\Default{3} |
| 1089 |
Rounds the value to this number of figures. |
| 1090 |
% \keybool{energy-round-places}\Default{false} |
| 1091 |
% Switch rounding mode to places. |
| 1092 |
\end{options} |
| 1093 |
Choosing a unit will add ticks and labels to the $y$ axis automatically and has |
| 1094 |
an impact on the commands \cs{ShowGain} and \cs{ShowEa}, see |
| 1095 |
section~\ref{ssec:real_einfluss}. |
| 1096 |
|
| 1097 |
\begin{example} |
| 1098 |
\begin{endiagram}[ticks,y-label=above,energy-step=10] |
| 1099 |
\ENcurve{1,3,2} |
| 1100 |
\end{endiagram} |
| 1101 |
\begin{endiagram}[y-label=above,energy-step=10,energy-zero=30] |
| 1102 |
\ENcurve{1,3,2} |
| 1103 |
\AddAxisLabel*{1;2;3} |
| 1104 |
\end{endiagram} |
| 1105 |
\end{example} |
| 1106 |
|
| 1107 |
\begin{example} |
| 1108 |
\begin{endiagram}[ |
| 1109 |
y-label=above, |
| 1110 |
energy-step=15, |
| 1111 |
energy-zero=30, |
| 1112 |
energy-unit=\kilo\joule] |
| 1113 |
\ENcurve{1,3,2} |
| 1114 |
\AddAxisLabel*{1;2;3} |
| 1115 |
\end{endiagram} |
| 1116 |
\begin{endiagram}[ |
| 1117 |
y-label=above, |
| 1118 |
energy-step=10, |
| 1119 |
energy-unit=\kilo\joule, |
| 1120 |
energy-unit-separator={ in }] |
| 1121 |
\ENcurve{1,3,2} |
| 1122 |
\AddAxisLabel*{1;2;3} |
| 1123 |
\end{endiagram} |
| 1124 |
\end{example} |
| 1125 |
|
| 1126 |
\begin{example} |
| 1127 |
\ENsetup{ |
| 1128 |
energy-unit=kJ, |
| 1129 |
energy-step=10, |
| 1130 |
energy-zero=.613, |
| 1131 |
y-label-offset=20pt |
| 1132 |
} |
| 1133 |
\begin{endiagram} |
| 1134 |
\ENcurve{1.0613,4.3465,2.9876} |
| 1135 |
\ShowGain[label] |
| 1136 |
\end{endiagram} |
| 1137 |
\end{example} |
| 1138 |
% \begin{endiagram}% [energy-round-places] |
| 1139 |
% \ENcurve{1.0613,4.3465,2.9876} |
| 1140 |
% \ShowGain[label] |
| 1141 |
% \end{endiagram} |
| 1142 |
|
| 1143 |
\subsection{Impact on Other Commands}\label{ssec:real_einfluss} |
| 1144 |
|
| 1145 |
Using the option \option{energy-unit} changes the default labels of |
| 1146 |
\cs{ShowGain} and \cs{ShowEa}. Now an actual value is shown: |
| 1147 |
\begin{example} |
| 1148 |
% uses \DeclareSIUnit{\calory}{cal} |
| 1149 |
\sisetup{per-mode = fraction} |
| 1150 |
\ENsetup{ |
| 1151 |
energy-step = 100, |
| 1152 |
energy-unit = \kilo\calory\per\mole, |
| 1153 |
energy-unit-separator = { in }, |
| 1154 |
y-label = above, |
| 1155 |
AddAxisLabel/font = \libertineLF\footnotesize |
| 1156 |
} |
| 1157 |
\begin{endiagram}[scale=1.5] |
| 1158 |
\ENcurve{2.232,4.174,.308} |
| 1159 |
\AddAxisLabel*{0;1;2;3;4} |
| 1160 |
\ShowEa[label,connect={draw=none}] |
| 1161 |
\ShowGain[label] |
| 1162 |
\end{endiagram} |
| 1163 |
\end{example} |
| 1164 |
|
| 1165 |
This behaviour can be switched off, though: |
| 1166 |
\begin{options} |
| 1167 |
\keybool{calculate}\Default{true} |
| 1168 |
Switch the calculating of activation energy and energy gain on or off. |
| 1169 |
\end{options} |
| 1170 |
\begin{example} |
| 1171 |
% uses \DeclareSIUnit{\calory}{cal} |
| 1172 |
\sisetup{per-mode = fraction} |
| 1173 |
\ENsetup{ |
| 1174 |
energy-step = 100, |
| 1175 |
energy-unit = \kilo\calory\per\mole, |
| 1176 |
energy-unit-separator = { in }, |
| 1177 |
y-label = above, |
| 1178 |
AddAxisLabel/font = \footnotesize, |
| 1179 |
} |
| 1180 |
\begin{endiagram}[scale=1.5,calculate=false] |
| 1181 |
\ENcurve{2.232,4.174,.308} |
| 1182 |
\AddAxisLabel*{0;1;2;3;4} |
| 1183 |
\ShowEa[label,connect={draw=none}] |
| 1184 |
\ShowGain[label] |
| 1185 |
\end{endiagram} |
| 1186 |
\end{example} |
| 1187 |
|
| 1188 |
\section{Example} |
| 1189 |
|
| 1190 |
The illustration of the Bell-Evans-Polanyi principle |
| 1191 |
(figure~\ref{fig:bell-evans-polanyi}) serves as an example for a more complex |
| 1192 |
usage. One reaction is coloured as it an exception to the principle. The |
| 1193 |
figure is a reproduction of a similar figure in~\cite{brueckner}. |
| 1194 |
|
| 1195 |
\begin{sourcecode} |
| 1196 |
% uses the packages `chemmacros', `chemfig' and `libertine' |
| 1197 |
\setatomsep{1.5em} |
| 1198 |
\DeclareChemIUPAC\iso{\textit{i}} |
| 1199 |
\chemsetup[chemformula]{format=\libertineLF} |
| 1200 |
\ENsetup{ |
| 1201 |
ENcurve/minima, |
| 1202 |
AddAxisLabel/font=\libertineLF\footnotesize |
| 1203 |
} |
| 1204 |
\begin{endiagram}[ |
| 1205 |
tikz = {yscale=1.5}, scale = 1.7, |
| 1206 |
y-label = above, y-label-text = $\Delta H$, |
| 1207 |
x-label = right, x-label-text = RK, |
| 1208 |
energy-step = 10] |
| 1209 |
\ENcurve{0,3.5,1} |
| 1210 |
\ENcurve[tikz=red]{0,3.7,.4} |
| 1211 |
\ENcurve{0,4.3[.2],2.4} |
| 1212 |
\ENcurve{0,4.7[.3],2.7} |
| 1213 |
\ENcurve{0,4.9[.35],2.9} |
| 1214 |
\ENcurve{0,5.2[.4],3.3} |
| 1215 |
\AddAxisLabel*{1;2;3;4;6} |
| 1216 |
\AddAxisLabel{ |
| 1217 |
(N1-1)[0]; (N1-2)[35]; (N2-2)[37]; (N3-2)[43]; (N4-2)[47]; (N5-2)[49]; |
| 1218 |
(N6-2)[52] |
| 1219 |
} |
| 1220 |
\draw[right] (N1-3) ++ (1,0) |
| 1221 |
node {\small \ch{2 "\chemfig{=_[:30]-[::-60]\lewis{0.,}}~" + N2} } ; |
| 1222 |
\draw[right,red] (N2-3) ++ (1,-.3) |
| 1223 |
node {\small \ch{2 "\chemfig{[:-60]*6(=-=-(-\lewis{0.,})=-)}~" + N2} } ; |
| 1224 |
\draw[right] (N3-3) ++ (1,-.2) |
| 1225 |
node {\small \ch{2 "\tert-\lewis{0.,Bu}~" + N2} } ; |
| 1226 |
\draw[right] (N4-3) ++ (1,-.1) |
| 1227 |
node {\small \ch{2 "\iso-\lewis{0.,Pr}~" + N2} } ; |
| 1228 |
\draw[right] (N5-3) ++ (1,0) |
| 1229 |
node {\small \ch{2 "\lewis{0.,Et}~" + N2} } ; |
| 1230 |
\draw[right] (N6-3) ++ (1,0) |
| 1231 |
node {\small \ch{2 "\lewis{0.,Me}~" + N2} } ; |
| 1232 |
\draw[above,font=\fontfamily{fxlf}\selectfont\footnotesize] |
| 1233 |
(N1-3) node {10} (N2-3) node[red] {4} |
| 1234 |
(N3-3) node {24} (N4-3) node {27} |
| 1235 |
(N5-3) node {29} (N6-3) node {33} ; |
| 1236 |
\end{endiagram} |
| 1237 |
|
| 1238 |
\setatomsep{2em} |
| 1239 |
\schemestart |
| 1240 |
\chemfig{R-[:30]N=N-[:30]R} |
| 1241 |
\arrow{->[$\Delta$]}[,2.1] |
| 1242 |
\ch{2 "\lewis{0.,R}~" + N2} |
| 1243 |
\schemestop |
| 1244 |
\end{sourcecode} |
| 1245 |
|
| 1246 |
\begin{figure} |
| 1247 |
\centering |
| 1248 |
\centering |
| 1249 |
\setatomsep{1.5em} |
| 1250 |
\DeclareChemIUPAC\iso{\textit{i}} |
| 1251 |
\chemsetup[chemformula]{format=\libertineLF} |
| 1252 |
\ENsetup{ |
| 1253 |
ENcurve/minima, |
| 1254 |
AddAxisLabel/font=\libertineLF\footnotesize |
| 1255 |
} |
| 1256 |
\begin{endiagram}[ |
| 1257 |
tikz = {yscale=1.5}, scale = 1.7, |
| 1258 |
y-label = above, y-label-text = $\Delta H$, |
| 1259 |
x-label = right, x-label-text = RK, |
| 1260 |
energy-step = 10] |
| 1261 |
\ENcurve{0,3.5,1} |
| 1262 |
\ENcurve[tikz=red]{0,3.7,.4} |
| 1263 |
\ENcurve{0,4.3[.2],2.4} |
| 1264 |
\ENcurve{0,4.7[.3],2.7} |
| 1265 |
\ENcurve{0,4.9[.35],2.9} |
| 1266 |
\ENcurve{0,5.2[.4],3.3} |
| 1267 |
\AddAxisLabel*{1;2;3;4;6} |
| 1268 |
\AddAxisLabel{ |
| 1269 |
(N1-1)[0]; (N1-2)[35]; (N2-2)[37]; (N3-2)[43]; (N4-2)[47]; (N5-2)[49]; |
| 1270 |
(N6-2)[52] |
| 1271 |
} |
| 1272 |
\draw[right] (N1-3) ++ (1,0) |
| 1273 |
node {\small \ch{2 "\chemfig{=_[:30]-[::-60]\lewis{0.,}}~" + N2} } ; |
| 1274 |
\draw[right,red] (N2-3) ++ (1,-.3) |
| 1275 |
node {\small \ch{2 "\chemfig{[:-60]*6(=-=-(-\lewis{0.,})=-)}~" + N2} } ; |
| 1276 |
\draw[right] (N3-3) ++ (1,-.2) |
| 1277 |
node {\small \ch{2 "\tert-\lewis{0.,Bu}~" + N2} } ; |
| 1278 |
\draw[right] (N4-3) ++ (1,-.1) |
| 1279 |
node {\small \ch{2 "\iso-\lewis{0.,Pr}~" + N2} } ; |
| 1280 |
\draw[right] (N5-3) ++ (1,0) |
| 1281 |
node {\small \ch{2 "\lewis{0.,Et}~" + N2} } ; |
| 1282 |
\draw[right] (N6-3) ++ (1,0) |
| 1283 |
node {\small \ch{2 "\lewis{0.,Me}~" + N2} } ; |
| 1284 |
\draw[above,font=\fontfamily{fxlf}\selectfont\footnotesize] |
| 1285 |
(N1-3) node {10} (N2-3) node[red] {4} |
| 1286 |
(N3-3) node {24} (N4-3) node {27} |
| 1287 |
(N5-3) node {29} (N6-3) node {33} ; |
| 1288 |
\end{endiagram} |
| 1289 |
|
| 1290 |
\setatomsep{2em} |
| 1291 |
\schemestart |
| 1292 |
\chemfig{R-[:30]N=N-[:30]R} |
| 1293 |
\arrow{->[$\Delta$]}[,2.1] |
| 1294 |
\ch{2 "\lewis{0.,R}~" + N2} |
| 1295 |
\schemestop |
| 1296 |
\caption{\label{fig:bell-evans-polanyi}Enthalpie-Entwicklung |
| 1297 |
entlang der Reaktionskoordinate bei einer Serie von Thermolysen |
| 1298 |
aliphatischer Azoverbindungen. Alle Thermolysen dieser Serie -- mit |
| 1299 |
Ausnahme der farbig hervorgehobenen -- folgen dem |
| 1300 |
Bell-Evans-Polanyi-Prinzip~\cite{brueckner}.} |
| 1301 |
\end{figure} |
| 1302 |
|
| 1303 |
\end{document} |
| 1304 |
|
| 1305 |
|
| 1306 |
\end{document} |