Is there a way to skip to a fixed position on a line? (a specific tab position)
Example:
The quick \skiptoposition{1.5cm} brown \skiptoposition{2.5cm}fox
which would put "brown" 1.5cm and "fox" 2.5cm from left margin?
|
Is there a way to skip to a fixed position on a line? (a specific tab position) Example:
which would put "brown" 1.5cm and "fox" 2.5cm from left margin? |
||||
|
The already mentioned However, the
|
|||||||||||||
|
|
This is what
|
|||||||||
|
|
Less complicated than Werner's, but using more or less the same idea:
Just as an exercise, here is a different version implementing the idea of backspacing of Dan's comment:
|
|||||
|
|
One way would be to use
For example:
yields the first two lines between the guide rules. The last two are to show that it works with font size changes as well (since you mentioned this in the comments):
Another method is to use a
One advantage of this method is that position is absolute, so if the first word does not fit, the second word is still in the correct spot. Replace |
|||||||||
|
|
Short TeX solution (you need to pdfTeX rather than pdfLaTeX).
Don't know why Knuth calls such routines dirty though, in Appendix D, of the TeX Book! You can add a fourth point |
|||||
|
|
Not sure about the elegance of this solution, but you could use an overlap via
The horizontal rules above is just for reference to show the distance from the left margin as Edit: Here is an updated version that provides
The main driver is Caveat: You need to use ties |
|||||||||||
|
tabbingenvironment, but I don't think that is what you need. This could be done using eithertikzor thezrefpackage by measuring the current position. – Martin Scharrer♦ Nov 2 '11 at 20:08