Text FormattingEmphasis in title

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
p7389
Posts: 2
Joined: Tue Feb 17, 2009 2:11 pm

Emphasis in title

Post by p7389 »

Hi,

I want to use the \emph{...} command to italicize part of my title, as contained in \title{...}... But I get no effect at all from this. I have searched Google and this forum for some solution to this frankly mystifying problem, but to no avail.

Actually, I now realize what the problem is: I use the scrartcl document class currently, and I get a "some font shapes were not available" warning when emphasising stuff in the title. Now I just need a solution...

Thanks in advance.
Last edited by cgnieder on Tue Mar 19, 2013 2:21 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Rasmus
Posts: 2
Joined: Tue Feb 17, 2009 6:11 pm

Emphasis in title

Post by Rasmus »

What font are you using. I am guessing you are using the default font, which is probably Computer Modern Sans or similar. This, however, does not contain it italic letters.
You might find another font. If you load kpfonts you will be able to emphasize. You might just use roman letters like
\addtokomafont{sectioning}{\rmfamily} (you might have to change sectioning).

There is a font catalogue here: http://www.tug.dk/FontCatalogue

Cheers,
Rasmus
Last edited by cgnieder on Tue Mar 19, 2013 2:22 am, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Emphasis in title

Post by localghost »

I can't see the problem. The following example works fine for me with and without the lmodern font.

Code: Select all

\documentclass{scrartcl}       % Article class from KOMA Script
\usepackage[T1]{fontenc}       % Enable Type 1 font encoding (Cork Encoding)
\usepackage[latin1]{inputenc}  % Enable direct input of special national characters
\usepackage[english]{babel}    % Language settings
\usepackage{lmodern}           % Enable Latin Modern fonts

\title{A \emph{partly emphasized} title}
\author{p7389}
\date{\today}

\begin{document}
  \maketitle
\end{document}
If your problem persists, build a minimal working example (MWE) that reproduces the warnings you mentioned.
p7389
Posts: 2
Joined: Tue Feb 17, 2009 2:11 pm

Emphasis in title

Post by p7389 »

Thank you both for your help. I'm a LaTeX newbie, and am not using any packages in my document yet. Using the packages from your example, localghost, solves my problem. I thought that I'd get packages as I needed them, with the additional benefit of knowing what it all does. This is not the case with this list... Could you perhaps superbriefly explain why these packages are needed (well, the \usepackage{lmodern} seems obvious, I suppose, but I didn't catch from the koma manual that you HAD to load any specific packages... and you don't actually need to load this - always! see below...)?

I can remove any one of those packages on its own, and I still get the output I want. Removing them all, or certain combinations, breaks it...

I think I will have to look into changing the font still though, because I can't say I'm overly fond of this lmodern thing. What is the standard font in scrartcl apart from the title? LaTeX standard roman?

Another question: I have been trying to make the \author and \date output a bit smaller in relation to the title, but I haven't really succeeded. I wanted to manipulate it with the \addtokomafont-command which I was able to change the title font with as Rasmus suggested, but looking in the koma manual I couldn't find an appropriate element...
Last edited by cgnieder on Tue Mar 19, 2013 2:23 am, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Emphasis in title

Post by localghost »

For explanation purposes I added some comments into the code of my last reply. To get things work you have to enable at least T1 encoding (Cork Encoding) with the fontenc package. To make sure that it works with the standard CM (Computer Modern) fonts, install the cm-super package. The installation of packages on a Windows can easily be done with the MiKTeX Package Manager.

The packages themselves, their manuals and a brief introduction can be found on CTAN. Take a look at a special topic we created for beginners [1]. The resources listed there will help you to come to grip with LaTeX.

The issue with the font size in the author and date field can simply be solved with the according switches (\small, \footnotesize, …).

Code: Select all

\title{A \emph{partly emphasized} title}
\author{\normalsize p7389}
\date{\small\today}
[1] View topic: LaTeX Resources for Beginners
Gbo
Posts: 2
Joined: Tue Mar 19, 2013 12:03 am

Emphasis in title

Post by Gbo »

Hi, there. I have a related question: I'm trying to italicize text within a section heading, because I'm using words from a foreign language. But when I use \emph or \textit it overrides the other font rules for section headings. For example:

Code: Select all

\documentclass[10pt,reqno]{amsart}
\title{On Isometries of the Euclidean Plane}
\begin{document}
\maketitle
\section {Ex uno plures: preservation of integer distances}
\section {\emph{Ex uno plures}: preservation of integer distances}
\section {\textit{Ex uno plures}: preservation of integer distances}
\end{document}
The font used for a section heading in this document is all-caps. When I put the Latin words in italics it changes them from all-caps to lower-case. Is there a way to change nothing but the 'slantiness' off the text, and keep everything else formatted like a normal section heading?

Any help is appreciated, especially if it's explained in simple terms for a beginner like me.

Thanks,
Gbo
Last edited by cgnieder on Tue Mar 19, 2013 2:24 am, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Emphasis in title

Post by localghost »

Gbo wrote:[…] But when I use \emph or \textit it overrides the other font rules for section headings. […]
The used font does not provide slanted or italic small capitals. So you have to search a font that does. Perhaps the LaTeX Font Catalogue lists such fonts for PDFTeX.


Thorsten
Post Reply