ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Hanging punctuation misalignment in footnotes
Date: Sun, 23 Feb 2014 19:50:44 +0100	[thread overview]
Message-ID: <C24B9DF4-6980-4C3C-9842-E26255EB1320@gmail.com> (raw)
In-Reply-To: <5307ee93.437e0e0a.70d2.413eSMTPIN_ADDED_BROKEN@mx.google.com>


Am 22.02.2014 um 01:25 schrieb Jan Tosovsky <j.tosovsky@email.cz>:

> On 2014-02-22 Jan Tosovsky wrote:
>> 
>> when hanging in footnotes is enabled and the starting character is a
>> punctuation, it is not protruded. However, the same character in the
>> footnote body works fine. When both cases are close each other, it
>> looks weird, see the screenshot:
>> 
>> http://drifted.in/other/footnote_alignment.png
>> 
>> Would it be possible make this behaviour uniform - either do not
>> protrude it
>> on the starting (left) edge or protrude it everywhere?
>> 
> 
> A minimal example is available at 
> http://drifted.in/other/sample.tex

There are two things which prevent the protrusion of the opening quote at the begin of the paragraph. One of these can be avoided with a change in the setup for footnotes but not the other without destroying the layout of the footnote text.


One problem is the way how context places the footnote number in front of the text, by default context uses the \llap command to move the number into the left margin but this prevents also the protrusion of the opening quote. You can avoid this problem when you change the footnote setup to \setupnotation[footnote][alternative=margin].

<example>
\definefontfeature[default][default][expansion=quality,protrusion=quality]

\setupbodyfont[modern]

\setupalign[hanging]

\showframe[text][text]

\starttext

»Text«

\noindent\hbox to 0pt{}»Text«

\noindent\hbox to 0pt{\hss}»Text«

\stoptext
</example>


The second problem which prevents the opening quote to protrude are the struts which are added by context at the begin and end of the footnote content and there is no way to disable them because they are needed to have proper spacing between the individual footnote texts on the same page.

<example>
\definefontfeature[default][default][expansion=quality,protrusion=quality]

\setupbodyfont[modern]

\setupalign[hanging]

\showframe[text][text]

\starttext

»Text«

\strut »Text«

\stoptext
</example>


In the example below where I took care of these two problems (don’t take care of \begstrut in this way in your real document because it will cause many problems, it’s just for educational purpose) to show you this is what caused the unwanted output.

<example>
\definefontfeature[default][default][expansion=quality,protrusion=quality]

\setupbodyfont[modern]

\setupalign[hanging]

\showframe[text][text]

\setupnotation[footnote][alternative=margin,align=hanging]

\starttext

\let\begstrut\relax

First Footnote.\footnote{»\input{ward}«}

Second Footnote.\footnote{»\input{ward}«}

\stoptext
</example>

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2014-02-23 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <00c101cf2f5a$dccfc600$966f5200$@tosovsky@tiscali.cz>
2014-02-22  0:25 ` Jan Tosovsky
     [not found] ` <00c201cf2f64$9c6d7d50$d54877f0$@tosovsky@email.cz>
2014-02-22  9:55   ` Hans Hagen
2014-02-22 11:36     ` Jan Tosovsky
     [not found] ` <5307ee93.437e0e0a.70d2.413eSMTPIN_ADDED_BROKEN@mx.google.com>
2014-02-23 18:50   ` Wolfgang Schuster [this message]
2016-03-29 21:07     ` Jan Tosovsky
     [not found]     ` <025b01d189ff$02089e00$0619da00$@tosovsky@email.cz>
2016-03-30  6:28       ` Hans Hagen
     [not found] <5307de3d.c8670e0a.6ad6.ffffcff0SMTPIN_ADDED_BROKEN@mx.google.com>
2014-02-21 23:34 ` Thangalin
2014-02-21 23:15 Jan Tosovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C24B9DF4-6980-4C3C-9842-E26255EB1320@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).