diff options
author | Karl Berry <karl@freefriends.org> | 2013-03-20 21:39:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-03-20 21:39:32 +0000 |
commit | 9e911023afe015ce7f305faa22f558745289096a (patch) | |
tree | c680f1ee8b7d0f6a50f6f2366949d7d2ebff1b30 /Master/texmf-dist/doc/latex/numberedblock | |
parent | d8babc4954624c4f019bfc69f90273dbb0ea6c35 (diff) |
numberedblock (20mar13)
git-svn-id: svn://tug.org/texlive/trunk@29447 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/numberedblock')
-rw-r--r-- | Master/texmf-dist/doc/latex/numberedblock/README | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.pdf | bin | 0 -> 35138 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.tex | 64 |
3 files changed, 77 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/numberedblock/README b/Master/texmf-dist/doc/latex/numberedblock/README new file mode 100644 index 00000000000..32533fb5b53 --- /dev/null +++ b/Master/texmf-dist/doc/latex/numberedblock/README @@ -0,0 +1,13 @@ +The style file numberedblock has been created for the report writer's +convenience. + +Do you need to include various small inline blocks of code in your +documents? It can be a pain to refer to them if they are not labeled. +This style package allows you to include and sequentially label +code-block snippets in your document, so that they can be subsequently +refered to in an unambiguous fashion. + +Sorry I don't have a separate documentation file, but it's very simply +documented in the style file itself, and the testnumberedblock example. + + -Steven Segletes diff --git a/Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.pdf b/Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.pdf Binary files differnew file mode 100644 index 00000000000..cdfd2713b3f --- /dev/null +++ b/Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.pdf diff --git a/Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.tex b/Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.tex new file mode 100644 index 00000000000..b12dc3c6725 --- /dev/null +++ b/Master/texmf-dist/doc/latex/numberedblock/testnumberedblock.tex @@ -0,0 +1,64 @@ +\documentclass[10pt]{article} +\usepackage{numberedblock} + +\begin{document} + +\parindent 0.3in +%\setlength\maxblocklabelsize{-.4in} +\setlength\blockindent{0.0in} + +This is a test of the \textsf{numberedblock} style packcage, which is +specially designed to produce sequentially numbered BLOCKS of code (note +the individual code lines are not numbered, but the whole block gets a +single number, for later reference (much in the same way that equations +can get numbered in a document). While specialized for numbering code +blocks, the commands can actually number other items, as well, in fact +anything that fits in a \LaTeX{} box. + +If the code block contains no special characters, one can simply use the +command form, called \verb,\numblock,. It cannot handle verbatim text, +but must use standard \LaTeX{} escape sequences (for line breaks, +contiguous spaces, special characters, etc.). It puts the output in a +tt font , which is the same used in the verbatim environment: + +\numblock{This text is the\\argument to the command\\where double +slashes have been\\used for line breaks} + +Most useful, however, there is also the \verb,numVblock, environment, +which handles verbatim text, as seen in the next example: + +\begin{numVblock} +This is the numVblock +environment, which (<--see contiguous spaces here) +succeeds in +incorporating verbatim text like +@##$%*$%$()||}{?><\\\ +\end{numVblock} + +As envisioned the \verb,numVblock, environment would be ideally suited +for displaying small code blocks as part of documentation. The code can +contain contiguous spaces and special characters: + +\begin{numVblock} + program test + implicit none + integer a, x +c$$$$$$$$$$$$$$$$$$$$$$$$$ + a = 0 + x = 1 + 10 a = a + x + if (a .eq. 100) stop + goto 10 + end +\end{numVblock} + +Below, I test the \verb,\numblock, command with the argument as a +box, rather than as formatted text. + +\numblock{\fbox{Testing, 1,2,3 testing a box}} + +Don't forget, there are settable parameters to define the block +left-indent, the format of the label, and (if needed) the labels' max +width/placement. + +\end{document} |