Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I had to cross out a sentence and I did it the following way, which is kinda sloppy.

$ \rlap{\textbf{-------------------------------------------------------------------------------------------------}}%
{\mbox{Its derivative should be}}$ $2z + 2\bar{z} =4Re[z]$ So are its critical points all over the real axis? 

is there a better way to do this and get the same result?

share|improve this question
add comment

2 Answers

up vote 41 down vote accepted

Use the either the ulem package or the soul package.

\documentclass{article}
\usepackage[normalem]{ulem} % either use this (simple) or
\usepackage{soul} % use this (many fancier options)
\begin{document}

% ulem command
\sout{Its derivative should be $2z + 2\bar{z} =4Re[z]$ So are its critical points all over the real axis?} 

% soul command
\st{Its derivative should be $2z + 2\bar{z} =4Re[z]$ So are its critical points all over the real axis?} 
\end{document}

output of code

share|improve this answer
    
+1 for ulem. It also provides \xout to put XXX over the text (see this answer for an image.) and allows you to design your own pattern. (soul might be able to to the same and more, but I don't know it) –  Martin Scharrer Mar 17 '11 at 10:09
    
Note that ulem changes the behavior of emph. In order to avoid it, add \normalem to the preamble after the package insertion. –  Dror Mar 17 '11 at 13:31
3  
That's why I added [normalem] as a package option in the example document. That has the same effect as adding \normalem into the preamble. –  Alan Munn Mar 17 '11 at 13:36
1  
I tried both solutions, and my preference goes to ulem because its \sout command can handle "special" characters (such as é, è, à, ...) commonly used in some languages, whereas \st fails. –  Anthony Labarre Oct 16 '12 at 8:05
    
@AnthonyLabarre Interesting observation, I'd never noticed that. soul will work with accented characters if you are using LuaTeX or XeTeX, though. –  Alan Munn Oct 16 '12 at 15:07
show 2 more comments

You can also use PDF annotations with the pdfcomment package. Then you can also add a comment/note.

\documentclass{article}
\usepackage{xcolor}
\usepackage{pdfcomment}
\begin{document}
\pdfmarkupcomment[markup=StrikeOut,color=red,author=Approximist]{Its derivative should be $2z + 2\bar{z} =4Re[z]$ So are its critical points all over the real axis?}{comment}
\end{document}

\pdfmarkupcomment example

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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