I personally like the tabbing environment very much to typeset table-like listings without having to worry about linebreaks, pagrebreaks and the like.
However, I now encounter a problem: I have a (very long) tabbing environment with entries that vary greatly in length. Setting the "maximum length" as the tabs is not an option, so I disocvered that apparently LaTeX "skips back" to the absolute position of the tab.
I would like to have a variant of tabbing that checks whether the current text position is further to the right than the tab position and then does either of the following to things:
- Just continue typesetting the text at the current curser position, or
- Insert a linebreak to correctly continue at the intended position.
Here is an MWE:
\documentclass{article}
\pagestyle{empty}
\begin{document}
\begin{tabbing}
\hspace{3cm}\=\hspace{3cm}\kill
\textbf{this is}\>ok\\
\textbf{this is absolutely not}\>ok\\
\textbf{I would rather imagine it} %\>
like this\\
\textbf{Altnernatively, I would also appreciate it}\\\>
like this\\
\end{tabbing}
\end{document}
I don't know if such an environment exists already, or if I would have to code something - and even then, I wouldn't know where to start, because I don't know how to check what is the current position of the cursor.
Any suggestions?


\makebox[3cm]{...}so there is no linebreaking and no warning if the text overprints the following cell as the cells are never over-full as glue is added to allow them to over-print in this way. – David Carlisle Jul 30 '17 at 14:41parboxes ormiminipagees, but I thought that space could be used more efficiently if one allowed cells to overrun and then just shift the next entry. However, if this is too complicated, I'll stick with that suggestions. – carsten Jul 30 '17 at 14:49