Set of tools useful for customizing TeX output of Mathematica.
Set of tools useful for customizing TeX output of Mathematica.
Contains also patch fixing behavior of TeXForm
for expressions with custom
formatting defined using Format[expr, TeXForm]
.
Define custom TeX formatting for some symbols:
Format[something, TeXForm] = TeXVerbatim["\\macro $1+1$ \\command[a=b]{c}"];
Format[f[x__], TeXForm] := TeXDelimited["\\left(", x, "\\right)", "DelimSeparator" -> ""]
Format[g[x__], TeXForm] := TeXCommand["g", {{a -> b}, x}]
Format[h[x__], TeXForm] := TeXEnvironment["myEnv", x]
Use TeXForm
as usual:
TeXForm[
h[
f[1 + alpha],
5 - g[3, g[2]],
something
]
]
Output is:
\begin{myEnv}
\left(\alpha +1\right)
5-\g[a=b]{3}{\g[a=b]{2}}
\macro $1+1$ \command[a=b]{c}
\end{myEnv}
You can find more usage examples in package documentation.
To install TeXUtilities package evaluate:
Get["https://raw.githubusercontent.com/jkuczm/MathematicaTeXUtilities/master/BootstrapInstall.m"]
Note that this will also install ProjectInstaller package, if you don't have it already installed.
To load TeXUtilities package evaluate: Needs["TeXUtilities`"]
.
Download latest released TeXUtilities.zip file.
Extract downloaded TeXUtilities.zip
to any directory which is on Mathematica $Path
,
e.g. to one obtained by evaluating FileNameJoin[{$UserBaseDirectory,"Applications"}]
.
To load the package evaluate: Needs["TeXUtilities`"]
.
To use package directly from the Web, without installation, evaluate:
Get["https://raw.githubusercontent.com/jkuczm/MathematicaTeXUtilities/master/NoInstall.m"]
Note that, with this method of initialization, package documentation will not be available in Mathematica Documentation Center, but you can use online version of documentation.
This application comes with documentation integrated with Mathematica Documentation Center.
To use it search for "TeXUtilities" in documentation center
or press F1
key with cursor on name of any of symbols introduced by this application.
There's also online version of documentation.
This package contains extensive automatic test suite. Package is being tested with Mathematica versions 8.0 and 9.0 on Linux. Since it doesn't contain any OS specific code it should work with above versions on all operating systems.
There's also no obvious reason for package not to work on earlier (6.0+) versions of Mathematica.
If you find any bugs or have feature request please create an issue on GitHub.
Feel free to fork and send pull requests.
If you want to use Ant scripts from this repository you will also need to install WWBCommon project.
All contributions are welcome!
This package is released under The MIT License.
Releases of this package will be numbered using Semantic Versioning guidelines.