Include *.tex AND \renewcommand inside inside Quarto include-in-header

Hello everybody,

I want to do a very simple thing (at least I think it is somewhat simple):

I want to include a .tex-document, which contains a defined environment for a title page, as well as plain LaTeX inside the YAML-Header of my Quarto-Document. According to, I can either specify

      text: |


      - myTexfile.tex

But I would like to have both, the \renewcomand{\contentsname}{New_TOC_Name} as well as the importation of my myTexfile.tex-file. I have tried to

  • use include-in-header twice
  • use text: | ... to include both contents (first .tex-file and then \renewcommand and the other way around)

I always get an error. Either it is a missing (e.g. undefined) environment for my title page (which occurs because the second include-in-header is just ignored or XeTeX complains about a missing \begin{document}.

I would like to know if there is a way to specify external .tex files together with commands inside the YAML-header, or if I can only include a specific myHeader.tex file, which contains all commands I would like to create or renew.

Maybe someone can help me with this.

Kind regards

Solved the issue, it was as easy as I expected: just use plain LaTeX inside

        text: |

runs without an error.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.