Re: [NTG-context] r2l alignment and linenumbering conflict?
Just to note: all numbers in the body text are having their digits placed individually right-to-left. Notice, in the attached PDF, how the ١٤ is displayed as ٤١, and how ١٨٧٢ is ٢٧٨١ … but also the footnote marker is ٣١ instead of ١٣ as it correctly is below in the footnote itself. Is there any temporary work around for this, until we sort out the underlying causes? Talal PastedGraphic-1.pdf Description: Adobe PDF document On 3 Aug 2015, at 16:19, Hans Hagen pra...@wxs.nl wrote: On 8/3/2015 3:54 PM, tala...@fastmail.fm wrote: I am having problems with the directionality of numbers and mirrored characters (like parentheses). When using bidi, the numbers are inverted (5102 instead of 2015); with the explicit commands, the mirrored characters are inverted as well. we have several approaches: the oldest method is based on some heuristics and targets at tex input in the sense that we assume tagging and directional switches the other two are unicode bidi based (successive versions and there might be more as that evolves) in any case, everything bidi / rl has to fit into some system and that's something idris and i are working on (well, we did at some point but we need to pick up that thread) ... so maybe you can trigger idris into onthology mode and help him 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 - ___ 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 ___ ___ 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 ___
Re: [NTG-context] footnotes when using RtL (Arabic)
I wonder whether anyone might have any thoughts about the below? Many thanks. On 21 Jul 2015, at 20:56, tala...@fastmail.fm wrote: I’m reviving this old thread, as the problem appears to still exist. Consider the following: \starttext \showframe \definenote[afootnote][rule={on,right},paragraph=no] \startalignment[r2l] Testing.\afootnote{This is footnote one.} Testing testing.\afootnote{This is footnote two.} Testing testing testing.\afootnote{This is footnote three.} \stopalignment \stoptext r2l.pdf In the output (r2l.pdf), the text runs from right to left as it should, and the footnote reference numbers are in the right margin, as they should be. However, if we switch the option “paragraph” to “yes”, the entire frame no longer runs r2l (see the output in r2l-yes.pdf). r2l-yes.pdf What I want is for the text to read as follows: .eerht etontoof si sihT 3 .owt etontoof si sihT 2 .eno etontoof si sihT 1 where the entire frame begins at the right margin, such that the first footnote number (1) is in the right margin, instead of in the left margin as it is in r2l-yes.pdf. To say it another way, the entire footnote frame should be r2l, regardless of its contents, perhaps (as Idris wrote to me) through some hard direction switch for the entire frame. Best wishes, Talal ___ 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 ___
Re: [NTG-context] footnotes when using RtL (Arabic)
Thank you, Pablo. This is indeed the problem: the individual elements — the notes — are correctly RTL, but the overall “paragraph” is ordering the elements LTR (with the additional caveat the footnote paragraph is not properly aligned/justified to the right margin either). Best wishes, Talal On 30 Jul 2015, at 15:26, Pablo Rodriguez oi...@gmx.es wrote: On 07/30/2015 03:00 PM, tala...@fastmail.fm wrote: I wonder whether anyone might have any thoughts about the below? Many thanks. I wonder whether there is a bug somewhere in notes, because you may have r2l notations, but the notes paragraph is built l2r: \setuppapersize[A6] \starttext \showframe \definenote[afootnote][rule={on,right}, paragraph=yes] \definenotation[afootnote][align=r2l] \startalignment[r2l] Testing.\afootnote{This is footnote one.} Testing testing.\afootnote{This is footnote two.} Testing testing testing.\afootnote{This is footnote three.} \stopalignment \stoptext Just in case it might help, Pablo -- http://www.ousia.tk ___ 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 ___ ___ 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 ___
[NTG-context] r2l alignment and linenumbering conflict?
There seems to be some limitation (or bug) in right-to-left (r2l) alignment, when used alongside linenumbering. Consider the following: \setuppapersize[A6] \starttext \showframe \section{Incorrect} \startlinenumbering \startalignment[r2l] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. \stopalignment \stoplinenumbering \section{Correct} \startalignment[r2l] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. \stopalignment \stoptext The RTL alignment works correctly on its own. However, when you introduce another factor — here, linenumbers — the RTL alignment is ignored. Perhaps this linked to the problem with of RTL footnotes being discussed here: gmane.comp.tex.context/92113 http://article.gmane.org/gmane.comp.tex.context/92113? Best wishes, Talal___ 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 ___
Re: [NTG-context] r2l alignment and linenumbering conflict?
Sorry to pester, but this problem is barring me from moving my book project into ConTeXt this weekend.The use of linenumbers seems to throw off the R2L mechanism. Example ofthe problem attached. linertl.pdf Description: Adobe PDF document linertl.tex Description: application/applefile On 30 Jul 2015, at 16:30, tala...@fastmail.fm wrote:There seems to be some limitation (or bug) in right-to-left (r2l) alignment, when used alongside linenumbering. Consider the following:\setuppapersize[A6]\starttext \showframe\section{Incorrect}\startlinenumbering\startalignment[r2l]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla.\stopalignment\stoplinenumbering\section{Correct}\startalignment[r2l]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla.\stopalignment\stoptextThe RTL alignment works correctly on its own. However, whenyou introduce another factor — here, linenumbers — the RTL alignment is ignored.Perhaps this linked to the problem with of RTL footnotes being discussed here:gmane.comp.tex.context/92113?Best wishes,Talal___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-contextwebpage : http://www.pragma-ade.nl / http://tex.aanhet.netarchive : http://foundry.supelec.fr/projects/contextrev/wiki : http://contextgarden.net__ 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 ___
Re: [NTG-context] footnotes when using RtL (Arabic)
Thank you, Pablo, for bringing method=two to my attention. I’ve read what has been written about in on the mailing list. However, in my case, it does not solve the problem. On the document I’ve attached: - using method=default produces the error I raised yesterday; - using method=one (or method=two) seem to do nothing — the parentheses are still inversed, as if I hadn’t defined \setupdirections at all. See attached: linenotes r2l 2.tex Description: Binary data linenotes r2l 2.pdf Description: Adobe PDF document Talal On 2 Aug 2015, at 08:52, Pablo Rodriguez oi...@gmx.es wrote: On 08/02/2015 12:36 AM, tala...@fastmail.fm wrote: I’ve run into a hiccup. In the previous MWE that worked with Woflgang and Hans’ patch, the notes were footnotes. However, if make them into linenotes, we run into a strange problem: the first note is typeset correctly, but all the remaining linenotes in that stream are typeset on the bottom left corner of the page. See attached files. Hi Talal, I experienced this issue before (although r2l languages are all Greek to me :-(). \setupdirections[bidi=global, method=two] seems to fix the problem. I hope it helps, Pablo -- http://www.ousia.tk ___ 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 ___ ___ 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 ___
Re: [NTG-context] r2l alignment and linenumbering conflict?
Thanks for that, Wolfgang. I can only hope that, as the culprit is known, it can be apprehended! Idris: here is the document that I had sent (and many thanks to you and to Pablo for the more general advice): \unexpanded\def\doVariant#1#2#3% {\startlinenote[#1]{#2] #3}#2\stoplinenote[#1]} \newcounter\countvariants \unexpanded\def\variant {\doglobal\increment\countvariants \normalexpanded{\doVariant{Varia:\countvariants}}} \setupalign[r2l] \showframe \starttext \section{Correct} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. Morbi id justo vitae quam rhoncus tincidunt ut adipiscing nisi. \section{Incorrect} \startlinenumbering Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. Morbi id justo vitae quam rhoncus tincidunt ut adipiscing nisi. \stoplinenumbering \stoptext All the best, Talal On 1 Aug 2015, at 19:47, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: tala...@fastmail.fm mailto:tala...@fastmail.fm 1. August 2015 17:37 Sorry to pester, but this problem is barring me from moving my book project into ConTeXt this weekend. The use of linenumbers seems to throw off the R2L mechanism. Example of the problem attached. The culprit is the function boxed.stage_two in page.lua which output each text line in the line numbering environment in left to right mode. When you have justified lines everything is fine but when you have a ragged line (e.g. the last line in a paragraph) ConTeXt aligns the context with the left margin. \starttext \showframe \startalignment[righttoleft,flushleft] \input ward \blank \startlinenumbering \input ward \stoplinenumbering \stopalignment \stoptext 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 ___ ___ 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 ___
Re: [NTG-context] footnotes when using RtL (Arabic)
I’ve run into a hiccup. In the previous MWE that worked with Woflgang and Hans’ patch, the notes were footnotes. However, if make them into linenotes, we run into a strange problem: the first note is typeset correctly, but all the remaining linenotes in that stream are typeset on the bottom left corner of the page. See attached files. Best wishes, Talal linenotes r2l.tex Description: Binary data linenotes r2l.pdf Description: Adobe PDF document On 31 Jul 2015, at 12:07, tala...@fastmail.fm wrote: Excellent. This seems to solve the problem completely. I even tried mixing Arabic and English text in the RTL footnotes, switched on the “alternative=serried” option, and defined my own custom note streams — everything worked very well. The only thing that didn’t work is to mix, in the same stream, footnotes that are LTR with footnotes that are RTL. But I did not expect this to work, and I cannot think of a real world scenario in which such footnotes would/should be mixed in the same stream. Attached are both the .tex file and the PDF with a perfectly working example. Many thanks to you both, Wolfgang and Hans. Hans, I assume we’ll know if the patch eventually makes it into a beta? Best, Talal RTL-paragraphed-footnotes.texRTL-paragraphed-footnotes.pdf On 31 Jul 2015, at 09:39, Hans Hagen pra...@wxs.nl wrote: On 7/31/2015 1:51 AM, tala...@fastmail.fm wrote: You’re right. The patch gets us half way to the desired behaviour (namely, correct ordering of the footnotes within the paragraph). But it seems that the ‘paragraph’ option doesn’t play well with RTL generally, resulting in the second note disappearing when using \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups. can you try \unprotect \unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi} \def\strc_notes_flush_global {\begingroup \useinterlinespaceparameter\noteparameter \doifelse{\noteparameter\c!paragraph}\v!yes {\leftorrightvbox {\starthboxestohbox \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber \stophboxestohbox}} {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}% \endgroup} \protect On 30 Jul 2015, at 20:04, Wolfgang Schuster schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote: tala...@fastmail.fm mailto:tala...@fastmail.fm 30. Juli 2015 20:37 I’ve come across a snag. When using parentheses in Arabic footnotes, they are flipped. In any earlier email (http://article.gmane.org/gmane.comp.tex.context/91501/match=setupdirections+bidi+global), you had advised adding the following: \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups \setupnote[footnote][setups=note:footnote] % align=righttoleft However, if one does this with your patch, the second footnote gets dropped. Here is the MWE: The second note disappears even without the patch, the problem this the paragraph option for the notes. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl mailto: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 ___ ___ 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 ___ -- - 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 - ___ 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
Re: [NTG-context] r2l alignment and linenumbering conflict?
Thank you very much for this, Idris. It works nicely in the sample file you sent. But it goes off again once you add \setupdirections[bidi=global]. Consider the following: == \setuppapersize[A6] \definefontfamily[mainface][serif][ALMFixed][% features=arabic, range=arabic, ] \setupbodyfont [mainface] \starttext \showframe \setupdirections[bidi=global] \setupthinrules[color=white] \setupwhitespace[big] \section{Incorrect} \startlinenumbering \startalignment[r2l] هذه رسالة لطيفة ألفها العالم الكبير الفهامة النحرير. هذه رسالة جامعة مانعة ألفها الشيخ الفاضل... \thinrule Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. \stopalignment \stoplinenumbering \section{Correct} \startalignment[r2l] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. \stopalignment \stoptext = With many thanks, and salam, Talal On 2 Aug 2015, at 12:51, Idris Samawi Hamid ادريس سماوي حامد idris.ha...@colostate.edu wrote: On Sun, 02 Aug 2015 03:24:12 -0600, tala...@fastmail.fm tala...@fastmail.fm wrote: Thanks for that, Wolfgang. I can only hope that, as the culprit is known, it can be apprehended! Talal, here is a barbarous workaround using \thinrule: == \setuppapersize[A6] \starttext \showframe \setupthinrules[color=white] \setupwhitespace[big] \section{Incorrect} \startlinenumbering \startalignment[r2l] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla.\thinrule Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. \stopalignment \stoplinenumbering \section{Correct} \startalignment[r2l] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque molestie dictum quam non congue. Integer ut dolor vel mi vestibulum molestie vel et nulla. \stopalignment \stoptext == This effectively hides the problem. Unfortunately it is apparently not straightforward to invoke the \thinrule automatically at the end of every paragraph [see the other thread with Alan]. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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 ___ ___ 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 ___
Re: [NTG-context] footnotes when using RtL (Arabic)
Thanks for the help, Pablo, but, unfortunately, this is not solvingthe problem (at least over here): The beginning of the third footnote/linenote is still missing. It should read (at the end of line one and at the beginning of line two of the notes):0 وهذهتعليقةThe end of line one is dropped. I have put an arrow on the attached PDF to demonstrate where it should be. (Of course, it is possible that our source tex files are slightly different?)Talal linenotes r2l 3.pdf Description: Adobe PDF document linenotes r2l 3.tex Description: Binary data On 2 Aug 2015, at 11:47, Pablo Rodriguez oi...@gmx.es wrote:On 08/02/2015 12:02 PM, tala...@fastmail.fm wrote:Apologies: While the problem remains, I realise now that using "method=one"or "method=two" wasn’t having any effect because I had forgotten to addthe option "align=righttoleft,” to "\setupnotations[lnote]”. Having doneso, adding the method options do have an effect. But the output is stillflawed; the beginning of the third note is missing at the end of thefirst line of the footnote, while its last few words can be seen on thesecond line of the footnote. See my new attachment (linenotes r2l 3,tex) below:Hi Talal,replace you bidi settings with this ones:\setupdirections[bidi=global, method=two]\startsetups[note:linenote] \setupdirections[bidi=global,method=two,fences=yes]\stopsetups\setupalign[r2l]At least, they work for me.Pablo-- http://www.ousia.tk___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-contextwebpage : http://www.pragma-ade.nl / http://tex.aanhet.netarchive : http://foundry.supelec.fr/projects/contextrev/wiki : http://contextgarden.net__ 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 ___
Re: [NTG-context] r2l alignment and linenumbering conflict?
Thank you very much for this, Idris. What with the other bugs and problems I’ve faced with R2L (in footnotes, etc.), I was starting to wonder whether a more explicit, rather than global, use of RTL might be a better approach. I’m going to experiment with them, at least to learn how to use them with greater focus. The good news is that apparently Hans has already patched the page-lin.lua file that Wolfgang had identified as the culprit, and it will be included in the next beta. Many thanks to you, Pablo, Wolfgang, and of course Hans so much for your help in getting these right-to-left issues solved. There are a couple of small bidi issues remaining, including that mentioned in the “footnotes when using RtL (Arabic)” thread. The one or two other ones I will post shortly. But, in any case, I have now completely moved my project over into ConTeXt, confident that it (and the team behind it) can handle all of the needs of a multilingual academic monograph and of a bi-direction, Arabic critical edition’s need With many thanks, Talal On 2 Aug 2015, at 18:15, Idris Samawi Hamid ادريس سماوي حامد idris.ha...@colostate.edu wrote: Dear Talal, Salaam. See below: On Sun, 02 Aug 2015 07:31:37 -0600, tala...@fastmail.fm tala...@fastmail.fm wrote: Thank you very much for this, Idris. It works nicely in the sample file you sent. But it goes off again once you add \setupdirections[bidi=global]. Consider the following: == snip \setupdirections[bidi=global] \setupthinrules[color=white] \setupwhitespace[big] \section{Incorrect} \startlinenumbering \startalignment[r2l] هذه رسالة لطيفة ألفها العالم الكبير الفهامة النحرير. هذه رسالة جامعة مانعة ألفها الشيخ الفاضل... \thinrule === You're right. \thinrule has LR unicode characters which is probably why it gets thrown off. So if you turn off global bidi and then either 1) just go with either global RL or 2) invoke RL inside the linenumbering it will work: % \setupdirections[bidi=global] \righttoleft %% global RL or just \startlinenumbering \righttoleft %% local RL, not needed if global RL invoked \startalignment[r2l] Again, it's a barbarous (and temporary) workaround. See attached. Wassalaam Idris PS Unless there is a lot of Latin in the critical edition file, I would probably depend more on explicit dir commands (\righttolet, \lefttoright) and less on bidi, which is still buggy in a number of ways. Beyond the ConTeXt implementation: The unicode bidi algorithm was not designed with advanced typesetting and typography in mind, works best for text-editing etc. per se. so local bidi *may perhaps* be more useful than global bidi for the critical-edition portion your project. I'm not at all suggesting that this particular bug should not be a priority; printing paragraph lines in a linenumbering environment *must* be direction-agnostic. Just a matter of general strategy to consider. -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523r2l-linenumbering-arabic.texr2l-linenumbering-arabic.pdf___ 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 ___ ___ 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 ___
Re: [NTG-context] r2l alignment and linenumbering conflict?
Hans, the beta is a solid step forward regarding bidi and Arabic support, and not just in footnotes. Thank you. However, it appears that my earlier declarations of ‘problem solved’ were a bit premature. Footnotes display everything correctly, but not linenumber notes. Using the three bidi methods of \setupdirections[bidi]: - ‘default’ orders the linenumber notes and their texts right-to-left, but any number therein is reversed (4102 instead of 2014). - ‘one’ does not render either the note block nor the individual notes' texts right-to-left. - ‘two’ is identical to method ‘one’. Compare these to regular footnotes, where everything is rendered correctly as of this new beta. Below is a minimal example with resulting PDF output. Talal = %%% LANGUAGE FONTS BIDI \mainlanguage[arabic] \definefontfamily [mainface] [rm] [ALM Fixed] [range=arabic,features=arabic] \setupbodyfont[mainface,11pt] \setupdirections[bidi=global,method=two,fences=no] \setupalign[r2l] %% HEADINGS \setuppagenumber[numberconversion=arabicdecimals] %%% NOTES \definenote[footnote][% Used for my comments in English. setups=note:footnote, align=righttoleft, rule={on,right}, paragraph=yes, ] \setupnotations[footnote][% align=righttoleft, alternative=serried, width=broad, distance=.5em, display=no, numberconversion=arabicdecimals, headstyle=\lefttoright, ] \setuplinenumbering[% style=\tfxx, referencing=on, step=1, location=outer, method=page, align=left, distance=1em, width=0.4em, conversion=arabicdecimals, ] \definelinenote[linenotedefault][% setups=note:linenotedefault, align=righttoleft, rule={on,right}, paragraph=yes, ] \setupnotations[linenotedefault][% align=righttoleft, alternative=serried, width=broad, distance=.5em, display=no, numberconversion=arabicdecimals, headstyle=\lefttoright, ] \definelinenote[linenoteone][% setups=note:linenoteone, align=righttoleft, rule={on,right}, paragraph=yes, ] \setupnotations[linenoteone][% align=righttoleft, alternative=serried, width=broad, distance=.5em, display=no, numberconversion=arabicdecimals, headstyle=\lefttoright, ] \definelinenote[linenotetwo][% setups=note:linenotetwo, align=righttoleft, rule={on,right}, paragraph=yes, ] \setupnotations[linenotetwo][% align=righttoleft, alternative=serried, width=broad, distance=.5em, display=no, numberconversion=arabicdecimals, headstyle=\lefttoright, ] \startsetups[note:footnote] \setupdirections[bidi=on,method=two,fences=no] \stopsetups \startsetups[note:linenotedefault] \setupdirections[bidi=on,method=default] \stopsetups \startsetups[note:linenoteone] \setupdirections[bidi=on,method=one] \stopsetups \startsetups[note:linenotetwo] \setupdirections[bidi=on,method=two] \stopsetups %%% DOCUMENT \starttext \showframe \startlinenumbering \input ward\footnote{هذه تعليقة أولى كتبت عام ٢٠١٤.} \input ward\footnote{هذه تعليقة ثانية (٢٠١٤).} \input ward\linenotedefault{هذه تعليقة أولى كتبت عام ٢٠١٤.} \input ward\linenotedefault{هذه تعليقة ثانية (٢٠١٤).} \input ward\linenoteone{هذه تعليقة أولى كتبت عام ٢٠١٤.} \input ward\linenoteone{هذه تعليقة ثانية (٢٠١٤).} \input ward\linenotetwo{هذه تعليقة أولى كتبت عام ٢٠١٤.} \input ward\linenotetwo{هذه تعليقة ثانية (٢٠١٤).} \stoplinenumbering \stoptext \stoptext = num-ar.pdf Description: Adobe PDF document On 3 Aug 2015, at 17:52, tala...@fastmail.fm wrote: Well, I don’t know if ‘solves’ the underlying questions that Hans wrote about, but after some more fiddling, I now have all the numbers appearing as I expect them to. It required specifying `method=two` as part of `\setupdirections[bidi=global,method=two]`. That, along with the `numbercommand=\righttoleft` in \setuphead[section], means that it now looks as I expect it to. Unless someone identifies a problem with any of this, I think I’ll write up a summary on the Wiki. Without trolling through the mailing list for anything on RTL and then experimenting with the various combinations, it would be hard for one to divine how to get this to work. For posterity’s sake, here is a full MWE example: == %%% LANGUAGE AND FONTS \mainlanguage[arabic] \definefontfamily [mainface] [rm] [ALM Fixed][range=arabic,features=arabic] \setupbodyfont[mainface,12pt] \setupdirections[bidi=global,method=two] \setupalign[r2l] %\righttoleft %% HEADINGS \setuphead[section][ conversion=myconversion, numbercommand=\righttoleft
Re: [NTG-context] footnotes when using RtL (Arabic)
You’re right. The patch gets us half way to the desired behaviour (namely, correct ordering of the footnotes within the paragraph). But it seems that the ‘paragraph’ option doesn’t play well with RTL generally, resulting in the second note disappearing when using \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups. On 30 Jul 2015, at 20:04, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: tala...@fastmail.fm mailto:tala...@fastmail.fm 30. Juli 2015 20:37 I’ve come across a snag. When using parentheses in Arabic footnotes, they are flipped. In any earlier email (http://article.gmane.org/gmane.comp.tex.context/91501/match=setupdirections+bidi+global http://article.gmane.org/gmane.comp.tex.context/91501/match=setupdirections+bidi+global), you had advised adding the following: \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups \setupnote[footnote][setups=note:footnote] % align=righttoleft However, if one does this with your patch, the second footnote gets dropped. Here is the MWE: The second note disappears even without the patch, the problem this the paragraph option for the notes. 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 ___ ___ 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 ___
[NTG-context] cross-references between documents in a project (using \useexternaldocument)
Dear all, I am trying to create cross references between two documents in my project. Links between the two are successfully made, but the actual page numbers are not being printed (which, for my purposes, are what I actually need, not links). Am I doing something wrong, or is this a known bug (such that I should cease my attempts)? Is \useexternaldocument the wrong command for this purpose? Minimum example files below: % project \project project_xref \startproduct prd_xref \component xref1 \component xref2 \stopproduct % product \startproject project_xref \environment env_xref \product prd_xref \stopproject % environment \startenvironment env_xref \setupinteraction [state=start, style=, color=blue, contrastcolor=, menu=on, title=Cross referencing Test File, author=Gerard Verhaag] \stopenvironment % component1 [xref1] \project project_xref \startcomponent xref1 \starttext \chapter[cross]{Cross referencing} \chapter[lorem]{Lorem} Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem]. \stoptext \stopcomponent % component2 [xref2] \project project_xref \startcomponent xref2 \useexternaldocument[xrf][xref1] \starttext Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[xrf::lorem]. \stoptext \stopcomponent All the best, Talal ___ 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 ___
Re: [NTG-context] local environment?
Hans, just to clarify (as I’m still new to the language of ConTeXt): - By ‘style’ you mean environment? - And by ‘common style’ you mean one, single environment document? - Finally, by ‘this assumes that settings are not global’: what settings — the environment? My apologies for the avalanche of questions. (1) set up a common style and then load specific ones for each part or (2) use grouping \start \component #1 \stop although this assumes that settings are not global -- - 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 - ___ 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 ___ ___ 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 ___
[NTG-context] local environment?
Dear all, What is the replacement for `localenvironment` in project structures? The first part of my book has one layout; the second has another. I have designed one environment for the first part, and another environment for the second. I do not want the first environment to be used for the second half of the book. In cont-eni.pdf, I read about using `localenvironment` for such scenarios, but it seems this has been removed. This is probably a very basic question, but how do I should change the following such that *one pdf* is produced, where the first part—ComponentA—uses EnvironmentA’s layout, while the second part—ComponentB—uses EnvironmentB's. If any startsetups need to be defined, I’d be grateful for any example, showing also where to place them. # Product \startproduct MyProduct \component ComponentA \component ComponentB \stopproduct # EnvironmentA \startenvironment envA % the definitions \stopenvironment # EnvironmentB \startenvironment envB % the definitions \stopenvironment # ComponentA \environment envA \product MyProduct \startcomponent ComponentA \starttext … \stoptext # ComponentB \environment envB \product MyProduct \startcomponent ComponentA \starttext … \stoptext --- With thanks, Talal ___ 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 ___
Re: [NTG-context] r2l alignment and linenumbering conflict?
Well, I don’t know if ‘solves’ the underlying questions that Hans wrote about, but after some more fiddling, I now have all the numbers appearing as I expect them to. It required specifying `method=two` as part of `\setupdirections[bidi=global,method=two]`. That, along with the `numbercommand=\righttoleft` in \setuphead[section], means that it now looks as I expect it to. Unless someone identifies a problem with any of this, I think I’ll write up a summary on the Wiki. Without trolling through the mailing list for anything on RTL and then experimenting with the various combinations, it would be hard for one to divine how to get this to work. For posterity’s sake, here is a full MWE example: == %%% LANGUAGE AND FONTS \mainlanguage[arabic] \definefontfamily [mainface] [rm] [ALM Fixed][range=arabic,features=arabic] \setupbodyfont[mainface,12pt] \setupdirections[bidi=global,method=two] \setupalign[r2l] %\righttoleft %% HEADINGS \setuphead[section][ conversion=myconversion, numbercommand=\righttoleft, % -- toggle ] \setuplinenumbering[conversion=myconversion] \setupnotations[footnote][numberconversion=myconversion] \setupnotations[linenote][numberconversion=myconversion] \setuppagenumber[numberconversion=myconversion] \defineconversion [myconversion] [١,٢,٣,٤,٥,٦,٧,٨,٩,١٠, ١١,١٢,١٣,١٤,١٥,١٦,١٧,١٨,١٩,٢٠, ۲۱,۲۲,۲۳,۲٤,۲٥,۲٦,۲۷,۲۸,۲۹,۳۰, ٣١,٣٢,٣٣,٣٤,٣٥,٣٦,٣٧,٣٨,٣٩,٤٠, ٤١,٤٢,٤٣,٤٤,٤٥,٤٦,٤٧,٤٨,٤٩,٥٠, ٥١,٥٢,٥٣,٥٤,٥٥,٥٦,٥٧,٥٨,٥٩,٦٠, ٦١,٦٢,٦٣,٦٤,٦٥,٦٦,٦٧,٦٨,٦٩,٧٠, ٧١,٧٢,٧٣,٧٤,٧٥,٧٦,٧٧,٧٨,٧٩,٨٠, ٨١,٨٢,٨٣,٨٤,٨٥,٨٦,٨٧,٨٨,٨٩,٩٠, ٩١,٩٢,٩٣,٩٤,٩٥,٩٦,٩٧,٩٨,٩٩,١٠٠, ١٠١,١٠٢,١٠٣,١٠٤,١٠٥,١٠٦,١٠٧,١٠٨,١٠٩,١١٠, ١١١,١١٢,١١٣,١١٤,١١٥,١١٦,١١٧,١١٨,١١٩,١٢٠, ١٢١,١٢٢,١٢٣,١٢٤,١٢٥,١٢٦,١٢٧,١٢٨,١٢٩,١٣٠, ١٣١,١٣٢,١٣٣,١٣٤,١٣٥,١٣٦,١٣٧,١٣٨,١٣٩,١١٣٠, ١٤١,١٤٢,١٤٣,١٤٤,١٤٥,١٤٦,١٤٧,١٤٨,١٤٩,١٥٠, ١٥١,١٥٢,١٥٣,١٥٤,١٥٥,١٥٦,١٥٧,١٥٨,١٥٩,١٦٠, ١٦١,١٦٢,١٦٣,١٦٤,١٦٥,١٦٦,١٦٧,١٦٨,١٦٩,١٧٠, ١٧١,١٧٢,١٧٣,١٧٤,١٧٥,١٧٦,١٧٧,١٧٨,١٧٩,١٨٠, ١٨١,١٨٢,١٨٣,١٨٤,١٨٥,١٨٦,١٨٧,١٨٨,١٨٩,١٩٠, ١٩١,١٩٢,١٩٣,١٩٤,١٩٥,١٩٦,١٩٧,١٩٨,١٩٩,٢٠٠, ٢٠١,٢٠٢,٢٠٣,٢٠٤,٢٠٥,٢٠٦,٢٠٧,٢٠٨,٢٠٩,٢١٠, ٢١١,٢١٢,٢١٣,٢١٤,٢١٥,٢١٦,٢١٧,٢١٨,٢١٩,٢٢٠, ٢٢١,٢٢٢,٢٢٣,٢٢٤,٢٢٥,٢٢٦,٢٢٧,٢٢٨,٢٢٩,٢٣٠, ٢٣١,٢٣٢,٢٣٣,٢٣٤,٢٣٥,٢٣٦,٢٣٧,٢٣٨,٢٣٩,٢٢٣٠, ٢٤١,٢٤٢,٢٤٣,٢٤٤,٢٤٥,٢٤٦,٢٤٧,٢٤٨,٢٤٩,٢٥٠, ٢٥١,٢٥٢,٢٥٣,٢٥٤,٢٥٥,٢٥٦,٢٥٧,٢٥٨,٢٥٩,٢٦٠, ٢٦١,٢٦٢,٢٦٣,٢٦٤,٢٦٥,٢٦٦,٢٦٧,٢٦٨,٢٦٩,٢٧٠, ٢٧١,٢٧٢,٢٧٣,٢٧٤,٢٧٥,٢٧٦,٢٧٧,٢٧٨,٢٧٩,٢٨٠, ٢٨١,٢٨٢,٢٨٣,٢٨٤,٢٨٥,٢٨٦,٢٨٧,٢٨٨,٢٨٩,٢٩٠, ٢٩١,٢٩٢,٢٩٣,٢٩٤,٢٩٥,٢٩٦,٢٩٧,٢٩٨,٢٩٩,٣٠٠, ] %%% DOCUMENT \starttext \showframe \section{section one} \startlinenumbering \input tufte \input tufte \stoplinenumbering \dorecurse{20}{ \section{محمد الجمل (١٨٧٢—١٩٢٣)} مرحباً باعالم . ١٢٣٤٥٦٧٨٩٠ مرحباً بالعالم. ولد عام ١٩٣٤. \footnote{تعليقة لطيفة.} \pagebreak } \stoptext == Best wishes, Talal On 3 Aug 2015, at 17:29, tala...@fastmail.fm wrote: Just to note: all numbers in the body text are having their digits placed individually right-to-left. Notice, in the attached PDF, how the ١٤ is displayed as ٤١, and how ١٨٧٢ is ٢٧٨١ … but also the footnote marker is ٣١ instead of ١٣ as it correctly is below in the footnote itself. Is there any temporary work around for this, until we sort out the underlying causes? Talal PastedGraphic-1.pdf On 3 Aug 2015, at 16:19, Hans Hagen pra...@wxs.nl wrote: On 8/3/2015 3:54 PM, tala...@fastmail.fm wrote: I am having problems with the directionality of numbers and mirrored characters (like parentheses). When using bidi, the numbers are inverted (5102 instead of 2015); with the explicit commands, the mirrored characters are inverted as well. we have several approaches: the oldest method is based on some heuristics and targets at tex input in the sense that we assume tagging and directional switches the other two are unicode bidi based (successive versions and there might be more as that evolves) in any case, everything bidi / rl has to fit into some system and that's something idris and i are working on (well, we did at some point but we need to pick up that thread) ... so maybe you can trigger idris into onthology mode and help him 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 - ___ 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
Re: [NTG-context] footnotes when using RtL (Arabic)
In a separate thread ("r2l alignment and linenumbering conflict?"), we've gotten numerals in an Arabic RTL document to (a) display as Arabic numerals, and (b) to order their digits in the right order (e.g. 2015 instead of 5102). By defining the headstyle of linenotes, we can even get linenotes to display the digits within individual numbers in the correct order (see below).However, when there is a line range in the linenote head, it is flipping the order of the page ranges. In the example PDF attached below, where it should read ١٥-١٦ (16-15, with the fifteen on the right and the sixteen on the left, for R2L word ordering), instead the output is ١٦-١٥.This seems to be a further example of the problems arising from not being able to apply bidi to the linenote stream, due to the bug or conflict between footnotes/linenotes and R2L. In the minimal example below, I have commented out the \startsetups[note:linenote]. The lines may be toggled to see the effect it has.=\mainlanguage[arabic] \definefontfamily [mainface] [rm] [ALM Fixed] [range=arabic,features=arabic]\setupbodyfont[mainface,12pt]\setupdirections[bidi=global,method=two]\setupalign[r2l]%% CONVERSION INTO ARABIC-HINDI NUMERALS\defineconversion[myconversion][١,٢,٣,٤,٥,٦,٧,٨,٩,١٠,١١,١٢,١٣,١٤,١٥,١٦,١٧,١٨,١٩,٢٠,]%% HEADINGS\setuppagenumber[numberconversion=myconversion]%%% LINENUMBERING\setuplinenumbering[% style=\tfxx, referencing=on, step=1, location=outer, method=page, align=left, distance=1em, width=0.4em, conversion=myconversion, ]\definelinenote[linenote][% setups=note:linenote, before={\blank[3.2em]}, align=righttoleft, rule={on,right}, paragraph=yes, frame=on,framecolor=red, ]\setupnotations[linenote][% align=righttoleft, alternative=serried, width=broad, distance=.5em, display=no, numberconversion=arabic-hindi, headstyle=\lefttoright, ]\unexpanded\def\doVariant#1#2#3%{\startlinenote[#1]{#2[ #3}#2\stoplinenote[#1]}\newcounter\countvariants\unexpanded\def\variant{\doglobal\increment\countvariants\normalexpanded{\doVariant{Varia:\countvariants}}}%%% DOCUMENT%\startsetups[note:linenote]% \setupdirections[bidi=on,method=default,fences=no]%\stopsetups\starttext \showframe\startlinenumbering\input ward\linenote{هذه تعليقة أولى.}\input ward\linenote{هذه تعليقة ثانية.}\input ward\linenote{هذه تعليقة ثالثة.}مرحباً بالعالم مرحباً بالعالم مرحباً بالعالم . هذا مثال على استعمال كونتكست لأجل تحقيق المخطوطات في اللغة العربية . وقد قربنا من\variant{الوصول إلى الحلول}{الحصول على الحلول}التي نحتاجها لتصميم الخطوط التي تكتب من اليمين إلى الشمال .\linenote{هذه تعليقة خامسة.}\stoplinenumbering\stoptext= num-ar.pdf Description: Adobe PDF document Best,TalalOn 2 Aug 2015, at 12:11, Pablo Rodriguez oi...@gmx.es wrote:On 08/02/2015 12:47 PM, Pablo Rodriguez wrote:[...]Hi Talal,replace you bidi settings with these ones:[...]At least, they work for me.Talal,sorry for the noise, the first linenote has the problem you described.I thought it belonged to the second linenote.Pablo-- http://www.ousia.tk___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-contextwebpage : http://www.pragma-ade.nl / http://tex.aanhet.netarchive : http://foundry.supelec.fr/projects/contextrev/wiki : http://contextgarden.net__ 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 ___
Re: [NTG-context] Arabic/Hindi numerals in layout structures (headers, page numbers, etc.)
Never mind. After more word combinations when searching the archives, I came across Wolfgang’s answer here: gmane.comp.tex.context/85673 http://article.gmane.org/gmane.comp.tex.context/85673, in which he says to use the \defineconversion command. E.g.: \defineconversion [myconversion] [۱,۲,۳,۴,۵,۶,۷,۸,۹,۱۰, ۱۱,۱۲,۱۳,۱۴,۱۵,۱۶,۱۷,۱۸,۱۹,۲۰, ۲۱,۲۲,۲۳,۲۴,۲۵,۲۶,۲۷,۲۸,۲۹,۳۰] \setuppagenumber[numberconversion=myconversion] Of course, one can add the same to setups for the other matters as well: \setuphead[chapter,title,section,subject][conversion=myconversion] \setuplinenumbering[conversion=myconversion] \setupnotations[footnote][numberconversion=myconversion] \setupnotations[linenote][numberconversion=myconversion] etc. This actually provides lots of flexibility, as you can fine-tune various footnote streams by assigning different scripts, etc. Talal On 3 Aug 2015, at 00:32, tala...@fastmail.fm wrote: Dear all, When typesetting in Arabic (or, for that matter, other non-Latin scripts), how does one get numerals to appear ‘natively’ in layout structures such as headers, page numbers, line-numbering, and footnote numbers? In the case of Arabic, this means using the so-called “mashriqi”, or “Arabic-Indic”/“Arabic-Hindi” numerals. Is there some option when defining the font family? (I would have thought that using “\mainlanguage[arabic]” would have done it.) Of course, I am using a font that contains the numbers of that script. Mind you, if I manually type such numbers into the body of my text, they appear correctly. MWE below. Best wishes, Talal = \setuppapersize[A6] \mainlanguage[arabic] \definefontfamily[mainface][serif][ALMFixed][features=arabic,range=arabic,] \setupbodyfont [mainface,10pt] \starttext \showframe \righttoleft %\setupdirections[bidi=global,method=two] \section{section one} \startlinenumbering \input ward \stoplinenumbering \footnote{I would like the footnote number — like the page number, section number, and linenumbers — to be in the so-called Arabic-Indic script.} \section{section two} مرحباً بالعالم. ١٢٣٤٥٦٧٨٩٠ مرحباً بالعالم. \stoptext = ___ 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 ___
[NTG-context] Arabic/Hindi numerals in layout structures (headers, page numbers, etc.)
Dear all, When typesetting in Arabic (or, for that matter, other non-Latin scripts), how does one get numerals to appear ‘natively’ in layout structures such as headers, page numbers, line-numbering, and footnote numbers? In the case of Arabic, this means using the so-called “mashriqi”, or “Arabic-Indic”/“Arabic-Hindi” numerals. Is there some option when defining the font family? (I would have thought that using “\mainlanguage[arabic]” would have done it.) Of course, I am using a font that contains the numbers of that script. Mind you, if I manually type such numbers into the body of my text, they appear correctly. MWE below. Best wishes, Talal = \setuppapersize[A6] \mainlanguage[arabic] \definefontfamily[mainface][serif][ALMFixed][features=arabic,range=arabic,] \setupbodyfont [mainface,10pt] \starttext \showframe \righttoleft %\setupdirections[bidi=global,method=two] \section{section one} \startlinenumbering \input ward \stoplinenumbering \footnote{I would like the footnote number — like the page number, section number, and linenumbers — to be in the so-called Arabic-Indic script.} \section{section two} مرحباً بالعالم. ١٢٣٤٥٦٧٨٩٠ مرحباً بالعالم. \stoptext = ___ 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 ___
Re: [NTG-context] Arabic/Hindi numerals in layout structures (headers, page numbers, etc.)
Thank you for that, Idris. I had tried those earlier, but both of them gave me not digits but the Arabic equivalents of roman numerals — letters, used in the Arabic language, to denote enumeration (as you know). In fact, I have now settled on using those for my front matter in the Arabic critical edition. In fact, now that you mention them both, it seems to me that they produce the same out put: ا ب ج د ه و ز … which I would expect from abjadnumerals but not from arabicnumerals. Perhaps there is a bug? But, in any case, the solution of Wolfgang solves my immediate problem. It would, of course, be nice not to have had to type out many lines of numbers (the Arabic edition has more than 250 sections, i.e. entries), and to have this automated when declaring the main language to be Arabic, for example. But it is a small price to pay for the flexible functionality. All the best, and salam, Talal On 3 Aug 2015, at 03:04, Idris Samawi Hamid ادريس سماوي حامد idris.ha...@colostate.edu wrote: Salaam, Talal, See below: On Sun, 02 Aug 2015 17:32:44 -0600, tala...@fastmail.fm mailto:tala...@fastmail.fm tala...@fastmail.fm mailto:tala...@fastmail.fm wrote: Dear all, When typesetting in Arabic (or, for that matter, other non-Latin scripts), how does one get numerals to appear ‘natively’ in layout structures such as headers, page numbers, line-numbering, and footnote numbers? In the case of Arabic, this means using the so-called “mashriqi”, or “Arabic-Indic”/“Arabic-Hindi” numerals. Is there some option when defining the font family? (I would have thought that using “\mainlanguage[arabic]” would have done it.) Of course, I am using a font that contains the numbers of that script. I'm on the move, but try these keys in the appropriate structure commands: numberconversion=arabicnumerals numberconversion=abjadnumerals Failing that, a workaround is to use the m-translate module, and define a translation for each the ten digits. But numberconversion=arabicnumerals is supposed to work. Wassalaam Idris PS \start-stopsection is now standard (\section is still there, but...) Mind you, if I manually type such numbers into the body of my text, they appear correctly. MWE below. Best wishes, Talal = \setuppapersize[A6] \mainlanguage[arabic] \definefontfamily[mainface][serif][ALMFixed][features=arabic,range=arabic,] \setupbodyfont [mainface,10pt] \starttext \showframe \righttoleft %\setupdirections[bidi=global,method=two] \section{section one} \startlinenumbering \input ward \stoplinenumbering \footnote{I would like the footnote number — like the page number, section number, and linenumbers — to be in the so-called Arabic-Indic script.} \section{section two} مرحباً بالعالم. ١٢٣٤٥٦٧٨٩٠ مرحباً بالعالم. \stoptext = ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net http://contextgarden.net/ ___ -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://tex.aanhet.net http://tex.aanhet.net/ archive : http://foundry.supelec.fr/projects/contextrev/ http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net http://contextgarden.net/ ___ ___ 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 ___
Re: [NTG-context] r2l alignment and linenumbering conflict?
I am having problems with the directionality of numbers and mirrored characters (like parentheses). When using bidi, the numbers are inverted (5102 instead of 2015); with the explicit commands, the mirrored characters are inverted as well.For reasons I think I understand, this is only happening in the text: the problem occurs with numbers in headings (chapters, etc.), and likewise in the main of the text. The digits of footnotes, linemargin numbers, and page numbers are correctly arranged.I have learnt that if I add the option [numbercommand=\lefttoright] to \setuphead[section], I can get the digits in the section number to be in the right order. But this does not address the problem of other numbers in the text.How do I solve this? I am happy to abandon the conveniences of bidi, as Idris suggests might be needed (see below), but it didn’t get any easier when trying to do it manually. See MWE below.With thanks,Talalp.s. The Wiki page on "Arabic and Hebrew" is out of date, instructing the use of\setcharactermirroring[1]which is clearly deprecated now in favour of \setupdirections[bidi=global]. I am happy to update the wiki page once I get my head around things. Does anybody have an authoritative list of the various commands related to right-to-left, as well as what combinations are not needed (e.g. are \setupalign[r2l] and \righttoleft overlapping, or do they play different roles)?%%% LANGUAGE AND FONTS\mainlanguage[arabic] \definefontfamily [mainface] [rm] [ALM Fixed][range=arabic,features=arabic] \setupbodyfont[mainface,12pt]%\setupdirections[bidi=global]\setupalign[r2l]%\righttoleft%% HEADINGS\setuphead[chapter,section][ conversion=myconversion,% numbercommand=\lefttoright % -- toggle ]\setuplinenumbering[conversion=myconversion]\setupnotations[footnote][numberconversion=myconversion]\setupnotations[linenote][numberconversion=myconversion]\setuppagenumber[numberconversion=myconversion]\defineconversion [myconversion] [١,٢,٣,٤,٥,٦,٧,٨,٩,١٠, ١١,١٢,١٣,١٤,١٥,١٦,١٧,١٨,١٩,٢٠, ۲۱,۲۲,۲۳,۲٤,۲٥,۲٦,۲۷,۲۸,۲۹,۳۰, ٣١,٣٢,٣٣,٣٤,٣٥,٣٦,٣٧,٣٨,٣٩,٤٠, ٤١,٤٢,٤٣,٤٤,٤٥,٤٦,٤٧,٤٨,٤٩,٥٠, ٥١,٥٢,٥٣,٥٤,٥٥,٥٦,٥٧,٥٨,٥٩,٦٠, ٦١,٦٢,٦٣,٦٤,٦٥,٦٦,٦٧,٦٨,٦٩,٧٠, ٧١,٧٢,٧٣,٧٤,٧٥,٧٦,٧٧,٧٨,٧٩,٨٠, ٨١,٨٢,٨٣,٨٤,٨٥,٨٦,٨٧,٨٨,٨٩,٩٠, ٩١,٩٢,٩٣,٩٤,٩٥,٩٦,٩٧,٩٨,٩٩,١٠٠, ١٠١,١٠٢,١٠٣,١٠٤,١٠٥,١٠٦,١٠٧,١٠٨,١٠٩,١١٠, ١١١,١١٢,١١٣,١١٤,١١٥,١١٦,١١٧,١١٨,١١٩,١٢٠, ١٢١,١٢٢,١٢٣,١٢٤,١٢٥,١٢٦,١٢٧,١٢٨,١٢٩,١٣٠, ١٣١,١٣٢,١٣٣,١٣٤,١٣٥,١٣٦,١٣٧,١٣٨,١٣٩,١١٣٠, ١٤١,١٤٢,١٤٣,١٤٤,١٤٥,١٤٦,١٤٧,١٤٨,١٤٩,١٥٠, ١٥١,١٥٢,١٥٣,١٥٤,١٥٥,١٥٦,١٥٧,١٥٨,١٥٩,١٦٠, ١٦١,١٦٢,١٦٣,١٦٤,١٦٥,١٦٦,١٦٧,١٦٨,١٦٩,١٧٠, ١٧١,١٧٢,١٧٣,١٧٤,١٧٥,١٧٦,١٧٧,١٧٨,١٧٩,١٨٠, ١٨١,١٨٢,١٨٣,١٨٤,١٨٥,١٨٦,١٨٧,١٨٨,١٨٩,١٩٠, ١٩١,١٩٢,١٩٣,١٩٤,١٩٥,١٩٦,١٩٧,١٩٨,١٩٩,٢٠٠, ٢٠١,٢٠٢,٢٠٣,٢٠٤,٢٠٥,٢٠٦,٢٠٧,٢٠٨,٢٠٩,٢١٠, ٢١١,٢١٢,٢١٣,٢١٤,٢١٥,٢١٦,٢١٧,٢١٨,٢١٩,٢٢٠, ٢٢١,٢٢٢,٢٢٣,٢٢٤,٢٢٥,٢٢٦,٢٢٧,٢٢٨,٢٢٩,٢٣٠, ٢٣١,٢٣٢,٢٣٣,٢٣٤,٢٣٥,٢٣٦,٢٣٧,٢٣٨,٢٣٩,٢٢٣٠, ٢٤١,٢٤٢,٢٤٣,٢٤٤,٢٤٥,٢٤٦,٢٤٧,٢٤٨,٢٤٩,٢٥٠, ٢٥١,٢٥٢,٢٥٣,٢٥٤,٢٥٥,٢٥٦,٢٥٧,٢٥٨,٢٥٩,٢٦٠, ٢٦١,٢٦٢,٢٦٣,٢٦٤,٢٦٥,٢٦٦,٢٦٧,٢٦٨,٢٦٩,٢٧٠, ٢٧١,٢٧٢,٢٧٣,٢٧٤,٢٧٥,٢٧٦,٢٧٧,٢٧٨,٢٧٩,٢٨٠, ٢٨١,٢٨٢,٢٨٣,٢٨٤,٢٨٥,٢٨٦,٢٨٧,٢٨٨,٢٨٩,٢٩٠, ٢٩١,٢٩٢,٢٩٣,٢٩٤,٢٩٥,٢٩٦,٢٩٧,٢٩٨,٢٩٩,٣٠٠,]%%% DOCUMENT\starttext \showframe\section{section one}\startlinenumbering\input tufte\input tufte\stoplinenumbering\dorecurse{20}{\section{محمد الجمل (١٨٧٢—١٩٢٣)} مرحباً باعالم . ١٢٣٤٥٦٧٨٩٠ مرحباً بالعالم. ولد عام١٩٣٤.\footnote{تعليقة لطيفة.}\pagebreak}\stoptext= num-ar.pdf Description: Adobe PDF document On 2 Aug 2015, at 18:15, Idris Samawi Hamid ادريس سماوي حامد idris.ha...@colostate.edu wrote:Dear Talal,Salaam. See below:On Sun, 02 Aug 2015 07:31:37 -0600, tala...@fastmail.fm tala...@fastmail.fm wrote:Thank you very much for this, Idris. It works nicely in the sample file you sent. But it goes off again once you add \setupdirections[bidi=global]. Consider the following:==snip\setupdirections[bidi=global]\setupthinrules[color=white]\setupwhitespace[big]\section{Incorrect}\startlinenumbering\startalignment[r2l]هذه رسالة لطيفة ألفها العالم الكبير الفهامة النحرير.هذه رسالة جامعة مانعة ألفها الشيخ الفاضل...\thinrule===You're right. \thinrule has LR unicode characters which is probably why it gets thrown off. So if you turn off global bidi and then either 1) just go with either global RL or 2) invoke RL inside the linenumbering it will work:% \setupdirections[bidi=global]\righttoleft %% global RLor just\startlinenumbering\righttoleft %% local RL, not needed if global RL invoked\startalignment[r2l]Again, it's a barbarous (and temporary) workaround. See attached.WassalaamIdrisPS Unless there is a lot of Latin in the critical edition file, I would probably depend more on explicit dir commands (\righttolet, \lefttoright) and less on bidi, which is still buggy in a number of ways. Beyond the ConTeXt implementation: The unicode bidi algorithm was not designed with advanced typesetting and typography in mind, works best for text-editing etc. per se. so local bidi *may perhaps* be more useful than global bidi for the critical-edition portion your p
Re: [NTG-context] footnotes when using RtL (Arabic)
Indeed, that seems to do the trick, Wolfgang. On 30 Jul 2015, at 18:54, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Pablo Rodriguez mailto:oi...@gmx.es30. Juli 2015 16:26 I wonder whether there is a bug somewhere in notes, because you may have r2l notations, but the notes paragraph is built l2r: \setuppapersize[A6] \starttext \showframe \definenote[afootnote][rule={on,right}, paragraph=yes] \definenotation[afootnote][align=r2l] \startalignment[r2l] Testing.\afootnote{This is footnote one.} Testing testing.\afootnote{This is footnote two.} Testing testing testing.\afootnote{This is footnote three.} \stopalignment \stoptext Can you test the following patch. \unprotect \def\strc_notes_flush_global {\begingroup \useinterlinespaceparameter\noteparameter \doifelse{\noteparameter\c!paragraph}\v!yes {%\vbox\starthboxestohbox \vbox\ifconditional\displaylefttoright \else dir TRT \fi\starthboxestohbox \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber \stophboxestohbox} {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}% \endgroup} \protect %\setupalign[righttoleft] \setupnote[footnote][paragraph=yes,align=righttoleft] \setupnotation[footnote][align=righttoleft] \showframe \starttext First note.\footnote{This is the first footnote.} Second note.\footnote{This is the second footnote.} \stoptext 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 ___ ___ 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 ___
Re: [NTG-context] footnotes when using RtL (Arabic)
I’ve come across a snag. When using parentheses in Arabic footnotes, they are flipped. In any earlier email (http://article.gmane.org/gmane.comp.tex.context/91501/match=setupdirections+bidi+global), you had advised adding the following: \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups \setupnote[footnote][setups=note:footnote] % align=righttoleft However, if one does this with your patch, the second footnote gets dropped. Here is the MWE: \unprotect \def\strc_notes_flush_global {\begingroup \useinterlinespaceparameter\noteparameter \doifelse{\noteparameter\c!paragraph}\v!yes {%\vbox\starthboxestohbox \vbox\ifconditional\displaylefttoright \else dir TRT \fi\starthboxestohbox \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber \stophboxestohbox} {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}% \endgroup} \protect \definefontfamily[mainface][serif][ALMFixed][features=arabic,range=arabic,] \setupbodyfont [mainface] \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups \setupnote[footnote][paragraph=yes,align=righttoleft,setups=note:footnote,] \setupnotation[footnote][align=righttoleft,alternative=serried,] \showframe \starttext First note.\footnote{هذه هي (التعليقة) الأولى.} Second note.\footnote{هذه هي (التعليقة) الثانية.} \stoptext All the best, Talal On 30 Jul 2015, at 18:54, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Pablo Rodriguez mailto:oi...@gmx.es30. Juli 2015 16:26 I wonder whether there is a bug somewhere in notes, because you may have r2l notations, but the notes paragraph is built l2r: \setuppapersize[A6] \starttext \showframe \definenote[afootnote][rule={on,right}, paragraph=yes] \definenotation[afootnote][align=r2l] \startalignment[r2l] Testing.\afootnote{This is footnote one.} Testing testing.\afootnote{This is footnote two.} Testing testing testing.\afootnote{This is footnote three.} \stopalignment \stoptext Can you test the following patch. \unprotect \def\strc_notes_flush_global {\begingroup \useinterlinespaceparameter\noteparameter \doifelse{\noteparameter\c!paragraph}\v!yes {%\vbox\starthboxestohbox \vbox\ifconditional\displaylefttoright \else dir TRT \fi\starthboxestohbox \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber \stophboxestohbox} {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}% \endgroup} \protect %\setupalign[righttoleft] \setupnote[footnote][paragraph=yes,align=righttoleft] \setupnotation[footnote][align=righttoleft] \showframe \starttext First note.\footnote{This is the first footnote.} Second note.\footnote{This is the second footnote.} \stoptext 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 ___ ___ 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 ___
Re: [NTG-context] footnotes when using RtL (Arabic)
Excellent. This seems to solve the problem completely. I even tried mixing Arabic and English text in the RTL footnotes, switched on the “alternative=serried” option, and defined my own custom note streams — everything worked very well. The only thing that didn’t work is to mix, in the same stream, footnotes that are LTR with footnotes that are RTL. But I did not expect this to work, and I cannot think of a real world scenario in which such footnotes would/should be mixed in the same stream. Attached are both the .tex file and the PDF with a perfectly working example. Many thanks to you both, Wolfgang and Hans. Hans, I assume we’ll know if the patch eventually makes it into a beta? Best, Talal RTL-paragraphed-footnotes.tex Description: Binary data RTL-paragraphed-footnotes.pdf Description: Adobe PDF document On 31 Jul 2015, at 09:39, Hans Hagen pra...@wxs.nl wrote: On 7/31/2015 1:51 AM, tala...@fastmail.fm wrote: You’re right. The patch gets us half way to the desired behaviour (namely, correct ordering of the footnotes within the paragraph). But it seems that the ‘paragraph’ option doesn’t play well with RTL generally, resulting in the second note disappearing when using \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups. can you try \unprotect \unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi} \def\strc_notes_flush_global {\begingroup \useinterlinespaceparameter\noteparameter \doifelse{\noteparameter\c!paragraph}\v!yes {\leftorrightvbox {\starthboxestohbox \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber \stophboxestohbox}} {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}% \endgroup} \protect On 30 Jul 2015, at 20:04, Wolfgang Schuster schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote: tala...@fastmail.fm mailto:tala...@fastmail.fm 30. Juli 2015 20:37 I’ve come across a snag. When using parentheses in Arabic footnotes, they are flipped. In any earlier email (http://article.gmane.org/gmane.comp.tex.context/91501/match=setupdirections+bidi+global), you had advised adding the following: \startsetups[note:footnote] \setupdirections[bidi=global] \stopsetups \setupnote[footnote][setups=note:footnote] % align=righttoleft However, if one does this with your patch, the second footnote gets dropped. Here is the MWE: The second note disappears even without the patch, the problem this the paragraph option for the notes. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl mailto: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 ___ ___ 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 ___ -- - 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 - ___ 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 ___ ___ 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 ___
Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)
Sorry for not being clear. The original question was whether cross-referencing in a project can only be done between components, or if they can also be done between products. I could never get the latter to work. Wolfgang confirmed that in MkII, intra-product cross-referencing works (even with the examples I had posted),but not in MkIV. He speculated that the numbers in the references were not appearing in MkIV due to a bug, or because the feature was not implemented. Best wishes, Talal On 11 Aug 2015, at 10:48, Hans Hagen pra...@wxs.nl wrote: On 8/11/2015 11:00 AM, tala...@fastmail.fm wrote: Hans, it would be great to have the numbers appearing again sometime in the future (if it is a bug or a not-yet implemented feature indeed). I couldn’t find anything in the documentation suggesting not to structure things this way. i have no clue what you're talking about - 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 - ___ 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 ___ ___ 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 ___
Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)
Hans, it would be great to have the numbers appearing again sometime in the future (if it is a bug or a not-yet implemented feature indeed). I couldn’t find anything in the documentation suggesting not to structure things this way. Best wishes, Talal On 10 Aug 2015, at 21:33, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: tala...@fastmail.fm mailto:tala...@fastmail.fm 6. August 2015 19:00 Perhaps I might ask a more preliminary question: when using project structure, is cross-document referencing possible between two product files, or only between two component files within a single product file? You can create hyperlinks between different products and your example (I slightly modified it) works as expected with MkII where I get the chapter number in the links. The missing numbers with MkIV can be a bug or not yet implemented. 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 ___ ___ 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 ___
Re: [NTG-context] Can \getmarking take more than one argument?
Many thanks, Hans, as that seems to have done the trick! On 9 Aug 2015, at 11:59, Hans Hagen pra...@wxs.nl wrote: On 8/9/2015 2:42 AM, tala...@fastmail.fm mailto:tala...@fastmail.fm wrote: Hello, I currently use the following to define my even and odd page headers. — \startsetups[header] {\doifoddpageelse {\getmarking[section]} {\getmarking[chapter]} } \doiftextelse {\getmarking[chapter]} \stopsetups — The problem is that some of my ‘section’s are not sections, but ‘subject’s (because I don’t want that section heading to appear in the TOC). As a result, my header is blank on the ‘subject’ pages. Is it possible to define getmarking to take either a section or a subject, somehow? Listing them both separated by a coma (\getmarking[section,subject]) produced no result. I also tried: — {\doifoddpageelse {\getmarking[section]} {\getmarking[subject]} {\getmarking[chapter]} — …but that caused the subject and the chapter to both be printed in the header. Many thanks for any help. \setupheadertexts[{\getmarking[section]}] \definehead[suction][section][number=no] \starttext \placelist[section] \page \section{foo} \page \suction{bar} \page \stoptext - 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 http://www.pragma-ade.com/ | www.pragma-pod.nl http://www.pragma-pod.nl/ - ___ 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 ___ ___ 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 ___
Re: [NTG-context] cross-references between documents in a project (using \useexternaldocument)
Perhaps I might ask a more preliminary question: when using project structure, is cross-document referencing possible between two product files, or only between two component files within a single product file? Kind regards, Talal On 5 Aug 2015, at 13:15, tala...@fastmail.fm wrote: Dear all, I am trying to create cross references between two documents in my project. Links between the two are successfully made, but the actual page numbers are not being printed (which, for my purposes, are what I actually need, not links). Am I doing something wrong, or is this a known bug (such that I should cease my attempts)? Is \useexternaldocument the wrong command for this purpose? Minimum example files below: % project \project project_xref \startproduct prd_xref \component xref1 \component xref2 \stopproduct % product \startproject project_xref \environment env_xref \product prd_xref \stopproject % environment \startenvironment env_xref \setupinteraction [state=start, style=, color=blue, contrastcolor=, menu=on, title=Cross referencing Test File, author=Gerard Verhaag] \stopenvironment % component1 [xref1] \project project_xref \startcomponent xref1 \starttext \chapter[cross]{Cross referencing} \chapter[lorem]{Lorem} Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem]. \stoptext \stopcomponent % component2 [xref2] \project project_xref \startcomponent xref2 \useexternaldocument[xrf][xref1] \starttext Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[xrf::lorem]. \stoptext \stopcomponent All the best, Talal ___ 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 ___ ___ 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 ___
[NTG-context] Can \getmarking take more than one argument?
Hello, I currently use the following to define my even and odd page headers. — \startsetups[header] {\doifoddpageelse {\getmarking[section]} {\getmarking[chapter]} } \doiftextelse {\getmarking[chapter]} \stopsetups — The problem is that some of my ‘section’s are not sections, but ‘subject’s (because I don’t want that section heading to appear in the TOC). As a result, my header is blank on the ‘subject’ pages. Is it possible to define getmarking to take either a section or a subject, somehow? Listing them both separated by a coma (\getmarking[section,subject]) produced no result. I also tried: — {\doifoddpageelse {\getmarking[section]} {\getmarking[subject]} {\getmarking[chapter]} — …but that caused the subject and the chapter to both be printed in the header. Many thanks for any help. Talal ___ 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 ___
[NTG-context] reverse page order and reverse page numbering in one part of a book
Dear all, I am producing a book that is divided into two sections. The book is published in English, and thus it runs left to right. Part one is an academic study in English. Part two is a critical edition of an Arabic text. The book is exactly 100 pages long, with fifty pages going to the English study, and fifty pages to the Arabic edition. In Part One (which includes all the front matter of the book, such as the table of contents, etc.): the page ordering runs left-to-right, the pagination runs from 1 to 50, and the page numbers should be printed in Arabic numerals. However, in Part Two (the Arabic text): the page ordering should run right-to-left, the page numbers should run in “reverse” pagination (in which “page 1 of the critical edition begins at the “back” of the book), and the page numbers should be printed in Hindi numerals. In other words, the structure of the book’s pages would be as follows (ellipses used to jump): 1 2 3 … 48 49 50 ٥٠ ٤٩ ٤٨ … ٣ ٢ ١ I would like the Table of Contents then to look something like this: Forward . . . . . . v English Study . . . 1 Arabic Edition. . . ١ Index of names. . . ٥٠ So my question is: is this currently possible in ConTeXt, to produce a single PDF, with such a TOC, from one file? Or am I bringing on too much of a headache upon myself, and it is easier to produce two separate files — but if so, how would one produce a TOC that includes the parts and page numbers of both documents? Many thanks, and best wishes, Talal___ 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 ___
Re: [NTG-context] Critical editions with ConTeXt
Dear Pablo, Thank you very much for what you proposed — it did work indeed. I tried to achieve the same at some length this afternoon. I think I understand what is going on in the first macro, but wouldn’t have been able to arrive at the the second one for \variant, or the counter (and still don’t fully understand it). Thanks again. Hans, Idris, Thomas, and others interested in critical editions: I wonder whether this code — with the user-facing command \variant{#1}{#2} — might be something that could become part of an eventual CritTeXt package. With many thanks and all best wishes, Talal p.s. I had thought it better to add this on to the old thread, since the topic was contiguous. Admittedly, I’m not sure what the proper etiquette for such matters is. On 22 Jul 2015, at 21:19, Pablo Rodriguez oi...@gmx.es wrote: On 07/22/2015 09:26 PM, Talal wrote: [...] I would like to be able to automate (through macros) the making of a critical apparatus' note. This is for two reasons. First, the body text and the lemma in the note below should be identical: as such, they ideally not have to be typed twice, as it introduces the possibility of error. Furthermore, if one manually writes out \linenote{Lemma ] Comment} in the body of the text, you forego the separation of content and style, since the separator ] has been hardcoded in. Hi Talal, I wonder whether creating a new thread should be the right thing to do. The original thread is three years old. Anyway, this may help you (it isn’t my original code): \unexpanded\def\doVariant#1#2#3% {\startlinenote[#1]{#2] #3}#2\stoplinenote[#1]} \newcounter\countvariants \unexpanded\def\variant {\doglobal\increment\countvariants \normalexpanded{\doVariant{Varia:\countvariants}}} \starttext \startlinenumbering \dorecurse{20}{\variant{donald e knuth}{herman zapf} } \stoplinenumbering \stoptext BTW, it has a “minor issue”: hyphenation doesn’t work in the body text It works fine in the notes. I reported this, but I’m afraid it hasn’t been solved. Just in case it helps, Pablo -- http://www.ousia.tk ___ 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 ___ ___ 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 ___
Re: [NTG-context] Upgrade to 2015.11.19 breaks OTF reader?
In case this helps anyone else: In my case, the LuaTeX error resulted from what appears to be a corrupt font cache. I was getting the error: > !LuaTeX error: cannot find OpenType font file for reading () > ==> Fatal error occurred, no output PDF file produced! The solution was to clean the LuaTeX font cache in my ConTeXt standalone directory. Mine was in: ` ~/context/tex/texmf-cache/luatex-cache/context/<...>/fonts/otf/ ` (The <…> represents a long string of numbers.) I deleted the .tma and .tmc files in that OTF directory. Upon running ConTeXt again, everything worked fine. [The source of this discovery was http://tex.stackexchange.com/questions/65038/luatex-cannot-find-existing-font <http://tex.stackexchange.com/questions/65038/luatex-cannot-find-existing-font> ] Talal > On 10 Dec 2015, at 23:10, tala...@fastmail.fm wrote: > > I am having the same problem as the OP. I have manually edited the > font-otr.lua file as per the patch below, and I deleted the font cache. But > all to no avail. I still get: > > !LuaTeX error: cannot find OpenType font file for reading () > ==> Fatal error occurred, no output PDF file produced! > > Is there a solution to this? > > Many thanks, > Talal > >> On 8 Dec 2015, at 00:22, Philipp Gesang <p...@phi-gamma.net >> <mailto:p...@phi-gamma.net>> wrote: >> >> · >> >>> On 12/6/2015 10:14 PM, Philipp Gesang wrote: >>>> · >>>> >>>>> The problem persisted with Courier New, not only Source Sans Pro (SSP). >>>>> >>>>> The font file for Source Sans Pro came directly from the Google's font >>>>> service. >>>>> >>>>> The SSP (on my machine) works fine in Inkscape. >>>>> >>>>> The exact same font was also working before the ConTeXt upgrade. >>>> >>>> Confirmed, it appears to work if you revert to the old loader in >>>> font-lib.mkvi. >>> >>> i need a better example of what fails then as it works here >> >> >> The problem seems to be the “filename” field being written to the >> cache from the wrong source. Between the old and the new >> fontloader, you get the following picture in the “resources” >> record: >> >>+ ["filename"]="Everson_Mono_Bold.ttf", >>- ["filename"]="/tmp/here-be-fonts/Everson_Mono_Bold.ttf", >> >> The attached patch fixes it for me. >> >> Philipp >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> <http://www.ntg.nl/mailman/listinfo/ntg-context> >> webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / >> http://tex.aanhet.net <http://tex.aanhet.net/> >> archive : http://foundry.supelec.fr/projects/contextrev/ >> <http://foundry.supelec.fr/projects/contextrev/> >> wiki : http://contextgarden.net <http://contextgarden.net/> >> ___ > > ___ > 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 > ___ ___ 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 ___
Re: [NTG-context] Upgrade to 2015.11.19 breaks OTF reader?
If I copy the fonts I need into ~/Library/Fonts/, the latest beta is able to produce the PDF without the aforementioned Luatex error. However, there still seems to be some type of OTF-related error: certain glyphs are being replaced with others. This is particularly true for diacritics, but not exclusively — all caps are also facing similar problems. I have attached some screen clippings to demonstrate. If I revert back to an earlier beta (as of September 2015) it does do not cause this problem. (should read: PROFESSIONAL AND SCHOLARLY LIFE) (should read: -Thaqāfah) (should read: aḥwāl) > On 10 Dec 2015, at 23:10, tala...@fastmail.fm wrote: > > I am having the same problem as the OP. I have manually edited the > font-otr.lua file as per the patch below, and I deleted the font cache. But > all to no avail. I still get: > > !LuaTeX error: cannot find OpenType font file for reading () > ==> Fatal error occurred, no output PDF file produced! > > Is there a solution to this? > > Many thanks, > Talal > >> On 8 Dec 2015, at 00:22, Philipp Gesang <p...@phi-gamma.net >> <mailto:p...@phi-gamma.net>> wrote: >> >> · >> >>> On 12/6/2015 10:14 PM, Philipp Gesang wrote: >>>> · >>>> >>>>> The problem persisted with Courier New, not only Source Sans Pro (SSP). >>>>> >>>>> The font file for Source Sans Pro came directly from the Google's font >>>>> service. >>>>> >>>>> The SSP (on my machine) works fine in Inkscape. >>>>> >>>>> The exact same font was also working before the ConTeXt upgrade. >>>> >>>> Confirmed, it appears to work if you revert to the old loader in >>>> font-lib.mkvi. >>> >>> i need a better example of what fails then as it works here >> >> >> The problem seems to be the “filename” field being written to the >> cache from the wrong source. Between the old and the new >> fontloader, you get the following picture in the “resources” >> record: >> >>+ ["filename"]="Everson_Mono_Bold.ttf", >>- ["filename"]="/tmp/here-be-fonts/Everson_Mono_Bold.ttf", >> >> The attached patch fixes it for me. >> >> Philipp >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> <http://www.ntg.nl/mailman/listinfo/ntg-context> >> webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / >> http://tex.aanhet.net <http://tex.aanhet.net/> >> archive : http://foundry.supelec.fr/projects/contextrev/ >> <http://foundry.supelec.fr/projects/contextrev/> >> wiki : http://contextgarden.net <http://contextgarden.net/> >> ___ > > ___ > 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 > ___ ___ 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 ___
[NTG-context] has the bidi mechanism been changed?
Has the bidi mechanism (method=one, or method=two, etc.) been changed or redefined? My RTL brackets and numbers are being inverted. As of the beta operative in September 2015, these were working. In the present beta, it reads: While it should read (notice the ordering of the numbers as well as the direction of the parentheses): Kind regards, Talal___ 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 ___
Re: [NTG-context] Upgrade to 2015.11.19 breaks OTF reader?
I am having the same problem as the OP. I have manually edited the font-otr.lua file as per the patch below, and I deleted the font cache. But all to no avail. I still get: !LuaTeX error: cannot find OpenType font file for reading () ==> Fatal error occurred, no output PDF file produced! Is there a solution to this? Many thanks, Talal > On 8 Dec 2015, at 00:22, Philipp Gesangwrote: > > · > >> On 12/6/2015 10:14 PM, Philipp Gesang wrote: >>> · >>> The problem persisted with Courier New, not only Source Sans Pro (SSP). The font file for Source Sans Pro came directly from the Google's font service. The SSP (on my machine) works fine in Inkscape. The exact same font was also working before the ConTeXt upgrade. >>> >>> Confirmed, it appears to work if you revert to the old loader in >>> font-lib.mkvi. >> >> i need a better example of what fails then as it works here > > > The problem seems to be the “filename” field being written to the > cache from the wrong source. Between the old and the new > fontloader, you get the following picture in the “resources” > record: > >+ ["filename"]="Everson_Mono_Bold.ttf", >- ["filename"]="/tmp/here-be-fonts/Everson_Mono_Bold.ttf", > > The attached patch fixes it for me. > > Philipp > > ___ > 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 > ___ ___ 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 ___