[NTG-context] \quotation, protrusion and linebreaking

Rik Kabel ConTeXt at rik.users.panix.com
Wed Oct 12 21:54:30 CEST 2022


On 2022-10-11 15:06, Leah Neukirchen via ntg-context wrote:
> Henning Hraban Ramm via ntg-context<ntg-context at ntg.nl>  writes:
>
>> Am 11.10.22 um 20:00 schrieb Leah Neukirchen via ntg-context:
>>> Hello,
>>> I noticed the following problem:
>>> \showframe
>>> \startluacode
>>>     fonts.protrusions.vectors.pure[0x201C] = { 1, 1 }
>>> \stopluacode
>>> \definefontfeature[default][default][protrusion=pure]
>>> \setupalign[hanging]
>>> \starttext
>>> This text is unquoted.
>>> “This text is quoted manually.”
>>> \quotation{This text is quoted by a macro.}
>>> This is a very long line followed by a nice linebreak, very
>>> supercalifragilisticexpialidocious.
>>> This is a very long line followed by an ugly linebreak, not
>>> \quotation{supercalifragilisticexpialidocious}
>>> \stoptext
>>> The macro-quoted text is not protruded.  I fixed this locally with a
>>> macro
>>> \def\q#1{\protrusionboundary1\quotation{#1}}
>>> Should this be default?
>>> But the missing hyphenation I have to add myself with \-.  Ideas?
>> Try
>> \setupdelimitedtext[quotation][method=font]
> That fixes both issues, thanks!
>
> Not sure where I should have learned this exists, however. ;)

Note that this does not fix the problem when the quotation begins a 
footnote. See the thread "Hanging punctuation misalignment in footnotes" 
(https://mailman.ntg.nl/pipermail/ntg-context/2014/077122.html or 
https://www.mail-archive.com/ntg-context@ntg.nl/msg73516.html, pick your 
favorite archiver), where the problem is described. An test example follows:

    \setuplayout       [width=9cm,
                         height=12cm]
    \definefontfeature [default]
                        [default]
                        [protrusion=quality]
    \setupalign        [hanging]
    \setupquotation    [method=font]
    \setupnote         [endnote]
                        [location=none]
    \setupnotation     [footnote]
                        [numberconversion=set 2]
    \setupnotation     [footnote]
                        [align=hanging]
    \setupwhitespace   [medium]
    \setupbodyfont     [libertinus]
    \showframe
    \starttext

    \quotation{{\em Cantharides}} is the reported message from Sir Francis
    Drake upon defeating the Spanish Armada.\endnote{\quotation{{\em
    Vovi}} is
    reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
    are as likely as the attribution of \quotation{{\em peccavi}} to
    Napier after
    his defeat of the Ameer of Scinde.}\footnote{“{\em Vovi}” is
    reportedly the message from James Broun|-|Ramsay on taking Oudh. Both
    are as likely as the attribution of \quotation{{\em peccavi}} to
    Napier after
    his defeat of the Ameer of Scinde.}

    {\tfx This problem appears intractable. See \quotation{Re:
    [NTG-context] Hanging punctuation misalignment in footnotes} on the
    mailing list, where Wolfgang explains that the problem is struts.}

    \placenotes[endnote]

    \stoptext

A solution is welcomed.

-- 
Rik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20221012/c4097d19/attachment.htm>


More information about the ntg-context mailing list