I am making major edits (a hack and slash) to a big document, want to do a word count on what's there (hence texcount), and, while I'm editing and we are reviewing, I want to retain what I'm removing in situ in strikeout text.
The text has citations so in places these will need strikeouts also and I would like to be able to easily ultimately remove this text from the final document by a simple change of my commands and if the text is ignored I want to ignore any citations in the section so LaTeX does not look up by .bib
files and add the citation to the bibliography
. At the moment I am using makeboxes
to try and format the strikeout but I am not getting the results I expect.
I am new to LaTeX
so please excuse my poor code. There is more explanation in the code below. Thanks
%TC: macro \cmd [1]
\documentclass[]{article}
\immediate\write18{texcount.pl -total \jobname.tex -out=\jobname.sum}
\newcommand{\cmt}[1]{}
\usepackage{ulem}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{verbatim}
\newcommand\wordcount{\verbatiminput{\jobname.sum}}
% This is my command. I want to strike out,
\newcommand{\strikeit}[1]
{
\makebox[\textwidth][s]{\sout{#1}}
}
\begin{document}
The first thing I want is to have this word count which ignores the words contained in the \textbackslash cmd macro
\wordcount
I want to be able to strike out text \sout{like this} and also be able to \sout{strikeout citations like this : \mbox{\cite{CA,HB98}}} and still have evertthing in situ but do all of this from a command that I can later edit to remove the edits from my pdf if they are all approved rather than manually editing the tex file twice.
Problem 1: This should be the width of the page and be in situ, but it's not \strikeit{\blindtext}
How do I wrap the text to the page (or text) width?
Problem 2: The next issue I am having is to do with citations.
\strikeit{
\cite{CA,HB98}
}
As you can see, the first citation is there, but the second is missing.
Also I'm getting the error \textit{Undefined Control Sequence. \}}
And Problem 3: When the edits are accepted I want to ultimatly be able to generate a PDF that will ignore these sections of text by changing my command \textit{\textbackslash strikeit} to
\textit{\textbackslash newcommand{\textbackslash strikeit}[1]{}}
but will also not process the citations if they are inside that command.
\begin{thebibliography}{1}
\bibitem{HB98} Huynen, M.~A. and Bork, P. 1998. Measuring genome evolution. {\em
Proceedings of the National Academy of Sciences USA}
95:5849--5856.
\bibitem{CA} Caprara, A. 1997. Sorting by reversals is difficult. In: {\em
Proceedings of the First Annual International Conference on Computational
Molecular Biology (RECOMB 97),} New York: ACM. pp. 75-83.
\end{thebibliography}
\end{document}
\verb+\newcommand...+
if you want to show literal (La)TeX code in your document, instead of\textbackslash
etc.\mbox{\cite{...}}
will work.