I'm trying to generate a clean PDF from markdown using Pandoc and xelatex.
When I convert :
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
I end up having :
Here is the command I use to generate the PDF :
/usr/local/bin/pandoc --verbose \
--chapters --from=markdown+yaml_metadata_block -S \
--latex-engine=xelatex \
--listings -H listings-setup.tex \
--template template.pdf \
--toc --chapters \
-o test.pdf \
metadata.yml \
test.md
I use the document class : report
I have tried different things from inside the template and the extra header I'm using but I have now idea what template is Pandoc using when generating paragraphs.
I see under my template.pdf (extracted from Pandoc), but doesn't seem to apply here :
\setlength{\emergencystretch}{3em} % prevent overfull lines
You've a few possibilities. Since pandoc uses LaTeX for PDF generation, these are adapted from this LaTeX answer :
Annotate the proper language:
--- lang: en-GB --- rest of document
use soft hyphens inside a word to explicitly denote the allowed places to break. You can either use the unicode character or the HTML entity ­
which pandoc will convert automatically for LaTeX etc. For example; cryp­to­graphy
Specify exceptions via \\hyphenation{cryp-to-graphy}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.