Skip to content
Discussion options

You must be logged in to vote

Using {{< include _macros.qmd >}} works but has the unfortunate side effect that, if placed before the first header in a revealjs format document, it can cause a blank slide. That means having to place it inside of the first slide. That's awkward.

I now use this approach: in the yaml header that specifies the format, I have

format:
  revealjs:
    include-in-header:
      - file: "macros.jax"

where macros.jax contains the macro definitions, as specified here:

<script>
window.MathJax = {
  tex: {
    macros: {
      RR: "{\\bf R}",
      bold: ["{\\bf #1}", 1]
    }
  }
};
</script>

This seems to work reliably, though the downside is having to maintain macros in an unusual format.

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mcanouil
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cderv
Comment options

Answer selected by mpf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
revealjs Issues with the revealjs format latex LaTeX engines related libraries and technologies
3 participants