33

I am co-authoring a piece of text, and I would like to indicate that in my opinion certain parts should be removed, by drawing a big red cross through that specific section. I have tried to work with tikz, but this usually ends up in procrastinating by exploring the awesomeness of Tikz.

What I need is being able to just add a line before and after the section needed to be discussed, such as:

\begin{cross}
    This text should be removed or discussed
\end{cross}

Is there a package that enables this?

51

Here is a solution which allows page breaks:

\documentclass{article}
\usepackage{lipsum}
\usepackage[many]{tcolorbox}

\newtcolorbox{cross}{blank,breakable,parbox=false,
  overlay={\draw[red,line width=5pt] (interior.south west)--(interior.north east);
    \draw[red,line width=5pt] (interior.north west)--(interior.south east);}}

\begin{document}

\begin{cross}
\lipsum[1]
\end{cross}

\par\bigskip
Now a part that continues to the next page:
\par\bigskip

\begin{cross}
\lipsum[2-9]
\end{cross}

\end{document}

enter image description here

  • 5
    +1 I am once more amazed by the possibilities of your nice package! – Daniel Sep 27 '13 at 12:57
  • 1
    @Daniel Thank you for the flowers :-) – Thomas F. Sturm Sep 27 '13 at 16:54
12

This will work only in a page.

\documentclass{article}
\usepackage{lipsum}
\usepackage{tikz}
\newcommand\tikzmark[1]{%
  \tikz[remember picture,overlay]\coordinate (#1) {};}
\newenvironment{cross}{%
\noindent\tikzmark{lbegin}\hfill \tikzmark{rbegin}
}{%
\par\noindent\tikzmark{lend}\hfill \tikzmark{rend}
\begin{tikzpicture}[overlay, remember picture]
    \draw[red,thick] (lbegin) -- (rend);
    \draw[red,thick] (rbegin) -- (lend);    
\end{tikzpicture}\par
}

\begin{document}
\lipsum[1]
%
\begin{cross}
    \lipsum[2]
\end{cross}

%
\lipsum[3-4]
\end{document}

enter image description here

5

Check out the changes package. Simply crossing out the text you want removed might be too little functionality. What if you have comments on why to remove certain text passages?

An example of how to use this package

  • changes is great but, by default, it has problems with multi-paragraph text and equations. In principle it can be configured to use this solution if it can detect it is needed. For example, to make changes work on math mode, I have this code in my preamble \newcommand{\stkout}[1]{\ifmmode\cancel{#1}\else\sout{#1}\fi}. – alfC Dec 8 '18 at 3:40
5

With PSTricks.

\documentclass{article}

\usepackage{pst-node,lipsum}

\newsavebox\IBox
\newenvironment{criscross}{%
    \begin{lrbox}{\IBox}
    \begin{minipage}{\linewidth}
    \parindent=\xxx\relax
    \ignorespaces
}{%
    \end{minipage}
    \end{lrbox}
    \noindent
    \psDefBoxNodes{N}{\usebox\IBox}%
    \psline[linecolor=red](N:tl)(N:br)%
    \psline[linecolor=red](N:bl)(N:tr)%
    \ignorespacesafterend
}

\AtBeginDocument{\newlength\xxx\xxx=\parindent}

\begin{document}
\textcolor{red}{Don't be lukewarm! If you cannot be the best, be the worst!}
\lipsum[1]

\begin{criscross}
\lipsum[2-3]
\end{criscross}

\lipsum[4]
\end{document}

enter image description here

  • One down vote detected... Oh my ghost! – kiss my armpit Oct 2 '13 at 7:20
4

A big red cross might be a bit awkward-looking. Through a squarish paragraph it would look OK (as in Harish Kumar's answer, but what if the block spans a page break? Or is only 1 long line?

The ulem package provides \sout{} like strikethrough and \xout{} where a slash is overlaid on each character. Coloured versions can easily be created, according to the manual.

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.