texlive[64868] Master/texmf-dist: ffcode (30oct22)
commits+karl at tug.org
commits+karl at tug.org
Sun Oct 30 21:43:21 CET 2022
Revision: 64868
http://tug.org/svn/texlive?view=revision&revision=64868
Author: karl
Date: 2022-10-30 21:43:21 +0100 (Sun, 30 Oct 2022)
Log Message:
-----------
ffcode (30oct22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt
trunk/Master/texmf-dist/doc/latex/ffcode/README.md
trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx
trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins
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 2022-10-30 20:43:08 UTC (rev 64867)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt 2022-10-30 20:43:21 UTC (rev 64868)
@@ -1,5 +1,3 @@
hard xkeyval
hard minted
hard tcolorbox
-hard pgf
-hard environ
Modified: trunk/Master/texmf-dist/doc/latex/ffcode/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ffcode/README.md 2022-10-30 20:43:08 UTC (rev 64867)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/README.md 2022-10-30 20:43:21 UTC (rev 64868)
@@ -23,11 +23,10 @@
\end{document}
```
-The full example and all commands are available in the
-[`ffcode.tex`](https://github.com/yegor256/ffcode/blob/master/ffcode.tex) file.
+Otherwise, you can download [`ffcode.sty`](https://raw.githubusercontent.com/yegor256/ffcode/gh-pages/ffcode/ffcode.sty) and add to your project.
-If you want to contribute yourself, make a fork, then create a branch,
-then run `make` in the root directory.
+If you want to contribute yourself, make a fork, then create a branch,
+then run `l3build ctan` in the root directory.
It should compile everything without errors. If not, submit an issue and wait.
-Otherwise, make your changes and then run `make` again. If the build is
+Otherwise, make your changes and then run `l3build ctan` again. If the build is
still clean, submit a pull request.
Modified: trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx 2022-10-30 20:43:08 UTC (rev 64867)
+++ trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx 2022-10-30 20:43:21 UTC (rev 64868)
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{ffcode}
%<*package>
-[03.10.2022 0.5.0 Fixed Font Code]
+[2022-10-30 0.5.1 Fixed Font Code]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -57,11 +57,13 @@
\usepackage[T1]{fontenc}
\usepackage[tt=false,type1=true]{libertine}
\usepackage{microtype}
+\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
\usepackage{href-ul}
\usepackage{ffcode}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{xcolor}
+\usepackage[dtx,runs=2]{docshots}
\PageIndex
\EnableCrossrefs
\CodelineIndex
@@ -86,86 +88,51 @@
% and make sure it looks nice. Install it from CTAN and then
% use like this (pay attention to |\ff| command
% and |ffcode| environment):
-% \begin{multicols}{2}
-% \setlength{\parskip}{0pt}
-% \raggedcolumns
-%\iffalse
-%<*verb>
-%\fi
-\begin{verbatim}
-\documentclass{article}
-\usepackage{ffcode}
-\begin{document}
-The function \ff{fibo()}
-is recursive:
-\begin{ffcode}
-int fibo(int n) {
- if (n < 2) {
- return n; |$\label{ln:ret}$|
- }
- return fibo(n-1)+fibo(n-2);
-}
-\end{ffcode}
-The line no.~\ref{ln:ret}
-terminates it.
-\end{document}
-\end{verbatim}
-%\iffalse
-%</verb>
-%\fi
-%
-% \columnbreak
-%
-% The function \ff{fibo()} is recursive:
-%
-%\iffalse
-%<*verb>
-%\fi
-\begin{ffcode}
-int fibo(int n) {
- if (n < 2) {
- return n; |$\label{ln:ret}$|
- }
- return fibo(n-1)+fibo(n-2);
-}
-\end{ffcode}
-%\iffalse
-%</verb>
-%\fi
-%
-% The line no.~\ref{ln:ret} terminates it.
-% \end{multicols}
+% \begin{docshot}
+% \documentclass{article}
+% \usepackage{ffcode}
+% \pagestyle{empty}
+% \begin{document}
+% The function \ff{fibo()}
+% is recursive:
+% \begin{ffcode}
+% int fibo(int n) {
+% if (n < 2) {
+% return n; |$\label{ln:ret}$|
+% }
+% return fibo(n-1)+fibo(n-2);
+% }
+% \end{ffcode}
+% The line no.~\ref{ln:ret}
+% terminates it.
+% \end{document}
+% \end{docshot}
% \section{Package Options}
-% \begin{macro}{nopygments}
+% \DescribeMacro{nopygments}
% You have to run |pdflatex| with |--shell-escape| flag
% in order to let |minted| (the package we use) to run Pygments
% and format the code. If you don't want this to happen,
% just use |nopygments| option.
-% \end{macro}
-% \begin{macro}{noframes}
+% \DescribeMacro{noframes}
% If you want to omit the light gray frames around |\ff|
% texts, use the package option |noframes|.
-% \end{macro}
-% \begin{macro}{nobars}
+% \DescribeMacro{nobars}
% To omit the vertical gray bar at the left side of each snippet,
% use |nobars| option of the package.
-% \end{macro}
-% \begin{macro}{nonumbers}
+% \DescribeMacro{nonumbers}
% To omit the line numbers, use |nonumbers| option of the package.
-% \end{macro}
-% \begin{macro}{nocn}
+% \DescribeMacro{nocn}
% By default, the numbering is continuous: line numbers start at the
% first snippet and increment until the end of the document. If you
% want them to start from one at each snippet, use |nocn|
% (stands for ``no continuous numbering'')
% option of the package.
-% \end{macro}
% \section{Typesetting}
@@ -178,37 +145,17 @@
% The command |\ff| behaves differently in math mode --- it doesn't
% add gray frames:
-% \begin{multicols}{2}
-% \setlength{\parskip}{0pt}
-% \raggedcolumns
-%\iffalse
-%<*verb>
-%\fi
-\begin{verbatim}
-\documentclass{article}
-\usepackage{ffcode}
-\begin{document}
-\begin{equation}
-x = \int_\ff{home}^N f(x).
-\end{equation}
-\end{document}
-\end{verbatim}
-%\iffalse
-%</verb>
-%\fi
-%
-% \columnbreak
-%
-%\iffalse
-%<*verb>
-%\fi
-% \begin{equation}
+% \begin{docshot}
+% \documentclass{article}
+% \usepackage{ffcode}
+% \usepackage{mathtools}
+% \pagestyle{empty}
+% \begin{document}
+% \begin{equation*}
% x = \int_\ff{home}^N f(x).
-% \end{equation}
-%\iffalse
-%</verb>
-%\fi
-% \end{multicols}
+% \end{equation*}
+% \end{document}
+% \end{docshot}
% \section{Line Highlighting}
@@ -215,50 +162,24 @@
% You can highlight some lines in your |ffcode| environment,
% or can use any other additional configuration parameters from
% |minted| package:
+% \begin{docshot}
+% \documentclass{article}
+% \usepackage[paperwidth=3in]{geometry}
+% \usepackage{ffcode}
+% \pagestyle{empty}
+% \begin{document}
+% \begin{ffcode*}
+% {highlightlines={1,4-5}}
+% while (true) {
+% print("Hello!")
+% print("Enter your name:")
+% scan(x)
+% print("You name is " + x)
+% }
+% \end{ffcode*}
+% \end{document}
+% \end{docshot}
-% \begin{multicols}{2}
-% \setlength{\parskip}{0pt}
-% \raggedcolumns
-%\iffalse
-%<*verb>
-%\fi
-\begin{verbatim}
-\documentclass{article}
-\usepackage{ffcode}
-\begin{document}
-\begin{ffcode*}
- {highlightlines={1,4-5}}
-while (true) {
- print("Hello!")
- print("Enter your name:")
- scan(x)
- print("You name is " + x)
-}
-\end{ffcode*}
-\end{document}
-\end{verbatim}
-%\iffalse
-%</verb>
-%\fi
-%
-% \columnbreak
-%
-%\iffalse
-%<*verb>
-%\fi
-\begin{ffcode*}{highlightlines={7,10-11}}
-while (true) {
- print("Hello!")
- print("Enter your name:")
- scan(x)
- print("You name is " + x)
-}
-\end{ffcode*}
-%\iffalse
-%</verb>
-%\fi
-% \end{multicols}
-
% Using this second argument of |ffcode*| (with the trailing asterisk),
% you can provide any other options from |minted| package to the
% snippet.
@@ -266,9 +187,8 @@
% \StopEventually{}
% \section{Implementation}
+% \changes{v0.1.0}{2021/06/10}{Initial version}
-% \changes{v0.2.0}{2021/07/10}{Initial version}
-
% First, we parse package options:
% \begin{macrocode}
\RequirePackage{xkeyval}
@@ -276,10 +196,14 @@
\DeclareOptionX{nopygments}{\PassOptionsToPackage{draft=true}{minted}}
\newif\ifff at noframes
\DeclareOptionX{noframes}{\ff at noframestrue}
+% \changes{v0.4.0}{2022/01/09}{Package option "nobars" added.}
\newif\ifff at nobars
\DeclareOptionX{nobars}{\ff at nobarstrue}
+% \changes{v0.2.0}{2021/06/13}{Package options "nonumbers"
+% and "noframes" added.}
\newif\ifff at nonumbers
\DeclareOptionX{nonumbers}{\ff at nonumberstrue}
+% \changes{v0.3.0}{2021/09/07}{Package option "nocn" added.}
\newif\ifff at nocn
\DeclareOptionX{nocn}{\ff at nocntrue}
\ProcessOptionsX\relax
@@ -306,7 +230,7 @@
framerule=1pt,rulecolor=gray,frame=leftline}
\fi
\else
- \renewcommand{\theFancyVerbLine}{\textcolor{gray}
+ \renewcommand{\theFancyVerbLine}{\textcolor{gray}%
{\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}}
\ifff at nocn
\ifff at nobars
@@ -337,10 +261,11 @@
% \begin{macro}{\ff at print}
% Then, we define supplementary commands |\ff at print| and |\ff at printx|:
+% \changes{v0.5.1}{2022/10/30}{Now, the command "ff" ignores italic and bold and always prints "texttt" as it should be.}
% \begin{macrocode}
\makeatletter
\newcommand\ff at print{\begingroup\obeyspaces\ff at printx}
-\newcommand\ff at printx[1]{\texttt{#1}\endgroup}
+\newcommand\ff at printx[1]{\textnormal{\texttt{#1}}\endgroup}
\makeatother
% \end{macrocode}
% \end{macro}
@@ -368,7 +293,7 @@
\newcommand\ff[1]{\relax\ifmmode%
{\ff at rule\ff at print{#1}}%
\else%
- {\ff at box{\ff at rule\ff at print{#1}}}
+ {\ff at box{\ff at rule\ff at print{#1}}}%
\fi}
\fi\makeatother
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins 2022-10-30 20:43:08 UTC (rev 64867)
+++ trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins 2022-10-30 20:43:21 UTC (rev 64868)
@@ -48,8 +48,8 @@
\endpreamble
\generate{\file{ffcode.sty}{\from{ffcode.dtx}{package}}}
\obeyspaces
-\Msg{*** To finish the installation you have to move the ".sty"}
-\Msg{*** file into a directory searched by TeX. To produce the}
-\Msg{*** documentation run the file ".dtx" through LaTeX. If any}
-\Msg{*** questions, submit a new GitHub issue.}
+\Msg{To finish the installation you have to move the ".sty"}
+\Msg{file into a directory searched by TeX. To produce the}
+\Msg{documentation run the file ".dtx" through LaTeX. If any}
+\Msg{questions, submit a new GitHub issue.}
\endbatchfile
Modified: trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty 2022-10-30 20:43:08 UTC (rev 64867)
+++ trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty 2022-10-30 20:43:21 UTC (rev 64868)
@@ -31,7 +31,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ffcode}
-[03.10.2022 0.5.0 Fixed Font Code]
+[2022-10-30 0.5.1 Fixed Font Code]
@@ -49,8 +49,6 @@
-
-
\RequirePackage{xkeyval}
\makeatletter
\DeclareOptionX{nopygments}{\PassOptionsToPackage{draft=true}{minted}}
@@ -79,7 +77,7 @@
framerule=1pt,rulecolor=gray,frame=leftline}
\fi
\else
- \renewcommand{\theFancyVerbLine}{\textcolor{gray}
+ \renewcommand{\theFancyVerbLine}{\textcolor{gray}%
{\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}}
\ifff at nocn
\ifff at nobars
@@ -108,7 +106,7 @@
\makeatletter
\newcommand\ff at print{\begingroup\obeyspaces\ff at printx}
-\newcommand\ff at printx[1]{\texttt{#1}\endgroup}
+\newcommand\ff at printx[1]{\textnormal{\texttt{#1}}\endgroup}
\makeatother
\makeatletter\newcommand\ff at rule
@@ -126,7 +124,7 @@
\newcommand\ff[1]{\relax\ifmmode%
{\ff at rule\ff at print{#1}}%
\else%
- {\ff at box{\ff at rule\ff at print{#1}}}
+ {\ff at box{\ff at rule\ff at print{#1}}}%
\fi}
\fi\makeatother
More information about the tex-live-commits
mailing list.