2

I am making plot in PyX.

To get (in LaTex language)

\mathrm{a}

you use

\rm{a}

(in PyX language).

I wanna get (in LaTex language)

\mathbb{a}.

How to do it in PyX language? Attempt of

\bb{a}

gives error message.

4

After looking briefly at the documentation, and the examples section (as you didn't provide an example, which would have been nice):

from pyx import graph, text

text.set(mode="latex")
text.preamble(r"\usepackage{amssymb}")

g = graph.graphxy(width=8, x=graph.axis.linear(min=0, max=1))
g.plot(graph.data.function("y(x) = x**2", points=8))

xax = g.axes['x']
xax.axis.title = '$\mathbb{A}$'

g.writePDFfile("demo")

which makes a PDF looking like

PDF generated by Python code

Note that only uppercase blackboard letters are defined by amsfonts, using lower case letters gives various symbols, as you can see if you try

\documentclass{article}
\usepackage{amssymb,pgffor}
\begin{document}
\foreach \i in {a,b,...,z} {$\mathbb{\i}$}

\foreach \i in {A,B,...,Z} {$\mathbb{\i}$}
\end{document}

lower and uppercase mathbb

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.