[NTG-context] Indenting number in TOC, particular numbering scheme, and other questions
Hello everyone, I just started to experiment with ConTeXt. I have a few issues with my first document structure. I need a very particular numbering scheme, which I have tried to implement. I have appended the document below. 1. Why is there no indenting in the TOC starting with (what I call) level 7? This could have to something with the fact that the levels starting from 7 are defined in the subsub module? 2. Why are the numbers in the headings inside the main text not printed for levels 8 and 9? Interestingly, they *are* printed for level 7, which is defined in the subsub module. I have looked into m-subsub.mkiv and saw no difference at all between the different levels defined there. 3. Is it possible to indent not only the section name but also the number in the TOC? Moreover, I would like to have a dot after the first three levels, but not the other ones (in the TOC and in the text), like this: A. First Level .. 1 I. Second Level . 2 1. Third Level .. 3 a) Fourth Level . 4 ... 4. I use the conversions A, I, 1 (without dot), and then defined my own ones "a)", "aa)", etc. *with* the ")". I think this is correct, since the way a section has to be referenced in the text is like this (for example): B.IV.5.c).aa).(4) Is there a way to get this? Moreover, is it possible to have a relative referencing command, for example, if section B.IV.5.d) is quoted from inside section B.IV.6.f) the command should only print 5.d) since the B.IV is implied. 5. How can I get rid of the additional vertical space before the second entry "B. Another first level" (chapter)? 6. I wanted to define aliases for the \subsub...subsection commands, since they are difficult to read, and I used \def as you can see below. Is this the right way to do it or would you recommend something else? Any help would be greatly appreciated. D. -- \usemodule[subsub] \usetypescript[termes] \setupbodyfont[termes,12pt] \def\arconv#1{\alphabeticnumerals{#1})} \defineconversion[ar][\arconv] \def\aarconv#1{\alphabeticnumerals{#1}\alphabeticnumerals{#1})} \defineconversion[aar][\aarconv] \def\lnrconv#1{(\numbers{#1})} \defineconversion[lnr][\lnrconv] \def\larconv#1{(\alphabeticnumerals{#1})} \defineconversion[lar][\larconv] \def\laarconv#1{(\alphabeticnumerals{#1}\alphabeticnumerals{#1})} \defineconversion[laar][\laarconv] \def\alpharconv#1{\greeknumerals{#1})} \defineconversion[alphar][\alpharconv] \definestructureconversionset[myconvset][,A,I,n,ar,aar,lnr,lar,laar,alphar] \setupheads[part, chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection, subsubsubsubsubsection, subsubsubsubsubsubsection, subsubsubsubsubsubsubsection][sectionconversionset=myconvset] \setuphead[chapter][sectionsegments=chapter] \setuphead[section][sectionsegments=section] \setuphead[subsection][sectionsegments=subsection] \setuphead[subsubsection][sectionsegments=subsubsection] \setuphead[subsubsubsection][sectionsegments=subsubsubsection] \setuphead[subsubsubsubsection][sectionsegments=subsubsubsubsection] \setuphead[subsubsubsubsubsection][sectionsegments=subsubsubsubsubsection] \setuphead[subsubsubsubsubsubsection][sectionsegments=subsubsubsubsubsubsection] \setuphead[subsubsubsubsubsubsubsection][sectionsegments=subsubsubsubsubsubsubsection] \def\startA{\startchapter} \def\stopA{\stopchapter} \def\startI{\startsection} \def\stopI{\stopsection} \def\startS{\startsubsection} \def\stopS{\stopsubsection} \def\startSS{\startsubsubsection} \def\stopSS{\stopsubsubsection} \def\startSSS{\startsubsubsubsection} \def\stopSSS{\stopsubsubsubsection} \def\startX{\startsubsubsubsubsection} \def\stopX{\stopsubsubsubsubsection} \def\startXX{\startsubsubsubsubsubsection} \def\stopXX{\stopsubsubsubsubsubsection} \def\startXXX{\startsubsubsubsubsubsubsection} \def\stopXXX{\stopsubsubsubsubsubsubsection} \def\start{\startsubsubsubsubsubsubsubsection} \def\stop{\stopsubsubsubsubsubsubsubsection} \setupcombinedlist[content][list={chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection, subsubsubsubsubsection, subsubsubsubsubsubsection, subsubsubsubsubsubsubsection},alternative=c] \starttext \placecontent \startA[title={First level}] \startI[title={Second level}] \startS[title={Third level}] \startSS[title={Fourth level}] \startSSS[title={Fifth level}] \startX[title={Sixth level}] \startXX[title={Seventh level}] \startXXX[title={Eighth level}] \start[title={Ninth level}] \stop \stopXXX \stopXX \stopX \stopSSS \stopSS \stopS \stopI \stopA \startA[title={Another first level}] \stopA \stoptext
Re: [NTG-context] r2l alignment and linenumbering conflict?
Hi Hans, Thanks for the new beta. As Idris pointed out, the logic you follow for naming greeknumerals, romannumerals, persiannumerals, arabicnumerals, and all others in core-con.lua, makes sense but I didn’t notice this logic before… Which means one may learn each and evry day :-) As far as I know, at least in the Persian use of the abjad system of counting, the first case corresponding to the number 1, is usually written الف in order to avoid the confusion with the digit ۱ I don’t know if this can be fixed in the table you have in core-con.lua. A further remark is that, don’t you think that the pagenumbering, as well as the numbers for chapters, sections, items, equations, etc, should be switched by default to arabicdecimals, or persiandecimals, as soon as \mainlanguage has been set to arabic or persian? Or maybe one could have a command like \setupdefaultnumberings[arabicdecimals] which sets a default for conversion of numbers for all the counters. Again many thanks for the features you included in ConTeXt for bidi writing. Best regards: OK On 04 Aug 2015, at 01:30, Hans Hagen pra...@wxs.nl wrote: On 8/3/2015 9:25 PM, Otared Kavian wrote: Hi Hans, Idris, Talal, Some years ago we had a discussion on the issue, but I don’t remember where we ended up… In my opinion, I think that the numberings should be maned as follows: arabicnumerals: should be ١,٢,٣,٤,٥,٦,٧,٨,٩,٠ persiannumerals: should be ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ۰ abjadnumerals: should be الف، ب، ج، د، ه، و، ز،….. As of today it seems that « persiannumerals » results in what should be named abjadnuemrals, and this is not correct. so you and idris and tatal has to come to some agreement on that we have these alphabetic ones arabicnumerals persiannumerals arabicexnumerals and some special ones abjadnumerals abjadnodotnumerals (these use small, medium, large chars and do special things with 10 100 1000) and now arabicdecimals persiandecimals see core-con.lua 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] issues with greeknumerals
On 04/08/2014 05:09 AM, Wolfgang Schuster wrote: [...] I’m speaking about the different results when you use “G” or “Greeknumerals” as name for the conversion in \defineconversionset, while the first works in bookmarks the second doesn’t work even though there is no difference between both names. Many thanks, Wolfgang, Otared and Thomas, for your replies. As a user I don’t understand why \defineconversionset needs complete names for some numerals and initials for others. And this is only required for PDF bookmarks, since everything else works fine. Here you have an example which shows the original issue: \defineconversionset[cs][0,Romannumerals,Characters,n,g][n] PDF bookmarks wouldn’t work with initials only: \defineconversionset[cs][0,I,a,n,g][n] You are the experts: wouldn’t it be easier that PDF bookmarks would accept both intials and full names? The required mixture isn’t easier for users. Many thanks for your 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 ___
[NTG-context] issues with greeknumerals
Dear list, I have the following sample: \definestructureconversionset[cs][0,Greeknumerals,greeknumerals][n] \setupheads[sectionconversionset=cs] \setupinteraction[state=start] \placebookmarks[chapter, section] \starttext \dorecurse{5}{\chapter{Chapter} \section{Section}} \stoptext I cannot get either Greeknumerals or greeknumerals working in PDF bookmarks. And greeknumerals don’t show numbering in text. Am I missing something or is this a bug? Many thanks for your 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 ___
Re: [NTG-context] issues with greeknumerals
Am 07.04.2014 um 20:45 schrieb Pablo Rodriguez oi...@gmx.es: Dear list, I have the following sample: \definestructureconversionset[cs][0,Greeknumerals,greeknumerals][n] \setupheads[sectionconversionset=cs] \setupinteraction[state=start] \placebookmarks[chapter, section] \starttext \dorecurse{5}{\chapter{Chapter} \section{Section}} \stoptext I cannot get either Greeknumerals or greeknumerals working in PDF bookmarks. \defineconversionset[cs][n,G,g][n] And greeknumerals don’t show numbering in text. You need a font with greek letters. 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 ___
Re: [NTG-context] issues with greeknumerals
On 04/07/2014 08:59 PM, Wolfgang Schuster wrote: Am 07.04.2014 um 20:45 schrieb Pablo Rodriguez: [...] I cannot get either Greeknumerals or greeknumerals working in PDF bookmarks. \defineconversionset[cs][n,G,g][n] Many thanks for your help, Wolfgang. Since Romannumerals and romannumerals (or Characters and characters) are required, I thought it would be consistent to use Greeknumerals and greeknumerals. But I was obviously wrong. And greeknumerals don’t show numbering in text. You need a font with greek letters. Of course, you’re right. This was a very basic mistake. I was misled by the fact that Latin Modern has uppercase Greek letters. Many thanks again for your 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 ___
Re: [NTG-context] issues with greeknumerals
Am 07.04.2014 um 21:18 schrieb Pablo Rodriguez oi...@gmx.es: On 04/07/2014 08:59 PM, Wolfgang Schuster wrote: Am 07.04.2014 um 20:45 schrieb Pablo Rodriguez: [...] I cannot get either Greeknumerals or greeknumerals working in PDF bookmarks. \defineconversionset[cs][n,G,g][n] Many thanks for your help, Wolfgang. Since Romannumerals and romannumerals (or Characters and characters) are required, I thought it would be consistent to use Greeknumerals and greeknumerals. But I was obviously wrong. This could be a bug because there shouldn’t be a difference between the two conversion names. 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 ___
Re: [NTG-context] issues with greeknumerals
On 7 avr. 2014, at 21:25, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 07.04.2014 um 21:18 schrieb Pablo Rodriguez oi...@gmx.es: […] Since Romannumerals and romannumerals (or Characters and characters) are required, I thought it would be consistent to use Greeknumerals and greeknumerals. But I was obviously wrong. This could be a bug because there shouldn’t be a difference between the two conversion names. Maybe not, since Roman numerals i, ii, iii, iv, etc correspond really to the way Romans used to write numbers, while Greek numerals \alpha, \beta, \gamma, \delta, etc are rather our modern way of numbering items, analogous to the case one would say a), b), c), d) etc. Would Thomas Schmitz give us some insight? Best regards: OK ___ 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] issues with greeknumerals
On 07 Apr 2014, at 23:24, Otared Kavian ota...@gmail.com wrote: Maybe not, since Roman numerals i, ii, iii, iv, etc correspond really to the way Romans used to write numbers, while Greek numerals \alpha, \beta, \gamma, \delta, etc are rather our modern way of numbering items, analogous to the case one would say a), b), c), d) etc. Would Thomas Schmitz give us some insight? In fact, I was wondering what “Greeknumerals” would translate to. The most common system used in antiquity is the “Milesian” system: α=1, β=2 etc., but 6 is expressed by ς; ι=10; ρ=100, with two archaic letters as 90 and 900; this is used in most papyri. There are other systems in use (especially in inscriptions), they involve special characters which most fonts don’t have. The simple system α=1 up to ω=24 is used to number the books in the Homeric epics, so it also has ancient precedents. If we want to be nitpicking, it shouldn’t be called “Greeknumerals,” but rather “Greekalphanumericalconversion,” which sounds like a really snappy, memorable way to express it, don’t you agree? So: this is just the historical and philological aspect, Greeknumerals will make sense to most users. All best Thomas ___ 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] issues with greeknumerals
Am 07.04.2014 um 23:24 schrieb Otared Kavian ota...@gmail.com: On 7 avr. 2014, at 21:25, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 07.04.2014 um 21:18 schrieb Pablo Rodriguez oi...@gmx.es: […] Since Romannumerals and romannumerals (or Characters and characters) are required, I thought it would be consistent to use Greeknumerals and greeknumerals. But I was obviously wrong. This could be a bug because there shouldn’t be a difference between the two conversion names. Maybe not, since Roman numerals i, ii, iii, iv, etc correspond really to the way Romans used to write numbers, while Greek numerals \alpha, \beta, \gamma, \delta, etc are rather our modern way of numbering items, analogous to the case one would say a), b), c), d) etc. I’m speaking about the different results when you use “G” or “Greeknumerals” as name for the conversion in \defineconversionset, while the first works in bookmarks the second doesn’t work even though there is no difference between both names. 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 ___
Re: [NTG-context] issues with greeknumerals
Thanks Thomas and Wolfgang for your attention. Actually the issue with the name of conversions exist also with Persiannumerals, which in ConTeXt results in the so called « Abjad numerals », instead of resulting in the use of Persian digits (or Eastern Arabic digits). Best regards: OK On 8 avr. 2014, at 05:09, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 07.04.2014 um 23:24 schrieb Otared Kavian ota...@gmail.com: On 7 avr. 2014, at 21:25, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 07.04.2014 um 21:18 schrieb Pablo Rodriguez oi...@gmx.es: […] Since Romannumerals and romannumerals (or Characters and characters) are required, I thought it would be consistent to use Greeknumerals and greeknumerals. But I was obviously wrong. This could be a bug because there shouldn’t be a difference between the two conversion names. Maybe not, since Roman numerals i, ii, iii, iv, etc correspond really to the way Romans used to write numbers, while Greek numerals \alpha, \beta, \gamma, \delta, etc are rather our modern way of numbering items, analogous to the case one would say a), b), c), d) etc. I’m speaking about the different results when you use “G” or “Greeknumerals” as name for the conversion in \defineconversionset, while the first works in bookmarks the second doesn’t work even though there is no difference between both names. 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] greek items broken:
On 2012-05-09 13:50, Mojca Miklavec wrote: On Wed, May 9, 2012 at 12:39 PM, Philipp Gesang wrote: On 2012-05-09 12:25, Mojca Miklavec wrote: If he wants to use Lucida, this would look bad, but the Lucida font does have greek glyphs, however they are in the math range. With unicode I thought this was an archaism. I'm sorry, I'm telling you nonsense. There are no Greek letters in LucidaBrightOT, but they are present in LucidaBrightMathOT. The italic version starts at 1D6FC and the regural one is in the normal Greek range. This is the case for LM, Lucida and probably a few more fonts. (Another option would be to define the counter to run through greek letters in math font.) Or to leave the counter untouched and wrap it into a substitution function -- is there a chance you (or anyone else) could supply me with a mapping of the “real” Greek code point to the “math Greek” one? See math-map.lua. If you need any help or explanation, please ask. I believe that the following part might be relevant (but only if you need italic): lcgreek = { [0x03B1]=0x1D6FC, [0x03B2]=0x1D6FD, [0x03B3]=0x1D6FE, [0x03B4]=0x1D6FF, [0x03B5]=0x1D700, [0x03B6]=0x1D701, [0x03B7]=0x1D702, [0x03B8]=0x1D703, [0x03B9]=0x1D704, [0x03BA]=0x1D705, [0x03BB]=0x1D706, [0x03BC]=0x1D707, [0x03BD]=0x1D708, [0x03BE]=0x1D709, [0x03BF]=0x1D70A, [0x03C0]=0x1D70B, [0x03C1]=0x1D70C, [0x03C2]=0x1D70D, [0x03C3]=0x1D70E, [0x03C4]=0x1D70F, [0x03C5]=0x1D710, [0x03C6]=0x1D711, [0x03C7]=0x1D712, [0x03C8]=0x1D713, [0x03C9]=0x1D714, [0x03D1]=0x1D717, [0x03D5]=0x1D719, [0x03D6]=0x1D71B, [0x03F0]=0x1D718, [0x03F1]=0x1D71A, [0x03F4]=0x1D6F3, [0x03F5]=0x1D716, }, Yeah, appears to be the correct range. Couldn’t test with Lucida, though. For regular variant of Lucida it should be enough to use Math font instead of the normal one, but I didn't test or write any code for it. For LM you would have to use the italic version since upright (without resorting to cm-unicode) looks horrible anyway. But if there’s a math font, I’d go with the example that Wolfgang posted; alternatively just wrap the converter into \mathematics: \unprotect \def\math_greek_characters#1{\mathematics{\greeknumerals{#1}}} \defineconversion [mathgreek] [\math_greek_characters] \protect etc. It will depend on your choice of math font whether you get italics or upright glyphs. Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgp4KUEJkFip5.pgp Description: PGP signature ___ 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] greek letters in itemize
On 31-10-2010 7:39, Khaled Hosny wrote: On Sun, Oct 31, 2010 at 06:48:21PM +0100, Wolfgang Schuster wrote: Am 31.10.2010 um 18:18 schrieb Mojca Miklavec: On Sun, Oct 31, 2010 at 16:57, Hans Hagen wrote: On 31-10-2010 12:11, Herbert Voss wrote: Do I need some additional settings to get lower greek letters in the example? I get only a dot for g does the font that you use have greek symbols? It seems to be a bug in code, not the lack of symbols. It fails in Gentium as well. The code (\greeknumerals{3}) doesn't return anything, but it works in MKII. Can you make a example because it works for me: \setupbodyfont[gentium] \starttext \startitemize[g] \dorecurse{10}{\startitem #1 = \greeknumerals{#1} \stopitem} \stopitemize \stoptext The difference between mkii and mkiv is that mkii use math mode to display the greek characters while mkiv takes them from the bodyfont and latin modern has no greek. LM has upper case Greek, no idea why not lower case as well. i guess that they will be there when lm math shows up 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] greek letters in itemize
On Sun, Oct 31, 2010 at 16:57, Hans Hagen wrote: On 31-10-2010 12:11, Herbert Voss wrote: Do I need some additional settings to get lower greek letters in the example? I get only a dot for g does the font that you use have greek symbols? It seems to be a bug in code, not the lack of symbols. It fails in Gentium as well. The code (\greeknumerals{3}) doesn't return anything, but it works in MKII. Mojca ___ 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] greek letters in itemize
Am 31.10.2010 um 18:18 schrieb Mojca Miklavec: On Sun, Oct 31, 2010 at 16:57, Hans Hagen wrote: On 31-10-2010 12:11, Herbert Voss wrote: Do I need some additional settings to get lower greek letters in the example? I get only a dot for g does the font that you use have greek symbols? It seems to be a bug in code, not the lack of symbols. It fails in Gentium as well. The code (\greeknumerals{3}) doesn't return anything, but it works in MKII. Can you make a example because it works for me: \setupbodyfont[gentium] \starttext \startitemize[g] \dorecurse{10}{\startitem #1 = \greeknumerals{#1} \stopitem} \stopitemize \stoptext The difference between mkii and mkiv is that mkii use math mode to display the greek characters while mkiv takes them from the bodyfont and latin modern has no greek. 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 ___
Re: [NTG-context] greek letters in itemize
On Sun, Oct 31, 2010 at 06:48:21PM +0100, Wolfgang Schuster wrote: Am 31.10.2010 um 18:18 schrieb Mojca Miklavec: On Sun, Oct 31, 2010 at 16:57, Hans Hagen wrote: On 31-10-2010 12:11, Herbert Voss wrote: Do I need some additional settings to get lower greek letters in the example? I get only a dot for g does the font that you use have greek symbols? It seems to be a bug in code, not the lack of symbols. It fails in Gentium as well. The code (\greeknumerals{3}) doesn't return anything, but it works in MKII. Can you make a example because it works for me: \setupbodyfont[gentium] \starttext \startitemize[g] \dorecurse{10}{\startitem #1 = \greeknumerals{#1} \stopitem} \stopitemize \stoptext The difference between mkii and mkiv is that mkii use math mode to display the greek characters while mkiv takes them from the bodyfont and latin modern has no greek. LM has upper case Greek, no idea why not lower case as well. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer ___ 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] bug with numeral conversion function
On Mon, Sep 01, 2008 at 07:26:43PM +0200, Khaled Hosny wrote: Now, I think I discovered another bug (or feature?), the function will ignore any zeros at the left which isn't what one expects. This happen to be some thing in Lua itself: s = 000123 print(s) will give 123, so it have to be a string to keep the to the left zeros. I rewrote the converters.alphabetic() and converters.Alphabetic() so that it will not expect a number and will just iterate through the given string, and now \arabicnumerals and its brothers will pass strings to it. Also I found that \abjadnumerals were referring to converters.arabicnumerals witch doesn't exist, I changed it to converters.abjadnumerals but there is no converters.abjadnaivenumerals and I've no idea what it is supposed to do. See the attached patch and tell me what you think. -- Khaled Hosny Arabic localizer and member of Arabeyes.org team diff -Naur cont-tmf/tex/context/base/core-con.lua cont-tmf.local/tex/context/base/core-con.lua --- cont-tmf/tex/context/base/core-con.lua 2008-06-24 23:02:50.0 +0300 +++ cont-tmf.local/tex/context/base/core-con.lua 2008-09-02 12:01:17.0 +0200 @@ -102,22 +102,22 @@ texsprint(utfchar(n+m)) end -local function do_alphabetic(n,max,chr) -if n max then -do_alphabetic(floor((n-1)/max),max,chr) -n = (n-1)%max+1 -end -characters.flush(chr(n)) -end - function converters.alphabetic(n,code) local code = counters[code] or counters['**'] -do_alphabetic(n,#code,function(n) return code[n] or fallback end) +for c in string.characters(n) do +local c = c + 1 + local chr = function(n) return code[n] or fallback end + characters.flush(chr(c)) +end end function converters.Alphabetic(n,code) local code = counters[code] or counters['**'] -do_alphabetic(n,#code,function(n) return characters.uccode(code[n] or fallback) end) +for c in string.characters(n) do +local c = c + 1 + local chr = function(n) return characters.uccode(code[n] or fallback) end + characters.flush(chr(c)) +end end function converters.character(n) converters.chr (n,96) end diff -Naur cont-tmf/tex/context/base/core-con.mkiv cont-tmf.local/tex/context/base/core-con.mkiv --- cont-tmf/tex/context/base/core-con.mkiv 2008-06-24 22:55:44.0 +0300 +++ cont-tmf.local/tex/context/base/core-con.mkiv 2008-09-02 12:17:49.0 +0200 @@ -17,8 +17,8 @@ \def\romannumerals #1{\ctxlua{converters.romannumerals(\number#1)}} \def\Romannumerals #1{\ctxlua{converters.Romannumerals(\number#1)}} -\def\abjadnumerals #1{\ctxlua{converters.arabicnumerals(\number#1)}} -\def\abjadnodotnumerals #1{\ctxlua{converters.arabicnodotnumerals(\number#1)}} +\def\abjadnumerals #1{\ctxlua{converters.abjadnumerals(\number#1)}} +\def\abjadnodotnumerals #1{\ctxlua{converters.abjadnodotnumerals(\number#1)}} \def\abjadnaivenumerals #1{\ctxlua{converters.arabicnaivenumerals(\number#1)}} \defineconversion [romannumerals] [\romannumerals] @@ -32,8 +32,8 @@ \def\characters#1{\ctxlua{converters.characters(\number#1)}} \def\Characters#1{\ctxlua{converters.Characters(\number#1)}} -\def\languagecharacters#1{\ctxlua{converters.alphabetic(\number#1,\currentlanguage)}} % new -\def\languageCharacters#1{\ctxlua{converters.Alphabetic(\number#1,\currentlanguage)}} % new +\def\languagecharacters#1{\ctxlua{converters.alphabetic(#1,\currentlanguage)}} % new +\def\languageCharacters#1{\ctxlua{converters.Alphabetic(#1,\currentlanguage)}} % new \def\getdayoftheweek#1#2#3{\normalweekday\ctxlua{converters.weekday(\number#1,\number#2,\number#3)}} \def\dayoftheweek #1#2#3{\doconvertday{\ctxlua{converters.weekday(\number#1,\number#2,\number#3)}}} @@ -73,19 +73,19 @@ % we could use an auxiliary macro to save some bytes in the format % -% \def\dolanguagecharacters#1#2{\ctxlua{converters.alphabetic(\number#2,#1)}} +% \def\dolanguagecharacters#1#2{\ctxlua{converters.alphabetic(#2,#1)}} % this does not belong here, but in a lang-module -\def\thainumerals #1{\ctxlua{converters.alphabetic(\number#1,thai)}} -\def\devanagarinumerals#1{\ctxlua{converters.alphabetic(\number#1,devanagari)}} -\def\gurmurkhinumerals #1{\ctxlua{converters.alphabetic(\number#1,gurmurkhi)}} -\def\gujaratinumerals #1{\ctxlua{converters.alphabetic(\number#1,gujarati)}} -\def\tibetannumerals #1{\ctxlua{converters.alphabetic(\number#1,tibetan)}} -\def\greeknumerals #1{\ctxlua{converters.alphabetic(\number#1,greek)}} -\def\Greeknumerals #1{\ctxlua{converters.Alphabetic(\number#1,greek)}} -\def\arabicnumerals#1{\ctxlua{converters.alphabetic(\number#1,arabic)}} -\def\persiannumerals #1{\ctxlua{converters.alphabetic(\number#1,persian)}} +\def\thainumerals #1{\ctxlua{converters.alphabetic(#1,thai)}} +\def\devanagarinumerals#1{\ctxlua{converters.alphabetic(#1,devanagari)}} +\def\gurmurkhinumerals #1{\ctxlua{converters.alphabetic(#1,gurmurkhi)}} +\def\gujaratinumerals #1{\ctxlua