2

There's an infinite loop with the Captcha under Chrome, so once again I have to use this avatar.

I have two issues with my document and would appreciate assistance. For some reason italics or emphasized text are not appearing.

The syntax I originally used was

\begin{textit}
Some text.
\end{textit}

But only the initial "S" was italicized. So I tried changing to:

\begin{emph}
Some text.
\end{emph}

but got the same result.

MWE follows.

  • 1
    Don't use \begin{italic}. Use \textit{} or \itshape. – Sigur May 14 '15 at 17:14
  • 1
    Why \begin{emph}? Just type \emph{words words}. – Alenanno May 14 '15 at 17:14
  • Sorry, I did originally use \begin{textit} some text \end{textit}. There were compile errors. I thought that maybe as this is compiled under pdflatex there might be a font issue. – Michael Kane May 14 '15 at 17:18
  • The reason for \begin{emph}...\end{emph} is a coding best practice designed to avoid unclosed arguments. Since I don't know where the problem is, I don't know if this is an issue or not. – Michael Kane May 14 '15 at 17:19
3

\begin{textit}Some text\end{textit} is wrong; there is the command \textit that takes as argument the text you want to typeset in italics.

What happens is essentially equivalent to doing

\begingroup\textit Some text\relax\endgroup

and \textit considers only S as its argument: when there are no braces, a macro with argument takes for it the first token only.

If you want to define an environment for typesetting some text in italics, do

\newenvironment{italics}
  {\itshape\ignorespaces}
  {\ignorespacesafterend}

Example

\documentclass{article}

\newenvironment{italics}
  {\itshape\ignorespaces}
  {\ignorespacesafterend}

\begin{document}

Some text before
\begin{italics}
then some text in italics
\end{italics}
and then text in Roman type.

Some text before \textit{then some text in italics}
and then text in Roman type.

\end{document}

I'd advise you to use the second form.

enter image description here

If you want to have the environment equivalent to \emph, it should be

\newenvironment{emphasis}
  {\em\ignorespaces}
  {\ignorespacesafterend}

Of course the environment's name is up to your preference.

| improve this answer | |
0

Enclose the sentences you want emphasized with \emph{...}. Concerning the enumerate environments, add \itshape.

So in summary, do like this:

\emph{The provisions of this Law are valid for:}

\begin{enumerate*}\itshape
\item [1.] ...
\item [2.] ...
\item [3.] ... 
\end{enumerate*}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.