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
\begin{tabbing}
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.
Best Answer
Perhaps you might be interested in using
\obeylines
: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: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-calledr
ight 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$
.