TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 7 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

Just for others which have a similar problem...the tagged command doesn't cause the problem.

The taggedblock blocks also cause problem when using before part and chapter commands. I get unwanted empty pages.

\documentclass[
    paper=a5,
    fontsize=12,
    ]{scrbook}

\usepackage{tagging}

\usetag{myTag-A}
\usetag{myTag-B}

\droptag{myTag-A}

\usepackage{blindtext}

\begin{document}

\begin{taggedblock}{myTag-A}
\part{Test Part A}
\end{taggedblock}

\begin{taggedblock}{myTag-B}
\part{Test Par B}
\end{taggedblock}

\end{document}

I don't have this problem with the tagged command:

\tagged{myTag-A}{
\part{Test Part A}
}

\tagged{myTag-B}{
\part{Test Par B}
}
share|improve this answer

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.