Ask Your Question
0

LaTeX macros in Markdown on Cocalc

asked 2018-05-30 08:30:45 +0100

Paul Bryan gravatar image

I'm trying to use some custom macros in sage worksheets and Markdown files. How do I include my own custom macros in a Markdown file? I thought the markdown conversion used pandoc so I tried adding YAML front matter:

---
header-includes: |
    \usepackage[all]{pabmacros}
---

but cocalc just tries to render it rather than treating it as YAML front matter.

I would also like to do something similar in Sage worksheets. It works okay with LaTeX. I have a cell like this

%auto
%latex.add_to_preamble
\usepackage[all]{pabmacros}

Then I can access my macros (such as "\Rm") in LaTeX cells:

%latex
\[
\Rm
\]

Everything works fine there.

If I try to use my macros in Markdown cells however, they do not render properly.

%md

# My heading

\[
\Rm
\]

just produces "\Rm" in red.

Does anyone know how I can use my own custom macros in Markdown?

edit retag flag offensive close merge delete

Comments

For any CoCalc related questions, the best is to contact their support team by clicking "Help" at the top of the document you are working on in CoCalc. This way they can have a look, see exactly what you see and provide help.

slelievre gravatar imageslelievre ( 2018-06-04 19:51:52 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-06-05 05:26:22 +0100

William Stein2 gravatar image

thought the markdown conversion used pandoc so I tried adding YAML front matter:

It's rendered on the frontend using markdown-it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-05-30 08:30:45 +0100

Seen: 896 times

Last updated: Jun 05 '18