GeneralSimple question

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Abu Noor El-Din
Posts: 11
Joined: Wed Nov 21, 2007 1:43 am

Simple question

Post by Abu Noor El-Din »

Hi all,

I have a simple question. What is the difference between \emph and textit{}? I cannot notice the difference.

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Simple question

Post by gmedina »

The \emph command switchs to the \itshape shape if the current font is upright, and to the \upshape shape if the current font is already slanted. Take a look at this example:

Code: Select all

\documentclass{article}

\begin{document}
\noindent
\emph{slanted text}\\
\textit{slanted text}\\
{\itshape slanted text}\\
{\itshape \emph{slanted} text?}\\
\textit{\emph{slanted} text?}\\
{\slshape Now with this shape}\\
{\slshape Now with \textit{this} shape}\\
{\slshape Now with \emph{this} shape}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Abu Noor El-Din
Posts: 11
Joined: Wed Nov 21, 2007 1:43 am

Re: Simple question

Post by Abu Noor El-Din »

Again, thanks gmedina very much.
Post Reply