diff options
author | Norbert Preining <norbert@preining.info> | 2021-09-08 03:03:50 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-09-08 03:03:50 +0000 |
commit | f8d688cceb9bee2119c4cf3422a85bd60c0e846c (patch) | |
tree | 834572e8c0ae9477ded5eb90f59e7379e5171774 /macros/latex/contrib/ffcode/ffcode.tex | |
parent | a7ef56f18421a8ffb9d34c16ff9f017e45e4e6d3 (diff) |
CTAN sync 202109080303
Diffstat (limited to 'macros/latex/contrib/ffcode/ffcode.tex')
-rw-r--r-- | macros/latex/contrib/ffcode/ffcode.tex | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/macros/latex/contrib/ffcode/ffcode.tex b/macros/latex/contrib/ffcode/ffcode.tex index e14a39517f..c1fbc40483 100644 --- a/macros/latex/contrib/ffcode/ffcode.tex +++ b/macros/latex/contrib/ffcode/ffcode.tex @@ -25,9 +25,10 @@ \usepackage{amsmath} \usepackage{multicol} \usepackage{ffcode} +\usepackage{xcolor} \title{\ff{ffcode}: \LaTeX{} Package \\ for Fixed-Font Code Blocks} \author{Yegor Bugayenko} -\date{0.2.0 2021/06/13} +\date{0.3.0 2021/09/07} \begin{document} \pagenumbering{gobble} \raggedbottom @@ -88,6 +89,43 @@ texts, use the package option \ff{noframes}. To omit the line numbers, use the \ff{nonumbers} option of the package. +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 \ff{nocn} +(stands for ``no continuous numbering'') +option of the package. + +You can highlight some lines in your \ff{ffcode} environment, +or can use any other additional configuration parameters from +the \ff{minted} package: + +\begin{multicols}{2} +\setlength{\parskip}{0pt} +\scriptsize +\raggedcolumns +\begin{verbatim} +\begin{ffcode*}{highlightlines={1,4-5}} +while (true) { + print("Hello!") + print("Enter your name:") + scan(x) + print("You name is " + x) +} +\end{ffcode*} +\end{verbatim} + +\columnbreak + +\begin{ffcode*}{highlightlines={7,10-11}} +while (true) { + print("Hello!") + print("Enter your name:") + scan(x) + print("You name is " + x) +} +\end{ffcode*} +\end{multicols} + More details about this package you can find in the \ff{yegor256/ffcode} GitHub repository. |