• No results found

The ntabbing environment

N/A
N/A
Protected

Academic year: 2021

Share "The ntabbing environment"

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The ntabbing environment

Gideon Stupp

stupp@math.tau.ac.il

April 9, 2000

Abstract

The ntabbing environment is an extension of the tabbing environment that supports automatic line numbering. The lines can be referenced using the standard \label and \ref mechanism.

1

Intorduction

Figure 1 shows an ntabbing environment example and its corresponding latex output. Every line inside the ntabbing environment which is labeled is auto-matically numbered. The lines can be referenced from within the environment or from the outside. If a line just needs to be numbered, \label{} can be used. Line numbers can be reset back to one at any point using the \reset command (line numbering continues across ntabbing environments)

2

User Interface

\begin{ntabbing}

\end{ntabbing} The text that needs to be numbered should start with \begin{ntabbing} and end with \end{ntabbing}. The ntabbing environment is an extension of the tabbing environment and all the tabbing commands are supported.

The \label{} command automatically numbers the line with the current \label{}

sequence number. It can appear at any point in a line up to the \\. Like \label{} but the line can be referenced using \ref{xxx}. \label{xxx}

Resets line numbering. Line numbers can be reset several times in the envi-\reset

ronment. Notice that line numbers are not automatically reset at the beginning of every ntabbing block.

The latest version of this file and the associated latex style can be found at

ftp://ftp.math.tau.ac.il/pub/stupp/latex.

(2)

Recursion example (Function $f$, Line~\ref{rec}). \begin{ntabbing}

123\=123\=\kill int $f$(int $i$)\\

\>if ($i<2$) return($i$); \label{}\\

\>return $i$*$f$($i-1$); // recurse\label{rec}\\ \\

\reset

int main()\\\

\>for $i$:=1 to 10\label{}\\ \>\>$s:=s+f(i)$;\label{}\\ \>return(s);\label{}\\ \end{ntabbing}

Recursion example (Function f , Line 2).

int f (int i)

1: if (i < 2) return(i);

2: return i*f (i − 1); // recurse

int main() 1: for i:=1 to 10 2: s := s + f (i); 3: return(s);

Figure 1: Simple ntabbing example.

Referenties

GERELATEERDE DOCUMENTEN

The command \kve@setdefaults will set all the keys in the given family hfami and prefix hprefi with their default values. e., those with a default in the set {true | false}) will

The package is primarily intended for use with the aeb mobile package, for format- ting document for the smartphone, but I’ve since developed other applications of a package that

The new edition adds a starting line of verse not present in the previous one, so we need to make an addition within the margin and textsuperscript the numbering from the

Er zal meer aandacht zijn voor hygiëne, en de gezondheid en het welzijn van medewerkers moet beter worden gewaarborgd. Dit wordt op de korte termijn toegepast (totdat er een

Wanneer de functie detecteert dat de auto op het punt staat om onbedoeld uit zijn rijstrook te stappen, waarschuwt hij de bestuurder door middel van een visuele en

“De SDG’s komen erop neer dat zowel privébezit als gemeenschappelijk bezit van de res publica worden afgeschaft, en de hele wereld – water, zaden, gewassen, lucht, uzelf, kortom;

1 oktober 2021 MyVDL - Handleiding Inloggen en reset paswoord.. Wanneer VDL een account voor jou heeft aangemaakt, ontvang je een e-mail met een link om jouw account

With the findings from the situation analysis, the highway access at Hengelo-Zuid is rebuilt in a traffic simulation model. Fosim is found to be the most suitable simulation