Defining output formats
- To: mathgroup at smc.vnet.net
- Subject: [mg88032] Defining output formats
- From: Szabolcs Horvát <szhorvat at gmail.com>
- Date: Tue, 22 Apr 2008 06:29:04 -0400 (EDT)
- Organization: University of Bergen
On the doc page tutorial/DefiningOutputFormats there is an example:
"""
This specifies the TeXForm for the symbol x.
In[1]:= Format[x, TeXForm] := "{\\bf x}"
The output format for x that you specified is now used whenever the TeX
form is needed.
In[2]:= TeXForm[1 + x^2]
Out[2]//TeXForm=
x^2+1
"""
Quite obviously, this does not work in the way the documentation
suggests. I would have expected {\bf x}^2 + 1.
Let's try another example:
In[3]:= TeXForm[x]
Out[3]//TeXForm=
\text{$\{\backslash \backslash $bf x$\}$}
So is there a way to tell Mathematica that x should always be formatted
in bold in TeXForm?