# [NTG-context] mathcal generates error in ConTeXt

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Sat Mar 26 09:48:19 CET 2022

A A via ntg-context schrieb am 26.03.2022 um 08:50:
> Hi Jan,
>
> Thanks, I was starting to think pandoc is not yet mature enough to
> handle these conversions, but it looks like that might not be the case.
>
> \mathcal works now, but I actually ran into another issue in my real
> document. I have the following defined in my LaTeX:
>
>     /$C = \textrm{dad}$/
>
> It looks like context has a hard time compiling the above, even with
> \starttext and \stoptext commands generated with the pandoc -s flag.
> Here's the error:
>
>     /The control sequence at the end of the top line of your error
>     message was never/
>     /\def'ed. You can just continue as I'll forget about whatever was
>     undefined./
>     /mtx-context     | fatal error: return code: 1/
>     /
>     /
>
> How can I include quotes in math expressions the same way I do in LaTeX?

When you take a closer look at the error message you can see ConTeXt
complains about the \textrm command.

tex error       > tex error on line 2 in file ./test.tex: Undefined
control sequence \undefined

<line 3.2>
$C = \textrm {dad}$

1     \starttext
2 >>  $C = \textrm{dad}$
3     \stoptext
The control sequence at the end of the top line of your error message
was never
\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context     | fatal error: return code: 1

You can solve this by replacing \textrm with \text or when you need more
control about the style of the text you can use the \mathtext commands
(e.g. \mathtextrm, \mathtextit etc.).

To get the correct quotes in your document you either use the proper
quotes in the source (“ and ”) or just use the \quotation command.

\starttext

$C = \text{\quotation{dad}}$

$C = \text{“dad”}$

\stoptext

Wolfgang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220326/104faba1/attachment.htm>


More information about the ntg-context mailing list