texlive[60500] Master/texmf-dist: ffcode (13sep21)

commits+karl at tug.org commits+karl at tug.org
Mon Sep 13 22:08:49 CEST 2021


Revision: 60500
          http://tug.org/svn/texlive?view=revision&revision=60500
Author:   karl
Date:     2021-09-13 22:08:48 +0200 (Mon, 13 Sep 2021)
Log Message:
-----------
ffcode (13sep21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt
    trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
    trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex
    trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty

Modified: trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt	2021-09-13 20:08:37 UTC (rev 60499)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt	2021-09-13 20:08:48 UTC (rev 60500)
@@ -1,4 +1,3 @@
-hard microtype
 hard xkeyval
 hard minted
 hard tcolorbox

Modified: trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex	2021-09-13 20:08:37 UTC (rev 60499)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex	2021-09-13 20:08:48 UTC (rev 60500)
@@ -21,14 +21,16 @@
 % SOFTWARE.
 
 \documentclass[12pt]{article}
+\usepackage[T1]{fontenc}
 \usepackage[tt=false,type1=true]{libertine}
 \usepackage{amsmath}
 \usepackage{multicol}
 \usepackage{ffcode}
 \usepackage{xcolor}
+\usepackage{microtype}
 \title{\ff{ffcode}: \LaTeX{} Package \\ for Fixed-Font Code Blocks}
 \author{Yegor Bugayenko}
-\date{0.3.0 2021/09/07}
+\date{0.3.2 2021/09/13}
 \begin{document}
 \pagenumbering{gobble}
 \raggedbottom
@@ -48,6 +50,7 @@
 \raggedcolumns
 \begin{verbatim}
 \documentclass{article}
+\usepackage[T1]{fontenc}
 \usepackage{ffcode}
 \begin{document}
 The function \ff{fibo()} is recursive:
@@ -84,6 +87,10 @@
 and format the code. If you don't want this to happen,
 just use the \ff{nopygments} option.
 
+A pair of vertical lines decorate a TeX command inside the snippet.
+If you want to print a single vertical line, use this:
+\ff{|\char`\\vert|}.
+
 If you want to omit the light gray frames around \ff{\char`\\ff}
 texts, use the package option \ff{noframes}.
 
@@ -126,6 +133,13 @@
 \end{ffcode*}
 \end{multicols}
 
+Using this second argument of the \ff{ffcode*} (with the trailing asterisk),
+you can provide any other options from the \ff{minted} package to the
+snippet.
+
+By the way, the package correctly formats low-height texts, for example, just
+a dot: \ff{.}
+
 More details about this package you can find
 in the \ff{yegor256/ffcode} GitHub repository.
 

Modified: trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty	2021-09-13 20:08:37 UTC (rev 60499)
+++ trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty	2021-09-13 20:08:48 UTC (rev 60500)
@@ -21,53 +21,55 @@
 % SOFTWARE.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ffcode}[2021/09/07 0.3.0 Fixed Font Code]
+\ProvidesPackage{ffcode}[2021/09/13 0.3.2 Fixed Font Code]
 
-\RequirePackage{microtype}
 \RequirePackage{xkeyval}
-\newif\ifnopygments
-\DeclareOptionX{nopygments}{\nopygmentstrue}
-\newif\ifnoframes
-\DeclareOptionX{noframes}{\noframestrue}
-\newif\ifnonumbers
-\DeclareOptionX{nonumbers}{\nonumberstrue}
-\newif\ifnocn
-\DeclareOptionX{nocn}{\nocntrue}
+
+\makeatletter
+\newif\ifffcode at nopygments
+\DeclareOptionX{nopygments}{\ffcode at nopygmentstrue}
+\newif\ifffcode at noframes
+\DeclareOptionX{noframes}{\ffcode at noframestrue}
+\newif\ifffcode at nonumbers
+\DeclareOptionX{nonumbers}{\ffcode at nonumberstrue}
+\newif\ifffcode at nocn
+\DeclareOptionX{nocn}{\ffcode at nocntrue}
 \ProcessOptionsX\relax
+\makeatother
 
-\ifnopygments
+\makeatletter\ifffcode at nopygments
   \RequirePackage[draft=true]{minted}
 \else
   \RequirePackage{minted}
-\fi
+\fi\makeatother
 \setminted{breaklines}
 \usemintedstyle{bw}
-\ifnonumbers
+\makeatletter\ifffcode at nonumbers
   \newminted[ffcode]{text}{framesep=6pt,framerule=1pt,rulecolor=gray,frame=leftline,escapeinside=||,mathescape,highlightcolor=gray!30}
 \else
   \renewcommand{\theFancyVerbLine}{\textcolor{gray}{\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}}
-  \ifnocn
+  \ifffcode at nocn
     \newminted[ffcode]{text}{linenos,numbersep=2pt,framesep=6pt,framerule=1pt,highlightcolor=gray!30,rulecolor=gray,frame=leftline,escapeinside=||,mathescape}
   \else
     \newminted[ffcode]{text}{firstnumber=last,linenos,numbersep=2pt,framesep=6pt,framerule=1pt,highlightcolor=gray!30,rulecolor=gray,frame=leftline,escapeinside=||,mathescape}
   \fi
-\fi
+\fi\makeatother
 
 \makeatletter
-\newcommand\ffprint{\begingroup\obeyspaces\@ffprint}
-\newcommand{\@ffprint}[1]{\texttt{#1}\endgroup}
+\newcommand\ffcode at print{\begingroup\obeyspaces\ffcode at printx}
+\newcommand\ffcode at printx[1]{\texttt{#1}\endgroup}
 \makeatother
 
-\newcommand\ffcoderule{\vrule height 6pt depth 1pt width 0pt}
-\ifnoframes
-  \newcommand{\ff}[1]{\ffcoderule\ffprint{#1}}
+\makeatletter\newcommand\ffcode at rule{\vrule height 6pt depth 1pt width 0pt}
+\makeatletter\ifffcode at noframes
+  \newcommand\ff[1]{\ffcode at rule\ffcode at print{#1}}
 \else
   \RequirePackage{tcolorbox}
-    \newtcbox{\ffcodebox}{nobeforeafter,colframe=gray!80!white,
+    \newtcbox\ffcode at box{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]{\ffcodebox{\ffcoderule\ffprint{#1}}}
-\fi
+  \newcommand\ff[1]{\ffcode at box{\ffcode at rule\ffcode at print{#1}}}
+\fi\makeatother
 
 \endinput



More information about the tex-live-commits mailing list.