There are two issues with right-to-left fontnotes, 1) the footnote number gets somewhere in the middle of the footnote text instead of being in the right margin 2) the footnote rule is left aligned: \setupalign[r2l] \starttext Text\footnote{Note} \stoptext Regards, Khaled -- Khaled Hosny Egyptian Arab
Am 06.08.2011 um 22:05 schrieb Khaled Hosny:
There are two issues with right-to-left fontnotes, 1) the footnote number gets somewhere in the middle of the footnote text instead of being in the right margin 2) the footnote rule is left aligned:
\setupalign[r2l] \starttext Text\footnote{Note} \stoptext
strc-not.mkiv: \def\letcurrentnoterulecommand{\expandafter\let\csname\??vn\c!rule:c:\currentnote\endcsname} +\def\letcurrentnoterulealign {\expandafter\let\csname\??vn\c!rule:a:\currentnote\endcsname} \appendtoks \letvalue{\??vn\c!rule:c:\currentnote}\currentnoterulecommandnormal \letvalue{\??vn\c!rule:a:\currentnote}\lefttoright \to \everysetupnote \appendtoks - \processallactionsinset[\noteparameter\c!rule] + \normalexpanded{\noexpand\processallactionsinset[\noteparameter\c!rule]} [ \v!on=>\letcurrentnoterulecommand\currentnoterulecommandnormal, \v!normal=>\letcurrentnoterulecommand\currentnoterulecommandnormal, - \v!left=>\letcurrentnoterulecommand\lefttoright, - \v!right=>\letcurrentnoterulecommand\righttoleft, + \v!left=>\letcurrentnoterulealign \lefttoright, + \v!right=>\letcurrentnoterulealign \righttoleft, \v!off=>\letcurrentnoterulecommand\relax, \s!default=>\letcurrentnoterulecommand\relax, \s!unknown=>\letcurrentnoterulecommand\currentnoterulecommandunknown]% \to \everysetupnote Example: \setupalign[r2l] \setupnote[footnote][rule={on,right}] \setupnotedefinition[footnote][location=left,command={\smash[w]}] % !!! \starttext \showframe Text\footnote{Note} \stoptext Wolfgang
On Mon, Aug 08, 2011 at 04:57:19PM +0200, Wolfgang Schuster wrote:
Am 06.08.2011 um 22:05 schrieb Khaled Hosny:
There are two issues with right-to-left fontnotes, 1) the footnote number gets somewhere in the middle of the footnote text instead of being in the right margin 2) the footnote rule is left aligned:
\setupalign[r2l] \starttext Text\footnote{Note} \stoptext
strc-not.mkiv:
\def\letcurrentnoterulecommand{\expandafter\let\csname\??vn\c!rule:c:\currentnote\endcsname} +\def\letcurrentnoterulealign {\expandafter\let\csname\??vn\c!rule:a:\currentnote\endcsname}
\appendtoks \letvalue{\??vn\c!rule:c:\currentnote}\currentnoterulecommandnormal \letvalue{\??vn\c!rule:a:\currentnote}\lefttoright \to \everysetupnote
\appendtoks - \processallactionsinset[\noteparameter\c!rule] + \normalexpanded{\noexpand\processallactionsinset[\noteparameter\c!rule]} [ \v!on=>\letcurrentnoterulecommand\currentnoterulecommandnormal, \v!normal=>\letcurrentnoterulecommand\currentnoterulecommandnormal, - \v!left=>\letcurrentnoterulecommand\lefttoright, - \v!right=>\letcurrentnoterulecommand\righttoleft, + \v!left=>\letcurrentnoterulealign \lefttoright, + \v!right=>\letcurrentnoterulealign \righttoleft, \v!off=>\letcurrentnoterulecommand\relax, \s!default=>\letcurrentnoterulecommand\relax, \s!unknown=>\letcurrentnoterulecommand\currentnoterulecommandunknown]% \to \everysetupnote
Example:
\setupalign[r2l] \setupnote[footnote][rule={on,right}] \setupnotedefinition[footnote][location=left,command={\smash[w]}] % !!! \starttext \showframe Text\footnote{Note} \stoptext
Thanks Wolfgang! I understand that the patch fixes rule=right (that I tried earlier and didn't work), but I don't understand what \setupnotedefinition is doing (I'm trying to incorporate this in my bidi module so I need to have some understanding of what is happening) To Hans, besides applying this patch, shouldn't "rule=right" be the default in r2l mode? Regards, Khaled -- Khaled Hosny Egyptian Arab
Am 08.08.2011 um 18:06 schrieb Khaled Hosny:
I understand that the patch fixes rule=right (that I tried earlier and didn't work), but I don't understand what \setupnotedefinition is doing (I'm trying to incorporate this in my bidi module so I need to have some understanding of what is happening)
There is a bug with the placement of margin content in RTL mode: \setupalign [r2l] \setuppapersize[A4][A2,landscape] \setuplayout [location=middle] \starttext \showframe \inmargin{Margin}text\par \inleft {Left}text\par \inright {Right}text\par \stoptext With my setup i place the number at the begin of the text and hide it’s width which results in the output you can see. Wolfgang
On 8-8-2011 6:44, Wolfgang Schuster wrote:
Am 08.08.2011 um 18:06 schrieb Khaled Hosny:
I understand that the patch fixes rule=right (that I tried earlier and didn't work), but I don't understand what \setupnotedefinition is doing (I'm trying to incorporate this in my bidi module so I need to have some understanding of what is happening)
There is a bug with the placement of margin content in RTL mode:
sure, as it was not looked into yet (to some extend I want to wait till lines in a par are l/rskip consistent which is on the agenda for luatex for later this year (taco and I already discussed this a while ago) which makes such things cleaner to deal with in mixed modes Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 8-8-2011 6:44, Wolfgang Schuster wrote:
There is a bug with the placement of margin content in RTL mode:
\setupalign [r2l] \setuppapersize[A4][A2,landscape] \setuplayout [location=middle]
\starttext \showframe \inmargin{Margin}text\par \inleft {Left}text\par \inright {Right}text\par \stoptext
With my setup i place the number at the begin of the text and hide it’s width which results in the output you can see.
experimental fix in next beta ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, Aug 09, 2011 at 01:51:44AM +0200, Hans Hagen wrote:
On 8-8-2011 6:44, Wolfgang Schuster wrote:
There is a bug with the placement of margin content in RTL mode:
\setupalign [r2l] \setuppapersize[A4][A2,landscape] \setuplayout [location=middle]
\starttext \showframe \inmargin{Margin}text\par \inleft {Left}text\par \inright {Right}text\par \stoptext
With my setup i place the number at the begin of the text and hide it’s width which results in the output you can see.
experimental fix in next beta
The margin stuff seems to work fine now, but the footnote number is not shown at all: \setupalign[r2l] \setupnote[footnote][rule=right] %\setupnotedefinition[footnote][location=inright] \starttext \showframe Text\footnote{Note} \stoptext Using location=inright shows the number on the right side though a bit outside the right margin. Regards, Khaled -- Khaled Hosny Egyptian Arab
Am 23.08.2011 um 22:58 schrieb Khaled Hosny:
On Tue, Aug 09, 2011 at 01:51:44AM +0200, Hans Hagen wrote:
On 8-8-2011 6:44, Wolfgang Schuster wrote:
There is a bug with the placement of margin content in RTL mode:
\setupalign [r2l] \setuppapersize[A4][A2,landscape] \setuplayout [location=middle]
\starttext \showframe \inmargin{Margin}text\par \inleft {Left}text\par \inright {Right}text\par \stoptext
With my setup i place the number at the begin of the text and hide it’s width which results in the output you can see.
experimental fix in next beta
The margin stuff seems to work fine now, but the footnote number is not shown at all:
\setupalign[r2l] \setupnote[footnote][rule=right] %\setupnotedefinition[footnote][location=inright]
\setupnotedefinition[footnote][location=rightmargin] Wolfgang
On Wed, Aug 24, 2011 at 06:19:13AM +0200, Wolfgang Schuster wrote:
Am 23.08.2011 um 22:58 schrieb Khaled Hosny:
On Tue, Aug 09, 2011 at 01:51:44AM +0200, Hans Hagen wrote:
On 8-8-2011 6:44, Wolfgang Schuster wrote:
There is a bug with the placement of margin content in RTL mode:
\setupalign [r2l] \setuppapersize[A4][A2,landscape] \setuplayout [location=middle]
\starttext \showframe \inmargin{Margin}text\par \inleft {Left}text\par \inright {Right}text\par \stoptext
With my setup i place the number at the begin of the text and hide it’s width which results in the output you can see.
experimental fix in next beta
The margin stuff seems to work fine now, but the footnote number is not shown at all:
\setupalign[r2l] \setupnote[footnote][rule=right] %\setupnotedefinition[footnote][location=inright]
\setupnotedefinition[footnote][location=rightmargin]
Makes no visible difference here, but I'm not even sure what is the correct result is so I can live with what I have. I just think it is a bug to not have a footnote number by default when \setupalign[r2l] is set. Regards, Khaled -- Khaled Hosny Egyptian Arab
On 8-8-2011 6:06, Khaled Hosny wrote:
I understand that the patch fixes rule=right (that I tried earlier and didn't work), but I don't understand what \setupnotedefinition is doing (I'm trying to incorporate this in my bidi module so I need to have some understanding of what is happening)
it does a lot (and at some point definitions etc will become r2l aware as part of a larger directional scheme)
To Hans, besides applying this patch, shouldn't "rule=right" be the default in r2l mode?
not in a local r2l mode but in an upcoming document direction mode Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 8-8-2011 4:57, Wolfgang Schuster wrote:
\def\letcurrentnoterulecommand{\expandafter\let\csname\??vn\c!rule:c:\currentnote\endcsname} +\def\letcurrentnoterulealign {\expandafter\let\csname\??vn\c!rule:a:\currentnote\endcsname}
etc ... added Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Khaled Hosny
-
Wolfgang Schuster