VFGEN
  • Home
  • Download
  • Support & FAQ
  • User's Guide
  • §   Vector Field File
  • §   ADOL-C
  • §   AUTO
  • §   Check
  • §   CVODE
  • §   DDE23
  • §   DDE-BIFTOOL
  • §   DDE_SOLVER
  • §   Delay2ODE
  • §   DSTool
  • §   EVF
  • §   GSL
  • §   Help
  • §   LaTeX
  • §   MATCONT
  • §   MATLAB
  • §   Octave
  • §   PyDSTool
  • §   PyGSL
  • §   RADAU5
  • §   Scilab
  • §   SciPy
  • §   Taylor
  • §   XPP

LaTeX

LaTeX is a program for typesetting documents.

The VFGEN LaTeX Command

The LaTeX command can be used to create a LaTeX fragment that can be used in a LaTeX document.

The command

$ vfgen latex vector_field_file.vf
will create the file [name].tex, which contains a fragment of LaTeX. This fragment consists of an equation environment which will produce a numbered equation. Within the equation environment, a split environment (from the the amsmath LaTeX package) is used. The equation will have the label eqn:[name].

In the vector field file, the following elements can be given a Latex attribute: Constant, Parameter, Expression, StateVariable. This will override the default LaTeX representation of the symbol in the LaTeX output. (See Example 2 below.)

Note: The conversion to LaTeX is handled by the GiNaC library. In general, expressions will not look the same as the formulas that were entered in the vector field file. GiNaC will often rearrange (and possible simplify) the expressions. You should consider the LaTeX generated by VFGEN as a starting point that may need additional editing.

Example 1

Here is a sample vector field file: pendulum.vf.
The LaTeX commands created by

$ vfgen latex pendulum.vf

are
\begin{equation}
\begin{split}
  \frac{d \theta}{d t} & =v\\
  \frac{d v}{d t} & =-\frac{ b v}{ m L^{2}}-\frac{ g \sin(\theta)}{L}\\
\end{split}
\label{eqn:pendulum}
\end{equation}
(The comments have not been included. The actual file is here: pendulum.tex.)

Note that the LaTeX command \theta is used for the variable theta automatically; it will be typeset by LaTeX as θ.

Here is a simple LaTeX document to show how this files generated by VFGEN can be used: main.tex. When processed with the command pdflatex the result is main.pdf.

Example 2

Here is a version of the Mackey-Glass delay equation, in which the Latex attribute has been assigned in the delayedx Expression:

<?xml version="1.0"?>
<VectorField Name="MackeyGlass">
<Parameter Name="a" DefaultValue="0.2" />
<Parameter Name="b" DefaultValue="0.1" />
<Parameter Name="tau" DefaultValue="17.0" Description="Delay time" />
<Expression Name="delayedx" Formula="delay(x,tau)" Description="x(t-tau)"
                Latex="x(t-\tau)" />
<StateVariable Name="x" Formula="-b*x+a*delayedx/(1+delayedx^10)"
                DefaultInitialCondition="0"/>
</VectorField>
(The file is here: MackeyGlass2.vf.)

The command
$ vfgen latex MackeyGlass2.vf
creates the file MackeyGlass2.tex.

The file mg2.tex shows how the file produced by VFGEN can be used. The result is mg2.pdf, or here:

Copyright © 2005-2007 Warren Weckesser