#130 Characters' size changes

open
nobody
None
5
2012-10-17
2010-12-26
Denis Bitouzé
No

Hello,

in Texmaker, and also in TmX, characters' size is changed by the way
of environments, e.g.

\begin{tiny}
Foo bar.
\end{tiny}

It must be noticed that these environments may not be exactly equivalent to their
commutator counterparts, e.g.

{\tiny Foo bar.}

Let us examine how it works with the following initial text:

Foo bar. Foo bar. Foo bar.

where we want to make the second "Foo bar." tiny. After selecting it,
we for instance click on "tiny" in the drop-down list and hence obtain:

Foo bar. \begin{tiny}
Foo bar.
\end{tiny} Foo bar.

which is not very clean and, as it may be noticed in the following minimal example,
not equivalent to what could be expected (the first two are wrong):

\documentclass{article}
\begin{document}
Foo bar. \begin{tiny}
Foo bar.
\end{tiny} Foo bar.

Foo bar. \begin{tiny} Foo bar. \end{tiny} Foo bar.

Foo bar. \begin{tiny}Foo bar.\end{tiny} Foo bar.

Foo bar. {\tiny Foo bar.} Foo bar.

Foo bar.
\begin{tiny}Foo bar.\end{tiny}
Foo bar.

Foo bar.
{\tiny Foo bar.}
Foo bar.
\end{document}

This file also shows that the trouble (spurious spaces) comes from
spaces or line breaks just after "\begin{...}" or before "\end{...}".

So, IMHO, changes of characters' size should be done either by the way
of commutators (with braces as delimiters) or by the way of
environments but without line breaks in them. It could be more readable
if they would be done on dedicated lines, as in the last two examples.

Another thing that should be noticed is that, if the characters' 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 ask for a characters' size
change of a selected region if it is (an) entire paragraph(s) and add
a "\par" command?

Cheers.

Discussion