diff options
author | Norbert Preining <norbert@preining.info> | 2021-06-14 03:01:12 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-06-14 03:01:12 +0000 |
commit | 269940e8e52b921a855083542b9e1109af49af09 (patch) | |
tree | ba8b7431f6e4878661215e5a6127aba941f5d711 /macros/latex/contrib/ffcode/ffcode.sty | |
parent | 2ba4b1ac7860085c0b259aacb0d99bd2c730edbc (diff) |
CTAN sync 202106140301
Diffstat (limited to 'macros/latex/contrib/ffcode/ffcode.sty')
-rw-r--r-- | macros/latex/contrib/ffcode/ffcode.sty | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/macros/latex/contrib/ffcode/ffcode.sty b/macros/latex/contrib/ffcode/ffcode.sty index 280bc58bd8..f478a0b5d6 100644 --- a/macros/latex/contrib/ffcode/ffcode.sty +++ b/macros/latex/contrib/ffcode/ffcode.sty @@ -21,12 +21,16 @@ % SOFTWARE. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ffcode}[2021/06/10 0.1.0 Fixed Font Code] +\ProvidesPackage{ffcode}[2021/06/13 0.2.0 Fixed Font Code] \RequirePackage{microtype} \RequirePackage{xkeyval} \newif\ifnopygments \DeclareOptionX{nopygments}{\nopygmentstrue} +\newif\ifnoframes +\DeclareOptionX{noframes}{\noframestrue} +\newif\ifnonumbers +\DeclareOptionX{nonumbers}{\nonumberstrue} \ProcessOptionsX\relax \ifnopygments @@ -36,15 +40,23 @@ \fi \setminted{breaklines} \usemintedstyle{bw} -\renewcommand{\theFancyVerbLine}{\textcolor{gray}{\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}} -\newminted[ffcode]{text}{firstnumber=last,linenos,numbersep=2pt,framesep=6pt,framerule=1pt, - rulecolor=gray,frame=leftline,escapeinside=||,mathescape} +\ifnonumbers + \newminted[ffcode]{text}{framesep=6pt,framerule=1pt,rulecolor=gray,frame=leftline,escapeinside=||,mathescape} +\else + \renewcommand{\theFancyVerbLine}{\textcolor{gray}{\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}} + \newminted[ffcode]{text}{firstnumber=last,linenos,numbersep=2pt,framesep=6pt,framerule=1pt, + rulecolor=gray,frame=leftline,escapeinside=||,mathescape} +\fi -\RequirePackage{tcolorbox} - \newtcbox{\codebox}{nobeforeafter,colframe=gray!80!white, - colback=gray!5!white,boxrule=0.1pt,arc=1pt, - boxsep=1.2pt,left=0.5pt,right=0.5pt,top=0.2pt,bottom=0.2pt, - tcbox raise base} -\newcommand{\ff}[1]{\codebox{\vrule height 6pt depth 1pt width 0pt\texttt{#1}}} +\ifnoframes + \newcommand{\ff}[1]{\vrule height 6pt depth 1pt width 0pt\texttt{#1}} +\else + \RequirePackage{tcolorbox} + \newtcbox{\codebox}{nobeforeafter,colframe=gray!80!white, + colback=gray!5!white,boxrule=0.1pt,arc=1pt, + boxsep=1.2pt,left=0.5pt,right=0.5pt,top=0.2pt,bottom=0.2pt, + tcbox raise base} + \newcommand{\ff}[1]{\codebox{\vrule height 6pt depth 1pt width 0pt\texttt{#1}}} +\fi \endinput |