4

I'm using the IEEEtran package to compile a two-column document and I need to submit two copies: one with highlighted sections and one in a 'clean' state.

I'm using soul to highlight the sections with no problem, but for me to create a 'clean' copy I'm going to have to go through the document and delete all highlight entries, which will take a long time and I don't want two separate copies of the paper in case I make changes to one I'll have to remember to do the same to the other.

Is there a way to easily 'turn off' packages or features in this situation? Ideally I'd like a single line of code in my main tex file which I can comment/uncomment in order to turn highlight/other editing features on and off. I'm playing around with the IEEE draft features, but they don't seem to do what I want.

Thanks.

4

You can redefine the commands from the soul package that you use to do nothing.

With highlighting:

\documentclass{article}
\usepackage{color,soul}
\setulcolor{red}
\sethlcolor{blue}
\begin{document}
This is \ul{underlined} and \hl{highlighted} text.
\end{document}

enter image description here

Without highlighting:

\documentclass{article}
\usepackage{color,soul}
\setulcolor{red}
\sethlcolor{blue}
\renewcommand\ul[1]{#1} % <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
\renewcommand\hl[1]{#1} % <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
\begin{document}
This is \ul{underlined} and \hl{highlighted} text.
\end{document}

enter image description here

  • This is exactly what I'm looking for. Thanks! – ritchie888 Jan 30 '17 at 17:02
2

You might want to look into the changes packages. By passing it the option final all the markup is suppressed. You can define your own highlights and get a list of changes. This package is design for marking up edits, but you don't have to use it for that.

It has its own tag here.

  • Thanks for this. As much as I like the functionality of 'changes' I couldn't see a way to do highlighting as opposed to changing the font colour. I will definitely use it in the future for editing though! – ritchie888 Jan 30 '17 at 17:01
  • I haven't got the manual in front of me but I'm sure you can use other highlights. Highlighting across paragraphs is interesting at the best of times. – Chris H Jan 30 '17 at 17:20

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.