[XeTeX] bidi question
Vafa Khalighi
persian-tex at tug.org
Wed Jul 16 10:56:38 CEST 2014
see Joseph's answer:
http://tex.stackexchange.com/questions/191675/footnote-moves-up-by-one-par/191686#191686
On Wed, Jul 16, 2014 at 3:23 PM, Vafa Khalighi <persian-tex at tug.org> wrote:
> Thanks for this bug report. Here is a minimal example, without using bidi
> package where this issue occures
>
>
> \documentclass{report}
> \usepackage{zref-abspage}
> \makeatletter
> \newcounter{footdir at label}
> \newtoks\footdir at toks
> \newcommand*{\footdir at temp}[3]{%
> \@ifdefinable{#1}{%
> \let#1#2%
> \renewcommand{#2}[1]{%
> \footdir at toks{##1}%
> \footdir at toks\expandafter{%
> \the\expandafter\footdir at toks
> \expandafter
> \zref at labelbyprops\expandafter{\thefootdir at label}{abspage}%
> }%
> \expandafter#1\expandafter{\the\footdir at toks}%
> }%
> }%
> }
>
> \footdir at temp\footdir at ORG@footnotetext\@footnotetext{L}%
> \makeatother
> \begin{document}
> Refer to first footnote\footnote{
> Fill fill fill fill fill fill fill fill fill fill
> fill fill fill fill fill fill fill fill fill fill
> fill fill fill fill fill fill fill fill fill fill
> fill fill fill fill fill fill fill fill fill fill
> fill fill fill fill fill fill fill fill fill fill
> fill fill fill fillfillfillfi.
> } refer to second footnote.\footnote{Another footnote.}
>
>
> \end{document}
>
>
> The problem is that the \footnoterule and the whole first footnote moves
> up by one \par. If you remove the code, you can see this clearly. I will
> investigate this and fix the issue.
>
>
> On Wed, Jul 16, 2014 at 11:01 AM, Bruno Le Floch <blflatex at gmail.com>
> wrote:
>
>> On 7/15/14, maxwell <maxwell at umiacs.umd.edu> wrote:
>> > I'm attaching the minimal file below. The PDF output has a blank line
>> > between the first and second footnotes, which IMO shouldn't be there. I
>> > don't get this result if bidi isn't loaded, and with bidi loaded I only
>> > get this result if the last line of the first footnote ends right at the
>> > right-hand margin (and TeX doesn't think it can improve the result by
>> > wrapping onto the next line--hence the rather long final word in the
>> > minimal example's footnote).
>> >
>> > So it's a very minor problem, and easy enough to work around. My
>> > problem with the work-around is that the LaTeX code is generated from
>> > XML, and avoiding that line break before the brace is difficult.
>>
>>
>> Hello,
>>
>> TeX inserts a space at the end of every line it reads, which normally
>> is what you want (to separate words, for instance). Here, you get a
>> space just before the brace.
>>
>> My guess is that without bidi the space ends up at the end of a
>> paragraph, where TeX removes spaces (since otherwise all paragraphs
>> would end with a space), so there is no space in what TeX breaks into
>> lines. With bidi, there may be some additional node in the list (to
>> take care of bidirectional typesetting), so the paragraph ends with a
>> space then some bidi stuff. TeX does not remove the space. It breaks
>> the paragraph-ending-with-a-space into lines, and it may break the
>> line in such a way that the single space is in a line of its own.
>> Thus the extra line you get.
>>
>> To avoid all this, either add the comment character % at the end of
>> the line which is before the brace (leaving no space between the text
>> and %), or add \unskip before the brace
>>
>> ...fill.%
>> }
>>
>> or
>>
>> ...fill.
>> \unskip}
>>
>> depending on what's easiest to generate.
>>
>> Regards,
>> Bruno
>>
>>
>>
>> --------------------------------------------------
>> Subscriptions, Archive, and List information, etc.:
>> http://tug.org/mailman/listinfo/xetex
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20140716/27611725/attachment.html>
More information about the XeTeX
mailing list