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

Feature request: put ams usage in the templates or the quarto extension #28

Open
durandg12 opened this issue Jun 27, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@durandg12
Copy link

To write mathematics in LaTeX, I find myself relying a lot on the amsmaths package. I found a (perhaps clunky) way to use it in a .qmd file for both pdf and html rendering with the computo extension.

I replaced

format:
  computo-html: default
  computo-pdf: default

by

format:
  computo-html: 
    html-math-method: mathjax
    include-in-header:
      - text: |
          <script>
          window.MathJax = {
            tex: {
              tags: 'ams'
            }
          };
          </script>
  computo-pdf: 
    include-in-header:
      - text: |
          \usepackage{amsmath}

Then, like many, I use some custom TeX macros, I defined them like that

::: {.hidden}
 \newcommand{\Pro}[1]{\mathbb{P}\left(#1\right)} 
:::

Notice the difference with this screenshot taken from the the Quarto doc:
image
I had to remove the $$ or else the LaTeX would compilation fail.

I think that the ams usage could be added to the template to help authors, or directly in the computo quarto extension maybe. And the syntax for custom TeX macros could be added to the template too.

@pneuvial pneuvial changed the title Feature request: put ams usage in the templates or the cuarto extension Feature request: put ams usage in the templates or the quarto extension Jul 8, 2024
@pneuvial pneuvial added the enhancement New feature or request label Aug 26, 2024
@pneuvial pneuvial transferred this issue from computorg/template-computo-R Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants