summaryrefslogtreecommitdiff
path: root/info/examples/lwc/apa
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/examples/lwc/apa
Initial commit
Diffstat (limited to 'info/examples/lwc/apa')
-rw-r--r--info/examples/lwc/apa/README.apa18
-rw-r--r--info/examples/lwc/apa/latexexa-raw.xml1054
-rw-r--r--info/examples/lwc/apa/latexexa.dtd190
-rw-r--r--info/examples/lwc/apa/latexexa.tex546
-rw-r--r--info/examples/lwc/apa/latexexa.xml171
-rw-r--r--info/examples/lwc/apa/phys332-1.eps419
-rw-r--r--info/examples/lwc/apa/phys332-2.eps556
-rw-r--r--info/examples/lwc/apa/teched.html47
-rw-r--r--info/examples/lwc/apa/teched.java187
9 files changed, 3188 insertions, 0 deletions
diff --git a/info/examples/lwc/apa/README.apa b/info/examples/lwc/apa/README.apa
new file mode 100644
index 0000000000..c011a1f118
--- /dev/null
+++ b/info/examples/lwc/apa/README.apa
@@ -0,0 +1,18 @@
+Files in Appendix A of the LaTeX Graphics Companion
+
+Section A.1
++++++++++++
+
+latexexa.tex Complete LaTeX source of example file
+phys332-1.eps EPS file used in latexexa.tex
+phys332-2.eps " "
+latexexa.dtd DTD for representing LaTeX and MathML
+latexexa-raw.xml raw XML file ontained from LaTeX-->XML translation
+latexexa.xml nicely formated excerpt shown in Section A.1.2
+
+Section A.2
++++++++++++
+
+teched.html techexplorer scripting examples (Section A.2.1)
+teched.java " " " (Section A.2.2)
+
diff --git a/info/examples/lwc/apa/latexexa-raw.xml b/info/examples/lwc/apa/latexexa-raw.xml
new file mode 100644
index 0000000000..095b37c922
--- /dev/null
+++ b/info/examples/lwc/apa/latexexa-raw.xml
@@ -0,0 +1,1054 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE document SYSTEM "latex.xmldtd"
+[
+<!ENTITY % MathML "INCLUDE">
+<!ENTITY % LaTeXEntShort "IGNORE">
+<!ENTITY % LaTeXMath "IGNORE">
+<!ENTITY % LaTeXEnt "IGNORE">
+]>
+ <document>
+<frontmatter>
+<title>Simulation of Energy Loss Straggling</title>
+<author>Maria Physicist</author>
+<date>
+January 17, 1999</date>
+</frontmatter>
+<bodymatter>
+<section id="intro">
+<stitle>
+Introduction</stitle>
+<displaymath>
+<math
+>
+<mrow>
+<par>
+ <msup><mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup>
+</mrow></math></displaymath>
+</par><par>Due to the statistical nature of ionisation energy loss, large fluctuations can occur in
+the amount of energy deposited by a particle traversing an absorber element.
+Continuous processes such as multiple scattering and energy loss play a relevant role
+in the longitudinal and lateral development of electromagnetic and hadronic
+showers, and in the case of sampling calorimeters the measured resolution
+can be significantly affected by such fluctuations in their active layers. The
+description of ionisation fluctuations is characterised by the significance parameter
+<inlinemath><math
+><mi>&kappa;</mi></math></inlinemath>,
+which is proportional to the ratio of mean energy loss to the maximum
+allowed energy transfer in a single collision with an atomic electron
+<displaymath><math
+><mrow>
+ <mi>&kappa;</mi><mo>=</mo> <mfrac><mrow><mi>&xi;</mi></mrow><!--___
+--><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow></mfrac>
+</mrow></math></displaymath>
+<inlinemath><math
+><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></math></inlinemath> is the
+maximum transferable energy in a single collision with an atomic electron.
+<displaymath><math
+><mrow>
+ <msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>=</mo> <mfrac><mrow><mn>2</mn><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup></mrow><!--____________
+--><mrow><mn>1</mn><mo>+</mo><mn>2</mn><mi>&gamma;</mi><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub><mo>+</mo><msup><mfenced
+open='(' close=')'><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub> </mfenced><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo>,</mo>
+</mrow></math></displaymath> where
+<inlinemath><math
+><mi>&gamma;</mi><mo>=</mo><mi>E</mi><mo>/</mo><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub></math></inlinemath>,
+<inlinemath><math
+><mi>E</mi></math></inlinemath> is energy and
+<inlinemath><math
+><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub></math></inlinemath> the mass of the
+incident particle, <inlinemath><math
+><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>=</mo><mn>1</mn><mo>-</mo><mn>1</mn><mo>/</mo><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup></math></inlinemath>
+and <inlinemath><math
+><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub></math></inlinemath> is the
+electron mass. <inlinemath><math
+><mi>&xi;</mi></math></inlinemath>
+comes from the Rutherford scattering cross section and is defined as:
+
+ <eqnarray ><subeqn ><math><mi>&xi;</mi><mo>=</mo><mfrac><mrow><mn>2</mn><mi>&pi;</mi><msup><mi>z</mi><mrow><mn>2</mn></mrow></msup><msup><mi>e</mi><mrow><mn>4</mn></mrow></msup><msub><mi>N</mi><mrow><mi>A</mi><mi>v</mi></mrow></msub><mi>Z</mi><mi>&rho;</mi><mi>&delta;</mi><mi>x</mi></mrow><!--
+ --><mrow><msub><mi>m</mi><mrow><mi>e</mi></mrow></msub><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mi>A</mi></mrow></mfrac> <mo>=</mo><mn>1</mn><mn>5</mn><mn>3</mn><mo>.</mo><mn>4</mn> <mfrac><mrow><msup><mi>z</mi><mrow><mn>2</mn></mrow></msup></mrow><!--
+--><mrow><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mfrac><mrow><mi>Z</mi></mrow><!--
+--><mrow><mi>A</mi></mrow></mfrac><mi>&rho;</mi><mi>&delta;</mi><mi>x</mi><mspace width='12pt'/><mi>keV </mi><mo>,</mo> <mtext></mtext>
+</math></subeqn></eqnarray>
+where
+</par><par><tabular preamble="ll"><row><cell
+><inlinemath><math
+><mi>z</mi></math></inlinemath></cell><cell
+>charge of the incident particle </cell>
+</row><row><cell
+><inlinemath><math
+><msub><mi>N</mi><mrow><mi>A</mi><mi>v</mi></mrow></msub></math></inlinemath></cell><cell
+>Avogadro's number </cell>
+</row><row><cell
+><inlinemath><math
+><mi>Z</mi></math></inlinemath></cell><cell
+>atomic number of the material</cell>
+</row><row><cell
+><inlinemath><math
+><mi>A</mi></math></inlinemath></cell><cell
+>atomic weight of the material </cell>
+</row><row><cell
+><inlinemath><math
+><mi>&rho;</mi></math></inlinemath></cell><cell
+>density </cell>
+</row><row><cell
+><inlinemath><math
+><mi>&delta;</mi><mi>x</mi></math></inlinemath></cell><cell
+>thickness of the material </cell>
+</row><row><cell
+> </cell>
+</row></tabular>
+</par><par><inlinemath><math
+><mi>&kappa;</mi></math></inlinemath>
+measures the contribution of the collisions with energy transfer close to
+<inlinemath><math
+><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></math></inlinemath>. For a given absorber,
+<inlinemath><math
+><mi>&kappa;</mi></math></inlinemath> tends towards large
+values if <inlinemath><math
+><mi>&delta;</mi><mi>x</mi></math></inlinemath> is large
+and/or if <inlinemath><math
+><mi>&beta;</mi></math></inlinemath> is small.
+Likewise, <inlinemath><math
+><mi>&kappa;</mi></math></inlinemath> tends
+towards zero if <inlinemath><math
+><mi>&delta;</mi><mi>x</mi></math></inlinemath> is
+small and/or if <inlinemath><math
+><mi>&beta;</mi></math></inlinemath>
+approaches 1.
+</par><par>The value of <inlinemath><math
+><mi>&kappa;</mi></math></inlinemath>
+distinguishes two regimes which occur in the description of ionisation fluctuations
+:
+</par><lalist class="enumerate">
+<item>
+<par>A
+large
+number
+of
+collisions
+involving
+the
+loss
+of
+all
+or
+most
+of
+the
+incident
+particle
+energy
+during
+the
+traversal
+of
+an
+absorber.
+</par><par>As
+the
+total
+energy
+transfer
+is
+composed
+of
+a
+multitude
+of
+small
+energy
+losses,
+we
+can
+apply
+the
+central
+limit
+theorem
+and
+describe
+the
+fluctuations
+by
+a
+Gaussian
+distribution.
+This
+case
+is
+applicable
+to
+non-relativistic
+particles
+and
+is
+described
+by
+the
+inequality
+<inlinemath><math
+><mi>&kappa;</mi><mo>&gt;</mo><mn>1</mn><mn>0</mn></math></inlinemath>
+(i.e.
+when
+the
+mean
+energy
+loss
+in
+the
+absorber
+is
+greater
+than
+the
+maximum
+energy
+transfer
+in
+a
+single
+collision).
+</par></item>
+<item>
+<par>Particles
+traversing
+thin
+counters
+and
+incident
+electrons
+under
+any
+conditions.
+</par><par>The
+relevant
+inequalities
+and
+distributions
+are
+<inlinemath><math
+><mn>0</mn><mo>.</mo><mn>0</mn><mn>1</mn><mo>&lt;</mo><mi>&kappa;</mi><mo>&lt;</mo><mn>1</mn><mn>0</mn></math></inlinemath>,
+Vavilov
+distribution,
+and
+<inlinemath><math
+><mi>&kappa;</mi><mo>&lt;</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>1</mn></math></inlinemath>,
+Landau
+distribution.</par></item></lalist>
+<par>An additional regime is defined by the contribution of the collisions
+with low energy transfer which can be estimated with the relation
+<inlinemath><math
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></inlinemath>,
+where <inlinemath><math
+><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></inlinemath>
+is the mean ionisation potential of the atom. Landau theory assumes that
+the number of these collisions is high, and consequently, it has a restriction
+<inlinemath><math
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub><mo>&Gt;</mo><mn>1</mn></math></inlinemath>. In <texttt>GEANT</texttt> (see
+URL http://wwwinfo.cern.ch/asdoc/geant/geantall.html), the limit of Landau theory has
+been set at <inlinemath><math
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub><mo>=</mo><mn>5</mn><mn>0</mn></math></inlinemath>.
+Below this limit special models taking into account the atomic structure of the material are
+used. This is important in thin layers and gaseous materials. Figure <ref refid="fg:phys332-1"/> shows the behaviour
+of <inlinemath><math
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></inlinemath> as
+a function of the layer thickness for an electron of 100 keV and 1 GeV of kinetic
+energy in Argon, Silicon and Uranium.
+</par>
+<figure>
+<includegraphics file="phys332-1"/>
+<!--Figure 1--><caption id="fg:phys332-1">The variable <inlinemath><math
+><mi>&xi;</mi><mo>/</mo><msub><mi>I</mi><mrow><mn>0</mn></mrow></msub></math></inlinemath>
+can be used to measure the validity range of the Landau
+theory. It depends on the type and energy of the particle,
+<inlinemath><math
+><mi>Z</mi></math></inlinemath>,
+<inlinemath><math
+><mi>A</mi></math></inlinemath>
+and the ionisation potential of the material and the layer thickness. </caption>
+</figure>
+<par>In the following sections, the different theories and models for the energy loss
+fluctuation are described. First, the Landau theory and its limitations are discussed,
+and then, the Vavilov and Gaussian straggling functions and the methods in the thin
+layers and gaseous materials are presented.
+</par>
+</section>
+<section id="sec:phys332-1">
+<stitle>
+Landau theory</stitle>
+<par>For a particle of mass <inlinemath><math
+><msub><mi>m</mi><mrow><mi>x</mi></mrow></msub></math></inlinemath> traversing
+a thickness of material <inlinemath><math
+><mi>&delta;</mi><mi>x</mi></math></inlinemath>,
+the Landau probability distribution may be written in terms of the universal Landau
+function <inlinemath><math
+><mi>&phi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>)</mo></mrow></math></inlinemath>
+as<cite refid="bib-LAND"/>:
+
+ <eqnarray ><subeqn ><math><mi>f</mi><mrow><mo>(</mo><mi>&epsi;</mi><mo>,</mo><mi>&delta;</mi><mi>x</mi><mo>)</mo></mrow> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--
+--><mrow><mi>&xi;</mi></mrow></mfrac><mi>&phi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>)</mo></mrow> <mtext></mtext>
+</math></subeqn></eqnarray>
+where
+
+ <eqnarray ><subeqn ><math><mi>&phi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>)</mo></mrow> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--_
+--><mrow><mn>2</mn><mi>&pi;</mi><mi>i</mi></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>c</mi><mo>+</mo><mi>i</mi><mi>&infin;</mi></mrow><mrow><mi>c</mi><mo>-</mo><mi>i</mi><mi>&infin;</mi></mrow></msubsup><mo>exp</mo><mfenced
+open='(' close=')'><mi>u</mi><mo>ln</mo><mi>u</mi><mo>+</mo><mi>&lambda;</mi><mi>u</mi></mfenced><mi>d</mi><mi>u</mi><mspace width='2cm'/><mi>c</mi><mo>&geq;</mo><mn>0</mn> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><mi>&lambda;</mi> <mo>=</mo> <mfrac><mrow><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mi>&epsi;</mi><mrow></mrow><mo>&barwed;</mo></munderover></mrow><!--
+ --><mrow><mi>&xi;</mi></mrow></mfrac> <mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>-</mo><mo>ln</mo> <mfrac><mrow><mi>&xi;</mi></mrow><!-- ___
+--><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow></mfrac> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><mi>&gamma;</mi><mi>&prime;</mi> <mo>=</mo> <mn>0</mn><mo>.</mo><mn>4</mn><mn>2</mn><mn>2</mn><mn>7</mn><mn>8</mn><mn>4</mn><mo>.</mo><mo>.</mo><mo>.</mo><mo>=</mo><mn>1</mn><mo>-</mo><mi>&gamma;</mi> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><mi>&gamma;</mi> <mo>=</mo> <mn>0</mn><mo>.</mo><mn>5</mn><mn>7</mn><mn>7</mn><mn>2</mn><mn>1</mn><mn>5</mn><mo>.</mo><mo>.</mo><mo>.</mo><mtext>(Euler's constant)</mtext> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><munderover accent='true'><mi>&epsi;</mi><mrow></mrow><mo>&barwed;</mo></munderover> <mo>=</mo> <mtext>average energy loss</mtext> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><mi>&epsi;</mi> <mo>=</mo> <mtext>actual energy loss</mtext> <mtext></mtext>
+</math></subeqn></eqnarray>
+</par>
+<subsection >
+<stitle>
+Restrictions</stitle>
+<par>The Landau formalism makes two restrictive assumptions :
+</par><lalist class="enumerate">
+<item>
+<par>The
+typical
+energy
+loss
+is
+small
+compared
+to
+the
+maximum
+energy
+loss
+in
+a
+single
+collision.
+This
+restriction
+is
+removed
+in
+the
+Vavilov
+theory
+(see
+section
+<ref refid="vavref"/>).
+</par></item>
+<item>
+<par>The
+typical
+energy
+loss
+in
+the
+absorber
+should
+be
+large
+compared
+to
+the
+binding
+energy
+of
+the
+most
+tightly
+bound
+electron.
+For
+gaseous
+detectors,
+typical
+energy
+losses
+are
+a
+few
+keV
+which
+is
+comparable
+to
+the
+binding
+energies
+of
+the
+inner
+electrons.
+In
+such
+cases
+a
+more
+sophisticated
+approach
+which
+accounts
+for
+atomic
+energy
+levels<cite refid="bib-TALM"/>
+is
+necessary
+to
+accurately
+simulate
+data
+distributions.
+In
+<texttt>GEANT</texttt>,
+a
+parameterised
+model
+by
+L.
+Urb&aacute;n
+is
+used
+(see
+section
+<ref refid="urban"/>).</par></item></lalist>
+<par>In addition, the average value of the Landau distribution is infinite.
+Summing the Landau fluctuation obtained to the average energy from the
+<inlinemath><math
+><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi></math></inlinemath>
+tables, we obtain a value which is larger than the one coming from the table. The
+probability to sample a large value is small, so it takes a large number of steps
+(extractions) for the average fluctuation to be significantly larger than zero. This
+introduces a dependence of the energy loss on the step size which can affect
+calculations.
+</par><par>A solution to this has been to introduce a limit on the value of the
+variable sampled by the Landau distribution in order to keep the average
+fluctuation to 0. The value obtained from the <texttt>GLANDO</texttt> routine is:
+<displaymath><math
+><mrow>
+ <mi>&delta;</mi><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi><mo>=</mo><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mi>&epsi;</mi><mrow></mrow><mo>&barwed;</mo></munderover><mo>=</mo><mi>&xi;</mi><mrow><mo>(</mo><mi>&lambda;</mi><mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>+</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>+</mo><mo>ln</mo> <mfrac><mrow><mi>&xi;</mi></mrow><!-- ___
+--><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow></mfrac> <mo>)</mo></mrow>
+</mrow></math></displaymath>
+In order for this to have average 0, we must impose that:
+<displaymath><math
+><mrow>
+ <munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&barwed;</mo></munderover><mo>=</mo><mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>-</mo><mo>ln</mo> <mfrac><mrow><mi>&xi;</mi></mrow><!-- ___
+--><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow></mfrac>
+</mrow></math></displaymath>
+</par><par>This is realised introducing a <inlinemath><math
+><msub><mi>&lambda;</mi><mrow><mi>max</mi></mrow></msub><mrow><mo>(</mo><munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&barwed;</mo></munderover><mo>)</mo></mrow></math></inlinemath>
+such that if only values of <inlinemath><math
+><mi>&lambda;</mi><mo>&leq;</mo><msub><mi>&lambda;</mi><mrow><mi>max</mi></mrow></msub></math></inlinemath>
+are accepted, the average value of the distribution is
+<inlinemath><math
+><munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&barwed;</mo></munderover></math></inlinemath>.
+</par><par>A parametric fit to the universal Landau distribution has been performed, with following result:
+<displaymath><math
+><mrow>
+ <msub><mi>&lambda;</mi><mrow><mi>max</mi></mrow></msub><mo>=</mo><mn>0</mn><mo>.</mo><mn>6</mn><mn>0</mn><mn>7</mn><mn>1</mn><mn>5</mn><mo>+</mo><mn>1</mn><mo>.</mo><mn>1</mn><mn>9</mn><mn>3</mn><mn>4</mn><munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&barwed;</mo></munderover><mo>+</mo><mrow><mo>(</mo><mn>0</mn><mo>.</mo><mn>6</mn><mn>7</mn><mn>7</mn><mn>9</mn><mn>4</mn><mo>+</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>5</mn><mn>2</mn><mn>3</mn><mn>8</mn><mn>2</mn><munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&barwed;</mo></munderover><mo>)</mo></mrow><mo>exp</mo><mrow><mo>(</mo><mn>0</mn><mo>.</mo><mn>9</mn><mn>4</mn><mn>7</mn><mn>5</mn><mn>3</mn><mo>+</mo><mn>0</mn><mo>.</mo><mn>7</mn><mn>4</mn><mn>4</mn><mn>4</mn><mn>2</mn><munderover accent='true'><mi>&lambda;</mi><mrow></mrow><mo>&barwed;</mo></munderover><mo>)</mo></mrow>
+</mrow></math></displaymath> only values
+smaller than <inlinemath><math
+><msub><mi>&lambda;</mi><mrow><mi>max</mi></mrow></msub></math></inlinemath>
+are accepted, otherwise the distribution is resampled.
+</par>
+</subsection>
+</section>
+<section id="vavref">
+<stitle>
+Vavilov theory</stitle>
+<par>Vavilov<cite refid="bib-VAVI"/> derived a more accurate straggling distribution by introducing the kinematic
+limit on the maximum transferable energy in a single collision, rather than using
+<inlinemath><math
+><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>=</mo><mi>&infin;</mi></math></inlinemath>. Now
+we can write<cite refid="bib-SCH1"/>:
+
+ <eqnarray ><subeqn ><math><mi>f</mi> <mfenced
+open='(' close=')'><mi>&epsi;</mi><mo>,</mo><mi>&delta;</mi><mi>s</mi></mfenced> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--
+--><mrow><mi>&xi;</mi></mrow></mfrac><msub><mi>&phi;</mi><mrow><mi>v</mi></mrow></msub> <mfenced
+open='(' close=')'><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub><mo>,</mo><mi>&kappa;</mi><mo>,</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mtext></mtext>
+</math></subeqn></eqnarray>
+where
+
+ <eqnarray ><subeqn ><math><msub><mi>&phi;</mi><mrow><mi>v</mi></mrow></msub> <mfenced
+open='(' close=')'><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub><mo>,</mo><mi>&kappa;</mi><mo>,</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--_
+--><mrow><mn>2</mn><mi>&pi;</mi><mi>i</mi></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>c</mi><mo>+</mo><mi>i</mi><mi>&infin;</mi></mrow><mrow><mi>c</mi><mo>-</mo><mi>i</mi><mi>&infin;</mi></mrow></msubsup><mi>&phi;</mi><mfenced
+open='(' close=')'><mi>s</mi></mfenced><msup><mi>e</mi><mrow><mi>&lambda;</mi><mi>s</mi></mrow></msup><mi>d</mi><mi>s</mi><mspace width='2cm'/><mi>c</mi><mo>&geq;</mo><mn>0</mn> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><mi>&phi;</mi><mfenced
+open='(' close=')'><mi>s</mi></mfenced> <mo>=</mo> <mo>exp</mo><mfenced
+open='[' close=']'><mi>&kappa;</mi><mrow><mo>(</mo><mn>1</mn><mo>+</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mi>&gamma;</mi><mo>)</mo></mrow></mfenced><mo>exp</mo><mfenced
+open='[' close=']'><mi>&psi;</mi> <mfenced
+open='(' close=')'><mi>s</mi></mfenced></mfenced><mo>,</mo> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><mi>&psi;</mi> <mfenced
+open='(' close=')'><mi>s</mi></mfenced> <mo>=</mo> <mi>s</mi><mo>ln</mo><mi>&kappa;</mi><mo>+</mo><mrow><mo>(</mo><mi>s</mi><mo>+</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mi>&kappa;</mi><mo>)</mo></mrow><mfenced
+open='[' close=']'><mo>ln</mo><mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>E</mi><mrow>
+<mn>1</mn></mrow></msub><mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi><mo>)</mo></mrow></mfenced><mo>-</mo><mi>&kappa;</mi><msup><mi>e</mi><mrow><mo>-</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi></mrow></msup><mo>,</mo> <mtext></mtext>
+</math></subeqn></eqnarray>
+and
+
+ <eqnarray ><subeqn ><math><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mrow><mo>(</mo><mi>z</mi><mo>)</mo></mrow> <mo>=</mo><msubsup> <mo>&int;</mo>
+ <mrow><mi>&infin;</mi></mrow><mrow><mi>z</mi></mrow></msubsup><msup><mi>t</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup><msup><mi>e</mi><mrow><mo>-</mo><mi>t</mi></mrow></msup><mi>d</mi><mi>t</mi><mspace width='1cm'/><mtext>(the exponential integral)</mtext> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub> <mo>=</mo> <mi>&kappa;</mi><mfenced
+open='[' close=']'><mfrac><mrow><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mi>&epsi;</mi><mrow></mrow><mo>&barwed;</mo></munderover></mrow><!--
+ --><mrow><mi>&xi;</mi></mrow></mfrac> <mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mfenced> <mtext></mtext>
+</math></subeqn></eqnarray>
+</par><par>The Vavilov parameters are simply related to the Landau parameter by
+<inlinemath><math
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub><mo>=</mo><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub><mo>/</mo><mi>&kappa;</mi><mo>-</mo><mo>ln</mo><mi>&kappa;</mi></math></inlinemath>. It can be shown that
+as <inlinemath><math
+><mi>&kappa;</mi><mo>&rarr;</mo><mn>0</mn></math></inlinemath>, the distribution of
+the variable <inlinemath><math
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub></math></inlinemath> approaches
+that of Landau. For <inlinemath><math
+><mi>&kappa;</mi><mo>&leq;</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>1</mn></math></inlinemath>
+the two distributions are already practically identical. Contrary to what many textbooks
+report, the Vavilov distribution <emph>does not</emph> approximate the Landau distribution for small
+<inlinemath><math
+><mi>&kappa;</mi></math></inlinemath>, but rather the
+distribution of <inlinemath><math
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub></math></inlinemath>
+defined above tends to the distribution of the true
+<inlinemath><math
+><mi>&lambda;</mi></math></inlinemath> from
+the Landau density function. Thus the routine <texttt>GVAVIV</texttt> samples the variable
+<inlinemath><math
+><msub><mi>&lambda;</mi><mrow><mi>L</mi></mrow></msub></math></inlinemath> rather
+than <inlinemath><math
+><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow></msub></math></inlinemath>.
+For <inlinemath><math
+><mi>&kappa;</mi><mo>&geq;</mo><mn>1</mn><mn>0</mn></math></inlinemath>
+the Vavilov distribution tends to a Gaussian distribution (see next section).
+</par>
+</section>
+<section >
+<stitle>
+Gaussian Theory</stitle>
+<par>Various conflicting forms have been proposed for Gaussian straggling functions, but most
+of these appear to have little theoretical or experimental basis. However, it has been shown<cite refid="bib-SELT"/>
+that for <inlinemath><math
+><mi>&kappa;</mi><mo>&geq;</mo><mn>1</mn><mn>0</mn></math></inlinemath>
+the Vavilov distribution can be replaced by a Gaussian of the form:
+
+ <eqnarray ><subeqn ><math><mi>f</mi><mrow><mo>(</mo><mi>&epsi;</mi><mo>,</mo><mi>&delta;</mi><mi>s</mi><mo>)</mo></mrow><mo>&ap;</mo> <mfrac><mrow><mn>1</mn></mrow><!--________
+--><mrow><mi>&xi;</mi><msqrt><!--<mi>&radical;</mi>
+ ______________--><mfrac><mrow><mn>2</mn><mi>&pi;</mi></mrow><!--
+ --><mrow><mi>&kappa;</mi></mrow></mfrac> <mfenced
+open='(' close=')'><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn></mfenced></msqrt></mrow></mfrac><mo>exp</mo><mfenced
+open='[' close=']'><mfrac><mrow><msup><mrow><mo>(</mo><mi>&epsi;</mi><mo>-</mo><munderover accent='true'><mi>&epsi;</mi><mrow></mrow><mo>&barwed;</mo></munderover><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow><!--
+ --><mrow><mn>2</mn></mrow></mfrac> <mfrac><mrow><mi>&kappa;</mi></mrow><!-- _______
+--><mrow><msup><mi>&xi;</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow></mrow></mfrac></mfenced> <mtext></mtext>
+</math></subeqn></eqnarray>
+thus implying
+
+ <eqnarray ><subeqn ><math><mi>mean</mi> <mo>=</mo> <munderover accent='true'><mi>&epsi;</mi><mrow></mrow><mo>&barwed;</mo></munderover> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><msup><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup> <mo>=</mo> <mfrac><mrow><msup><mi>&xi;</mi><mrow><mn>2</mn></mrow></msup></mrow><!--
+ --><mrow><mi>&kappa;</mi></mrow></mfrac> <mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow><mo>=</mo><mi>&xi;</mi><msub><mi>E</mi><mrow><mi>
+max</mi></mrow></msub><mrow><mo>(</mo><mn>1</mn><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mn>2</mn><mo>)</mo></mrow> <mtext></mtext>
+</math></subeqn></eqnarray>
+</par>
+</section>
+<section id="urban">
+<stitle>
+Urb&aacute;n model</stitle>
+<par>The method for computing restricted energy losses with
+<inlinemath><math
+><mi>&delta;</mi></math></inlinemath>-ray
+production above given threshold energy in <texttt>GEANT</texttt> is a Monte Carlo method that
+can be used for thin layers. It is fast and it can be used for any thickness of a
+medium. Approaching the limit of the validity of Landau's theory, the loss
+distribution approaches smoothly the Landau form as shown in Figure <ref refid="fg:phys332-2"/>.
+</par><figure>
+<includegraphics file="phys332-2"/>
+<!--Figure 2--><caption id="fg:phys332-2">Energy loss distribution for a 3 GeV electron in Argon as given by
+standard <texttt>GEANT</texttt>. The width of the layers is given in centimeters.</caption>
+</figure>
+<par>It is assumed that the atoms have only two energy levels with binding energy
+<inlinemath><math
+><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub></math></inlinemath> and
+<inlinemath><math
+><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub></math></inlinemath>.
+The particle--atom interaction will then be an excitation with energy loss
+<inlinemath><math
+><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub></math></inlinemath> or
+<inlinemath><math
+><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub></math></inlinemath>, or
+an ionisation with an energy loss distributed according to a function
+<inlinemath><math
+><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mo>&sim;</mo><mn>1</mn><mo>/</mo><msup><mi>E</mi><mrow><mn>2</mn></mrow></msup></math></inlinemath>:
+<equation ><math>
+ <mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mo>=</mo><mfrac><mrow><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mi>I</mi></mrow><!--
+ --><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow></mfrac> <mfrac><mrow><mn>1</mn></mrow><!-- _
+--><mrow><msup><mi>E</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mi>(</mi><mi>1</mi><mi>)</mi>
+</math></equation>
+</par><par>The macroscopic cross-section for excitations
+(<inlinemath><math
+><mi>i</mi><mo>=</mo><mn>1</mn><mo>,</mo><mn>2</mn></math></inlinemath>) is
+<equation id="eq:sigex"><math>
+ <msub><mi>&Sigma;</mi><mrow><mi>i</mi></mrow></msub><mo>=</mo><mi>C</mi> <mfrac><mrow><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></mrow><!--
+--><mrow><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></mrow></mfrac> <mfrac><mrow><mo>ln</mo><mrow><mo>(</mo><mn>2</mn><mi>m</mi><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mrow><!--
+ --><mrow><mo>ln</mo><mrow><mo>(</mo><mn>2</mn><mi>m</mi><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup><msup><mi>&gamma;</mi><mrow><mn>2</mn></mrow></msup><mo>/</mo><mi>I</mi><mo>)</mo></mrow><mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mrow><mo>(</mo><mn>1</mn><mo>-</mo><mi>r</mi><mo>)</mo></mrow> <mi>(</mi><mi>2</mi><mi>)</mi>
+</math></equation>and
+the macroscopic cross-section for ionisation is
+<equation id="eq:sigion"><math>
+ <msub><mi>&Sigma;</mi><mrow><mn>3</mn></mrow></msub><mo>=</mo><mi>C</mi> <mfrac><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow><!-- ________________
+--><mrow><mi>I</mi><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>ln</mo><mrow><mo>(</mo><mfrac><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi></mrow><!--
+ --><mrow><mi>I</mi></mrow></mfrac> <mo>)</mo></mrow></mrow></mfrac><mi>r</mi> <mi>(</mi><mi>3</mi><mi>)</mi>
+</math></equation><inlinemath><math
+><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></math></inlinemath>
+is the <texttt>GEANT</texttt> cut for <inlinemath><math
+><mi>&delta;</mi></math></inlinemath>-production,
+or the maximum energy transfer minus mean ionisation energy, if it is smaller than
+this cut-off value. The following notation is used:
+</par><par><tabular preamble="ll"><row><cell
+><inlinemath><math
+><mi>r</mi><mo>,</mo><mi>C</mi></math></inlinemath></cell><cell
+>parameters of the model</cell>
+</row><row><cell
+><inlinemath><math
+><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath></cell><cell
+>atomic energy levels </cell>
+</row><row><cell
+><inlinemath><math
+><mi>I</mi></math></inlinemath></cell><cell
+>mean ionisation energy </cell>
+</row><row><cell
+><inlinemath><math
+><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath></cell><cell
+>oscillator strengths </cell>
+</row></tabular>
+</par><par>The model has the parameters <inlinemath><math
+><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath>,
+<inlinemath><math
+><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath>,
+<inlinemath><math
+><mi>C</mi></math></inlinemath> and
+<inlinemath><math
+><mi>r</mi><mrow><mo>(</mo><mn>0</mn><mo>&leq;</mo><mi>r</mi><mo>&leq;</mo><mn>1</mn><mo>)</mo></mrow></math></inlinemath>. The oscillator
+strengths <inlinemath><math
+><msub><mi>f</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath> and the
+atomic level energies <inlinemath><math
+><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath>
+should satisfy the constraints
+
+ <eqnarray ><subeqn id="eq:fisum"><math><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub> <mo>=</mo> <mn>1</mn> <mtext>(4)</mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn id="eq:flnsum"><math><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo>ln</mo><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub><mo>ln</mo><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub> <mo>=</mo> <mo>ln</mo><mi>I</mi> <mtext>(5)</mtext>
+</math></subeqn></eqnarray>
+The parameter <inlinemath><math
+><mi>C</mi></math></inlinemath>
+can be defined with the help of the mean energy loss
+<inlinemath><math
+><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi></math></inlinemath> in the following way: The
+numbers of collisions (<inlinemath><math
+><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath>,
+i = 1,2 for the excitation and 3 for the ionisation) follow the Poisson distribution with a mean
+number <inlinemath><math
+><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub><mo>>;</mo></mrow></math></inlinemath>. In a step
+<inlinemath><math
+><mi>&Delta;</mi><mi>x</mi></math></inlinemath> the mean number
+of collisions is <equation ><math>
+ <mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>i</mi></mrow></msub><mo>>;</mo></mrow><mo>=</mo><msub><mi>&Sigma;</mi><mrow><mi>i</mi></mrow></msub><mi>&Delta;</mi><mi>x</mi> <mi>(</mi><mi>6</mi><mi>)</mi>
+</math></equation>The
+mean energy loss <inlinemath><math
+><mi>d</mi><mi>E</mi><mo>/</mo><mi>d</mi><mi>x</mi></math></inlinemath>
+in a step is the sum of the excitation and ionisation contributions
+<equation ><math>
+ <mfrac><mrow><mi>d</mi><mi>E</mi></mrow><!--
+--><mrow><mi>d</mi><mi>x</mi></mrow></mfrac> <mi>&Delta;</mi><mi>x</mi><mo>=</mo><mfenced
+open='[' close=']'><msub><mi>&Sigma;</mi><mrow><mn>1</mn></mrow></msub><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>&Sigma;</mi><mrow><mn>2</mn></mrow></msub><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub><mo>+</mo><msub><mi>&Sigma;</mi><mrow><mn>3</mn></mrow></msub><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi></mrow></msubsup><mi>E</mi><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi></mfenced><mi>&Delta;</mi><mi>x</mi> <mi>(</mi><mi>7</mi><mi>)</mi>
+</math></equation>From
+this, using the equations (<ref refid="eq:sigex"/>), (<ref refid="eq:sigion"/>), (<ref refid="eq:fisum"/>) and (<ref refid="eq:flnsum"/>), one can define the parameter
+<inlinemath><math
+><mi>C</mi></math></inlinemath>
+<equation ><math>
+ <mi>C</mi><mo>=</mo><mfrac><mrow><mi>d</mi><mi>E</mi></mrow><!--
+--><mrow><mi>d</mi><mi>x</mi></mrow></mfrac> <mi>(</mi><mi>8</mi><mi>)</mi>
+</math></equation>
+</par><par>The following values have been chosen in <texttt>GEANT</texttt> for the other parameters:
+<displaymath><math
+><mrow>
+ <mtable equalrows='false' equalcolumns='false'><mtr><mtd><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub><mo>=</mo><mfenced
+open='{' ><mtable equalrows='false' equalcolumns='false'><mtr><mtd><mn>0</mn> </mtd><mtd><mi>if</mi><mi>Z</mi><mo>&leq;</mo><mn>2</mn></mtd>
+</mtr><mtr><mtd><mn>2</mn><mo>/</mo><mi>Z</mi></mtd><mtd><mi>if</mi><mi>Z</mi><mo>&gt;</mo><mn>2</mn></mtd>
+</mtr><mtr><mtd> </mtd></mtr></mtable> </mfenced></mtd><mtd><mo>&Rarr;</mo></mtd><mtd><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><mo>=</mo><mn>1</mn><mo>-</mo><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub> </mtd>
+ </mtr><mtr><mtd><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub><mo>=</mo><mn>1</mn><mn>0</mn><msup><mi>Z</mi><mrow><mn>2</mn></mrow></msup><mi>eV </mi> </mtd><mtd><mo>&Rarr;</mo></mtd><mtd><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>=</mo><msup><mfenced
+open='(' close=')'> <mfrac><mrow><mi>I</mi></mrow><!--___
+--><mrow><msubsup><mi>E</mi><mrow><mn>2</mn></mrow><mrow><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub></mrow></msubsup></mrow></mfrac> </mfenced><mrow> <mfrac><mrow><mn>1</mn></mrow><!-- _
+--><mrow><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub></mrow></mfrac> </mrow></msup></mtd>
+ </mtr><mtr><mtd><mi>r</mi><mo>=</mo><mn>0</mn><mo>.</mo><mn>4</mn> </mtd><mtd> </mtd><mtd> </mtd>
+ </mtr><mtr><mtd> </mtd></mtr></mtable>
+</mrow></math></displaymath> With these values
+the atomic level <inlinemath><math
+><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub></math></inlinemath>
+corresponds approximately the K-shell energy of the atoms and
+<inlinemath><math
+><mi>Z</mi><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub></math></inlinemath> the number of
+K-shell electrons. <inlinemath><math
+><mi>r</mi></math></inlinemath>
+is the only variable which can be tuned freely. It determines the relative contribution
+of ionisation and excitation to the energy loss.
+</par><par>The energy loss is computed with the assumption that the step length (or the relative
+energy loss) is small, and---in consequence---the cross-section can be considered
+constant along the path length. The energy loss due to the excitation is
+<equation ><math>
+ <mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>e</mi></mrow></msub><mo>=</mo><msub><mi>n</mi><mrow><mn>1</mn></mrow></msub><msub><mi>E</mi><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>n</mi><mrow><mn>2</mn></mrow></msub><msub><mi>E</mi><mrow><mn>2</mn></mrow></msub> <mi>(</mi><mi>9</mi><mi>)</mi>
+</math></equation>where
+<inlinemath><math
+><msub><mi>n</mi><mrow><mn>1</mn></mrow></msub></math></inlinemath> and
+<inlinemath><math
+><msub><mi>n</mi><mrow><mn>2</mn></mrow></msub></math></inlinemath>
+are sampled from Poisson distribution as discussed above. The
+loss due to the ionisation can be generated from the distribution
+<inlinemath><math
+><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow></math></inlinemath> by
+the inverse transformation method:
+
+ <eqnarray ><subeqn ><math><mi>u</mi><mo>=</mo><mi>F</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow> <mo>=</mo><msubsup> <mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>E</mi></mrow></msubsup><mi>g</mi><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mi>d</mi><mi>x</mi> <mtext></mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math><mi>E</mi><mo>=</mo><msup><mi>F</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup><mrow><mo>(</mo><mi>u</mi><mo>)</mo></mrow> <mo>=</mo> <mfrac><mrow><mi>I</mi></mrow><!--____
+--><mrow><mn>1</mn><mo>-</mo><mi>u</mi> <mfrac><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow><!-- ___
+--><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac> <mtext>(10)</mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn ><math> <mtext>(11)</mtext>
+</math></subeqn></eqnarray>
+where <inlinemath><math
+><mi>u</mi></math></inlinemath> is a uniform random
+number between <inlinemath><math
+><mi>F</mi><mrow><mo>(</mo><mi>I</mi><mo>)</mo></mrow><mo>=</mo><mn>0</mn></math></inlinemath> and
+<inlinemath><math
+><mi>F</mi><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>=</mo><mn>1</mn></math></inlinemath>. The contribution from the
+ionisations will be <equation ><math>
+ <mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub><mo>=</mo><msubsup><mo>&sum;</mo>
+ <mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></mrow></msubsup> <mfrac><mrow><mi>I</mi></mrow><!--________
+--><mrow><mn>1</mn><mo>-</mo><msub><mi>u</mi><mrow><mi>j</mi></mrow></msub> <mfrac><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow><!-- ___
+--><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac> <mi>(</mi><mi>1</mi><mi>2</mi><mi>)</mi>
+</math></equation>where
+<inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></inlinemath> is the
+number of ionisation (sampled from Poisson distribution). The energy loss in a step will
+then be <inlinemath><math
+><mi>&Delta;</mi><mi>E</mi><mo>=</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>e</mi></mrow></msub><mo>+</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>i</mi></mrow></msub></math></inlinemath>.
+</par>
+<subsection >
+<stitle>
+Fast simulation for <inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>&geq;</mo><mn>1</mn><mn>6</mn></math></inlinemath></stitle>
+<par>If the number of ionisation <inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></inlinemath>
+is bigger than 16, a faster sampling method can be used. The possible energy loss
+interval is divided in two parts: one in which the number of collisions is large and the
+sampling can be done from a Gaussian distribution and the other in which
+the energy loss is sampled for each collision. Let us call the former interval
+<inlinemath><math
+><mrow><mo>[</mo><mi>I</mi><mo>,</mo><mi>&alpha;</mi><mi>I</mi><mo>]</mo></mrow></math></inlinemath> the interval A,
+and the latter <inlinemath><math
+><mrow><mo>[</mo><mi>&alpha;</mi><mi>I</mi><mo>,</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>]</mo></mrow></math></inlinemath> the
+interval B. <inlinemath><math
+><mi>&alpha;</mi></math></inlinemath> lies
+between 1 and <inlinemath><math
+><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>/</mo><mi>I</mi></math></inlinemath>.
+A collision with a loss in the interval A happens with the probability
+<equation id="eq:phys332-5"><math>
+ <mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>=</mo><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>&alpha;</mi><mi>I</mi></mrow></msubsup><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi><mo>=</mo><mfrac><mrow><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mrow><mo>(</mo><mi>&alpha;</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><!--
+ --><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mi>&alpha;</mi></mrow></mfrac> <mi>(</mi><mi>1</mi><mi>3</mi><mi>)</mi>
+</math></equation>The
+mean energy loss and the standard deviation for this type of collision are
+<equation ><math>
+ <mrow><mo>&lt;</mo><mi>&Delta;</mi><mi>E</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>>;</mo></mrow><mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--___
+--><mrow><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>&alpha;</mi><mi>I</mi></mrow></msubsup><mi>E</mi><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi><mo>=</mo><mfrac><mrow><mi>I</mi><mi>&alpha;</mi><mo>ln</mo><mi>&alpha;</mi></mrow><!--
+ --><mrow><mi>&alpha;</mi><mo>-</mo><mn>1</mn></mrow></mfrac> <mi>(</mi><mi>1</mi><mi>4</mi><mi>)</mi>
+</math></equation>and
+<equation ><math>
+ <msup><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--___
+--><mrow><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow></mrow></mfrac><msubsup><mo>&int;</mo>
+ <mrow><mi>I</mi></mrow><mrow><mi>&alpha;</mi><mi>I</mi></mrow></msubsup><msup><mi>E</mi><mrow><mn>2</mn></mrow></msup><mi>g</mi><mrow><mo>(</mo><mi>E</mi><mo>)</mo></mrow><mi>d</mi><mi>E</mi><mo>=</mo><msup><mi>I</mi><mrow><mn>2</mn></mrow></msup><mi>&alpha;</mi><mfenced
+open='(' close=')'><mn>1</mn><mo>-</mo> <mfrac><mrow><mi>&alpha;</mi><msup><mo>ln</mo><mrow><mn>2</mn></mrow></msup><mi>&alpha;</mi></mrow><!--_
+--><mrow><msup><mrow><mo>(</mo><mi>&alpha;</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow><mrow><mn>2</mn></mrow></msup></mrow></mfrac></mfenced> <mi>(</mi><mi>1</mi><mi>5</mi><mi>)</mi>
+</math></equation>If the
+collision number is high, we assume that the number of the type A collisions can be
+calculated from a Gaussian distribution with the following mean value and standard
+deviation:
+
+ <eqnarray ><subeqn id="eq:phys332-1"><math><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow> <mo>=</mo> <msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow> <mtext>(16)</mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn id="eq:phys332-2"><math><msubsup><mi>&sigma;</mi><mrow><mi>A</mi></mrow><mrow><mn>2</mn></mrow></msubsup> <mo>=</mo> <msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mrow><mo>(</mo><mn>1</mn><mo>-</mo><mi>P</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>)</mo></mrow> <mtext>(17)</mtext>
+</math></subeqn></eqnarray>
+It is further assumed that the energy loss in these collisions has a Gaussian
+distribution with
+
+ <eqnarray ><subeqn id="eq:phys332-3"><math><mrow><mo>&lt;</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow> <mo>=</mo> <msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mrow><mo>&lt;</mo><mi>&Delta;</mi><mi>E</mi><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow><mo>>;</mo></mrow> <mtext>(18)</mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn id="eq:phys332-4"><math><msubsup><mi>&sigma;</mi><mrow><mi>E</mi><mo>,</mo><mi>A</mi></mrow><mrow><mn>2</mn></mrow></msubsup> <mo>=</mo> <msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><msup><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><mi>&alpha;</mi><mo>)</mo></mrow> <mtext>(19)</mtext>
+</math></subeqn></eqnarray>
+The energy loss of these collision can then be sampled from the Gaussian
+distribution.
+</par><par>The collisions where the energy loss is in the interval B are sampled directly from
+<equation ><math>
+ <mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>B</mi></mrow></msub><mo>=</mo><msubsup><mo>&sum;</mo>
+ <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>-</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub></mrow></msubsup> <mfrac><mrow><mi>&alpha;</mi><mi>I</mi></mrow><!--_________
+--><mrow><mn>1</mn><mo>-</mo><msub><mi>u</mi><mrow><mi>i</mi></mrow></msub> <mfrac><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>-</mo><mi>&alpha;</mi><mi>I</mi></mrow><!--
+ --><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi></mrow></mfrac> </mrow></mfrac> <mi>(</mi><mi>2</mi><mi>0</mi><mi>)</mi>
+</math></equation>The
+total energy loss is the sum of these two types of collisions:
+<equation ><math>
+ <mi>&Delta;</mi><mi>E</mi><mo>=</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>+</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>B</mi></mrow></msub> <mi>(</mi><mi>2</mi><mi>1</mi><mi>)</mi>
+</math></equation>
+</par><par>The approximation of equations (<ref refid="eq:phys332-1"/>), (<ref refid="eq:phys332-2"/>), (<ref refid="eq:phys332-3"/>) and (<ref refid="eq:phys332-4"/>) can be used under the following
+conditions:
+
+ <eqnarray ><subeqn id="eq:phys332-6"><math><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>-</mo><mi>c</mi><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub> <mo>&geq;</mo> <mn>0</mn> <mtext>(22)</mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn id="eq:phys332-7"><math><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>+</mo><mi>c</mi><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub> <mo>&leq;</mo> <msub><mi>n</mi><mrow><mn>3</mn></mrow></msub> <mtext>(23)</mtext>
+ </math></subeqn><subeqn ><math>
+ </math></subeqn><subeqn id="eq:phys332-8"><math><mrow><mo>&lt;</mo><mi>&Delta;</mi><msub><mi>E</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>-</mo><mi>c</mi><msub><mi>&sigma;</mi><mrow><mi>E</mi><mo>,</mo><mi>A</mi></mrow></msub> <mo>&geq;</mo> <mn>0</mn> <mtext>(24)</mtext>
+</math></subeqn></eqnarray>
+where <inlinemath><math
+><mi>c</mi><mo>&geq;</mo><mn>4</mn></math></inlinemath>. From
+the equations (<ref refid="eq:phys332-5"/>), (<ref refid="eq:phys332-1"/>) and (<ref refid="eq:phys332-3"/>) and from the conditions (<ref refid="eq:phys332-6"/>) and (<ref refid="eq:phys332-7"/>) the following limits can be
+derived: <equation ><math>
+ <msub><mi>&alpha;</mi><mrow><mi>min</mi></mrow></msub><mo>=</mo><mfrac><mrow><mrow><mo>(</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow></mrow><!--
+--><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mi>I</mi></mrow></mfrac> <mo>&leq;</mo><mi>&alpha;</mi><mo>&leq;</mo><msub><mi>&alpha;</mi><mrow><mi>max</mi></mrow></msub><mo>=</mo><mfrac><mrow><mrow><mo>(</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mo>)</mo></mrow><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow></mrow><!--
+--><mrow><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup><mrow><mo>(</mo><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><mi>I</mi><mo>)</mo></mrow><mo>+</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mi>I</mi></mrow></mfrac> <mi>(</mi><mi>2</mi><mi>5</mi><mi>)</mi>
+</math></equation>This
+conditions gives a lower limit to number of the ionisations
+<inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></inlinemath> for which the fast
+sampling can be done: <equation ><math>
+ <msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>&geq;</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup> <mi>(</mi><mi>2</mi><mi>6</mi><mi>)</mi>
+</math></equation>As
+in the conditions (<ref refid="eq:phys332-6"/>), (<ref refid="eq:phys332-7"/>) and (<ref refid="eq:phys332-8"/>) the value of
+<inlinemath><math
+><mi>c</mi></math></inlinemath> is as minimum
+4, one gets <inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>&geq;</mo><mn>1</mn><mn>6</mn></math></inlinemath>.
+In order to speed the simulation, the maximum value is used for
+<inlinemath><math
+><mi>&alpha;</mi></math></inlinemath>.
+</par><par>The number of collisions with energy loss in the interval B (the number of interactions
+which has to be simulated directly) increases slowly with the total number of collisions
+<inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></inlinemath>.
+The maximum number of these collisions can be estimated as
+<equation ><math>
+ <msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub><mo>=</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>-</mo><msub><mi>n</mi><mrow><mi>A</mi><mo>,</mo><mi>m</mi><mi>i</mi><mi>n</mi></mrow></msub><mo>&ap;</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mrow><mo>(</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow><mo>-</mo><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub><mo>)</mo></mrow> <mi>(</mi><mi>2</mi><mi>7</mi><mi>)</mi>
+</math></equation>From the previous
+expressions for <inlinemath><math
+><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mi>A</mi></mrow></msub><mo>>;</mo></mrow></math></inlinemath> and
+<inlinemath><math
+><msub><mi>&sigma;</mi><mrow><mi>A</mi></mrow></msub></math></inlinemath> one can derive the
+condition <equation ><math>
+ <msub><mi>n</mi><mrow><mi>B</mi></mrow></msub><mo>&leq;</mo><msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub><mo>=</mo> <mfrac><mrow><mn>2</mn><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup></mrow><!--_
+--><mrow><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>+</mo><msup><mi>c</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac> <mi>(</mi><mi>2</mi><mi>8</mi><mi>)</mi>
+</math></equation>The following
+values are obtained with <inlinemath><math
+><mi>c</mi><mo>=</mo><mn>4</mn></math></inlinemath>:
+</par><par><tabular preamble="llcrr"><row><cell
+><inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></inlinemath></cell><cell
+><inlinemath><math
+><msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub></math></inlinemath></cell><cell
+></cell><cell
+><inlinemath><math
+><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub></math></inlinemath></cell><cell
+><inlinemath><math
+><msub><mi>n</mi><mrow><mi>B</mi><mo>,</mo><mi>m</mi><mi>a</mi><mi>x</mi></mrow></msub></math></inlinemath></cell>
+</row><row><cell
+>16 </cell><cell
+>16 </cell><cell
+></cell><cell
+> 200</cell><cell
+> 29.63</cell>
+</row><row><cell
+>20 </cell><cell
+>17.78 </cell><cell
+></cell><cell
+> 500</cell><cell
+> 31.01</cell>
+</row><row><cell
+>50 </cell><cell
+>24.24 </cell><cell
+></cell><cell
+> 1000</cell><cell
+> 31.50</cell>
+</row><row><cell
+>100 </cell><cell
+>27.59 </cell><cell
+></cell><cell
+><inlinemath><math
+><mi>&infin;</mi></math></inlinemath></cell><cell
+> 32.00</cell>
+</row></tabular>
+</par>
+</subsection>
+<subsection >
+<stitle>
+Special sampling for lower part of the spectrum</stitle>
+<par>If the step length is very small (<inlinemath><math
+><mo>&leq;</mo><mn>5</mn></math></inlinemath>
+mm in gases, <inlinemath><math
+><mo>&leq;</mo></math></inlinemath>
+2-3 <inlinemath><math
+><mi>&mu;</mi></math></inlinemath>m in solids)
+the model gives 0 energy loss for some events. To avoid this, the probability of 0 energy loss is
+computed <equation ><math>
+ <mi>P</mi><mrow><mo>(</mo><mi>&Delta;</mi><mi>E</mi><mo>=</mo><mn>0</mn><mo>)</mo></mrow><mo>=</mo><msup><mi>e</mi><mrow><mo>-</mo><mrow><mo>(</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>1</mn></mrow></msub><mo>>;</mo></mrow><mo>+</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>2</mn></mrow></msub><mo>>;</mo></mrow><mo>+</mo><mrow><mo>&lt;</mo><msub><mi>n</mi><mrow><mn>3</mn></mrow></msub><mo>>;</mo></mrow><mo>)</mo></mrow></mrow></msup> <mi>(</mi><mi>2</mi><mi>9</mi><mi>)</mi>
+</math></equation>If the
+probability is bigger than 0.01 a special sampling is done, taking into account the fact that in
+these cases the projectile interacts only with the outer electrons of the atom. An energy level
+<inlinemath><math
+><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub><mo>=</mo><mn>1</mn><mn>0</mn></math></inlinemath> eV is chosen
+to correspond to the outer electrons. The mean number of collisions can be calculated from
+<equation ><math>
+ <mrow><mo>&lt;</mo><mi>n</mi><mo>>;</mo></mrow><mo>=</mo> <mfrac><mrow><mn>1</mn></mrow><!--_
+--><mrow><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow></mfrac> <mfrac><mrow><mi>d</mi><mi>E</mi></mrow><!--
+--><mrow><mi>d</mi><mi>x</mi></mrow></mfrac> <mi>&Delta;</mi><mi>x</mi> <mi>(</mi><mi>3</mi><mi>0</mi><mi>)</mi>
+</math></equation>The number
+of collisions <inlinemath><math
+><mi>n</mi></math></inlinemath>
+is sampled from Poisson distribution. In the case of the thin layers, all the
+collisions are considered as ionisations and the energy loss is computed as
+<equation ><math>
+ <mi>&Delta;</mi><mi>E</mi><mo>=</mo><msubsup><mo>&sum;</mo>
+ <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>n</mi></mrow></msubsup> <mfrac><mrow><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow><!--_________
+--><mrow><mn>1</mn><mo>-</mo> <mfrac><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub></mrow><!--_____
+--><mrow><msub><mi>E</mi><mrow><mi>max</mi></mrow></msub><mo>+</mo><msub><mi>E</mi><mrow><mn>0</mn></mrow></msub></mrow></mfrac> <msub><mi>u</mi><mrow><mi>i</mi></mrow></msub></mrow></mfrac> <mi>(</mi><mi>3</mi><mi>1</mi><mi>)</mi>
+</math></equation>
+</par>
+</subsection>
+</section>
+<section class="star">
+<stitle>
+References</stitle>
+<bibliography >
+<bibitem id="bib-LAND">
+<par>L.Landau.
+On
+the
+Energy
+Loss
+of
+Fast
+Particles
+by
+Ionisation.
+Originally
+published
+in
+<emph>J.
+Phys.</emph>,
+8:201,
+1944.
+Reprinted
+in
+D.ter
+Haar,
+Editor,
+<emph>L.D.Landau,
+Collected
+papers</emph>,
+page
+417.
+Pergamon
+Press,
+Oxford,
+1965.
+</par></bibitem>
+<bibitem id="bib-SCH1">
+<par>B.Schorr.
+Programs
+for
+the
+Landau
+and
+the
+Vavilov
+distributions
+and
+the
+corresponding
+random
+numbers.
+<emph>Comp.
+Phys.
+Comm.</emph>,
+7:216,
+1974.
+</par></bibitem>
+<bibitem id="bib-SELT">
+<par>S.M.Seltzer
+and
+M.J.Berger.
+Energy
+loss
+straggling
+of
+protons
+and
+mesons.
+In
+<emph>Studies
+in
+Penetration
+of
+Charged
+Particles
+in
+Matter</emph>,
+Nuclear
+Science
+Series 39,
+Nat.
+Academy
+of
+Sciences,
+Washington
+DC,
+1964.
+</par></bibitem>
+<bibitem id="bib-TALM">
+<par>R.Talman.
+On
+the
+statistics
+of
+particle
+identification
+using
+ionization.
+<emph>Nucl.
+Inst.
+Meth.</emph>,
+159:189,
+1979.
+</par></bibitem>
+<bibitem id="bib-VAVI">
+<par>P.V.Vavilov.
+Ionisation
+losses
+of
+high
+energy
+heavy
+particles.
+<emph>Soviet
+Physics
+JETP</emph>,
+5:749,
+1957.</par></bibitem></bibliography>
+</section>
+</bodymatter></document>
+
diff --git a/info/examples/lwc/apa/latexexa.dtd b/info/examples/lwc/apa/latexexa.dtd
new file mode 100644
index 0000000000..5385751004
--- /dev/null
+++ b/info/examples/lwc/apa/latexexa.dtd
@@ -0,0 +1,190 @@
+<!-- latex.dtd: XML version of LaTeX + MathML -->
+
+<!ENTITY % fontchange "emph|textit|textbf|textsf|textsl|texttt" >
+<!ENTITY % misc "url|quad|hspace|vspace|includegraphics|footnote|tag|ent">
+<!ENTITY % xref "ref|cite|pageref">
+<!ENTITY % chunk "lalist|par|tabular|figure|table|align|bibliography">
+<!ENTITY % mathobj "displaymath|inlinemath|equation|eqnarray" >
+<!ENTITY % inline "#PCDATA|%fontchange;|%chunk;|%misc;|%xref;|%mathobj;">
+
+<!ELEMENT document (frontmatter?,bodymatter)>
+<!ATTLIST document class CDATA "article">
+
+<!ELEMENT frontmatter (title,author,date?,abstract?,keywords?)>
+<!ELEMENT bodymatter ((par|section)*,appendix*)>
+
+<!-- front matter -->
+<!ELEMENT title (%inline;)*>
+<!ELEMENT author (%inline;)*>
+<!ELEMENT date (#PCDATA)>
+
+<!-- structuring -->
+<!ELEMENT section (stitle,(%chunk;|subsection)*)>
+<!ATTLIST section
+ class CDATA #IMPLIED
+ id ID #IMPLIED>
+<!ELEMENT subsection (stitle,(%chunk;|paragraph)*)>
+<!ATTLIST subsection
+ class CDATA #IMPLIED
+ id ID #IMPLIED>
+<!ELEMENT paragraph (stitle,(%chunk;|subparagraph)*)>
+<!ATTLIST paragraph
+ class CDATA #IMPLIED
+ id ID #IMPLIED>
+<!ELEMENT subparagraph (stitle,(%chunk;)*)>
+<!ATTLIST subparagraph
+ class CDATA #IMPLIED
+ id ID #IMPLIED>
+<!ELEMENT stitle (%inline;)*>
+
+<!-- font changes -->
+<!ELEMENT emph (%inline;)*>
+<!ELEMENT textit (%inline;)*>
+<!ELEMENT textbf (%inline;)*>
+<!ELEMENT textsf (%inline;)*>
+<!ELEMENT textsl (%inline;)*>
+<!ELEMENT texttt (%inline;)*>
+
+<!-- lists -->
+<!ELEMENT lalist (item)*>
+<!ATTLIST lalist
+ id ID #IMPLIED
+ class (enumerate|itemize|description) #REQUIRED>
+<!ELEMENT item (%inline;)*>
+
+<!-- bibliography -->
+<!ELEMENT bibliography (bibitem)*>
+<!ELEMENT bibitem (%inline;)*>
+<!ATTLIST bibitem
+ id ID #REQUIRED>
+
+<!-- floats -->
+<!ELEMENT table (%chunk;|caption|includegraphics)*>
+<!ELEMENT figure (%chunk;|caption|includegraphics)*>
+<!ELEMENT caption (%inline;)*>
+<!ATTLIST caption
+ id ID #IMPLIED>
+<!ELEMENT includegraphics EMPTY>
+<!ATTLIST includegraphics
+ width CDATA #IMPLIED
+ height CDATA #IMPLIED
+ scale CDATA #IMPLIED
+ file CDATA #IMPLIED>
+
+<!-- tables -->
+<!ELEMENT tabular (hline|row)*>
+<!ATTLIST tabular
+ preamble CDATA #REQUIRED>
+<!ELEMENT row (cell)*>
+<!ELEMENT hline EMPTY>
+<!ELEMENT cell (%inline;)*>
+<!ELEMENT newline EMPTY>
+<!ATTLIST newline
+ id ID #IMPLIED>
+
+<!-- low-level bits and pieces -->
+<!ELEMENT align (%inline;)*>
+<!ATTLIST align
+ style CDATA #REQUIRED>
+<!ELEMENT url EMPTY>
+<!ATTLIST url
+ name CDATA #REQUIRED>
+<!ELEMENT par (%inline;)*>
+<!ELEMENT quad EMPTY>
+<!ELEMENT hspace EMPTY>
+<!ATTLIST hspace
+ dim CDATA #REQUIRED>
+<!ELEMENT vspace EMPTY>
+<!ATTLIST vspace
+ dim CDATA #REQUIRED>
+<!ELEMENT tag (#PCDATA)>
+<!ELEMENT ent EMPTY>
+<!ATTLIST ent
+ value CDATA #REQUIRED
+ name CDATA #REQUIRED>
+
+<!-- cross-refs -->
+<!ELEMENT cite EMPTY>
+<!ATTLIST cite
+ refid IDREF #REQUIRED>
+<!ELEMENT ref EMPTY>
+<!ATTLIST ref
+ refid IDREF #REQUIRED>
+
+<!-- maths. must reduce to <math> elements for MathML -->
+<!ELEMENT equation (math)*>
+<!ATTLIST equation
+ id ID #IMPLIED>
+<!ELEMENT displaymath (math)*>
+<!ELEMENT inlinemath (math)*>
+<!ELEMENT subeqn (math)*>
+<!ATTLIST subeqn
+ id ID #IMPLIED>
+<!ELEMENT eqnarray (subeqn)*>
+<!ATTLIST eqnarray
+ number (yes|no) "yes"
+ id ID #IMPLIED>
+
+<!-- sub DTDs and entities -->
+<!--Added Math Symbols: Arrows-->
+<!ENTITY % isoamsae.dtd SYSTEM "isoamsae.dtd">
+
+<!--Added Math Symbols: Binary Operators-->
+<!ENTITY % isoamsbe.dtd SYSTEM "isoamsbe.dtd">
+
+<!--Added Math Symbols: Delimiters-->
+<!ENTITY % isoamsce.dtd SYSTEM "isoamsce.dtd">
+
+<!--Added Math Symbols: Negated Relations-->
+<!ENTITY % isoamsne.dtd SYSTEM "isoamsne.dtd">
+
+<!--Added Math Symbols: Ordinary-->
+<!ENTITY % isoamsoe.dtd SYSTEM "isoamsoe.dtd">
+
+<!--Added Math Symbols: Relations-->
+<!ENTITY % isoamsre.dtd SYSTEM "isoamsre.dtd">
+
+<!--General Technical-->
+<!ENTITY % isoteche.dtd SYSTEM "isoteche.dtd">
+
+<!--Numbers and Currency symbols-->
+<!ENTITY % isonume.dtd SYSTEM "isonume.dtd">
+
+<!--MathML Aliases (From ISO PUB,DIA,NUM)-->
+<!ENTITY % mmaliase.dtd SYSTEM "mmaliase.dtd">
+
+<!--Greek Symbols-->
+<!ENTITY % isogrk3e.dtd SYSTEM "isogrk3e.dtd">
+
+<!--Math Script Font-->
+<!ENTITY % isomscre.dtd SYSTEM "isomscre.dtd">
+
+<!--Math Open Face Font-->
+<!ENTITY % isomopfe.dtd SYSTEM "isomopfe.dtd">
+
+<!--MathML Entities-->
+<!ENTITY % mmlent.dtd SYSTEM "mmlent.dtd">
+
+<!--Main MathML DTD -->
+<!ENTITY % mathml.dtd SYSTEM "mathml.dtd">
+
+%mathml.dtd;
+%isoamsae.dtd;
+%isoamsbe.dtd;
+%isoamsce.dtd;
+%isoamsne.dtd;
+%isoamsoe.dtd;
+%isoamsre.dtd;
+%isoteche.dtd;
+%isonume.dtd;
+%mmaliase.dtd;
+%isogrk3e.dtd;
+%isomscre.dtd;
+%isomopfe.dtd;
+%mmlent.dtd;
+<!ENTITY aacute "&#x00E1;">
+<!ENTITY OverBar "[OverBar]">
+<!ENTITY negationslash "/">
+
+
+<!-- end of latex.dtd -->
diff --git a/info/examples/lwc/apa/latexexa.tex b/info/examples/lwc/apa/latexexa.tex
new file mode 100644
index 0000000000..50a0b57633
--- /dev/null
+++ b/info/examples/lwc/apa/latexexa.tex
@@ -0,0 +1,546 @@
+%% version September 23 Sep 1998
+\documentclass{article}
+\usepackage{graphicx}
+\usepackage{url}
+\title{Simulation of Energy Loss Straggling}
+\author{Maria Physicist}
+\newcommand{\Emax}{\ensuremath{E_{\mathrm{max}}}}
+\newcommand{\GEANT}{\texttt{GEANT}}
+\begin{document}
+\maketitle
+
+\section{Introduction}
+
+Due to the statistical nature of ionisation energy loss, large
+fluctuations can occur in the amount of energy deposited by a particle
+traversing an absorber element. Continuous processes such as multiple
+scattering and energy loss play a relevant role in the longitudinal
+and lateral development of electromagnetic and hadronic
+showers, and in the case of sampling calorimeters the
+measured resolution can be significantly affected by such fluctuations
+in their active layers. The description of ionisation fluctuations is
+characterised by the significance parameter $\kappa$, which is
+proportional to the ratio of mean energy loss to the maximum allowed
+energy transfer in a single collision with an atomic electron
+\[
+\kappa =\frac{\xi}{\Emax}
+\]
+\Emax{}
+is the maximum transferable energy in a single collision with
+an atomic electron.
+\[
+\Emax =\frac{2 m_e \beta^2\gamma^2 }
+{1 + 2\gamma m_e/m_x + \left ( m_e/m_x\right)^2},
+\]
+where $\gamma = E/m_x$, $E$ is energy and
+$m_x$ the mass of the incident particle,
+$\beta^2 = 1 - 1/\gamma^2$ and $m_e$ is the electron mass.
+$\xi$ comes from the Rutherford scattering cross section
+and is defined as:
+\begin{eqnarray*} \xi = \frac{2\pi z^2 e^4 N_{Av} Z \rho \delta x}
+ {m_e \beta^2 c^2 A} = 153.4 \frac{z^2} {\beta^2} \frac{Z}{A}
+ \rho \delta x \quad\mathrm{keV},
+\end{eqnarray*}
+where
+
+\begin{tabular}{ll}
+$z$ & charge of the incident particle \\
+$N_{Av}$ & Avogadro's number \\
+$Z$ & atomic number of the material \\
+$A$ & atomic weight of the material \\
+$\rho$ & density \\
+$ \delta x$ & thickness of the material \\
+\end{tabular}
+
+$\kappa$ measures the contribution of the collisions with energy
+transfer close to \Emax. For a given absorber, $\kappa$ tends
+towards large values if $\delta x$ is large and/or if $\beta$ is
+small. Likewise, $\kappa$ tends towards zero if $\delta x $ is small
+and/or if $\beta$ approaches 1.
+
+The value of $\kappa$ distinguishes two regimes which occur in the
+description of ionisation fluctuations:
+
+\begin{enumerate}
+\item A large number of collisions involving the loss of all or most
+ of the incident particle energy during the traversal of an absorber.
+
+ As the total energy transfer is composed of a multitude of small
+ energy losses, we can apply the central limit theorem and describe
+ the fluctuations by a Gaussian distribution. This case is
+ applicable to non-relativistic particles and is described by the
+ inequality $\kappa > 10 $ (i.e. when the mean energy loss in the
+ absorber is greater than the maximum energy transfer in a single
+ collision).
+
+\item Particles traversing thin counters and incident electrons under
+ any conditions.
+
+ The relevant inequalities and distributions are $ 0.01 < \kappa < 10
+ $, Vavilov distribution, and $\kappa < 0.01 $, Landau distribution.
+\end{enumerate}
+
+An additional regime is defined by the contribution of the collisions
+with low energy transfer which can be estimated with the relation
+$\xi/I_0$, where $I_0$ is the mean ionisation potential of the atom.
+Landau theory assumes that the number of these collisions is high, and
+consequently, it has a restriction $\xi/I_0 \gg 1$. In \GEANT{}
+(see URL \url{http://wwwinfo.cern.ch/asdoc/geant/geantall.html}), the
+limit of Landau theory has been set at $\xi/I_0 = 50$. Below this
+limit special models taking into account the atomic structure of the
+material are used. This is important in thin layers and gaseous
+materials. Figure \ref{fg:phys332-1} shows the behaviour of $\xi/I_0$
+as a function of the layer thickness for an electron of 100 keV and 1
+GeV of kinetic energy in Argon, Silicon and Uranium.
+
+\begin{figure}
+ \centering
+ \includegraphics[width=.6\linewidth]{phys332-1}
+ \caption{The variable $\xi/I_0$ can be used to measure the
+ validity range of the Landau theory. It depends
+ on the type and energy of the particle, $Z$, $A$
+ and the ionisation potential of the material and
+ the layer thickness.
+ }
+ \label{fg:phys332-1}
+\end{figure}
+
+In the following sections, the different theories and models for the
+energy loss fluctuation are described. First, the Landau theory and
+its limitations are discussed, and then, the Vavilov and Gaussian
+straggling functions and the methods in the thin layers and gaseous
+materials are presented.
+
+\section{Landau theory}
+\label{sec:phys332-1}
+
+For a particle of mass $m_x$ traversing a thickness of material
+$\delta x $, the Landau probability distribution may be written in
+terms of the universal Landau function $\phi(\lambda)$
+as\cite{bib-LAND}:
+\begin{eqnarray*}
+f( \epsilon , \delta x ) & = &\frac{1}{\xi} \phi ( \lambda )
+\end{eqnarray*}
+where
+\begin{eqnarray*}
+\phi(\lambda )& = & \frac{1} {2 \pi i}\int^{c+i\infty}_{c-i\infty}
+\exp \left ( u \ln u + \lambda u \right ) du \hspace{2cm} c \geq 0 \\
+\lambda & = & \frac{\epsilon -\bar{\epsilon} }{\xi}
+ - \gamma' - \beta^2 - \ln \frac{\xi}{\Emax} \\
+\gamma' & = & 0.422784\dots = 1 - \gamma \\
+\gamma & = & 0.577215\dots \mbox{(Euler's constant)} \\
+\bar{\epsilon} & = & \mbox{average energy loss} \\
+\epsilon & = & \mbox{actual energy loss}
+\end{eqnarray*}
+
+\subsection{Restrictions}
+
+The Landau formalism makes two restrictive assumptions:
+\begin{enumerate}
+\item The typical energy loss is small compared to the maximum energy
+ loss in a single collision. This restriction is removed in the
+ Vavilov theory (see section \ref{vavref}).
+\item The typical energy loss in the absorber should be large compared
+ to the binding energy of the most tightly bound electron. For
+ gaseous detectors, typical energy losses are a few keV which is
+ comparable to the binding energies of the inner electrons. In such
+ cases a more sophisticated approach which accounts for atomic energy
+ levels\cite{bib-TALM} is necessary to accurately simulate data
+ distributions. In \GEANT, a parameterised model by L. Urb\'{a}n is
+ used (see section \ref{urban}).
+\end{enumerate}
+
+In addition, the average value of the Landau distribution is infinite.
+Summing the Landau fluctuation obtained to the average energy from the
+$dE/dx$ tables, we obtain a value which is larger than the one coming
+from the table. The probability to sample a large value is small, so
+it takes a large number of steps (extractions) for the average
+fluctuation to be significantly larger than zero. This introduces a
+dependence of the energy loss on the step size which can affect
+calculations.
+
+A solution to this has been to introduce a limit on the value of the
+variable sampled by the Landau distribution in order to keep the
+average fluctuation to 0. The value obtained from the \texttt{GLANDO}
+routine is:
+\[
+\delta dE/dx = \epsilon - \bar{\epsilon} = \xi ( \lambda - \gamma'
++\beta^2 +\ln \frac{\xi}{\Emax})
+\]
+In order for this to have average 0, we must impose that:
+\[
+\bar{\lambda} = -\gamma' - \beta^2 -\ln \frac{\xi}{\Emax}
+\]
+
+This is realised introducing a $\lambda_{\mathrm{max}}(\bar{\lambda})$
+such that if only values of $\lambda \leq \lambda_{\mathrm{max}}$ are
+accepted, the average value of the distribution is $\bar{\lambda}$.
+
+A parametric fit to the universal Landau distribution has been
+performed, with following result:
+\[
+\lambda_{\mathrm{max}} = 0.60715 +
+ 1.1934\bar{\lambda}+(0.67794+0.052382\bar{\lambda})
+ \exp(0.94753+0.74442\bar{\lambda})
+\]
+only values smaller than $\lambda_{\mathrm{max}}$ are accepted, otherwise the
+distribution is resampled.
+
+
+
+\section{Vavilov theory}
+\label{vavref}
+
+Vavilov\cite{bib-VAVI} derived a more accurate straggling distribution
+by introducing the kinematic limit on the maximum transferable energy
+in a single collision, rather than using $ \Emax = \infty $.
+Now we can write\cite{bib-SCH1}:
+\begin{eqnarray*}
+f \left ( \epsilon, \delta s \right ) & = & \frac{1}{\xi} \phi_{v}
+\left ( \lambda_{v}, \kappa, \beta^{2} \right )
+\end{eqnarray*}
+where
+\begin{eqnarray*}
+\phi_{v} \left ( \lambda_{v}, \kappa, \beta^{2} \right ) & = &
+\frac{1}{2 \pi i} \int^{c+i\infty}_{c-i\infty}\phi \left( s \right )
+e^{\lambda s} ds \hspace{2cm} c \geq 0 \\
+\phi \left ( s \right ) & = &
+\exp \left [ \kappa ( 1 + \beta^{2}\gamma ) \right ]
+~ \exp \left [ \psi \left ( s \right ) \right ], \\
+\psi \left ( s \right ) & = & s \ln \kappa + ( s + \beta^{2} \kappa )
+\left [ \ln (s/\kappa) + E_{1} (s/\kappa) \right ] - \kappa e^{-s/\kappa},
+\end{eqnarray*}
+and
+\begin{eqnarray*}
+E_{1}(z) & = & \int^{\infty}_{z} t^{-1} e^{-t} dt
+\mbox{\hspace{1cm} (the exponential integral)} \\
+\lambda_v & = & \kappa \left [ \frac{\epsilon - \bar{\epsilon}}{\xi}
+- \gamma' - \beta^2 \right]
+\end{eqnarray*}
+
+The Vavilov parameters are simply related to the Landau parameter by
+$\lambda_L = \lambda_v/\kappa - \ln\kappa $. It can be shown that as
+$\kappa \rightarrow 0$, the distribution of the variable $\lambda_L$
+approaches that of Landau. For $\kappa \leq 0.01$ the two
+distributions are already practically identical. Contrary to what many
+textbooks report, the Vavilov distribution \emph{does not} approximate
+the Landau distribution for small $\kappa$, but rather the
+distribution of $\lambda_L$ defined above tends to the distribution of
+the true $\lambda$ from the Landau density function. Thus the routine
+\texttt{GVAVIV} samples the variable $\lambda_L$ rather than
+$\lambda_v$. For $\kappa \geq 10$ the Vavilov distribution tends to a
+Gaussian distribution (see next section).
+
+\section{Gaussian Theory}
+
+Various conflicting forms have been proposed for Gaussian straggling
+functions, but most of these appear to have little theoretical or
+experimental basis. However, it has been shown\cite{bib-SELT} that
+for $\kappa \geq 10 $ the Vavilov distribution can be replaced by a
+Gaussian of the form:
+\begin{eqnarray*}
+f( \epsilon , \delta s) \approx \frac{1}
+{\xi \sqrt{\frac{2 \pi}{\kappa} \left( 1 - \beta^2/2 \right)}}
+ \exp \left [ \frac{( \epsilon - \bar{\epsilon} )^2}{2} \frac{\kappa}
+ {\xi^2 (1- \beta^2/2)}\right ]
+\end{eqnarray*}
+thus implying
+\begin{eqnarray*}
+\mathrm{mean} & = & \bar{\epsilon} \\
+\sigma^2 & = & \frac{\xi^2}{\kappa} (1-\beta^2/2) = \xi
+ \Emax (1-\beta^2/2)
+\end{eqnarray*}
+
+\section{Urb\'an model}
+\label{urban}
+
+The method for computing restricted energy losses with $\delta$-ray
+production above given threshold energy in \GEANT{} is a Monte
+Carlo method that can be used for thin layers. It is fast and it can
+be used for any thickness of a medium. Approaching the limit of the
+validity of Landau's theory, the loss distribution approaches smoothly
+the Landau form as shown in Figure \ref{fg:phys332-2}.
+\begin{figure}
+ \centering
+ \includegraphics[width=.6\linewidth]{phys332-2}
+ \caption{Energy loss distribution for a 3 GeV electron in
+ Argon as given by standard \GEANT. The width of the layers is
+ given in centimeters.}
+ \label{fg:phys332-2}
+\end{figure}
+
+It is assumed that the atoms have only two energy levels with binding
+energy $E_1$ and $E_2$. The particle--atom interaction will then be
+an excitation with energy loss $E_1$ or $E_2$, or an ionisation with
+an energy loss distributed according to a function $g(E) \sim 1/E^2$:
+\begin{equation}
+g(E) = \frac{(\Emax + I)I}{\Emax} \frac{1}{E^2}
+\end{equation}
+
+The macroscopic cross-section for excitations ($i=1,2$) is
+\begin{equation}
+\label{eq:sigex}
+\Sigma_i = C \frac{f_i}{E_i} \frac{\ln (2 m \beta^2 \gamma^2/E_i) - \beta^2}
+ {\ln (2 m \beta^2 \gamma^2/ I) - \beta^2}(1-r)
+\end{equation}
+and the macroscopic cross-section for ionisation is
+\begin{equation}
+\label{eq:sigion}
+\Sigma_3 = C \frac{\Emax}{I(\Emax+I) \ln(\frac{\Emax+I}{I})}
+ ~ r
+\end{equation}
+\Emax{} is the \GEANT{} cut for $\delta$-production, or the maximum
+energy transfer minus mean ionisation energy, if it is smaller than
+this cut-off value. The following notation is used:
+
+\begin{tabular}{ll}
+$r, C$ & parameters of the model \\
+$E_i$ & atomic energy levels \\
+$I$ & mean ionisation energy \\
+${f_i}$ & oscillator strengths
+\end{tabular}
+
+The model has the parameters $f_i$, $E_i$, $C$ and $r ~(0\leq r\leq
+1)$. The oscillator strengths $f_i$ and the atomic level energies
+$E_i$ should satisfy the constraints
+\begin{eqnarray}
+f_1 + f_2 & = & 1 \label{eq:fisum}\\
+f_1 \ln E_1 + f_2 \ln E_2 & = & \ln I \label{eq:flnsum}
+\end{eqnarray}
+The parameter $C$ can be defined with the help of the mean energy loss
+$dE/dx$ in the following way: The numbers of collisions ($n_i$, i =
+1,2 for the excitation and 3 for the ionisation) follow the Poisson
+distribution with a mean number $ \langle n_i \rangle $. In a step
+$\Delta x$ the mean number of collisions is
+\begin{equation}
+\langle n_i \rangle = \Sigma_i \Delta x
+\end{equation}
+The mean energy loss $dE/dx$ in a step is the sum of the excitation
+and ionisation contributions
+\begin{equation}
+\frac{dE}{dx} \Delta x = \left[ \Sigma_1 E_1 + \Sigma_2 E_2 +
+ \Sigma_3 \int_{I}^{\Emax+I} E~g(E)~dE \right]
+ \Delta x
+\end{equation}
+From this, using the equations (\ref{eq:sigex}), (\ref{eq:sigion}),
+(\ref{eq:fisum}) and (\ref{eq:flnsum}), one can define the parameter
+$C$
+\begin{equation}
+C = \frac{dE}{dx}
+\end{equation}
+
+The following values have been chosen in \GEANT{} for the other
+parameters:
+\[
+\begin{array}{lcl}
+f_2 = \left\{ \begin{array}{ll}
+ 0 & \mathrm{if}\, Z \leq 2 \\
+ 2/Z & \mathrm{if}\, Z > 2 \\
+ \end{array} \right. & \Rightarrow & f_1 = 1 - f_2 \\
+E_2 = 10 Z^2 \mathrm{eV} & \Rightarrow & E_1 = \left(\frac{I}{E_{2}^{f_2}}
+ \right)^{\frac{1}{f_1}} \\
+r = 0.4 & & \\
+\end{array}
+\]
+With these values the atomic level $E_2$ corresponds approximately
+the K-shell energy of the atoms and $Zf_2$ the number of K-shell
+electrons. $r$ is the only variable which can be tuned freely. It
+determines the relative contribution of ionisation and
+excitation to the energy loss.
+
+The energy loss is computed with the assumption that the step length
+(or the relative energy loss) is small, and---in consequence---the
+cross-section can be considered constant along the path length. The
+energy loss due to the excitation is
+\begin{equation}
+\Delta E_e = n_1 E_1 + n_2 E_2
+\end{equation}
+where $n_1$ and $n_2$ are sampled from Poisson distribution as
+discussed above. The loss due to the ionisation can be generated from
+the distribution $g(E)$ by the inverse transformation method:
+\begin{eqnarray}
+u = F(E) & = & \int_{I}^E g(x) dx \nonumber \\
+E = F^{-1}(u) & = & \frac{I}{1 - u \frac {\Emax}{\Emax+I}} \\
+\end{eqnarray}
+where $u$ is a uniform random number between $F(I)=0$ and
+$F(\Emax+I)=1$. The contribution from the ionisations will be
+\begin{equation}
+\Delta E_i = \sum_{j=1}^{n_3} \frac{I}
+ {1 - u_j \frac {\Emax}{\Emax + I}}
+\end{equation}
+where $n_3$ is the number of ionisation (sampled from Poisson
+distribution). The energy loss in a step will then be $\Delta E =
+\Delta E_e + \Delta E_i$.
+
+\subsection{Fast simulation for $n_3 \geq 16$}
+
+If the number of ionisation $n_3$ is bigger than 16, a faster sampling
+method can be used. The possible energy loss interval is divided in
+two parts: one in which the number of collisions is large and the
+sampling can be done from a Gaussian distribution and the other in
+which the energy loss is sampled for each collision. Let us call the
+former interval $[I, \alpha I]$ the interval A, and the latter
+$[\alpha I,\Emax]$ the interval B. $\alpha$ lies between 1 and
+$\Emax/I$. A collision with a loss in the interval A happens with
+the probability
+\begin{equation}
+\label{eq:phys332-5}
+P(\alpha) = \int_I^{\alpha I} g(\!E\!) \, dE =
+ \frac {( \Emax + I) (\alpha - 1)}{\Emax \alpha}
+\end{equation}
+The mean energy loss and the standard deviation for this type
+of collision are
+\begin{equation}
+\langle \Delta E(\alpha) \rangle = \frac{1}{P(\alpha)}
+ \int_I^{\alpha I} E \, g(\!E\!) \, dE =
+ \frac{I \alpha \ln \alpha}{\alpha - 1}
+\end{equation}
+and
+\begin{equation}
+\sigma^2(\alpha) = \frac{1}{P(\alpha)}
+ \int_I^{\alpha I} E^2 \, g(\!E\!) \, dE =
+ I^2 \alpha \left( 1 - \frac{\alpha \ln \! ^2 \alpha}{(\alpha - 1)^2} \right)
+\end{equation}
+If the collision number is high , we assume that the number of the
+type A collisions can be calculated from a Gaussian distribution
+with the following mean value and standard deviation:
+\begin{eqnarray}
+\label{eq:phys332-1}
+\langle n_A \rangle & = & n_3 P(\alpha) \\
+\label{eq:phys332-2}
+\sigma_A^2 & = & n_3 P(\alpha) ( 1 - P(\alpha))
+\end{eqnarray}
+It is further assumed that the energy loss in these collisions
+has a Gaussian distribution with
+\begin{eqnarray}
+\label{eq:phys332-3}
+\langle \Delta E_A \rangle & = & n_A \langle \Delta E(\alpha) \rangle \\
+\label{eq:phys332-4}
+\sigma_{E,A}^2 & = & n_A \sigma^2(\alpha)
+\end{eqnarray}
+The energy loss of these collision can then be sampled from the
+Gaussian distribution.
+
+The collisions where the energy loss is in the interval B are sampled
+directly from
+\begin{equation}
+\Delta E_B = \sum_{i=1}^{n_3 - n_A} \frac{\alpha I}
+ {1 - u_i \frac{\Emax + I - \alpha I}{\Emax + I}}
+\end{equation}
+The total energy loss is the sum of these two types of collisions:
+\begin{equation}
+\Delta E = \Delta E_A + \Delta E_B
+\end{equation}
+
+The approximation of equations (\ref{eq:phys332-1}),
+(\ref{eq:phys332-2}), (\ref{eq:phys332-3}) and (\ref{eq:phys332-4})
+can be used under the following conditions:
+\begin{eqnarray}
+\label{eq:phys332-6}
+\langle n_A \rangle - c \, \sigma_A & \geq & 0 \\
+\label{eq:phys332-7}
+\langle n_A \rangle + c \, \sigma_A & \leq & n_3 \\
+\label{eq:phys332-8}
+\langle \Delta E_A \rangle - c \, \sigma_{E,A} & \geq & 0
+\end{eqnarray}
+where $c \geq 4$. From the equations (\ref{eq:phys332-5}),
+(\ref{eq:phys332-1}) and (\ref{eq:phys332-3}) and from the conditions
+(\ref{eq:phys332-6}) and (\ref{eq:phys332-7}) the following limits can
+be derived:
+\begin{equation}
+\alpha_{\mathrm{min}} = \frac{(n_3 + c^2)(\Emax+I)}
+ {n_3 (\Emax + I) + c^2 I} \; \leq \alpha \; \leq
+\alpha_{\mathrm{max}} = \frac{(n_3 + c^2)(\Emax+I)}
+ {c^2 (\Emax + I) + n_3 I}
+\end{equation}
+This conditions gives a lower limit to number of the ionisations $n_3$
+for which the fast sampling can be done:
+\begin{equation}
+n_3 \; \geq \; c^2
+\end{equation}
+As in the conditions (\ref{eq:phys332-6}), (\ref{eq:phys332-7}) and
+(\ref{eq:phys332-8}) the value of $c$ is as minimum 4, one gets $n_3
+\; \geq 16$. In order to speed the simulation, the maximum value is
+used for $\alpha$.
+
+The number of collisions with energy loss in the interval B (the
+number of interactions which has to be simulated directly) increases
+slowly with the total number of collisions $n_3$. The maximum number
+of these collisions can be estimated as
+\begin{equation}
+n_{B,max} = n_3 - n_{A,min} \approx n_3 (\langle n_A \rangle
+ - \sigma_A)
+\end{equation}
+From the previous expressions for $\langle n_A \rangle$ and $\sigma_A$
+one can derive the condition
+\begin{equation}
+n_B \; \leq \; n_{B,max} = \frac{2 n_3 c^2}{n_3+c^2}
+\end{equation}
+The following values are obtained with $c=4$:
+
+\begin{tabular}{llcrr}
+$n_3$ & $n_{B,max}$ & & $n_3$ & $n_{B,max}$\\ \hline
+16 & 16 & & 200 & 29.63\\
+20 & 17.78 & & 500 & 31.01 \\
+50 & 24.24 & & 1000 & 31.50 \\
+100 & 27.59 & & $\infty$ & 32.00
+\end{tabular}
+
+\subsection{Special sampling for lower part of the spectrum}
+
+If the step length is very small ($\leq 5$ mm in gases, $\leq$ 2-3
+$\mu$m in solids) the model gives 0 energy loss for some events. To
+avoid this, the probability of 0 energy loss is computed
+\begin{equation}
+P( \Delta E=0) = e^{-( \langle n_1 \rangle + \langle n_2 \rangle
+ + \langle n_3 \rangle )}
+\end{equation}
+If the probability is bigger than 0.01 a special sampling is done,
+taking into account the fact that in these cases the projectile
+interacts only with the outer electrons of the atom. An energy level
+$E_0 = 10$ eV is chosen to correspond to the outer electrons. The mean
+number of collisions can be calculated from
+\begin{equation}
+\langle n \rangle = \frac{1}{E_0} \frac{dE}{dx} \Delta x
+\end{equation}
+The number of collisions $n$ is sampled from Poisson distribution.
+In the case of the thin layers, all the collisions are considered as
+ionisations and the energy loss is computed as
+\begin{equation}
+\Delta E = \sum_{i=1}^n \frac{E_0}
+ {1 - \frac {\Emax}{\Emax + E_0} u_i}
+\end{equation}
+
+\begin{thebibliography}{10}
+\bibitem{bib-LAND}
+L.Landau.
+\newblock On the Energy Loss of Fast Particles by Ionisation.
+\newblock Originally published in \emph{J. Phys.}, 8:201, 1944.
+\newblock Reprinted in D.ter Haar, Editor, \emph{L.D.Landau, Collected
+ papers}, page 417. Pergamon Press, Oxford, 1965.
+
+\bibitem{bib-SCH1}
+B.Schorr.
+\newblock Programs for the Landau and the Vavilov distributions and the
+ corresponding random numbers.
+\newblock \emph{Comp. Phys. Comm.}, 7:216, 1974.
+
+\bibitem{bib-SELT}
+S.M.Seltzer and M.J.Berger.
+\newblock Energy loss straggling of protons and mesons.
+\newblock In \emph{Studies in Penetration of Charged Particles in
+ Matter}, Nuclear Science Series~39, Nat. Academy of Sciences,
+ Washington DC, 1964.
+
+\bibitem{bib-TALM}
+R.Talman.
+\newblock On the statistics of particle identification using ionization.
+\newblock \emph{Nucl. Inst. Meth.}, 159:189, 1979.
+
+\bibitem{bib-VAVI}
+P.V.Vavilov.
+\newblock Ionisation losses of high energy heavy particles.
+\newblock \emph{Soviet Physics JETP}, 5:749, 1957.
+\end{thebibliography}
+
+\end{document}
diff --git a/info/examples/lwc/apa/latexexa.xml b/info/examples/lwc/apa/latexexa.xml
new file mode 100644
index 0000000000..164f487db9
--- /dev/null
+++ b/info/examples/lwc/apa/latexexa.xml
@@ -0,0 +1,171 @@
+<?xml version="1.0"?>
+<!DOCTYPE document SYSTEM "latexexa.dtd" []>
+<document>
+<frontmatter>
+ <title>Simulation of Energy Loss Straggling</title>
+ <author>Maria Physicist</author>
+ <date>January 14, 1999</date>
+</frontmatter>
+<bodymatter>
+<section id="intro"> <stitle>Introduction</stitle>
+<par>Due to the statistical nature of ionisation energy loss, large
+fluctuations can occur in the amount of energy deposited by a particle
+traversing an absorber element. Continuous processes such as multiple
+scattering and energy loss play a relevant role in the longitudinal
+and lateral development of electromagnetic and hadronic showers, and
+in the case of sampling calorimeters the measured resolution can be
+significantly affected by such fluctuations in their active
+layers. The description of ionisation fluctuations is characterised by
+the significance parameter <inlinemath>
+<math><mi>&kappa;</mi></math></inlinemath>, which is proportional to
+the ratio of mean energy loss to the maximum allowed energy transfer
+in a single collision with an atomic electron
+
+<displaymath><math><mrow>
+<mi>&kappa;</mi><mo>=</mo> <mfrac> <mrow>
+<mi>&xi;</mi></mrow><mrow><msub><mi>E</mi><mrow><mi>max </mi> </mrow>
+</msub> </mrow> </mfrac> </mrow></math></displaymath>
+
+<inlinemath><math><msub><mi>E</mi><mrow><mi>max </mi> </mrow> </msub>
+</math></inlinemath> is the maximum transferable energy in a single
+collision with an atomic electron.
+
+....
+
+</section>
+<section id="vavref"><stitle>Vavilov theory</stitle>
+<par>Vavilov<cite refid="bib-VAVI"/> derived a more accurate
+straggling distribution by introducing the kinematic limit on the
+maximum transferable energy in a single collision, rather than using
+<inlinemath> <math><msub><mi>E</mi><mrow><mi>max </mi> </mrow> </msub>
+<mo>=</mo><mi>&infin;</mi></math></inlinemath>. Now we can write<cite
+refid="bib-SCH1"/>: <eqnarray><subeqn><math><mi>f</mi> <mfenced
+open='('
+close=')'><mi>&epsi;</mi><mo>,</mo><mi>&delta;</mi><mi>s</mi></mfenced>
+<mo>=</mo>
+<mfrac><mrow><mn>1</mn></mrow><mrow><mi>&xi;</mi></mrow></mfrac>
+<msub><mi>&phi;</mi><mrow><mi>v</mi></mrow>
+</msub> <mfenced open='('
+close=')'><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow> </msub>
+<mo>,</mo><mi>&kappa;</mi><mo>,</mo><msup><mi>&beta;</mi><mrow><mn>2</mn>
+</mrow> </msup> </mfenced> <mtext></mtext> </math></subeqn></eqnarray>
+where
+<eqnarray><subeqn><math><msub><mi>&phi;</mi><mrow><mi>v</mi></mrow>
+</msub> <mfenced open='('
+close=')'><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow> </msub>
+<mo>,</mo><mi>&kappa;</mi><mo>,</mo><msup><mi>&beta;</mi><mrow><mn>2</mn>
+</mrow> </msup> </mfenced> <mo>=</mo>
+<mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn><mi>&pi;</mi><mi>i</mi></mrow>
+</mfrac><msubsup><mo>&int;</mo>
+<mrow><mi>c</mi><mo>+</mo><mi>i</mi><mi>&infin;</mi></mrow>
+<mrow><mi>c</mi><mo>-</mo><mi>i</mi><mi>&infin;</mi>
+</mrow></msubsup><mi>&phi;</mi><mfenced
+open='('
+close=')'><mi>s</mi></mfenced><msup><mi>e</mi><mrow><mi>&lambda;</mi><mi>s</mi>
+</mrow> </msup> <mi>d</mi><mi>s</mi><mspace
+width='2cm'/><mi>c</mi><mo>&geq;</mo><mn>0</mn> <mtext></mtext>
+</math></subeqn><subeqn><math> </math></subeqn><subeqn
+><math><mi>&phi;</mi><mfenced open='(' close=')'><mi>s</mi></mfenced>
+<mo>=</mo> <mo>exp</mo><mfenced open='['
+close=']'><mi>&kappa;</mi><mrow><mo>(</mo><mn>1</mn><mo>+</mo>
+<msup><mi>&beta;</mi><mrow><mn>2</mn>
+</mrow> </msup>
+<mi>&gamma;</mi><mo>)</mo></mrow></mfenced><mo>exp</mo><mfenced
+open='[' close=']'><mi>&psi;</mi> <mfenced open='('
+close=')'><mi>s</mi></mfenced></mfenced><mo>,</mo> <mtext></mtext>
+</math></subeqn><subeqn><math> </math></subeqn><subeqn
+><math><mi>&psi;</mi> <mfenced open='(' close=')'><mi>s</mi></mfenced>
+<mo>=</mo> <mi>s</mi><mo>ln</mo>
+<mi>&kappa;</mi><mo>+</mo><mrow><mo>(</mo><mi>s</mi><mo>+</mo><msup>
+<mi>&beta;</mi><mrow><mn>2</mn>
+</mrow> </msup> <mi>&kappa;</mi><mo>)</mo></mrow><mfenced open='['
+close=']'><mo>ln</mo>
+<mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi><mo>)</mo></mrow>
+<mo>+</mo><msub><mi>E</mi><mrow>
+<mn>1</mn> </mrow> </msub>
+<mrow><mo>(</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi><mo>)</mo>
+</mrow></mfenced><mo>-</mo><mi>&kappa;</mi><msup><mi>e</mi><mrow>
+<mo>-</mo><mi>s</mi><mo>/</mo><mi>&kappa;</mi>
+</mrow> </msup> <mo>,</mo> <mtext></mtext> </math></subeqn></eqnarray>
+and <eqnarray><subeqn><math><msub><mi>E</mi><mrow><mn>1</mn> </mrow>
+</msub> <mrow><mo>(</mo><mi>z</mi><mo>)</mo></mrow>
+<mo>=</mo><msubsup> <mo>&int;</mo>
+<mrow><mi>&infin;</mi></mrow><mrow><mi>z</mi></mrow></msubsup>
+<msup><mi>t</mi><mrow><mo>-</mo><mn>1</mn>
+</mrow> </msup> <msup><mi>e</mi><mrow><mo>-</mo><mi>t</mi> </mrow>
+</msup> <mi>d</mi><mi>t</mi><mspace width='1cm'/><mtext>(the
+exponential integral)</mtext> <mtext></mtext> </math></subeqn><subeqn
+><math> </math></subeqn><subeqn
+><math><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow> </msub>
+<mo>=</mo> <mi>&kappa;</mi><mfenced open='['
+close=']'><mfrac><mrow><mi>&epsi;</mi><mo>-</mo><munderover
+accent='true'><mi>&epsi;</mi><mrow></mrow><mo>&barwed;</mo></munderover>
+</mrow> <mrow><mi>&xi;</mi></mrow></mfrac>
+<mo>-</mo><mi>&gamma;</mi><mi>&prime;</mi>
+<mo>-</mo><msup><mi>&beta;</mi><mrow><mn>2</mn> </mrow> </msup>
+</mfenced> <mtext></mtext> </math></subeqn></eqnarray>
+</par>
+<par>The Vavilov parameters are simply related to the Landau parameter
+by <inlinemath><math><msub><mi>&lambda;</mi><mrow><mi>L</mi> </mrow>
+</msub> <mo>=</mo><msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow>
+</msub> <mo>/</mo><mi>&kappa;</mi><mo>-</mo><mo>ln</mo>
+<mi>&kappa;</mi></math></inlinemath>. It can be shown that as
+<inlinemath> <math>
+<mi>&kappa;</mi><mo>&rarr;</mo><mn>0</mn></math></inlinemath>, the
+distribution of the variable <inlinemath> <math>
+<msub><mi>&lambda;</mi><mrow><mi>L</mi> </mrow> </msub>
+</math></inlinemath> approaches that of Landau. For <inlinemath>
+<math>
+<mi>&kappa;</mi><mo>&leq;</mo><mn>0</mn><mo>.</mo><mn>0</mn><mn>1</mn>
+</math></inlinemath>
+the two distributions are already practically identical. Contrary to
+what many textbooks report, the Vavilov distribution <emph> does
+not</emph> approximate the Landau distribution for small
+<inlinemath><math><mi>&kappa;</mi></math></inlinemath>, but rather the
+distribution of <inlinemath> <math>
+<msub><mi>&lambda;</mi><mrow><mi>L</mi> </mrow> </msub>
+</math></inlinemath> defined above tends to the distribution of the
+true <inlinemath><math><mi>&lambda;</mi></math></inlinemath> from the
+Landau density function. Thus the routine <texttt> GVAVIV</texttt>
+samples the variable <inlinemath>
+<math><msub><mi>&lambda;</mi><mrow><mi>L</mi> </mrow> </msub>
+</math></inlinemath> rather than <inlinemath> <math>
+<msub><mi>&lambda;</mi><mrow><mi>v</mi></mrow> </msub>
+</math></inlinemath>. For <inlinemath> <math>
+<mi>&kappa;</mi><mo>&geq;</mo><mn>1</mn><mn>0</mn></math></inlinemath>
+the Vavilov distribution tends to a Gaussian distribution (see next
+section). </par>
+</section>
+.....
+</section>
+<section class="star"><stitle>References</stitle>
+<bibliography>
+<bibitem id="bib-LAND">
+<par>L.Landau. On the Energy Loss of Fast Particles by
+Ionisation. Originally published in <emph>J. Phys.</emph>, 8:201,
+1944. Reprinted in D.ter Haar, Editor, <emph>L.D.Landau, Collected
+papers</emph>, page 417. Pergamon Press, Oxford, 1965. </par>
+</bibitem>
+<bibitem id="bib-SCH1">
+<par>B.Schorr. Programs for the Landau and the Vavilov distributions
+and the corresponding random numbers. <emph>Comp. Phys. Comm.</emph>,
+7:216, 1974. </par>
+</bibitem>
+<bibitem id="bib-SELT">
+<par>S.M.Seltzer and M.J.Berger. Energy loss straggling of protons and
+mesons. In <emph>Studies in Penetration of Charged Particles in
+Matter</emph>, Nuclear Science Series 39, Nat. Academy of Sciences,
+Washington DC, 1964. </par>
+</bibitem>
+<bibitem id="bib-TALM">
+<par>R.Talman. On the statistics of particle identification using
+ionization. <emph>Nucl. Inst. Meth.</emph>, 159:189, 1979. </par>
+</bibitem>
+<bibitem id="bib-VAVI">
+<par>P.V.Vavilov. Ionisation losses of high energy heavy
+particles. <emph>Soviet Physics JETP</emph>, 5:749, 1957.</par>
+</bibitem>
+</bibliography>
+</section>
+</bodymatter>
+</document>
diff --git a/info/examples/lwc/apa/phys332-1.eps b/info/examples/lwc/apa/phys332-1.eps
new file mode 100644
index 0000000000..8299292087
--- /dev/null
+++ b/info/examples/lwc/apa/phys332-1.eps
@@ -0,0 +1,419 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%BoundingBox: 0 0 567 567
+%%Title: regime.eps
+%%Creator: HIGZ Version 1.20/02
+%%CreationDate: 93/11/12 09.41
+%%EndComments
+80 dict begin
+/s {stroke} def /l {lineto} def /m {moveto} def /t { translate} def
+/sw {stringwidth} def /r {rotate} def /rl {roll} def
+/d {rlineto} def /rm {rmoveto} def /gr {grestore} def /f {eofill} def
+/c {setrgbcolor} def /lw {setlinewidth} def /sd {setdash} def
+/cl {closepath} def /sf {scalefont setfont} def
+/box {m dup 0 exch d exch 0 d 0 exch neg d cl} def
+/bl {box s} def /bf {box f} def
+/mp {newpath /y exch def /x exch def} def
+/side {[w .77 mul w .23 mul] .385 w mul sd w 0 l currentpoint t -144 r} def
+/mr {mp x y w2 0 360 arc} def /m24 {mr s} def /m20 {mr f} def
+/mb {mp x y w2 add m w2 neg 0 d 0 w neg d w 0 d 0 w d cl} def
+/mt {mp x y w2 add m w2 neg w neg d w 0 d cl} def
+/m21 {mb f} def /m25 {mb s} def /m22 {mt f} def /m26 {mt s} def
+/m23 {mp x y w2 sub m w2 w d w neg 0 d cl f} def
+ /m27 {mp x y w2 add m w3 neg w2 neg d w3 w2 neg d w3 w2 d cl s} def
+ /m28 {mp x w2 sub y w2 sub w3 add m w3 0 d 0 w3 neg d w3 0 d 0 w3 d w3 0 d
+ 0 w3 d w3 neg 0 d 0 w3 d w3 neg 0 d 0 w3 neg d w3 neg 0 d cl s } def
+ /m29 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t
+ 4 {side} repeat cl fill gr} def
+ /m30 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t
+ 5 {side} repeat s gr} def /m31 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d
+ x w2 sub y w2 add m w w neg d x w2 sub y w2
+ sub m w w d s} def
+/m2 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d s} def
+/m5 {mp x w2 sub y w2 sub m w w d x w2 sub y w2 add m w w neg d s} def
+/reencdict 24 dict def /ReEncode {reencdict begin /nco&na exch def
+/nfnam exch def /basefontname exch def /basefontdict basefontname findfont def
+/newfont basefontdict maxlength dict def basefontdict {exch dup /FID ne
+{dup /Encoding eq {exch dup length array copy newfont 3 1 roll put} {exch
+newfont 3 1 roll put} ifelse} {pop pop} ifelse } forall newfont
+/FontName nfnam put nco&na aload pop nco&na length 2 idiv {newfont
+/Encoding get 3 1 roll put} repeat nfnam newfont definefont pop end } def
+/accvec [ 176 /agrave 181 /Agrave 190 /acircumflex 192 /Acircumflex
+201 /adieresis 204 /Adieresis 209 /ccedilla 210 /Ccedilla 211 /eacute
+212 /Eacute 213 /egrave 214 /Egrave 215 /ecircumflex 216 /Ecircumflex
+217 /edieresis 218 /Edieresis 219 /icircumflex 220 /Icircumflex
+221 /idieresis 222 /Idieresis 223 /ntilde 224 /Ntilde 226 /ocircumflex
+228 /Ocircumflex 229 /odieresis 230 /Odieresis 231 /ucircumflex 236 /Ucircumflex
+237 /udieresis 238 /Udieresis 239 /aring 242 /Aring 243 /ydieresis
+244 /Ydieresis 246 /aacute 247 /Aacute 252 /ugrave 253 /Ugrave] def
+/Times-Roman /Times-Roman accvec ReEncode
+/Times-Italic /Times-Italic accvec ReEncode
+/Times-Bold /Times-Bold accvec ReEncode
+/Times-BoldItalic /Times-BoldItalic accvec ReEncode
+/Helvetica /Helvetica accvec ReEncode
+/Helvetica-Oblique /Helvetica-Oblique accvec ReEncode
+/Helvetica-Bold /Helvetica-Bold accvec ReEncode
+/Helvetica-BoldOblique /Helvetica-BoldOblique accvec ReEncode
+/Courier /Courier accvec ReEncode
+/Courier-Oblique /Courier-Oblique accvec ReEncode
+/Courier-Bold /Courier-Bold accvec ReEncode
+/Courier-BoldOblique /Courier-BoldOblique accvec ReEncode
+/oshow {gsave [] 0 sd true charpath stroke gr} def
+/stwn { /fs exch def /fn exch def /text exch def fn findfont fs sf
+ text sw pop xs add /xs exch def} def
+/stwb { /fs exch def /fn exch def /nbas exch def /textf exch def
+textf length /tlen exch def nbas tlen gt {/nbas tlen def} if
+fn findfont fs sf textf dup length nbas sub nbas getinterval sw
+pop neg xs add /xs exch def} def
+/accspe [ 65 /plusminus 66 /bar 67 /existential 68 /universal
+69 /exclam 70 /numbersign 71 /greater 72 /question 73 /integral
+74 /colon 75 /semicolon 76 /less 77 /bracketleft 78 /bracketright
+79 /greaterequal 80 /braceleft 81 /braceright 82 /radical
+83 /spade 84 /heart 85 /diamond 86 /club 87 /lessequal
+88 /multiply 89 /percent 90 /infinity 48 /circlemultiply 49 /circleplus
+50 /emptyset 51 /lozenge 52 /bullet 53 /arrowright 54 /arrowup
+55 /arrowleft 56 /arrowdown 57 /arrowboth 48 /degree 44 /comma 43 /plus
+ 45 /angle 42 /angleleft 47 /divide 61 /notequal 40 /equivalence 41 /second
+ 97 /approxequal 98 /congruent 99 /perpendicular 100 /partialdiff 101 /florin
+ 102 /intersection 103 /union 104 /propersuperset 105 /reflexsuperset
+ 106 /notsubset 107 /propersubset 108 /reflexsubset 109 /element 110 /notelement
+ 111 /gradient 112 /logicaland 113 /logicalor 114 /arrowdblboth
+ 115 /arrowdblleft 116 /arrowdblup 117 /arrowdblright 118 /arrowdbldown
+ 119 /ampersand 120 /omega1 121 /similar 122 /aleph ] def
+/Symbol /Special accspe ReEncode
+gsave .25 .25 scale
+%%EndProlog
+ gsave 0 0 t 0 setgray [] 0 sd 1 lw 4 lw 1814 1814 227 227 bl 231 346 m 240 354
+ l 249 362 l 259 370 l 268 378 l 277 386 l 286 394 l 295 401 l 304 409 l 313 417
+ l 322 425 l 331 433 l 340 441 l 349 449 l 358 457 l 367 465 l 376 473 l 386 481
+ l 395 489 l 404 496 l 413 504 l 422 512 l 431 520 l 440 528 l 449 536 l 458 544
+ l 467 552 l 476 560 l 485 568 l 494 576 l 503 584 l 513 592 l 522 599 l 531 607
+ l 540 615 l 549 623 l 558 631 l 567 639 l 576 647 l 585 655 l 594 663 l 603 671
+ l 612 679 l 621 687 l 631 694 l 640 702 l 649 710 l 658 718 l 667 726 l 676 734
+ l s 676 734 m 685 742 l 694 750 l 703 758 l 712 766 l 721 774 l 730 782 l 739
+ 789 l 748 797 l 758 805 l 767 813 l 776 821 l 785 829 l 794 837 l 803 845 l 812
+ 853 l 821 861 l 830 869 l 839 877 l 848 885 l 857 892 l 866 900 l 875 908 l 885
+ 916 l 894 924 l 903 932 l 912 940 l 921 948 l 930 956 l 939 964 l 948 972 l 957
+ 980 l 966 987 l 975 995 l 984 1003 l 993 1011 l 1002 1019 l 1012 1027 l 1021
+ 1035 l 1030 1043 l 1039 1051 l 1048 1059 l 1057 1067 l 1066 1075 l 1075 1083 l
+ 1084 1090 l 1093 1098 l 1102 1106 l 1111 1114 l 1120 1122 l s 1120 1122 m 1129
+ 1130 l 1139 1138 l 1148 1146 l 1157 1154 l 1166 1162 l 1175 1170 l 1184 1178 l
+ 1193 1185 l 1202 1193 l 1211 1201 l 1220 1209 l 1229 1217 l 1238 1225 l 1247
+ 1233 l 1256 1241 l 1266 1249 l 1275 1257 l 1284 1265 l 1293 1273 l 1302 1281 l
+ 1311 1288 l 1320 1296 l 1329 1304 l 1338 1312 l 1347 1320 l 1356 1328 l 1365
+ 1336 l 1374 1344 l 1383 1352 l 1393 1360 l 1402 1368 l 1411 1376 l 1420 1383 l
+ 1429 1391 l 1438 1399 l 1447 1407 l 1456 1415 l 1465 1423 l 1474 1431 l 1483
+ 1439 l 1492 1447 l 1501 1455 l 1510 1463 l 1520 1471 l 1529 1479 l 1538 1486 l
+ 1547 1494 l 1556 1502 l 1565 1510 l s 1565 1510 m 1574 1518 l 1583 1526 l 1592
+ 1534 l 1601 1542 l 1610 1550 l 1619 1558 l 1628 1566 l 1637 1574 l 1647 1581 l
+ 1656 1589 l 1665 1597 l 1674 1605 l 1683 1613 l 1692 1621 l 1701 1629 l 1710
+ 1637 l 1719 1645 l 1728 1653 l 1737 1661 l 1746 1669 l 1755 1676 l 1765 1684 l
+ 1774 1692 l 1783 1700 l 1792 1708 l 1801 1716 l 1810 1724 l 1819 1732 l 1828
+ 1740 l 1837 1748 l 1846 1756 l 1855 1764 l 1864 1772 l 1873 1779 l 1882 1787 l
+ 1892 1795 l 1901 1803 l 1910 1811 l 1919 1819 l 1928 1827 l 1937 1835 l 1946
+ 1843 l 1955 1851 l 1964 1859 l 1973 1867 l 1982 1874 l 1991 1882 l 2000 1890 l
+ 2009 1898 l s 2009 1898 m 2019 1906 l 2028 1914 l 2037 1922 l s 1 lw 227 227 m
+ 227 2041 l s 4 lw 244 247 m 227 247 l s 244 274 m 227 274 l s 244 297 m 227 297
+ l s 244 317 m 227 317 l s 261 335 m 227 335 l s
+ /xs 0 def
+(10)
+ /Helvetica-Bold 43 stwn
+ gsave 181 319
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(10)
+ show
+ gr
+ /xs 0 def
+(-2)
+ /Helvetica-Bold 35 stwn
+ gsave 213 358
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 35 sf 0 0 m
+(-2)
+ show
+ gr
+ 244 454 m 227 454 l s 244 524 m 227 524 l s 244 573 m 227 573 l s 244 612 m 227
+ 612 l s 244 643 m 227 643 l s 244 670 m 227 670 l s 244 693 m 227 693 l s 244
+ 713 m 227 713 l s 261 731 m 227 731 l s
+ /xs 0 def
+(10)
+ /Helvetica-Bold 43 stwn
+ gsave 181 715
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(10)
+ show
+ gr
+ /xs 0 def
+(-1)
+ /Helvetica-Bold 35 stwn
+ gsave 213 754
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 35 sf 0 0 m
+(-1)
+ show
+ gr
+ 244 850 m 227 850 l s 244 920 m 227 920 l s 244 969 m 227 969 l s 244 1008 m
+ 227 1008 l s 244 1039 m 227 1039 l s 244 1066 m 227 1066 l s 244 1089 m 227
+ 1089 l s 244 1109 m 227 1109 l s 261 1127 m 227 1127 l s
+ /xs 0 def
+(1)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1111
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(1)
+ show
+ gr
+ 244 1246 m 227 1246 l s 244 1316 m 227 1316 l s 244 1365 m 227 1365 l s 244
+ 1404 m 227 1404 l s 244 1435 m 227 1435 l s 244 1462 m 227 1462 l s 244 1485 m
+ 227 1485 l s 244 1505 m 227 1505 l s 261 1523 m 227 1523 l s
+ /xs 0 def
+(10)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1507
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(10)
+ show
+ gr
+ 244 1642 m 227 1642 l s 244 1712 m 227 1712 l s 244 1761 m 227 1761 l s 244
+ 1800 m 227 1800 l s 244 1831 m 227 1831 l s 244 1858 m 227 1858 l s 244 1881 m
+ 227 1881 l s 244 1901 m 227 1901 l s 261 1919 m 227 1919 l s
+ /xs 0 def
+(10)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1903
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(10)
+ show
+ gr
+ /xs 0 def
+(2)
+ /Helvetica-Bold 35 stwn
+ gsave 213 1926
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 35 sf 0 0 m
+(2)
+ show
+ gr
+ 244 2038 m 227 2038 l s 1 lw 227 227 m 2041 227 l s 4 lw 227 261 m 227 227 l s
+ 680 261 m 680 227 l s 1134 261 m 1134 227 l s 1588 261 m 1588 227 l s 2041 261
+ m 2041 227 l s
+ /xs 0 def
+(0.01)
+ /Helvetica-Bold 43 stwn
+ gsave 227 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.01)
+ show
+ gr
+ /xs 0 def
+(0.1)
+ /Helvetica-Bold 43 stwn
+ gsave 680 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.1)
+ show
+ gr
+ /xs 0 def
+(1)
+ /Helvetica-Bold 43 stwn
+ gsave 1134 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(1)
+ show
+ gr
+ /xs 0 def
+(10)
+ /Helvetica-Bold 43 stwn
+ gsave 1588 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(10)
+ show
+ gr
+ /xs 0 def
+(100)
+ /Helvetica-Bold 43 stwn
+ gsave 2041 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(100)
+ show
+ gr
+ 231 243 m 240 251 l 249 258 l 259 266 l 268 274 l 277 282 l 286 290 l 295 298 l
+ 304 306 l 313 314 l 322 322 l 331 330 l 340 338 l 349 346 l 358 354 l 367 361 l
+ 376 369 l 386 377 l 395 385 l 404 393 l 413 401 l 422 409 l 431 417 l 440 425 l
+ 449 433 l 458 441 l 467 449 l 476 456 l 485 464 l 494 472 l 503 480 l 513 488 l
+ 522 496 l 531 504 l 540 512 l 549 520 l 558 528 l 567 536 l 576 544 l 585 551 l
+ 594 559 l 603 567 l 612 575 l 621 583 l 631 591 l 640 599 l 649 607 l 658 615 l
+ 667 623 l 676 631 l s 676 631 m 685 639 l 694 647 l 703 654 l 712 662 l 721 670
+ l 730 678 l 739 686 l 748 694 l 758 702 l 767 710 l 776 718 l 785 726 l 794 734
+ l 803 742 l 812 749 l 821 757 l 830 765 l 839 773 l 848 781 l 857 789 l 866 797
+ l 875 805 l 885 813 l 894 821 l 903 829 l 912 837 l 921 845 l 930 852 l 939 860
+ l 948 868 l 957 876 l 966 884 l 975 892 l 984 900 l 993 908 l 1002 916 l 1012
+ 924 l 1021 932 l 1030 940 l 1039 947 l 1048 955 l 1057 963 l 1066 971 l 1075
+ 979 l 1084 987 l 1093 995 l 1102 1003 l 1111 1011 l 1120 1019 l s 1120 1019 m
+ 1129 1027 l 1139 1035 l 1148 1043 l 1157 1050 l 1166 1058 l 1175 1066 l 1184
+ 1074 l 1193 1082 l 1202 1090 l 1211 1098 l 1220 1106 l 1229 1114 l 1238 1122 l
+ 1247 1130 l 1256 1138 l 1266 1145 l 1275 1153 l 1284 1161 l 1293 1169 l 1302
+ 1177 l 1311 1185 l 1320 1193 l 1329 1201 l 1338 1209 l 1347 1217 l 1356 1225 l
+ 1365 1233 l 1374 1241 l 1383 1248 l 1393 1256 l 1402 1264 l 1411 1272 l 1420
+ 1280 l 1429 1288 l 1438 1296 l 1447 1304 l 1456 1312 l 1465 1320 l 1474 1328 l
+ 1483 1336 l 1492 1343 l 1501 1351 l 1510 1359 l 1520 1367 l 1529 1375 l 1538
+ 1383 l 1547 1391 l 1556 1399 l 1565 1407 l s 1565 1407 m 1574 1415 l 1583 1423
+ l 1592 1431 l 1601 1438 l 1610 1446 l 1619 1454 l 1628 1462 l 1637 1470 l 1647
+ 1478 l 1656 1486 l 1665 1494 l 1674 1502 l 1683 1510 l 1692 1518 l 1701 1526 l
+ 1710 1534 l 1719 1541 l 1728 1549 l 1737 1557 l 1746 1565 l 1755 1573 l 1765
+ 1581 l 1774 1589 l 1783 1597 l 1792 1605 l 1801 1613 l 1810 1621 l 1819 1629 l
+ 1828 1636 l 1837 1644 l 1846 1652 l 1855 1660 l 1864 1668 l 1873 1676 l 1882
+ 1684 l 1892 1692 l 1901 1700 l 1910 1708 l 1919 1716 l 1928 1724 l 1937 1732 l
+ 1946 1739 l 1955 1747 l 1964 1755 l 1973 1763 l 1982 1771 l 1991 1779 l 2000
+ 1787 l 2009 1795 l s 2009 1795 m 2019 1803 l 2028 1811 l 2037 1819 l s
+ [12 12] 0 sd 231 1636 m 240 1644 l 249 1652 l 259 1660 l 268 1668 l 277 1676 l
+ 286 1684 l 295 1692 l 304 1700 l 313 1708 l 322 1716 l 331 1724 l 340 1732 l
+ 349 1739 l 358 1747 l 367 1755 l 376 1763 l 386 1771 l 395 1779 l 404 1787 l
+ 413 1795 l 422 1803 l 431 1811 l 440 1819 l 449 1827 l 458 1834 l 467 1842 l
+ 476 1850 l 485 1858 l 494 1866 l 503 1874 l 513 1882 l 522 1890 l 531 1898 l
+ 540 1906 l 549 1914 l 558 1922 l 567 1930 l 576 1937 l 585 1945 l 594 1953 l
+ 603 1961 l 612 1969 l 621 1977 l 631 1985 l 640 1993 l 649 2001 l 658 2009 l
+ 667 2017 l 676 2025 l s 676 2025 m 685 2032 l 694 2040 l 695 2041 l s 231 1533
+ m 240 1541 l 249 1549 l 259 1557 l 268 1565 l 277 1573 l 286 1581 l 295 1589 l
+ 304 1596 l 313 1604 l 322 1612 l 331 1620 l 340 1628 l 349 1636 l 358 1644 l
+ 367 1652 l 376 1660 l 386 1668 l 395 1676 l 404 1684 l 413 1692 l 422 1699 l
+ 431 1707 l 440 1715 l 449 1723 l 458 1731 l 467 1739 l 476 1747 l 485 1755 l
+ 494 1763 l 503 1771 l 513 1779 l 522 1787 l 531 1794 l 540 1802 l 549 1810 l
+ 558 1818 l 567 1826 l 576 1834 l 585 1842 l 594 1850 l 603 1858 l 612 1866 l
+ 621 1874 l 631 1882 l 640 1890 l 649 1897 l 658 1905 l 667 1913 l 676 1921 l s
+ 676 1921 m 685 1929 l 694 1937 l 703 1945 l 712 1953 l 721 1961 l 730 1969 l
+ 739 1977 l 748 1985 l 758 1992 l 767 2000 l 776 2008 l 785 2016 l 794 2024 l
+ 803 2032 l 812 2040 l 813 2041 l s [4 8] 0 sd 231 1662 m 240 1670 l 249 1678 l
+ 259 1686 l 268 1693 l 277 1701 l 286 1709 l 295 1717 l 304 1725 l 313 1733 l
+ 322 1741 l 331 1749 l 340 1757 l 349 1765 l 358 1773 l 367 1781 l 376 1789 l
+ 386 1796 l 395 1804 l 404 1812 l 413 1820 l 422 1828 l 431 1836 l 440 1844 l
+ 449 1852 l 458 1860 l 467 1868 l 476 1876 l 485 1884 l 494 1891 l 503 1899 l
+ 513 1907 l 522 1915 l 531 1923 l 540 1931 l 549 1939 l 558 1947 l 567 1955 l
+ 576 1963 l 585 1971 l 594 1979 l 603 1987 l 612 1994 l 621 2002 l 631 2010 l
+ 640 2018 l 649 2026 l 658 2034 l 666 2041 l s 231 1558 m 240 1566 l 249 1574 l
+ 259 1582 l 268 1590 l 277 1598 l 286 1606 l 295 1614 l 304 1622 l 313 1630 l
+ 322 1638 l 331 1646 l 340 1653 l 349 1661 l 358 1669 l 367 1677 l 376 1685 l
+ 386 1693 l 395 1701 l 404 1709 l 413 1717 l 422 1725 l 431 1733 l 440 1741 l
+ 449 1749 l 458 1756 l 467 1764 l 476 1772 l 485 1780 l 494 1788 l 503 1796 l
+ 513 1804 l 522 1812 l 531 1820 l 540 1828 l 549 1836 l 558 1844 l 567 1851 l
+ 576 1859 l 585 1867 l 594 1875 l 603 1883 l 612 1891 l 621 1899 l 631 1907 l
+ 640 1915 l 649 1923 l 658 1931 l 667 1939 l 676 1947 l s 676 1947 m 685 1954 l
+ 694 1962 l 703 1970 l 712 1978 l 721 1986 l 730 1994 l 739 2002 l 748 2010 l
+ 758 2018 l 767 2026 l 776 2034 l 784 2041 l s [12 15 4 15] 0 sd 263 1800 m 2041
+ 1800 l s
+ gsave 1134 1738
+ t 0 r 0 0 m
+ /Symbol findfont 78 sf 0 0 m
+(x)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(/I)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 55 sf 0 -26 m
+(0)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 78 sf 0 0 m
+( \074 50)
+ show
+ gr
+ [] 0 sd 1134 612 m 1530 612 l s [12 12] 0 sd 1134 533 m 1530 533 l s [4 8] 0 sd
+ 1134 454 m 1530 454 l s
+ gsave 1589 584
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(Argon)
+ show
+ gr
+ gsave 1589 505
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(Silicon)
+ show
+ gr
+ gsave 1589 426
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(Uranium)
+ show
+ gr
+ [] 0 sd 871 -316 1055 691 bl
+ gsave 1213 1011
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(1 GeV)
+ show
+ gr
+ gsave 778 1099
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(100 keV)
+ show
+ gr
+ gsave 679 1852
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(1 GeV)
+ show
+ gr
+ gsave 223 1907
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 78 sf 0 0 m
+(100 keV)
+ show
+ gr
+ /xs 0 def
+(Step,\040)
+ /Helvetica-Bold 43 stwn
+(\133)
+ /Special 43 stwn
+(cm)
+ /Helvetica-Bold 43 stwn
+(\135)
+ /Special 43 stwn
+ gsave 2041 104
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(Step,\040)
+ show
+ currentpoint pop 0 t
+ /Special findfont 43 sf 0 0 m
+(\133)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(cm)
+ show
+ currentpoint pop 0 t
+ /Special findfont 43 sf 0 0 m
+(\135)
+ show
+ gr
+ gsave 57 2009
+ t 0 r 0 0 m
+ /Symbol findfont 43 sf 0 0 m
+(x)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(/I)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 30 sf 0 -14 m
+(0)
+ show
+ gr
+gr gr showpage
+end
+%%EOF
diff --git a/info/examples/lwc/apa/phys332-2.eps b/info/examples/lwc/apa/phys332-2.eps
new file mode 100644
index 0000000000..e255ddadf5
--- /dev/null
+++ b/info/examples/lwc/apa/phys332-2.eps
@@ -0,0 +1,556 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%BoundingBox: 0 0 567 567
+%%Title: curves.eps
+%%Creator: HIGZ Version 1.19/01
+%%CreationDate: 93/07/16 12.02
+%%EndComments
+80 dict begin
+/s {stroke} def /l {lineto} def /m {moveto} def /t { translate} def
+/sw {stringwidth} def /r {rotate} def /rl {roll} def
+/d {rlineto} def /rm {rmoveto} def /gr {grestore} def /f {eofill} def
+/c {setrgbcolor} def /lw {setlinewidth} def /sd {setdash} def
+/cl {closepath} def /sf {scalefont setfont} def
+/box {m dup 0 exch d exch 0 d 0 exch neg d cl} def
+/bl {box s} def /bf {box f} def
+/mp {newpath /y exch def /x exch def} def
+/side {[w .77 mul w .23 mul] .385 w mul sd w 0 l currentpoint t -144 r} def
+/mr {mp x y w2 0 360 arc} def /m24 {mr s} def /m20 {mr f} def
+/mb {mp x y w2 add m w2 neg 0 d 0 w neg d w 0 d 0 w d cl} def
+/mt {mp x y w2 add m w2 neg w neg d w 0 d cl} def
+/m21 {mb f} def /m25 {mb s} def /m22 {mt f} def /m26 {mt s} def
+/m23 {mp x y w2 sub m w2 w d w neg 0 d cl f} def
+ /m27 {mp x y w2 add m w3 neg w2 neg d w3 w2 neg d w3 w2 d cl s} def
+ /m28 {mp x w2 sub y w2 sub w3 add m w3 0 d 0 w3 neg d w3 0 d 0 w3 d w3 0 d
+ 0 w3 d w3 neg 0 d 0 w3 d w3 neg 0 d 0 w3 neg d w3 neg 0 d cl s } def
+ /m29 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t
+ 4 {side} repeat cl fill gr} def
+ /m30 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t
+ 5 {side} repeat s gr} def /m31 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d
+ x w2 sub y w2 add m w w neg d x w2 sub y w2
+ sub m w w d s} def
+/m2 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d s} def
+/m5 {mp x w2 sub y w2 sub m w w d x w2 sub y w2 add m w w neg d s} def
+/reencdict 24 dict def /ReEncode {reencdict begin /nco&na exch def
+/nfnam exch def /basefontname exch def /basefontdict basefontname findfont def
+/newfont basefontdict maxlength dict def basefontdict {exch dup /FID ne
+{dup /Encoding eq {exch dup length array copy newfont 3 1 roll put} {exch
+newfont 3 1 roll put} ifelse} {pop pop} ifelse } forall newfont
+/FontName nfnam put nco&na aload pop nco&na length 2 idiv {newfont
+/Encoding get 3 1 roll put} repeat nfnam newfont definefont pop end } def
+/accvec [ 176 /agrave 181 /Agrave 190 /acircumflex 192 /Acircumflex
+201 /adieresis 204 /Adieresis 209 /ccedilla 210 /Ccedilla 211 /eacute
+212 /Eacute 213 /egrave 214 /Egrave 215 /ecircumflex 216 /Ecircumflex
+217 /edieresis 218 /Edieresis 219 /icircumflex 220 /Icircumflex
+221 /idieresis 222 /Idieresis 223 /ntilde 224 /Ntilde 226 /ocircumflex
+228 /Ocircumflex 229 /odieresis 230 /Odieresis 231 /ucircumflex 236 /Ucircumflex
+237 /udieresis 238 /Udieresis 239 /aring 242 /Aring 243 /ydieresis
+244 /Ydieresis 246 /aacute 247 /Aacute 252 /ugrave 253 /Ugrave] def
+/Times-Roman /Times-Roman accvec ReEncode
+/Times-Italic /Times-Italic accvec ReEncode
+/Times-Bold /Times-Bold accvec ReEncode
+/Times-BoldItalic /Times-BoldItalic accvec ReEncode
+/Helvetica /Helvetica accvec ReEncode
+/Helvetica-Oblique /Helvetica-Oblique accvec ReEncode
+/Helvetica-Bold /Helvetica-Bold accvec ReEncode
+/Helvetica-BoldOblique /Helvetica-BoldOblique accvec ReEncode
+/Courier /Courier accvec ReEncode
+/Courier-Oblique /Courier-Oblique accvec ReEncode
+/Courier-Bold /Courier-Bold accvec ReEncode
+/Courier-BoldOblique /Courier-BoldOblique accvec ReEncode
+/oshow {gsave [] 0 sd true charpath stroke gr} def
+/stwn { /fs exch def /fn exch def /text exch def fn findfont fs sf
+ text sw pop xs add /xs exch def} def
+/stwb { /fs exch def /fn exch def /nbas exch def /textf exch def
+textf length /tlen exch def nbas tlen gt {/nbas tlen def} if
+fn findfont fs sf textf dup length nbas sub nbas getinterval sw
+pop neg xs add /xs exch def} def
+/accspe [ 65 /plusminus 66 /bar 67 /existential 68 /universal
+69 /exclam 70 /numbersign 71 /greater 72 /question 73 /integral
+74 /colon 75 /semicolon 76 /less 77 /bracketleft 78 /bracketright
+79 /greaterequal 80 /braceleft 81 /braceright 82 /radical
+83 /spade 84 /heart 85 /diamond 86 /club 87 /lessequal
+88 /multiply 89 /percent 90 /infinity 48 /circlemultiply 49 /circleplus
+50 /emptyset 51 /lozenge 52 /bullet 53 /arrowright 54 /arrowup
+55 /arrowleft 56 /arrowdown 57 /arrowboth 48 /degree 44 /comma 43 /plus
+ 45 /angle 42 /angleleft 47 /divide 61 /notequal 40 /equivalence 41 /second
+ 97 /approxequal 98 /congruent 99 /perpendicular 100 /partialdiff 101 /florin
+ 102 /intersection 103 /union 104 /propersuperset 105 /reflexsuperset
+ 106 /notsubset 107 /propersubset 108 /reflexsubset 109 /element 110 /notelement
+ 111 /gradient 112 /logicaland 113 /logicalor 114 /arrowdblboth
+ 115 /arrowdblleft 116 /arrowdblup 117 /arrowdblright 118 /arrowdbldown
+ 119 /ampersand 120 /omega1 121 /similar 122 /aleph ] def
+/Symbol /Special accspe ReEncode
+gsave .25 .25 scale
+%%EndProlog
+ gsave 0 0 t 0 setgray [] 0 sd 1 lw 4 lw 2268 2268 0 0 bl
+ gsave 771 1813
+ t 0 r 0 0 m
+ /Helvetica-Bold findfont 47 sf 0 0 m
+(Landau)
+ show
+ gr
+ /xs 0 def
+(40)
+ /Helvetica-Bold 54 stwn
+ gsave 862 1533
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 54 sf 0 0 m
+(40)
+ show
+ gr
+ /xs 0 def
+(20)
+ /Helvetica-Bold 54 stwn
+ gsave 789 1347
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 54 sf 0 0 m
+(20)
+ show
+ gr
+ /xs 0 def
+(10)
+ /Helvetica-Bold 54 stwn
+ gsave 771 1011
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 54 sf 0 0 m
+(10)
+ show
+ gr
+ /xs 0 def
+(5)
+ /Helvetica-Bold 54 stwn
+ gsave 699 824
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 54 sf 0 0 m
+(5)
+ show
+ gr
+ /xs 0 def
+(1)
+ /Helvetica-Bold 54 stwn
+ gsave 517 740
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 54 sf 0 0 m
+(1)
+ show
+ gr
+ /xs 0 def
+(0.5)
+ /Helvetica-Bold 54 stwn
+ gsave 336 525
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 54 sf 0 0 m
+(0.5)
+ show
+ gr
+ /xs 0 def
+(dE/dx\040)
+ /Helvetica-Bold 43 stwn
+(M)
+ /Special 43 stwn
+(GeV/cm)
+ /Helvetica-Bold 43 stwn
+(N)
+ /Special 43 stwn
+( `)
+ /Helvetica-Bold 43 stwn
+ gsave 2041 104
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(dE/dx\040)
+ show
+ currentpoint pop 0 t
+ /Special findfont 43 sf 0 0 m
+(M)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(GeV/cm)
+ show
+ currentpoint pop 0 t
+ /Special findfont 43 sf 0 0 m
+(N)
+ show
+ currentpoint pop 0 t
+ /Helvetica-Bold findfont 43 sf 0 0 m
+( `)
+ show
+ gr
+ /xs 0 def
+(Counts)
+ /Helvetica-Bold 43 stwn
+ gsave 68 2041
+ t 90 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(Counts)
+ show
+ gr
+ 1814 1814 227 227 bl 227 227 m 227 227 l 249 227 l 272 227 l 295 227 l 318 227
+ l 340 227 l 363 227 l 386 227 l 408 227 l 431 227 l 454 227 l 476 227 l 499 227
+ l 522 227 l 544 227 l 567 227 l 590 227 l 612 227 l 635 227 l 658 227 l 658 231
+ l 680 231 l 680 397 l 703 397 l 703 1300 l 726 1300 l 726 1860 l 748 1860 l 748
+ 1697 l 771 1697 l 771 1393 l 794 1393 l 794 992 l 816 992 l 816 831 l 839 831 l
+ 839 636 l 862 636 l 862 516 l 885 516 l 885 481 l 907 481 l 907 443 l 930 443 l
+ 930 380 l 953 380 l 953 343 l 975 343 l 975 324 l 998 324 l 998 283 l 1021 283
+ l 1021 301 l 1043 301 l 1043 288 l 1066 288 l 1066 294 l 1089 294 l 1089 272 l
+ 1111 272 l 1111 262 l 1134 262 l 1134 272 l 1157 272 l 1157 251 l 1179 251 l
+ 1179 253 l 1202 253 l 1202 255 l 1225 255 l 1225 257 l 1247 257 l 1247 245 l
+ 1270 245 l 1270 244 l 1293 244 l 1293 247 l 1315 247 l 1315 249 l 1338 249 l
+ 1338 240 l 1361 240 l 1361 231 l 1383 231 l 1383 244 l 1406 244 l 1406 234 l
+ 1429 234 l 1429 231 l 1452 231 l 1452 238 l 1474 238 l 1497 238 l 1497 234 l
+ 1520 234 l 1520 236 l 1542 236 l 1542 231 l 1565 231 l 1565 234 l 1588 234 l
+ 1588 232 l 1610 232 l 1610 231 l 1633 231 l 1633 229 l 1656 229 l 1656 234 l
+ 1678 234 l 1701 234 l 1701 232 l 1724 232 l 1724 229 l 1746 229 l 1769 229 l
+ 1769 234 l 1792 234 l 1792 227 l 1814 227 l 1814 232 l 1837 232 l 1837 234 l
+ 1860 234 l 1860 229 l 1882 229 l 1882 231 l 1905 231 l 1905 227 l 1928 227 l
+ 1928 229 l 1950 229 l 1950 227 l 1973 227 l 1973 229 l 1996 229 l 1996 231 l
+ 2019 231 l 2041 231 l 2041 227 l s 1 lw 227 227 m 227 2041 l s 4 lw 261 227 m
+ 227 227 l s 244 264 m 227 264 l s 244 301 m 227 301 l s 244 339 m 227 339 l s
+ 244 376 m 227 376 l s 261 413 m 227 413 l s 244 451 m 227 451 l s 244 488 m 227
+ 488 l s 244 525 m 227 525 l s 244 563 m 227 563 l s 261 600 m 227 600 l s 244
+ 637 m 227 637 l s 244 675 m 227 675 l s 244 712 m 227 712 l s 244 749 m 227 749
+ l s 261 787 m 227 787 l s 244 824 m 227 824 l s 244 861 m 227 861 l s 244 899 m
+ 227 899 l s 244 936 m 227 936 l s 261 973 m 227 973 l s 244 1011 m 227 1011 l s
+ 244 1048 m 227 1048 l s 244 1085 m 227 1085 l s 244 1123 m 227 1123 l s 261
+ 1160 m 227 1160 l s 244 1197 m 227 1197 l s 244 1235 m 227 1235 l s 244 1272 m
+ 227 1272 l s 244 1309 m 227 1309 l s 261 1347 m 227 1347 l s 244 1384 m 227
+ 1384 l s 244 1421 m 227 1421 l s 244 1459 m 227 1459 l s 244 1496 m 227 1496 l
+ s 261 1533 m 227 1533 l s 244 1570 m 227 1570 l s 244 1608 m 227 1608 l s 244
+ 1645 m 227 1645 l s 244 1682 m 227 1682 l s 261 1720 m 227 1720 l s 244 1757 m
+ 227 1757 l s 244 1794 m 227 1794 l s 244 1832 m 227 1832 l s 244 1869 m 227
+ 1869 l s 261 1906 m 227 1906 l s 261 1906 m 227 1906 l s 244 1944 m 227 1944 l
+ s 244 1981 m 227 1981 l s 244 2018 m 227 2018 l s
+ /xs 0 def
+(0)
+ /Helvetica-Bold 43 stwn
+ gsave 181 211
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0)
+ show
+ gr
+ /xs 0 def
+(100)
+ /Helvetica-Bold 43 stwn
+ gsave 181 398
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(100)
+ show
+ gr
+ /xs 0 def
+(200)
+ /Helvetica-Bold 43 stwn
+ gsave 181 584
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(200)
+ show
+ gr
+ /xs 0 def
+(300)
+ /Helvetica-Bold 43 stwn
+ gsave 181 771
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(300)
+ show
+ gr
+ /xs 0 def
+(400)
+ /Helvetica-Bold 43 stwn
+ gsave 181 957
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(400)
+ show
+ gr
+ /xs 0 def
+(500)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1144
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(500)
+ show
+ gr
+ /xs 0 def
+(600)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1331
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(600)
+ show
+ gr
+ /xs 0 def
+(700)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1517
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(700)
+ show
+ gr
+ /xs 0 def
+(800)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1704
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(800)
+ show
+ gr
+ /xs 0 def
+(900)
+ /Helvetica-Bold 43 stwn
+ gsave 181 1891
+ t 0 r xs neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(900)
+ show
+ gr
+ 1 lw 227 227 m 2041 227 l s 4 lw 227 261 m 227 227 l s 263 244 m 263 227 l s
+ 299 244 m 299 227 l s 336 244 m 336 227 l s 372 244 m 372 227 l s 408 261 m 408
+ 227 l s 445 244 m 445 227 l s 481 244 m 481 227 l s 517 244 m 517 227 l s 553
+ 244 m 553 227 l s 590 261 m 590 227 l s 626 244 m 626 227 l s 662 244 m 662 227
+ l s 699 244 m 699 227 l s 735 244 m 735 227 l s 771 261 m 771 227 l s 807 244 m
+ 807 227 l s 844 244 m 844 227 l s 880 244 m 880 227 l s 916 244 m 916 227 l s
+ 953 261 m 953 227 l s 989 244 m 989 227 l s 1025 244 m 1025 227 l s 1061 244 m
+ 1061 227 l s 1098 244 m 1098 227 l s 1134 261 m 1134 227 l s 1170 244 m 1170
+ 227 l s 1207 244 m 1207 227 l s 1243 244 m 1243 227 l s 1279 244 m 1279 227 l s
+ 1315 261 m 1315 227 l s 1352 244 m 1352 227 l s 1388 244 m 1388 227 l s 1424
+ 244 m 1424 227 l s 1461 244 m 1461 227 l s 1497 261 m 1497 227 l s 1533 244 m
+ 1533 227 l s 1569 244 m 1569 227 l s 1606 244 m 1606 227 l s 1642 244 m 1642
+ 227 l s 1678 261 m 1678 227 l s 1715 244 m 1715 227 l s 1751 244 m 1751 227 l s
+ 1787 244 m 1787 227 l s 1823 244 m 1823 227 l s 1860 261 m 1860 227 l s 1896
+ 244 m 1896 227 l s 1932 244 m 1932 227 l s 1969 244 m 1969 227 l s 2005 244 m
+ 2005 227 l s 2041 261 m 2041 227 l s
+ /xs 0 def
+(0)
+ /Helvetica-Bold 43 stwn
+ gsave 227 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0)
+ show
+ gr
+ /xs 0 def
+(0.01)
+ /Helvetica-Bold 43 stwn
+ gsave 408 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.01)
+ show
+ gr
+ /xs 0 def
+(0.02)
+ /Helvetica-Bold 43 stwn
+ gsave 590 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.02)
+ show
+ gr
+ /xs 0 def
+(0.03)
+ /Helvetica-Bold 43 stwn
+ gsave 771 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.03)
+ show
+ gr
+ /xs 0 def
+(0.04)
+ /Helvetica-Bold 43 stwn
+ gsave 953 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.04)
+ show
+ gr
+ /xs 0 def
+(0.05)
+ /Helvetica-Bold 43 stwn
+ gsave 1134 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.05)
+ show
+ gr
+ /xs 0 def
+(0.06)
+ /Helvetica-Bold 43 stwn
+ gsave 1315 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.06)
+ show
+ gr
+ /xs 0 def
+(0.07)
+ /Helvetica-Bold 43 stwn
+ gsave 1497 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.07)
+ show
+ gr
+ /xs 0 def
+(0.08)
+ /Helvetica-Bold 43 stwn
+ gsave 1678 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.08)
+ show
+ gr
+ /xs 0 def
+(0.09)
+ /Helvetica-Bold 43 stwn
+ gsave 1860 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.09)
+ show
+ gr
+ /xs 0 def
+(0.1)
+ /Helvetica-Bold 43 stwn
+ gsave 2041 172
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(0.1)
+ show
+ gr
+ /xs 0 def
+(x 10)
+ /Helvetica-Bold 43 stwn
+ gsave 2041 109
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 43 sf 0 0 m
+(x 10)
+ show
+ gr
+ /xs 0 def
+(-4)
+ /Helvetica-Bold 35 stwn
+ gsave 2105 141
+ t 0 r xs 2 div neg 0 t 0 0 m
+ /Helvetica-Bold findfont 35 sf 0 0 m
+(-4)
+ show
+ gr
+ [12 12] 0 sd 227 227 m 227 227 l 249 227 l 272 227 l 295 227 l 318 227 l 340
+ 227 l 363 227 l 386 227 l 408 227 l 431 227 l 454 227 l 476 227 l 499 227 l 522
+ 227 l 544 227 l 544 229 l 567 229 l 567 232 l 590 232 l 590 270 l 612 270 l 612
+ 352 l 635 352 l 635 546 l 658 546 l 658 901 l 680 901 l 680 1199 l 703 1199 l
+ 703 1490 l 726 1490 l 726 1628 l 748 1628 l 748 1533 l 771 1533 l 771 1404 l
+ 794 1404 l 794 1048 l 816 1048 l 816 738 l 839 738 l 839 572 l 862 572 l 862
+ 417 l 885 417 l 885 331 l 907 331 l 907 272 l 930 272 l 930 244 l 953 244 l 953
+ 231 l 975 231 l 998 231 l 998 227 l 1021 227 l 1043 227 l 1066 227 l 1089 227 l
+ 1111 227 l 1134 227 l 1157 227 l 1179 227 l 1202 227 l 1225 227 l 1247 227 l
+ 1270 227 l 1293 227 l 1315 227 l 1338 227 l 1361 227 l 1361 227 l 1383 227 l
+ 1406 227 l 1429 227 l 1452 227 l 1474 227 l 1497 227 l 1520 227 l 1542 227 l
+ 1565 227 l 1588 227 l 1610 227 l 1633 227 l 1656 227 l 1678 227 l 1701 227 l
+ 1724 227 l 1746 227 l 1769 227 l 1792 227 l 1814 227 l 1837 227 l 1860 227 l
+ 1882 227 l 1905 227 l 1928 227 l 1928 227 l 1950 227 l 1973 227 l 1996 227 l
+ 2019 227 l 2041 227 l s [4 8] 0 sd 227 227 m 227 227 l 249 227 l 272 227 l 295
+ 227 l 318 227 l 340 227 l 363 227 l 386 227 l 408 227 l 431 227 l 454 227 l 476
+ 227 l 499 227 l 499 231 l 522 231 l 522 244 l 544 244 l 544 257 l 567 257 l 567
+ 315 l 590 315 l 590 447 l 612 447 l 612 613 l 635 613 l 635 833 l 658 833 l 658
+ 1029 l 680 1029 l 680 1190 l 703 1190 l 703 1212 l 726 1212 l 726 1285 l 748
+ 1285 l 748 1141 l 771 1141 l 771 1085 l 794 1085 l 794 884 l 816 884 l 816 775
+ l 839 775 l 839 619 l 862 619 l 862 492 l 885 492 l 885 413 l 907 413 l 907 369
+ l 930 369 l 930 294 l 953 294 l 953 290 l 975 290 l 975 260 l 998 260 l 998 244
+ l 1021 244 l 1021 238 l 1043 238 l 1043 234 l 1066 234 l 1066 229 l 1089 229 l
+ 1089 231 l 1111 231 l 1111 227 l 1134 227 l 1134 229 l 1157 229 l 1157 227 l
+ 1179 227 l 1202 227 l 1225 227 l 1247 227 l 1270 227 l 1293 227 l 1315 227 l
+ 1338 227 l 1361 227 l 1361 227 l 1383 227 l 1406 227 l 1429 227 l 1452 227 l
+ 1474 227 l 1497 227 l 1520 227 l 1542 227 l 1565 227 l 1588 227 l 1610 227 l
+ 1633 227 l 1656 227 l 1678 227 l 1701 227 l 1724 227 l 1746 227 l 1769 227 l
+ 1792 227 l 1814 227 l 1837 227 l 1860 227 l 1882 227 l 1905 227 l 1928 227 l
+ 1928 227 l 1950 227 l 1973 227 l 1996 227 l 2019 227 l 2041 227 l s
+ [12 15 4 15] 0 sd 227 227 m 227 227 l 249 227 l 272 227 l 295 227 l 318 227 l
+ 340 227 l 363 227 l 386 227 l 408 227 l 431 227 l 431 229 l 454 229 l 454 234 l
+ 476 234 l 476 242 l 499 242 l 499 277 l 522 277 l 522 335 l 544 335 l 544 412 l
+ 567 412 l 567 580 l 590 580 l 590 749 l 612 749 l 612 889 l 635 889 l 635 953 l
+ 658 953 l 658 984 l 680 984 l 680 1009 l 703 1009 l 703 942 l 726 942 l 726 962
+ l 748 962 l 748 869 l 771 869 l 771 820 l 794 820 l 794 725 l 816 725 l 816 677
+ l 839 677 l 839 580 l 862 580 l 862 492 l 885 492 l 885 458 l 907 458 l 907 404
+ l 930 404 l 930 341 l 953 341 l 953 328 l 975 328 l 975 315 l 998 315 l 998 277
+ l 1021 277 l 1021 270 l 1043 270 l 1043 255 l 1066 255 l 1066 262 l 1089 262 l
+ 1089 236 l 1111 236 l 1134 236 l 1134 238 l 1157 238 l 1157 231 l 1179 231 l
+ 1179 229 l 1202 229 l 1202 227 l 1225 227 l 1225 231 l 1247 231 l 1247 227 l
+ 1270 227 l 1293 227 l 1315 227 l 1338 227 l 1338 229 l 1361 229 l 1361 227 l
+ 1383 227 l 1406 227 l 1429 227 l 1452 227 l 1474 227 l 1497 227 l 1520 227 l
+ 1542 227 l 1565 227 l 1588 227 l 1610 227 l 1633 227 l 1656 227 l 1678 227 l
+ 1701 227 l 1724 227 l 1746 227 l 1769 227 l 1792 227 l 1814 227 l 1837 227 l
+ 1860 227 l 1882 227 l 1905 227 l 1928 227 l 1928 227 l 1950 227 l 1973 227 l
+ 1996 227 l 2019 227 l 2041 227 l s [] 0 sd 227 227 m 227 227 l 249 227 l 272
+ 227 l 295 227 l 318 227 l 340 227 l 363 227 l 386 227 l 408 227 l 408 232 l 431
+ 232 l 431 247 l 454 247 l 454 277 l 476 277 l 476 324 l 499 324 l 499 419 l 522
+ 419 l 522 544 l 544 544 l 544 600 l 567 600 l 567 738 l 590 738 l 590 742 l 612
+ 742 l 612 830 l 635 830 l 635 798 l 658 798 l 658 789 l 680 789 l 680 764 l 703
+ 764 l 703 772 l 726 772 l 726 766 l 748 766 l 748 691 l 771 691 l 771 596 l 794
+ 596 l 794 619 l 816 619 l 816 565 l 839 565 l 839 553 l 862 553 l 862 479 l 885
+ 479 l 885 430 l 907 430 l 907 423 l 930 423 l 930 456 l 953 456 l 953 393 l 975
+ 393 l 975 361 l 998 361 l 998 359 l 1021 359 l 1021 346 l 1043 346 l 1043 329 l
+ 1066 329 l 1066 307 l 1089 307 l 1089 285 l 1111 285 l 1111 294 l 1134 294 l
+ 1134 281 l 1157 281 l 1157 270 l 1179 270 l 1179 260 l 1202 260 l 1202 247 l
+ 1225 247 l 1247 247 l 1247 245 l 1270 245 l 1270 234 l 1293 234 l 1315 234 l
+ 1338 234 l 1361 234 l 1361 244 l 1383 244 l 1383 229 l 1406 229 l 1406 232 l
+ 1429 232 l 1429 229 l 1452 229 l 1452 231 l 1474 231 l 1474 227 l 1497 227 l
+ 1497 229 l 1520 229 l 1520 227 l 1542 227 l 1542 231 l 1565 231 l 1565 229 l
+ 1588 229 l 1610 229 l 1610 227 l 1633 227 l 1656 227 l 1678 227 l 1701 227 l
+ 1724 227 l 1746 227 l 1769 227 l 1792 227 l 1814 227 l 1837 227 l 1860 227 l
+ 1882 227 l 1905 227 l 1928 227 l 1928 227 l 1950 227 l 1973 227 l 1996 227 l
+ 2019 227 l 2041 227 l s [] 0 sd 227 227 m 227 231 l 249 231 l 249 234 l 272 234
+ l 272 249 l 295 249 l 295 266 l 318 266 l 318 270 l 340 270 l 340 300 l 363 300
+ l 363 384 l 386 384 l 386 460 l 408 460 l 408 499 l 431 499 l 431 570 l 454 570
+ l 454 667 l 476 667 l 476 691 l 499 691 l 499 706 l 522 706 l 522 699 l 544 699
+ l 544 706 l 567 706 l 567 660 l 590 660 l 590 671 l 612 671 l 612 585 l 635 585
+ l 635 563 l 658 563 l 658 559 l 680 559 l 680 555 l 703 555 l 703 490 l 726 490
+ l 726 434 l 748 434 l 748 454 l 771 454 l 771 423 l 794 423 l 794 395 l 816 395
+ l 816 393 l 839 393 l 839 389 l 862 389 l 862 331 l 885 331 l 885 348 l 907 348
+ l 907 328 l 930 328 l 930 331 l 953 331 l 953 315 l 975 315 l 975 326 l 998 326
+ l 998 303 l 1021 303 l 1021 309 l 1043 309 l 1043 287 l 1066 287 l 1066 303 l
+ 1089 303 l 1089 313 l 1111 313 l 1111 292 l 1134 292 l 1134 279 l 1157 279 l
+ 1157 272 l 1179 272 l 1179 292 l 1202 292 l 1202 305 l 1225 305 l 1225 257 l
+ 1247 257 l 1247 268 l 1270 268 l 1270 273 l 1293 273 l 1293 268 l 1315 268 l
+ 1315 270 l 1338 270 l 1338 255 l 1361 255 l 1361 259 l 1383 259 l 1383 255 l
+ 1406 255 l 1406 266 l 1429 266 l 1429 249 l 1452 249 l 1452 251 l 1474 251 l
+ 1474 268 l 1497 268 l 1497 244 l 1520 244 l 1520 238 l 1542 238 l 1542 244 l
+ 1565 244 l 1588 244 l 1588 247 l 1610 247 l 1633 247 l 1633 242 l 1656 242 l
+ 1656 238 l 1678 238 l 1678 240 l 1701 240 l 1701 245 l 1724 245 l 1724 244 l
+ 1746 244 l 1746 234 l 1769 234 l 1792 234 l 1814 234 l 1837 234 l 1837 238 l
+ 1860 238 l 1860 236 l 1882 236 l 1882 238 l 1905 238 l 1905 232 l 1928 232 l
+ 1928 232 l 1950 232 l 1950 236 l 1973 236 l 1973 234 l 1996 234 l 2019 234 l
+ 2019 236 l 2041 236 l 2041 227 l s [12 12] 0 sd 227 227 m 227 326 l 249 326 l
+ 249 268 l 272 268 l 272 354 l 295 354 l 295 404 l 318 404 l 318 406 l 340 406 l
+ 340 473 l 363 473 l 363 516 l 386 516 l 386 542 l 408 542 l 408 652 l 431 652 l
+ 431 654 l 454 654 l 454 593 l 476 593 l 476 667 l 499 667 l 499 568 l 522 568 l
+ 522 637 l 544 637 l 544 682 l 567 682 l 567 587 l 590 587 l 590 598 l 612 598 l
+ 612 496 l 635 496 l 635 522 l 658 522 l 658 527 l 680 527 l 680 466 l 703 466 l
+ 703 464 l 726 464 l 726 440 l 748 440 l 748 436 l 771 436 l 771 371 l 794 371 l
+ 794 400 l 816 400 l 816 384 l 839 384 l 839 341 l 862 341 l 862 335 l 885 335 l
+ 885 301 l 907 301 l 907 324 l 930 324 l 930 313 l 953 313 l 953 316 l 975 316 l
+ 975 296 l 998 296 l 998 285 l 1021 285 l 1021 288 l 1043 288 l 1043 279 l 1066
+ 279 l 1066 268 l 1089 268 l 1089 260 l 1111 260 l 1111 283 l 1134 283 l 1134
+ 255 l 1157 255 l 1157 266 l 1179 266 l 1179 255 l 1202 255 l 1202 259 l 1225
+ 259 l 1225 245 l 1247 245 l 1247 251 l 1270 251 l 1270 245 l 1293 245 l 1293
+ 257 l 1315 257 l 1315 251 l 1338 251 l 1338 245 l 1361 245 l 1361 242 l 1383
+ 242 l 1383 255 l 1406 255 l 1406 236 l 1429 236 l 1429 242 l 1452 242 l 1452
+ 249 l 1474 249 l 1474 257 l 1497 257 l 1497 238 l 1520 238 l 1542 238 l 1542
+ 240 l 1565 240 l 1588 240 l 1588 242 l 1610 242 l 1610 244 l 1633 244 l 1633
+ 253 l 1656 253 l 1656 247 l 1678 247 l 1678 245 l 1701 245 l 1701 253 l 1724
+ 253 l 1724 240 l 1746 240 l 1746 238 l 1769 238 l 1769 242 l 1792 242 l 1792
+ 240 l 1814 240 l 1814 249 l 1837 249 l 1837 236 l 1860 236 l 1860 240 l 1882
+ 240 l 1905 240 l 1905 242 l 1928 242 l 1928 240 l 1950 240 l 1950 231 l 1973
+ 231 l 1973 240 l 1996 240 l 1996 247 l 2019 247 l 2019 244 l 2041 244 l 2041
+ 227 l s
+gr gr showpage
+end
+%%EOF
diff --git a/info/examples/lwc/apa/teched.html b/info/examples/lwc/apa/teched.html
new file mode 100644
index 0000000000..6971f5f5ca
--- /dev/null
+++ b/info/examples/lwc/apa/teched.html
@@ -0,0 +1,47 @@
+<HTML>
+<!-- teched.html -->
+<!-- (C) Copyright 1998 by Robert S. Sutor. All rights reserved. -->
+<HEAD>
+ <META HTTP-EQUIV="Content-Type"
+ CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="GENERATOR"
+ CONTENT="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <TITLE>teched Sample LaTeX Editor</TITLE>
+</HEAD>
+
+<!-- This is a very simple LaTeX editor built using the -->
+<!-- IBM techexplorer Hypermedia Browser and a Java applet. -->
+
+<BODY>
+<CENTER>
+
+<!-- The upper window is controlled by techexplorer. We -->
+<!-- give the name 'teInput' to this window. We are -->
+<!-- using a table to put a frame around the window. -->
+
+<TABLE BORDER=1>
+ <TR>
+ <TD>
+ <EMBED TYPE="application/x-techexplorer"
+ TEXDATA="\(\)"
+ NAME="teInput" WIDTH=600 HEIGHT=150>
+ </TD>
+ </TR>
+</TABLE>
+
+<!-- The lower window is handled by the 'teched' Java -->
+<!-- applet. Like the techexplorer window, it is 600 -->
+<!-- pixels wide. -->
+
+<TABLE BORDER=1>
+ <TR>
+ <TD>
+ <APPLET CODE="teched.class"
+ NAME="teched" ALIGN=CENTER
+ WIDTH=600 HEIGHT=130 MAYSCRIPT></APPLET>
+ </TD>
+ </TR>
+</TABLE>
+</CENTER>
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/info/examples/lwc/apa/teched.java b/info/examples/lwc/apa/teched.java
new file mode 100644
index 0000000000..06c2a9c392
--- /dev/null
+++ b/info/examples/lwc/apa/teched.java
@@ -0,0 +1,187 @@
+// teched.java
+// (C) Copyright 1998 by Robert S. Sutor. All rights reserved.
+
+// We first import the classes we need from the standard Java
+// distribution. This will work with Java 1.0 or higher.
+
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.*;
+import java.applet.Applet;
+
+// The following brings in the Netscape LiveConnect classes
+// that we will use.
+
+import netscape.javascript.JSObject;
+
+// These are the classes that we use that are exposed by
+// techexplorer. The first is the basic interface to the
+// plug-in. The others are the event and listener classes.
+
+import ibm.techexplorer.plugin.techexplorerPlugin;
+import ibm.techexplorer.awt.AWTEvent;
+import ibm.techexplorer.awt.event.KeyListener;
+import ibm.techexplorer.awt.event.KeyEvent;
+
+public class teched
+ extends java.applet.Applet
+ implements KeyListener
+{
+ // The JavaScript window object
+ JSObject Window = null;
+ // The JavaScript document object
+ JSObject Document = null;
+
+ // The techexplorer plug-in instance
+ techexplorerPlugin tePlugin = null;
+ // The editable text area for the markup source
+ TextArea markupInputArea = null;
+ // The 'Clear input' button
+ Button clearInputButton = null;
+
+ // A utility buffer for holding the markup.
+ StringBuffer markupString = new StringBuffer("");
+
+ public boolean action(Event evt, Object arg) {
+ // We only handle the 'Clear input' action.
+
+ boolean result = false;
+
+ if ( evt.target == clearInputButton ) {
+ // Empty the markup edit area.
+ markupInputArea.setText( "" );
+
+ // Reinitialize the techexplorer document. This
+ // needs to be a non-empty string to actually
+ // updated the document, so we give it some
+ // non-visible input.
+
+ tePlugin.reloadFromTeXString( "\\(\\)" );
+
+ result = true;
+ }
+
+ return result;
+ }
+
+ public void init() {
+ // Initialize the components we are displaying
+ // with this Java applet.
+
+ clearInputButton = new Button("Clear input");
+ markupInputArea = new TextArea( 5, 80 );
+
+ this.setLayout( new FlowLayout() );
+ this.add( markupInputArea );
+ this.add( clearInputButton );
+ }
+
+ public void keyPressed( ibm.techexplorer.awt.event.KeyEvent e ) {
+ // We don't do anything with this event given us by
+ // techexplorer. But see 'keyTyped'.
+ }
+
+ public void keyTyped( ibm.techexplorer.awt.event.KeyEvent e ) {
+ // This is a naive (but effective!) way of dealing with
+ // keys coming to us from techexplorer. We grab the key
+ // that was pressed and put it on the end of our markup.
+ // Then we update the techexplorer window.
+
+ if ( e.getSource() == tePlugin ) {
+ markupInputArea.appendText(
+ ( new Character( e.getKeyChar() )).toString() );
+
+ // This replaces the document within the techexplorer
+ // window with that gotten by parsing the string
+ // passed to it.
+
+ tePlugin.reloadFromTeXString( markupInputArea.getText() );
+ }
+ }
+
+ public void keyReleased( ibm.techexplorer.awt.event.KeyEvent e ) {
+ // This is where we deal with key release events coming to
+ // us from the techexplorer window.
+
+ switch ( e.getKeyCode() ) {
+ case KeyEvent.VK_DELETE:
+ // When we see a 'delete' key, we remove the last character
+ // in the markup.
+
+ if ( e.getSource() == tePlugin ) {
+ markupString = new StringBuffer( markupInputArea.getText() );
+ int length = markupString.length();
+ if ( length > 0 )
+ --length;
+ markupString.setLength( length );
+ markupInputArea.setText( markupString.toString() );
+ tePlugin.reloadFromTeXString( markupInputArea.getText() );
+ }
+ break;
+
+ case KeyEvent.VK_ENTER:
+ // When we see that the 'enter' key has been pressed, we
+ // insert a newline in the markup. This improves readability.
+
+ if ( e.getSource() == tePlugin ) {
+ markupInputArea.appendText( "\n" );
+ tePlugin.reloadFromTeXString( markupInputArea.getText() );
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ public boolean keyUp( Event evt, int key )
+ {
+ // This key is one from the markup input area.
+ // When a key is released, update the techexplorer
+ // document with the current markup.
+
+ boolean result = false;
+
+ if ( evt.target == markupInputArea ) {
+ if ( evt.id == Event.KEY_RELEASE ) {
+ int length = markupInputArea.getText().length();
+ if ( length > 0 )
+ tePlugin.reloadFromTeXString(
+ markupInputArea.getText() );
+ else
+ tePlugin.reloadFromTeXString( "\\(\\)" );
+ }
+
+ result = true;
+ }
+
+ return result;
+ }
+
+ public void start() {
+ // Initialize the Netscape JavaScript objects.
+
+ Window = (JSObject) JSObject.getWindow(this);
+ Document = (JSObject) Window.getMember("document");
+
+ // Try to get the techexplorer plug-in object.
+ tePlugin = (techexplorerPlugin) Document.getMember("teInput");
+
+ if ( tePlugin == null )
+ // If we didn't get it, print a debug message.
+ System.out.println("teched: start(): null teched");
+ else
+ // Otherwise add the listener for techexplorer keys.
+ tePlugin.addKeyListener( (KeyListener) this );
+ }
+
+ public void stop() {
+ if ( tePlugin == null )
+ // If we don't have the techexplorer plug-in object,
+ // print a debug message.
+ System.out.println("teched: stop(): null teched");
+ else
+ // Otherwise remove the listener for techexplorer keys.
+ tePlugin.removeKeyListener( (KeyListener) this );
+ }
+}