LTR footnotes from RTL paragraph
Hi Footnotes originating from an RTL paragraph will be also typeset in RTL mode as the following example illustrates: %%%%%%%%%%%%%%%%%%%%%% \setupdelimitedtext[blockquote] [leftmargin=1.5em,rightmargin=0em,] \definedelimitedtext[rtlblockquote] \setupdelimitedtext[rtlblockquote] [leftmargin=0em,rightmargin=1.5em,before={\righttoleft}] \starttext \input knuth \startblockquote \input knuth\footnote{this starts on the left.} \stopblockquote \startrtlblockquote \input knuth\footnote{this should start on the left, but it doesn't.} \stoprtlblockquote \input knuth \stoptext %%%%%%%%%%%%%%%%%%%%%%%% According to the wiki, that's the expected behaviour (https://wiki.contextgarden.net/RTL#Footnotes). However, I'd prefer to keep the footnotes as LTR footnotes. Can I convince ConTeXt to typeset these footnotes in LTR mode? Best, Denis
Ok, this works:
\setupnote[footnote][align=l2r]
Does that have any drawbacks?
Is it possible to change the text direction for single notes ?
Denis
Von: ntg-context
On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
Ok, this works:
\setupnote[footnote][align=l2r]
Does that have any drawbacks?
Hi Denis, I don’t think it may have (other than forgetting other options, such as hz or hanging).
Is it possible to change the text direction for single notes?
It doesn’t seem an option for \startfootnote. How about defining a new command? \definedelimitedtext[rtlblockquote][before={\righttoleft}] \definenote[otnote][footnote] \setupnote[otnote][align=l2r] \starttext \input zapf \startblockquote \input zapf\footnote{this starts on the left.} \stopblockquote \startrtlblockquote \input zapf\footnote{this should start on the left.} \input zapf\otnote{this should start on the left.} \stoprtlblockquote \input zapf \stoptext Just in case it might help, Pablo
-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Pablo Rodriguez via ntg-context Gesendet: Donnerstag, 16. Dezember 2021 18:07 An: Denis Maier via ntg-context Cc: Pablo Rodriguez Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
Ok, this works:
\setupnote[footnote][align=l2r]
Does that have any drawbacks?
Hi Denis,
I don’t think it may have (other than forgetting other options, such as hz or hanging).
Ah, I alway forget that. By the way, is there a way to append to setting instead of overriding it?
Is it possible to change the text direction for single notes?
It doesn’t seem an option for \startfootnote.
Yep, unlike other \startstops \startfootnote does not inherit key-values settings from the corresponding \setupX (I mean, it does of course inherit the settings, but you can't set them directly on \startfootnote.) Why is that? Is it due to the fact that note setups take place in two places? (\setupnote vs \setupnotation)?
How about defining a new command?
Thanks for pointing me in that direction. That looks good.
\definedelimitedtext[rtlblockquote][before={\righttoleft}] \definenote[otnote][footnote] \setupnote[otnote][align=l2r] \starttext \input zapf \startblockquote \input zapf\footnote{this starts on the left.} \stopblockquote \startrtlblockquote \input zapf\footnote{this should start on the left.} \input zapf\otnote{this should start on the left.} \stoprtlblockquote \input zapf \stoptext
Just in case it might help,
Pablo __________________________________________________________ _________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net __________________________________________________________ _________________________
On 12/17/2021 10:02 AM, Denis Maier via ntg-context wrote:
-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Pablo Rodriguez via ntg-context Gesendet: Donnerstag, 16. Dezember 2021 18:07 An: Denis Maier via ntg-context Cc: Pablo Rodriguez Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
Ok, this works:
\setupnote[footnote][align=l2r]
Does that have any drawbacks?
Hi Denis,
I don’t think it may have (other than forgetting other options, such as hz or hanging).
Ah, I alway forget that. By the way, is there a way to append to setting instead of overriding it?
sure, but I don't think it needs to be avocated (valid but not intuitive) i'll add this (only a few line addition with no performance hit): \definealign[MyAlign][r2l,flushleft] so that you can do \setupalign[MyAlign] and you can also use it as value to the align parameter as well ... the usual 'context abstraction' so again something to wikify ... Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
-----Ursprüngliche Nachricht----- Von: Hans Hagen
Gesendet: Freitag, 17. Dezember 2021 12:24 An: mailing list for ConTeXt users Cc: Maier, Denis Christian (UB) ; oinos@gmx.es Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/17/2021 10:02 AM, Denis Maier via ntg-context wrote:
-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Pablo Rodriguez via ntg-context Gesendet: Donnerstag, 16. Dezember 2021 18:07 An: Denis Maier via ntg-context Cc: Pablo Rodriguez Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
Ok, this works:
\setupnote[footnote][align=l2r]
Does that have any drawbacks?
Hi Denis,
I don’t think it may have (other than forgetting other options, such as hz or hanging).
Ah, I alway forget that. By the way, is there a way to append to setting instead of overriding it?
sure, but I don't think it needs to be avocated (valid but not intuitive)
i'll add this (only a few line addition with no performance hit):
\definealign[MyAlign][r2l,flushleft]
so that you can do
\setupalign[MyAlign]
and you can also use it as value to the align parameter as well ... the usual 'context abstraction'
Nice! So, IIUC, you should also be able to do something like this then: \definealign[AlignStandard][verytolerant,stretch] \definealign[AlignR2L][AlignStandard][r2l] Is that correct? Re wikifying: I've tried to create the \definealign page, but unlike other command pages this page would look empty with no automatically generated content. So I guess the command is not yet in the command index, right? Denis
On 12/21/2021 10:02 AM, denis.maier@unibe.ch wrote:
Nice! So, IIUC, you should also be able to do something like this then:
\definealign[AlignStandard][verytolerant,stretch] \definealign[AlignR2L][AlignStandard][r2l]
Is that correct?
No, because these definitions are interpreted at definition time there is no inheritance (unless I explcitly add that); Is it really needed? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
-----Ursprüngliche Nachricht----- Von: Hans Hagen
Gesendet: Freitag, 17. Dezember 2021 12:24 An: mailing list for ConTeXt users Cc: Maier, Denis Christian (UB) ; oinos@gmx.es Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/17/2021 10:02 AM, Denis Maier via ntg-context wrote:
-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Pablo Rodriguez via ntg-context Gesendet: Donnerstag, 16. Dezember 2021 18:07 An: Denis Maier via ntg-context Cc: Pablo Rodriguez Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
Ok, this works:
\setupnote[footnote][align=l2r]
Does that have any drawbacks?
Hi Denis,
I don’t think it may have (other than forgetting other options, such as hz or hanging).
Ah, I alway forget that. By the way, is there a way to append to setting instead of overriding it?
sure, but I don't think it needs to be avocated (valid but not intuitive)
i'll add this (only a few line addition with no performance hit):
\definealign[MyAlign][r2l,flushleft]
so that you can do
\setupalign[MyAlign]
and you can also use it as value to the align parameter as well ... the usual 'context abstraction'
so again something to wikify ...
Wanted to wikify, but is this already implemented? Denis
On 1/12/2022 9:57 PM, denis.maier@unibe.ch wrote:
-----Ursprüngliche Nachricht----- Von: Hans Hagen
Gesendet: Freitag, 17. Dezember 2021 12:24 An: mailing list for ConTeXt users Cc: Maier, Denis Christian (UB) ; oinos@gmx.es Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/17/2021 10:02 AM, Denis Maier via ntg-context wrote:
-----Ursprüngliche Nachricht----- Von: ntg-context
Im Auftrag von Pablo Rodriguez via ntg-context Gesendet: Donnerstag, 16. Dezember 2021 18:07 An: Denis Maier via ntg-context Cc: Pablo Rodriguez Betreff: Re: [NTG-context] LTR footnotes from RTL paragraph On 12/16/21 12:34 PM, Denis Maier via ntg-context wrote:
Ok, this works:
\setupnote[footnote][align=l2r]
Does that have any drawbacks?
Hi Denis,
I don’t think it may have (other than forgetting other options, such as hz or hanging).
Ah, I alway forget that. By the way, is there a way to append to setting instead of overriding it?
sure, but I don't think it needs to be avocated (valid but not intuitive)
i'll add this (only a few line addition with no performance hit):
\definealign[MyAlign][r2l,flushleft]
so that you can do
\setupalign[MyAlign]
and you can also use it as value to the align parameter as well ... the usual 'context abstraction'
so again something to wikify ...
Wanted to wikify, but is this already implemented? sure
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Denis Maier
-
denis.maier@unibe.ch
-
Hans Hagen
-
Pablo Rodriguez