Hi,
Newbie user here. I have a question about the following line on page 202 (§C.10.1: “The _tabbing_ Environment”) of Leslie B. Lamport’s _LaTeX: A Document Preparation System_, second edition:
“\\ Starts a new line and sets the value of next_tab_stop equal to the value of left_margin_tab.”
This seems to contradict the sentence on the previous page, “Initially, the value of next_tab_stop is 1, the value of left_margin_tab is 0”; shouldn’t the value of next_tab_stop be set equal to 1 after \\ rather than to the value of left_margin_tab (initially 0)?
Also, is there a WWW page with second-edition book errata, analogous to that for the second edition of _The C Programming Language_ maintained by Brian W. Kernighan and to the gazillions of errata pages maintained by Donald E. Knuth for his books on TeX, METAFONT, _etc._?
’preciate it
General ⇒ _LaTeX: A Document Preparation System_, 2/e
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
_LaTeX: A Document Preparation System_, 2/e
Welcome to the forum!
Does this help? http://tug.org/texinfohtml/latex2e.html#tabbing
The first thing sounds right, the other sentence is unclear here. (What is meant with the value 1? With which unit?) Perhaps provide the full context. But I guess the tabbing reference link above may help if it's about tabbing and not about book phrasing.
Stefan
Does this help? http://tug.org/texinfohtml/latex2e.html#tabbing
The first thing sounds right, the other sentence is unclear here. (What is meant with the value 1? With which unit?) Perhaps provide the full context. But I guess the tabbing reference link above may help if it's about tabbing and not about book phrasing.
Stefan
LaTeX.org admin
_LaTeX: A Document Preparation System_, 2/e
Thanks for the link! I was not aware of that resource.
However, that link doesn’t really address my question (unless I’m missing something).
Sorry for not providing enough context and/or not being clearer.
The original sentence on page 202 (in §C.10.1: “The _tabbing_ Environment”) in Lamport’s LaTeX: A Document Preparation System, second edition, reads:
“\\ Starts a new line and sets the value of next_tab_stop equal to the value of left_margin_tab.”
My question is, why would \\ when starting a new line set the value of next_tab_stop equal to the value of left_margin_tab; shouldn’t it instead set the value of next_tab_stop equal to the value of left_margin_tab + 1 instead?
However, that link doesn’t really address my question (unless I’m missing something).
Sorry for not providing enough context and/or not being clearer.
The original sentence on page 202 (in §C.10.1: “The _tabbing_ Environment”) in Lamport’s LaTeX: A Document Preparation System, second edition, reads:
“\\ Starts a new line and sets the value of next_tab_stop equal to the value of left_margin_tab.”
My question is, why would \\ when starting a new line set the value of next_tab_stop equal to the value of left_margin_tab; shouldn’t it instead set the value of next_tab_stop equal to the value of left_margin_tab + 1 instead?
_LaTeX: A Document Preparation System_, 2/e
Sorry if I didn’t provide enough context; I was originally reluctant to quote more due to copyright. Additional context (I hope this doesn’t violate any copyright laws):
Page 201 in Leslie B. Lamport’s LaTeX: A Document Preparation System, second edition, under §C.10.1: “The tabbing Environment”:
“The behavior of the tabbing commands is described in terms of the values of two quantities called next_tab_stop and left_margin_tab. Initially, the value of next_tab_stop is 1, the value of left_margin_tab is 0”…
“The value of next_tab_stop is incremented by the \> and \= commands, and it is reset to the value of left_margin_tab by the \\ and \kill commands.”
[Page 202:]
“The following commands, all of which are fragile, may appear in rows”:
“\\ Starts a new line and sets the value of next_tab_stop equal to the value of left_margin_tab.”
“\kill Throws away the current line, keeping the effects of any tab-stop-setting commands, starts a new line, and sets the value of next_tab_stop to the value of left_margin_tab.”
My question is, shouldn’t \\ and \kill, after starting a new line, instead set the value of next_tab_stop to the value of left_margin_tab + 1 rather than to the value of just left_margin_tab?
Page 201 in Leslie B. Lamport’s LaTeX: A Document Preparation System, second edition, under §C.10.1: “The tabbing Environment”:
“The behavior of the tabbing commands is described in terms of the values of two quantities called next_tab_stop and left_margin_tab. Initially, the value of next_tab_stop is 1, the value of left_margin_tab is 0”…
“The value of next_tab_stop is incremented by the \> and \= commands, and it is reset to the value of left_margin_tab by the \\ and \kill commands.”
[Page 202:]
“The following commands, all of which are fragile, may appear in rows”:
“\\ Starts a new line and sets the value of next_tab_stop equal to the value of left_margin_tab.”
“\kill Throws away the current line, keeping the effects of any tab-stop-setting commands, starts a new line, and sets the value of next_tab_stop to the value of left_margin_tab.”
My question is, shouldn’t \\ and \kill, after starting a new line, instead set the value of next_tab_stop to the value of left_margin_tab + 1 rather than to the value of just left_margin_tab?
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
_LaTeX: A Document Preparation System_, 2/e
Indeed, that sounds contradictory and wrong. With that explanation, next_tab_stop should indeed be left_margin_tab + 1 as you said. What makes the book explanation wrong it that regard.
In my opinion that next_tab_stop explanation is not good, as there may be zero tabstops anyway. The better explanation would be using current_tab_stop that starts with 0 and that's reset to left_margin_tab by \\ and \kill.
And that's what's actually used in the source. In source2e.pdf, File Klttab.dtx, 1.1 tabbing:
Stefan
In my opinion that next_tab_stop explanation is not good, as there may be zero tabstops anyway. The better explanation would be using current_tab_stop that starts with 0 and that's reset to left_margin_tab by \\ and \kill.
And that's what's actually used in the source. In source2e.pdf, File Klttab.dtx, 1.1 tabbing:
Code: Select all
% !TEX none
\\== BEGIN \@stopline \@startline END
\@startline==
\@curtabmar :=G \@nxttabmar
\@curtab :=G\ @curtabmar
...
\@nxttabmar = tab stop number of next line’s left margin
\@curtabmar = tab stop number of current line’s left margin
\@curtab = number of the current tab. At start of line, it equals \@curtabmar
LaTeX.org admin