[texhax] TeX vs LaTeX primitives

Victor Ivrii vivrii at gmail.com
Mon Dec 30 12:24:20 CET 2013


On Mon, Dec 30, 2013 at 5:35 AM, Ulrike Fischer <news3 at nililand.de> wrote:

> Am Mon, 30 Dec 2013 03:48:34 -0500 schrieb Victor Ivrii:
>
> >> If you are using TeX primitives instead of LaTeX macros you certainly
> >> lose parts of LaTeX's functionality.
>
> > Reinhard's response raises in me 2 questions
>
> > 1) In particular: I use very seldom hbox to avoid breakage of lines in
> > multiline environment (f.e. in the title of the chapter) or  for some
> other
> > exotic reasons (example below) when everything else I tried failed. What
> > one can do instead?
>
> \mbox or \makebox. The second has an optional argument to set the
> width and another to set the alignment:  \makebox[0pt][l]{...}
>
> For math there is also \mathllap, \mathmakebox etc from the
> mathtools package.
>

Thanks, Ulrike! I weeded out all hboxes and it worked like a charm and now
I feel much better (not eating a beefsteak  at vegans convention) and safer
(for LaTeX3 coming).

>
> > 2) How in general distinguish truly LaTeX macros?
>
> By looking in the code or the documentation.
>

I hoped that there could be a kind of script like LaTeX validator. If
someone uses 4 \\over 3 f.e. LaTeX complains:

Package amsmath Warning: Foreign command \over;
(amsmath)                \frac or \genfrac should be used instead
(amsmath)                 on input line ***


but never for \hbox usage (overfull is a different matter)


>
>
> --
> Ulrike Fischer
> http://www.troubleshooting-tex.de/
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>



-- 

Victor Ivrii
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20131230/1835c7d4/attachment.html>


More information about the texhax mailing list