nhmk/lib/codeblock.tex

35 lines
851 B
TeX
Raw Normal View History

2021-07-22 06:35:24 +08:00
\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
}