Re: redefining @example to @smallexample
Stepan Kasal <[email protected]> Tue, 16 Dec 2003 09:45:08 +0100
| Newsgroups | gmane.comp.tex.texinfo.pretest |
|---|---|
| Message-ID | <[email protected]> |
Hi, I think it was Akim who told me that he is unhappy that so much texinfo development is done in private discussions, not in the lists. So I'll forward the mail I wrote a few seconds ago to this list. Hello Karl and Aharon, On Mon, Dec 15, 2003 at 11:58:12AM -0500, Karl Berry wrote: > Maybe I will define an @set thing to make all examples into small > examples, [...] a patch is attached to this mail. It is a quick proposal, not tested at all. Do you like it? Stepan _______________________________________________ Texinfo home page: http://www.gnu.org/software/texinfo/ [email protected] http://ff0.org/mailman/listinfo/texinfo-pretest
texinfo-20031216-small.patch
(text/plain, 2.1 KB)
2003-12-16 Stepan Kasal <[email protected]> * doc/texinfo.tex (\makedispenv): Determine the size of the fonts according to the value of SETdispenvsize, using ... (\setnormaldispenv, \setsmalldispenv, \SETdispenvsize, \smallword): (\nosmallword): ... these new macros. (\flushleft): No longer defined via \makedispenv. --- texinfo.tex.a0 2003-12-16 09:06:28.000000000 +0100 +++ texinfo.tex 2003-12-16 09:27:59.000000000 +0100 @@ -4730,17 +4730,36 @@ \let\exdent=\nofillexdent } +% If you want all examples etc. small, ``@set dispenvsize small''. +% If you want even ``small'' examples the full size, set it to ``nosmall''. +% This affects the following ``displayed environments'': +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \smallexamplefonts \rm + \fi +} + % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #1#2{ - \expandafter\envdef\csname#1\endcsname{#2} - \expandafter\envdef\csname small#1\endcsname - {\smallexamplefonts \rm #2} + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } -% And there are often two synonyms: +% Define two synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} @@ -4766,13 +4785,20 @@ } % @format/@smallformat: same as @display except don't narrow margins. -% @flushleft (same as @format). (Note: @smallflushleft not documeted.) % -\maketwodispenvs {format}{flushleft}{% +\makedispenv{format}{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} + +% @flushlefti: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } +\let\Eflushleft = \afterenvbreak % @flushright. %