<br><div class="gmail_quote">On Mon, Apr 11, 2011 at 5:48 AM, Ulrike Fischer <span dir="ltr"><<a href="mailto:news3@nililand.de">news3@nililand.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Am Sun, 10 Apr 2011 20:17:52 -0400 schrieb Peter Davis:<br>
<div class="im"><br>
> In other words, if my XML is<br>
> something like:<br>
><br>
> <fo:block xyz:tabstop="47"><br>
> This is some text that's on the left, but if I insert a tab character<br>
> &#x0A;, it should just jump to the position 47bp in whatever line I'm on.<br>
> </fo:block><br>
><br>
> So the tab may occur on the first line, or the second, or the third,<br>
> depending on how the preceding text wraps.  Also, if the current line up to<br>
> this point is wider than the tab, than the tab should effectively just act<br>
> as a word separator.<br>
<br>
</div>tabbing doesn't work this way. At first it doesn't wrap lines, at<br>
second if the tab is on the left it will go back and overwrite<br>
existing text.<br>
<div class="im"><br></div></blockquote><div> </div><div>Yes, I understand the LaTeX tabbing environment doesn't work that way, but that's how tabs work in most text editors and word processors.  So what I'm trying to achieve is more like that than like LaTeX tabbing.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> So what I'd really love is a way to say, in effect, "from where ever we are<br>
> on the current line, jump to 47bp (if it's to the right) and continue<br>
> setting text.<br>
<br>
> Another way to think of this would be: "get the current position on the<br>
> line, subtract that from 47bp, and make a box that's as wide as that<br>
> difference."<br>
><br>
> Is there any way to accomplish either of those?  That's really the effect<br>
> I'm after.  But I don't know any way to get the current point or current<br>
> length of the line.<br>
<br>
</div>XeTeX knows the pdftex primitive \pdfsavepos. So it is possible to<br>
write the current position on the page e.g. to the aux-file and<br>
reuse it in subsequent runs. The marginnote package e.g. places the<br>
notes in the margin in this way.<br></blockquote><div><br></div><div>Yes, I've just discovered pdfsavepos, pdflastxpos and pdflastypos.  I'm investigating these now to see if these offer a solution.</div><div><br>
</div><div>Another thought I had was that since I'm using textpos anyway, I could start a new text block whenever I encounter a tab character.  It would have to align vertically with the current line of text (which would be tricky), and then the first character would be an empty box the width of the tab.  If I can manage the vertical alignment, it should work.  I thought perhaps \pagetotal could be used, but I don't know what effect textpos has on that.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
So theoretically it is possible to move the text depending on the<br>
current (absolute) position. But to decide if it can be done in<br>
pratice one would need a much better and precise description of your<br>
requirements and the structure of your data first. It is not helpful<br>
that you at first give the impression that you only want to align<br>
some phone numbers and in the next post speak of general, multiline<br>
text.<br>
<br></blockquote><div><br></div><div>I'm sorry.  My own understanding of the problem is getting refined as I consider more examples.  At first, I thought the business card example was a good illustration of the problem, but it's more general than that.  I can start a separate discussion topic, if people prefer. </div>
<div><br></div><div>-pd</div><div><br></div><div><br></div><div>-- </div></div><span style="font-family:arial, sans-serif;border-collapse:collapse">----<div>The Tech Curmudgeon</div><div><a href="http://www.techcurmudgeon.com/" style="color:rgb(17, 65, 112)" target="_blank">http://www.techcurmudgeon.com</a></div>
<div style="font-size:10.8333px"><br></div></span><br>