[texhax] XeLaTeX: Extra vertical space in tabbing environment with \kill?

Ulrike Fischer news3 at nililand.de
Mon Apr 11 11:48:47 CEST 2011


Am Sun, 10 Apr 2011 20:17:52 -0400 schrieb Peter Davis:

> In other words, if my XML is
> something like:
> 
> <fo:block xyz:tabstop="47">
> This is some text that's on the left, but if I insert a tab character
> &#x0A;, it should just jump to the position 47bp in whatever line I'm on.
> </fo:block>
> 
> So the tab may occur on the first line, or the second, or the third,
> depending on how the preceding text wraps.  Also, if the current line up to
> this point is wider than the tab, than the tab should effectively just act
> as a word separator.

tabbing doesn't work this way. At first it doesn't wrap lines, at
second if the tab is on the left it will go back and overwrite
existing text.

> So what I'd really love is a way to say, in effect, "from where ever we are
> on the current line, jump to 47bp (if it's to the right) and continue
> setting text.

> Another way to think of this would be: "get the current position on the
> line, subtract that from 47bp, and make a box that's as wide as that
> difference."
> 
> Is there any way to accomplish either of those?  That's really the effect
> I'm after.  But I don't know any way to get the current point or current
> length of the line.

XeTeX knows the pdftex primitive \pdfsavepos. So it is possible to
write the current position on the page e.g. to the aux-file and
reuse it in subsequent runs. The marginnote package e.g. places the
notes in the margin in this way.

So theoretically it is possible to move the text depending on the
current (absolute) position. But to decide if it can be done in
pratice one would need a much better and precise description of your
requirements and the structure of your data first. It is not helpful
that you at first give the impression that you only want to align
some phone numbers and in the next post speak of general, multiline
text.

-- 
Ulrike Fischer 



More information about the texhax mailing list