[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Font size
From: |
Denis Bitouzé |
Subject: |
[AUCTeX] Font size |
Date: |
Wed, 26 Jan 2011 08:24:17 +0100 |
Hello,
in LaTeX, font size may be (locally) changed by the way of either
commands (with group):
{\tiny Foo bar.}
or environments:
\begin{tiny}Foo bar.\end{tiny}
Currently, AucTeX has no facility for this purpose (except
auto-completion for commands but without braces for grouping): one
could expect to proceed as with word processors: select the text whom
font size has to be changed and apply change with a menu or a keystroke.
Of course, with AucTeX, one could select the text and, by typing C-c C-e
and the name of environment (currently without auto-completion), obtain:
\begin{tiny}
Foo bar.
\end{tiny}
But it must be noticed that these kind of environments are not exactly
equivalent to their (grouped) commutator counterparts, e.g.
{\tiny Foo bar.}
as pointed out with the following MCE:
\documentclass{article}
\begin{document}
Foo bar. {\tiny Foo bar.} Foo bar.
Foo bar.
\begin{tiny}Foo bar.\end{tiny}
Foo bar.
Foo bar.
\begin{tiny}
Foo bar.
\end{tiny}
Foo bar.
\end{document}
The last one, obtained by regular proceeding with AucTeX (as explained
earlier) is wrong: it leads to spurious spaces.
So, it could be nice that AucTeX provide facilities for font size
changes:
1. for semi-global changes (just commutators), just as that's
currently the case: with commands auto-completion (though the braces
{} at the end of \tiny, \scriptsize, \footnotesize, \small, \large,
\Large, \LARGE, \huge, \Huge should be avoided),
2. for local changes, by applying either:
{\<command> <selected text>}
or:
\begin{<environment>}<selected text>\end{<environment>}
without line breaks inside the <environment>, but maybe just
before and just after it (dedicated lines) in order to make the
font size changes easy to locate.
In both cases auto-completion and (for beginners) menus would be
essential.
Another thing that should be noticed is that, if the font size of an
entire paragraph has to be changed, the baseline skip is usually
expected to be adapted, and this requires a "\par" command at the end
of the paragraph (by the way of either commutators or environments), as
it may be seen in the following minimal example:
\documentclass{article}
%
\newcommand{\EntireParagraph}{%
Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar.
Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar.
Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar.
Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar.
Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar.
Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar. Foo bar.
}
%
\begin{document}
\EntireParagraph{}
Foo.
{\tiny \EntireParagraph{}}
Foo.
\begin{tiny}\EntireParagraph{}\end{tiny}
Foo.
{\tiny \EntireParagraph{}\par}
Foo.
\begin{tiny}\EntireParagraph{}\par\end{tiny}
Foo.
\end{document}
Would it be possible to detect, when the user asks for font
size changes of a selected region if it is (an) entire paragraph(s) and
add a "\par" command?
Cheers.
--
Denis
- [AUCTeX] Font size,
Denis Bitouzé <=
- Re: [AUCTeX] Font size, Ralf Angeli, 2011/01/30
- Re: [AUCTeX] Font size, Uwe Siart, 2011/01/30
- Re: [AUCTeX] Font size, Denis Bitouzé, 2011/01/30
- Re: [AUCTeX] Font size, Uwe Siart, 2011/01/31
- Re: [AUCTeX] Font size, Denis Bitouzé, 2011/01/31
- Re: [AUCTeX] Font size, Uwe Siart, 2011/01/31
- Re: [AUCTeX] Font size, Denis Bitouzé, 2011/01/31
- Re: [AUCTeX] Font size, Uwe Siart, 2011/01/31
Re: [AUCTeX] Font size, Denis Bitouzé, 2011/01/30