Mercurial > emacs
comparison etc/fr-refcard.tex @ 35789:51e3ab6046a0
Macro changes to avoid overfull boxes.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 31 Jan 2001 17:24:19 +0000 |
parents | c96c07c36f33 |
children | e69aa66ec7cc |
comparison
equal
deleted
inserted
replaced
35788:f100c207f0e8 | 35789:51e3ab6046a0 |
---|---|
4 \newcount\columnsperpage | 4 \newcount\columnsperpage |
5 | 5 |
6 % This file can be printed with 1, 2, or 3 columns per page (see below). | 6 % This file can be printed with 1, 2, or 3 columns per page (see below). |
7 % Specify how many you want here. Nothing else needs to be changed. | 7 % Specify how many you want here. Nothing else needs to be changed. |
8 | 8 |
9 \columnsperpage=2 | 9 \columnsperpage=1 |
10 | 10 |
11 % Copyright (c) 1987, 1993, 1996, 1997 Free Software Foundation, Inc. | 11 % Copyright (c) 1987, 1993, 1996, 1997 Free Software Foundation, Inc. |
12 | 12 |
13 % This file is part of GNU Emacs. | 13 % This file is part of GNU Emacs. |
14 | 14 |
215 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows | 215 \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows |
216 | 216 |
217 % beginexample...endexample - surrounds literal text, such a code example. | 217 % beginexample...endexample - surrounds literal text, such a code example. |
218 % typeset in a typewriter font with line breaks preserved | 218 % typeset in a typewriter font with line breaks preserved |
219 \def\beginexample{\par\leavevmode\begingroup | 219 \def\beginexample{\par\leavevmode\begingroup |
220 \obeylines\obeyspaces\parskip0pt\tt} | 220 \obeylines\obeyspaces\parskip0pt\tt\tolerance=10000} |
221 {\obeyspaces\global\let =\ } | 221 {\obeyspaces\global\let =\ } |
222 \def\endexample{\endgroup} | 222 \def\endexample{\endgroup} |
223 | 223 |
224 % key - definition of a key. | 224 % key - definition of a key. |
225 % \key{description of key}{key-name} | 225 % \key{description of key}{key-name} |
226 % prints the description left-justified, and the key-name in a \kbd | 226 % prints the description left-justified, and the key-name in a \kbd |
227 % form near the right margin. | 227 % form near the right margin. |
228 \def\key#1#2{\leavevmode\hbox to \hsize{\vtop | 228 \def\key#1#2{\leavevmode\hbox to \hsize{\vbox |
229 {\hsize=.75\hsize\rightskip=1em | 229 {\hsize=.75\hsize\rightskip=1em \tolerance=20000 |
230 \hskip\keyindent\relax#1}\kbd{#2}\hfil}} | 230 \raggedright |
231 \hskip\keyindent\hangindent=1em\strut#1\strut}\kbd{\quad#2}\hss}} | |
231 | 232 |
232 \newbox\metaxbox | 233 \newbox\metaxbox |
233 \setbox\metaxbox\hbox{\kbd{M-x }} | 234 \setbox\metaxbox\hbox{\kbd{M-x }} |
234 \newdimen\metaxwidth | 235 \newdimen\metaxwidth |
235 \metaxwidth=\wd\metaxbox | 236 \metaxwidth=\wd\metaxbox |
236 | 237 |
237 % metax - definition of a M-x command. | 238 % metax - definition of a M-x command. |
238 % \metax{description of command}{M-x command-name} | 239 % \metax{description of command}{M-x command-name} |
239 % Tries to justify the beginning of the command name at the same place | 240 % Tries to justify the beginning of the command name at the same place |
240 % as \key starts the key name. (The "M-x " sticks out to the left.) | 241 % as \key starts the key name. (The "M-x " sticks out to the left.) |
241 \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize | 242 \def\metax#1#2{\leavevmode\hbox to \hsize{\vbox |
242 {\hskip\keyindent\relax#1\hfil}% | 243 {\hsize=.74\hsize\rightskip=1em |
243 \hskip -\metaxwidth minus 1fil | 244 \raggedright \tolerance=20000 |
244 \kbd{#2}\hfil}} | 245 \hskip\keyindent\hangindent=1em\strut#1\strut\par}% |
246 %\hskip-\metaxwidth minus 1fil | |
247 \kbd{#2}\hss}} | |
245 | 248 |
246 % threecol - like "key" but with two key names. | 249 % threecol - like "key" but with two key names. |
247 % for example, one for doing the action backward, and one for forward. | 250 % for example, one for doing the action backward, and one for forward. |
248 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad | 251 \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad |
249 &\kbd{#3}\hfil\quad\cr} | 252 &\kbd{#3}\hfil\quad\cr} |