[XeTeX] hyphenation cancelled through footnote

Zdenek Wagner zdenek.wagner at gmail.com
Wed Jan 3 22:06:41 CET 2018


Hi,

this is the problem of the first word of a paragraph which is too long and
TeX never hyphenates the first word. I did not managed to persuade TeX to
consider it as the second word but maybe somebody knows TeX better than me
and can help.


Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz

2018-01-03 17:53 GMT+01:00 <hanneder at staff.uni-marburg.de>:

> Thanks for the workaround!
> I checked with other parts of my edition and there are still erratic
> problems. In the
> example below the first paragraph works, but the second does not.
>
> My installation is recent:
>
>> This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017/Arch Linux)
>>
>
> JH
>
> \documentclass[11pt]{memoir}
> \usepackage[series={A,B},noend,noeledsec,nofamiliar,noledgroup]{reledmac}
> \Xarrangement[A]{paragraph}
> %\newcommand{\varc}[2]{\edtext{}{\lemma{#1}\Afootnote{\sanskritfont{#2}}}}
> \newcommand{\varc}[2]{\nobreak\hskip 0pt
> \edtext{}{\lemma{#1}\Afootnote{\sanskritfont{#2}}}\hskip 0pt \relax}
>
> \usepackage{polyglossia,fontspec,xunicode}
>  \setdefaultlanguage{english} \setotherlanguage{sanskrit}
>  \setmainfont{EB Garamond}
> \newfontfamily\sanskritfont[Script=Devanagari,Mapping=RomDev
> ,Scale=1.36,LetterSpace=1.35]{Sanskrit2003}
>
>
> \begin{document}
> \begin{sanskrit}
>   \beginnumbering
>   \pstart kvāpi ca svātmanaivātmani
>   nikhilajalapatibhāvamāropyocitavividhasattva\varc{sattva}{sa
> ttve}gaṇavinayananayatayā
> vikhyātaviṣadayaśovattvākṛśataravibhūtiviśeṣaḥ/
> \pend
>
> \pstart
> śrīmacchrīsvasvatantrānāśritanirbhāgaparamaprakāśavimarśamay
> apāramaiśvaryānubhāvānubhāvuka\varc{ānubhāvānubhāvuka}{ānubh
> avānubhāvaka}prathitamahitanijasahajaparamānandādvayasattāsāmānyaspanda
> uditoditaparamaśaktisāmrājyo rājarājeśvaro jayasi
> paramaśivastvamayam//\varc{tvamayam}{tvamaya}
> \pend
>
> \endnumbering
> \end{sanskrit}
> \end{document}
>
>
>
>
>
> ----- Nachricht von Zdenek Wagner <zdenek.wagner at gmail.com> ---------
>      Datum: Wed, 3 Jan 2018 16:33:35 +0100
>        Von: Zdenek Wagner <zdenek.wagner at gmail.com>
> Antwort an: "XeTeX (Unicode-based TeX) discussion." <xetex at tug.org>
>    Betreff: Re: [XeTeX] hyphenation cancelled through footnote
>         An: Ulrike Fischer <news3 at nililand.de>, "XeTeX (Unicode-based
> TeX) discussion." <xetex at tug.org>
>
>
>
> 2018-01-03 16:16 GMT+01:00 Ulrike Fischer <news3 at nililand.de>:
>>
>> Am Wed, 03 Jan 2018 14:35:56 +0100 schrieb
>>> hanneder at staff.uni-marburg.de:
>>>
>>> > When editing Sanskrit texts with very long compounds, avoiding manual
>>> > hyphenation is extremely time
>>> > saving. XeLaTeX fortunately takes care of this, but the mechanism is
>>> > cancelled by footnotes within
>>> > the compounded word. In the example below the \varc{}{} causes the
>>> > error. Any idea on how to enable
>>> > hyphenation under such conditions?
>>>
>>> I see no difference with and without \varc. In both cases I get an
>>> overful line.
>>>
>>> What texsystem are you using?
>>>
>>>
>> Yes, you get an overflow line but not so much, less than 1pt. The problem
>> is that there is no expandable/shrinkable space, so with my redefinition
>> the word is hyphenated at the first place with smallest possible overflow
>> (in the part after \varc). \hskip 0pt says TeX to treat the parts before
>> and after \varc as separate words. Text in Indic scripts can be hyphenated
>> after each group started with a vyanjana and ending with a svara, so
>> \patterns are not generated by patgen but made agorithmically. Thus the
>> compound word can be broken by \hskip 0pt after any svara and both parts
>> will certainly have a good match in \patterns. Jürgen's definition of
>> \varc
>> prevents finding a match in \patterns so that the whole word with \varc in
>> its middle remain unhyphenated on the first line which is overflowed more
>> than 69pt. In addition, I forgot to mention that TeX never hyphenates the
>> first word of a paragraph which is another problem. Thus if \varc appeared
>> too far then even my solution will not help. It will be necessary to force
>> TeX to think that there is an invisible word with zero width at the
>> beginning of a paragraph followe by a fixed zero-width space.
>>
>> Zdeněk Wagner
>> http://ttsm.icpf.cas.cz/team/wagner.shtml
>> http://icebearsoft.euweb.cz
>>
>>
>>
>>
>>> --
>>> Ulrike Fischer
>>> http://www.troubleshooting-tex.de/
>>>
>>>
>>>
>>> --------------------------------------------------
>>> Subscriptions, Archive, and List information, etc.:
>>>   http://tug.org/mailman/listinfo/xetex
>>>
>>>
>
> ----- Ende der Nachricht von Zdenek Wagner <zdenek.wagner at gmail.com> -----
>
>
>
> ---
>
> Prof. Dr. Juergen Hanneder
> Philipps-Universitaet Marburg
> FG Indologie u. Tibetologie
> Deutschhausstr.12
> 35032 Marburg
> Germany
> Tel. 0049-6421-28-24930
> hanneder at staff.uni-marburg.de
>
>
>
> --------------------------------------------------
> 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/20180103/57fb6d86/attachment.html>


More information about the XeTeX mailing list