Closed pedropark99 closed 2 years ago
Thanks for the detailed report! Try using block-headings: false
to disable the Pandoc redefinition of those commands.
Thank you @dragonstyle!!! I included block-headings: false
in the YAML header, and the .qmd
file compiled smoothly!
Hi @dragonstyle,
I am having the exact same problem on Mac OS, compiling via vscode. I am using the same example as @pedropark99
tlmgr --version
tlmgr revision 63068 (2022-04-18 07:58:07 +0200)
tlmgr using installation: /usr/local/texlive/2022
TeX Live (https://tug.org/texlive) version 2022
When I run render PDF with the block-headings: false
option I get the following output:
running xelatex - 1
This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
updating tlmgr
updating existing packages
compilation failed- error
Undefined control sequence.
<argument> \Large \bfseries \fontforsection
l.146 \section{Quarto}\label{quarto}}
This is a different error than without the block-headings
switch:
compilation failed- error
Argument of \paragraph has an extra }.
<inserted text>
\par
l.1641 \ttl@extract\paragraph
I'm sorry that you've run into this. I'm guess this is some other issue - can you share a qmd
document that causes the error for me to use trying to track the issue down?
That's the weird part. They are literally the same files from the example above:
qmd:
---
title: "Pedro Duarte Faria"
format:
pdf:
keep-tex: true
documentclass: article
number-sections: true
colorlinks: true
geometry:
- top=2cm
- bottom=3cm
- left=2.5cm
- right=2.5cm
include-in-header:
- pdf_config.sty
block-headings: false
fontsize: 11pt
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
pdf_config.sty:
\usepackage{titlesec}
\titleformat*{\section}{\Large\bfseries\fontforsection}
It looks to me like \fontforsection
isn't defined in this simple example. Try updating the pdf_config.sty
to read:
\usepackage{titlesec}
\titleformat*{\section}{\Large\bfseries\sffamily\color{blue}}
@dragonstyle This works! This solution could also help #4126.
Bug description
Hello! I am using Quarto (version 0.9.531) on Windows 10 (I am running RStudio IDE version 2022.07.2+576), to output a PDF Curriculum Vitae. Everything was going great, until I decided to change the font and style of the section headers. And the logic way to do this in Latex, is by using the
titlesec
package. However, a Latex conflict is happening when I include thetitlesec
package. The resulting error produced by xelatex, when I include thetitlesec
package is this:I started to research a little about this error, and, by doing some tests, I discovered that the source of the Latex error/conflict happens because of this section of the Latex code that is produced by default by Pandoc/Quarto:
In other words, if I remove this Latex code from
titlesec-error.tex
, and, try to compile the.tex
file again with xelatex, everything works perfectly, without errors.If I undestood correctly, looks to me that the Latex conflict is happening because
titlesec
looks for a specific definition of\paragraph
command. However, with the latex code above, we are redefining the\paragraph
command to a different version (I might be wrong).Reproducible example
If you want to reproduce this error, you can do it by using the
titlesec-error.qmd
andpdf_config.tex
files, which are exposed below. Thetitlesec-error.qmd
file is composed of these lines:And the
pdf_config.tex
is composed of the following lines:More infos about the system and session
My
tmlgr
version is:The basic info about my session:
Checklist