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 would like to use the tagging package to tag parts of a document, which not only contain text, but also other environments like enumerate. If I use the taggedblock-environment for this, this creates additional vertical space after the taggedblock, see the minimal example below. Is there any way to avoid that? This effectively ruins the layout of my document. :/

One solution would be to replace the taggedblock-environment by the \tagged-command, but I don't want to do that, since the parts of the documents are quite large and every time I forget a } to close the \tagged-command it becomes a mess.

\documentclass{scrartcl}

\usepackage{tagging}

\usetag{mytag}

\begin{document}

%a tagged block
\begin{taggedblock}{mytag}
\begin{enumerate}
    \item 
    foo
    \item
    bar
\end{enumerate}
\end{taggedblock}
%here you have additional vertical space
\begin{enumerate}
    \item 
    foo
    \item
    bar
\end{enumerate}
%here you don't 
\begin{enumerate}
    \item 
    foo
    \item
    bar
\end{enumerate}

\end{document}
share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

For strange reasons, the taggedblock environment adds \leavevmode at the end, which is clearly wrong.

\documentclass{scrartcl}

\usepackage{tagging}
\def\endtaggedblock{\endcomment} % we can't use \renewcommand

\usetag{mytag}

\begin{document}

%a tagged block
\begin{taggedblock}{mytag}
\begin{enumerate}
    \item 
    foo
    \item
    bar
\end{enumerate}
\end{taggedblock}
% normal spacing
\begin{enumerate}
    \item 
    foo
    \item
    bar
\end{enumerate}
% normal spacing
\begin{enumerate}
    \item 
    foo
    \item
    bar
\end{enumerate}

\end{document}

enter image description here

share|improve this answer
    
Thanks, this really does the job. :) –  Meneldur Dec 29 '13 at 19:08
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.