mirror of
https://github.com/sysprog21/lkmpg.git
synced 2024-11-29 04:10:24 +08:00
fdc07d0008
We can now use \cpp|...| and \sh|...| to add inline code blocks, which resembles the \verb|...| syntax Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
38 lines
904 B
TeX
38 lines
904 B
TeX
\newminted[code]{c}{frame=single,
|
|
framesep=2mm,
|
|
baselinestretch=1,
|
|
fontsize=\footnotesize,
|
|
breaklines,
|
|
breakafter=d,
|
|
linenos
|
|
}
|
|
|
|
\usemintedstyle{vs}
|
|
|
|
\NewDocumentCommand{\samplec}{oom}{%
|
|
\IfNoValueTF{#1}%
|
|
{%
|
|
\inputminted[frame=single, framesep=2mm, baselinestretch=1, fontsize=\footnotesize, breaklines, breakafter=d, linenos]{c}{#3}%
|
|
}%
|
|
{%
|
|
\IfNoValueTF{#2}%
|
|
{%
|
|
\inputminted[frame=single, framesep=2mm, baselinestretch=1, fontsize=\footnotesize, breaklines, breakafter=d, firstline=#1, linenos]{c}{#3}%
|
|
}%
|
|
{%
|
|
\inputminted[frame=single, framesep=2mm, baselinestretch=1, fontsize=\footnotesize, breaklines, breakafter=d, firstline=#1, lastline=#2, linenos]{c}{#3}%
|
|
}%
|
|
}%
|
|
}
|
|
|
|
\newminted[codebash]{bash}{frame=single,
|
|
framesep=2mm,
|
|
baselinestretch=1.2,
|
|
breaklines,
|
|
breakafter=d,
|
|
linenos
|
|
}
|
|
|
|
\newmintinline[sh]{bash}{}
|
|
\newmintinline[cpp]{c}{}
|