I'm making dense revision notes so I'm trying to use all space possible e.g. tabbing and adding short notes whenever the previous item takes up significantly less than half the line

Defns 1.0: Graph, vert, edge, adj, $E_n$,$K_n$,$P_n$,\=$C_n$, sbgraph, induced graph,     connected,\\ components, forest, tree\\
Thm 2.1: (Hall's Marriage Theorem)\>Cor 2.2: (Defect Form)\\
Thm 2.5: (Menger)\>Cor 2.6: Menger for subsets\

But I would also like to have automatic line breaks. I don't think any table type environment would suit me since I elsewhere want text to fill the whole line (i.e. not be confined to one column). However I would still like to be able to align the things I have previously been tabbing.

  • I don't see why you would want automatic line breaks and use all possible space. By definition using all possible space precludes the use of line breaks.
    – Mythio
    Mar 25, 2013 at 9:06
  • I may have misunderstood, but when I use the tabbing environment I have to manually input every line break in order to have any break whatsoever. Mar 25, 2013 at 10:01
  • Yes that is true. Would it be possible to use an adapated list environment perhaps, as is done here: tex.stackexchange.com/questions/5946/….
    – Mythio
    Mar 25, 2013 at 12:01
  • I think you set me on the right track there. I haven't tested it fully yet, but it seems that \tabto does what I wanted \tabbing i.e. allows me to tab but retains automatic line breaking. Mar 25, 2013 at 14:24
  • Donald Arseneau just came out with a new version of the tabto package (MAR 13), which includes the syntax \tabto*{\TabPrevPos} to return to the location where you last left off. It is great for marginpar kind of approaches. I have a copy of the package, but I don't think it is on CTAN yet, but I asked him to put it there. Mar 29, 2013 at 9:49

2 Answers 2


Perhaps you might be interested in using \obeylines:

enter image description here

\textbf{Graph Theory}
\textbf{\S1. Definitons and Miscellany}
Defns 1.0: Graph, vert, edge, adj, $E_n$, $K_n$, $P_n$,~$C_n$, sbgraph, induced graph, connected,
components, forest, tree
Thm 1.1: two equivalent characterisations of trees
\textbf{\S2. Connectivity and Matching}
Defns 2.1.0: matching, independent, 1-factor
Thm 2.1: (Hall's Marriage Theorem) \quad Cor 2.2: (Defect Form)
Cor 2.3: (Polyandrous version)



Using \obeylines allow you to drop the use of \\ for line-breaking, while wrapping occurs naturally. Also, scoping it inside \begingroup...\endgroup localizes the effect, as you can see in the end of the minimal example, where regular line-breaking is re-instated as spaces.

To maintain an alignment similar to tabbing, you could use some box-manipulation through \phantom and overlaps:

enter image description here

\textbf{\S2. Connectivity and Matching}
Defns 2.1.0: matching, independent, 1-factor
\mbox{}\rlap{Thm 2.1: (Hall's Marriage Theorem)}%
\phantom{Defns 1.0: Graph, vert, edge, adj, $E_n$, $K_n$, $P_n$,~}Cor 2.2: (Defect Form)
Cor 2.3: (Polyandrous version)

Note that the alignment is only achieved when there is no full line in the alignment of the "parent", otherwise the inter-word stretch might affect it. As an immediate resolution, I've used \raggedright.

\mbox "initiates" a paragraph, while \rlap inserts a zero-width box that is left-aligned/justified. This causes the so-called right overlap. Then, \phantom{<stuff>} sets <stuff> as a blank box so your alignment starts at the right spot again, immediately in line (horizontally) with $C_n$.

  • Thanks for your help! Am I right in thinking that I can't use \obeylines within tabbing? If so, is it possible to modify this (sorry if this is obvious) in such a way to have those things I had previously tabbed be aligned horizontally? Sorry if this requirement wasn't clear in my original question. Mar 25, 2013 at 9:43
  • @user2205595: I've added some detail to obtain the desired alignment.
    – Werner
    Mar 25, 2013 at 18:02
  • Thanks a lot, I'll look at this more thoroughly when I come back to this document. Mar 29, 2013 at 9:13

I found the \tabto package (http://ftp.uni-erlangen.de/mirrors/CTAN/macros/latex/contrib/tabto/tabto-doc.pdf) did precisely what I wanted, in that I can have a tab feature and still have automatic line breaking.

  • I suspect that tabto isn't a package, but a macro or an environment. Please add more detail to your "answer".
    – lockstep
    Mar 25, 2013 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .