Hi John,

Within Sage, you can get the appropriate command with


sage: from sage.misc.latex_macros import sage_configurable_latex_macros
sage: sage_configurable_latex_macros
['\\newcommand{\\Bold}[1]{\\mathbf{#1}}']
sage: print(sage_configurable_latex_macros[0])
\newcommand{\Bold}[1]{\mathbf{#1}}


I'm not sure how SageTeX is supposed to handle this, and I'm surprised that 
it hasn't come up before. The use of \Bold{...} in Sage dates back to 2009: 
see sage/misc/latex_macros.py.

-- 
John
 
On Monday, May 8, 2017 at 12:25:12 PM UTC-7, John Cremona wrote:
>
> In Sage 7.6: 
>
> sage: latex(QQ) 
> \Bold{Q} 
>
> but \Bold is not a standard LaTeX macro. However, 
>
> sage: show(QQ) 
> \newcommand{\Bold}[1]{\mathbf{#1}}\Bold{Q} 
>
> shows that the macro is defined somewhere in Sage itself. 
>
> Next, if I create a file mini.tex containing 
>
> \documentclass{article} 
> \usepackage{sagetex} 
> \begin{document} 
> \title{A Sage\TeX\ document} 
> The rational field is \sage{QQ}. 
> \end{document} 
>
> and run 
>
> pdflatex mini 
> sage mini.sagetex.sage 
> pdflatex mini 
>
> then the second time pdflatex runs there's an error when it encounters 
> the undefined \Bold macro.  This can be fixed by adding the line 
> \newcommand{\Bold}[1]{\mathbf{#1}} 
> into the preamble, but surely this should not be necessary, and there 
> might be more "missing" macros. 
>
> I checked that the version of sagetex.sty being used is exactly the 
> one in the Sage version I was running. 
>
> John 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to