Marc van Dongen gave a great answer. I'll throw in another reason:
\it
and \bf
do not play well together. That is, they do not nest as one would intuitively expect:
Whereas \textit
and \textbf
do play well together:
This is nice. However, you may notice that it still fails to handle nested style adjustments to small caps, since the Computer Modern fonts do not contain slanted or bold small caps:
If this is a problem for you, then use the slantsc
package in combination with the lmodern
package. slantsc
provides, among other things, \rmfamily
(roman), \ttfamily
(typewriter/teletype), \sffamily
(sans-serif), \bfseries
(boldface), \itshape
(italics), \slshape
(slant/oblique), and \scshape
(small caps). With these, small caps can obtained in slanted form:
As a bonus, slantsc
fixes \textsl
to behave properly with \textsc
, so you can continue using those if you like.
Alas, I haven't yet found a package which fixes the behavior of nested instances of \textit
. In typesetting, when you nest italics, you're supposed to come back out of italics to roman. For example, the word "Titanic" below is in nested italics (which should ideally render as roman, not italics):
Tanaka, Shelly. On Board the Titanic: What It Was Like When the Great Liner
Sank. New York, NY: Hyperion/Madison Press, 1998.
As a workaround, one can usually write \textrm
to temporarily return to non-italics in those cases, but of course this is only valid if you know the exact number of nested italic levels, which may not always be the case, especially inside a macro.
Update:
As others have pointed out, \textit
and \textsl
do automatic italic correction, whereas \it
, \itshape
, \sl
, and \slshape
do not. Thus, you can write \textit{stuff}
, but you must write {\it stuff\/}
or {\itshape stuff\/}
to get the same effect.
I tested with moderncv.cls 2012/03/26 v1.0
, and \newline
works and generates a line break in every argument. This can be easily tested with template.tex
which is distributed with the moderncv
documentation - just a crazy test of line breaks:
\section{Education}
\cventry{2010\newline -- 2012}{Master of Science\newline (honoris causa)}
{University of TeXas\newline TeX committee}
{Austin\newline (``Keep Austin Weird'')}
{Supported by\newline the local TUG}
{Awarded for writing\newline the thesis in \LaTeX}
Indeed \\
doesn't work, but \newline
does. And, in such and similar cases, you could use \parbox
. Within that, even \\
works.
The first argument is an exception: within that, \\
works and gives properly right aligned lines, in contrast to \newline
:
\cventry{2010\\ -- 2012}...
Best Answer
Well, adding your shown code into the file
example.tex
of current classmoderncv
(version 2.0.0) I have no problem seeing the italic words with your mentioned stylebanking
(in an comment) ...Because you gave us no other informations I can only guess you are using an older version of class
moderncv
or an outdated TeX distribution with an included outdatedmoderncv
.Please copy the following MWE to your computer and compile it three times. Then check your log file, at the end you should find an list of used class, packages and version numbers! This list is the result of the command
\listfiles
I added into the MWE.Please add this list to your question, if it differs to mine list later ...
MWE:
giving the result:
with the following list of used packages and version numbers:
BTW: I'm using an current MiKTeX 2.9 ...