Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline LaTeX math not parsed properly - how to quote literal for longname? #4

Open
zeigerpuppy opened this issue Oct 4, 2022 · 0 comments

Comments

@zeigerpuppy
Copy link
Contributor

zeigerpuppy commented Oct 4, 2022

In the RMarkdown document, the following inline parses properly (in both HTML and PDF formats):

$\color{DarkGreen}{\text{Green Text}}$

However, when trying to use the same in an acronym:

---
acronyms:
  keys:
    - shortname: myacr
      longname: $\color{DarkGreen}{\text{Green Text}}$
---

\acr{myacr}

this gets parsed in LaTeX as:

\textbackslash color\{DarkGreen\}\{\textbackslash text\{Green Text\}\}

It looks like the backslash gets converted to a \textbackslash which results in the LaTex not working.

whereas it should be parsed as

\(\color{DarkGreen}{\text{Green Text}}\)

Also tried following without success

  • \color{DarkGreen}{\text{Green Text}}
  • "\color{DarkGreen}{\text{Green Text}}"
  • \\color{DarkGreen}{\text{Green Text}}
  • \(\color{DarkGreen}{\text{Green Text}}\)

Is there a way to force \acr{} to insert literal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant