Re: TeX is broken? LaTeX is broken?
- From: "chedva.aleph@xxxxxxxxx" <chedva.aleph@xxxxxxxxx>
- Date: 10 Aug 2006 15:41:23 -0700
The beginning of every line is not known until the paragraph is set
completely. And this would not help when one wants to reference the
current line (footnotes in humanities are often referenced by line
number rather than by footnote markers in order to avoid cluttering
the original text).
I know this. You bring me to tell what new primitives I have in mind.
Here are some of them:
1) \everyline, that put a whatsit at the beginning of every line at the
reference point position.
2) make the following informations available inside a \vadjust: the
depth, height and width of the horizontal line \vadjust is called from
(this solves trivially the problem of margin notes), and the number of
the line \vadjust is called from (this solves the problem of making
footnotes that reference the line number, using \vadjust together with
\everyline that globally increases the counter). So, it suffices to
create the primitives
\adjustlinedepth, \adjustlineheight, \adjustlinewidth and
\adjustlinepos.
3) a \madjust that does the same thing in a display vertical list, with
correlated
\madjustlinedepth, \madjustlineheight, \madjustlinewidth and
\madjustlinepos. This solve the problem of putting margin notes beside
display math formulae.
4) make the total width of a display math formula available after its
end. If it spans on two pages, make the two informations available (say
\firstsplitdspwidth, \scdsplitdspwidth that generally agree excepted if
the display spans on two pages).
5) make a \phantompar primitive that acts exactly as \par, but without
skipping one line after par: this solve problem 7) p. 392 of the
TeXbook.
Note: the same effect can apparently be obtained with the following
(dirty) macro:
\newdimen\lastlinedepth
\newdimen\lastlinewidth
\def\phantompar{%
\ifhmode
\null %in order to include space tokens before \phantompar
\begingroup
\displaywidowpenalty\widowpenalty
$$
\predisplaypenalty \@M \postdisplaypenalty \@M
\lineskiplimit -999\p@
\abovedisplayskip -\tw@\baselineskip
\abovedisplayshortskip -\tw@\baselineskip
\belowdisplayskip \z@ \belowdisplayshortskip \z@
\halign{##\cr\noalign{\global\lastlinedepth \prevdepth}\cr}%
%get depth of line above
\global\lastlinewidth\predisplaysize
%get the width of the last line of the paragraph that just ended
$$\endgroup
\endgraf \nolocalindent
\hskip \dimexpr \lastlinewidth -\tw@\em \ifheb+ \hsize \fi \relax
\vrule \width \z@ \height \z@ \depth \lastlinedepth \relax
\fi
}%
For example, try:
{\raggedright some_long_sentence \phantompar}{\raggedleft
some_long_sentence\par}
6) make a primitive \noholemode=1 | 0 such that if on, TeX will
calculate the width of the line following a display math formula, and
will use \belowdisplayshortskip or \belowdisplayskip according as if is
2em shorter than the display formula or not, as is done for
\predisplaysize.
A bit of skill. Sure. I am afraid that you underestimate the
complexity of the page builder.
TeX already fails in a number of situations quite devastatingly. For
example, it can't split a footnote successfully if the next line of
the main matter after the footnote reference has to be on the same
page (for example, when \widowpenalty=10000). In that case, it will
move footnote and reference to the next page, leaving a big hole.
The insertion arrangement and splitting mechanism is pretty much
outside of TeX's page optimization: once insertions come into play,
TeX's "best fit" algorithm is replaced essentially by "first fit
without waiting for vital information".
The skill of Knuth was not sufficient to get that right. Good luck
with adding your bit.
Perhaps a group of Texnicians could do better than Knuth?
.
- Follow-Ups:
- Re: TeX is broken? LaTeX is broken?
- From: David Kastrup
- Re: TeX is broken? LaTeX is broken?
- References:
- Re: TeX is broken? LaTeX is broken?
- From: chedva.aleph@xxxxxxxxx
- Re: TeX is broken? LaTeX is broken?
- From: David Kastrup
- Re: TeX is broken? LaTeX is broken?
- From: chedva.aleph@xxxxxxxxx
- Re: TeX is broken? LaTeX is broken?
- From: Morten Høgholm
- Re: TeX is broken? LaTeX is broken?
- From: chedva.aleph@xxxxxxxxx
- Re: TeX is broken? LaTeX is broken?
- From: Jonathan Fine
- Re: TeX is broken? LaTeX is broken?
- From: Heiko Oberdiek
- Re: TeX is broken? LaTeX is broken?
- From: Jonathan Fine
- Re: TeX is broken? LaTeX is broken?
- From: Heiko Oberdiek
- Re: TeX is broken? LaTeX is broken?
- From: Heiko Oberdiek
- Re: TeX is broken? LaTeX is broken?
- From: Jonathan Fine
- Re: TeX is broken? LaTeX is broken?
- From: Heiko Oberdiek
- Re: TeX is broken? LaTeX is broken?
- From: Jonathan Fine
- Re: TeX is broken? LaTeX is broken?
- From: chedva.aleph@xxxxxxxxx
- Re: TeX is broken? LaTeX is broken?
- From: David Kastrup
- Re: TeX is broken? LaTeX is broken?
- From: chedva.aleph@xxxxxxxxx
- Re: TeX is broken? LaTeX is broken?
- From: David Kastrup
- Re: TeX is broken? LaTeX is broken?
- Prev by Date: Re: Suppressing the \cite command for the list of figures
- Next by Date: Re: TeX is broken? LaTeX is broken?
- Previous by thread: Re: TeX is broken? LaTeX is broken?
- Next by thread: Re: TeX is broken? LaTeX is broken?
- Index(es):
Relevant Pages
|
Loading