-
Hi, While overriding Do you have any idea how to automatically add a line break with verbatim render going over line width ? Tex file: % Override markdown render of code blocks
\ExplSyntaxOn% enable expl3 syntax
\global\def\markdownRendererInputFencedCode#1#2#3{%
\catcode`\#=6\relax
\tl_if_empty:nTF
{ #2 }
{ \markdownRendererInputVerbatim{#1} }
{ \inputminted{#2}{#1} }
\catcode`\#=12\relax
}
\ExplSyntaxOff% disable expl3 syntax Markdown file:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The minted package has the You can use See also the documentation of the minted package.
In expl3, you can write
In expl3, you can write |
Beta Was this translation helpful? Give feedback.
The minted package has the
breaklines
option that causes overlong lines to break:You can use
\setminted{breaklines=true}
in the preamble to enable this. This will only affect code blocks typeset by the minted package, i.e. fenced code blocks. To typeset all code blocks with the minted package, may replace\markdownRendererInputVerbatim{#1}
with\inputminted{text}{#1}
.See also the documentation of the minted package.
In expl3, you can write
\char_set_catcode_parameter:N \#
.In expl3, you can write
\char_set_catcode_other:N \#
.