Open Lednerb opened 4 years ago
This issue does not occur in unordered lists.
Could you post your Markdown and the pandoc command that you used to render the document?
Hi, sure:
pandoc command:
pandoc src.md -o out.pdf \
--from markdown+yaml_metadata_block+raw_html \
--template eisvogel \
--table-of-contents \
--toc-depth 6 \
--top-level-division=chapter \
--highlight-style zenburn \
--pdf-engine xelatex
Markdown Text: bug.txt
It looks like the fix implemented in #2 is not working correctly 😢 A workaround is to use listings
for rendering code blocks with the option --listings
.
Even with the option breakanywhere
there are still overflowing lines:
\usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,breakanywhere,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}}
I agree with Lednerb and can replicate this issue. I also added the option breakanywhere
to my eisvogel.tex file. Inline code that exceeds 4-5 words tends to run past the default column width and is then unreadable.
I created a listings-setup.tex
file and added the following text:
\usepackage{xcolor}
\lstset{
basicstyle=\ttfamily,
numbers=none,
keywordstyle=\color[RGB]{0.13,0.29,0.53}\bfseries,
stringstyle=\color[RGB]{0.31,0.60,0.02},
commentstyle=\color[RGB]{0.56,0.35,0.01}\itshape,
numberstyle=\small,
stepnumber=1,
numbersep=5pt,
backgroundcolor=\color[RGB]{248,248,248},
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
captionpos=b,
breaklines=true,
breakatwhitespace=true,
breakautoindent=true,
escapeinside={\%*}{*)},
linewidth=\textwidth,
basewidth=0.5em,
}
I then reference this file in my pandoc build using the syntax --listings -H listings-setup.tex
.
The final result DOES enable word wrapping and things work as anticipated. BUT, the color background of inline code is no longer light gray, but is white.
It also adds line numbers to blockcode even when I set the above variable numbers=none
.
If I knew where in the eisvogel.tex file I could find or set similar settings rather than reference the outside --listings
file, that might work.
Hey and thanks for the nice template!
I've discovered an issue with line wraps when code-blocks are used within lists:
As you can see from the screenshot, the chars
20(New-
are outside the code block.I don't understand enough about latex to fix this by myself now.
Any help would be appreciated.