[NTG-context] Passing unicode characters
Hi everyone, Is it possible to pass a character to another in MKIV, I mean, like XeTeX in which one can pass one unicode character to another one (this is done in some mapping files with some lines in it of the form U+0030 U+06F0 ) ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
Dear Mehdi, سلام On Tue, 22 Jul 2008 08:48:46 -0600, Mehdi Omidali [EMAIL PROTECTED] wrote: Hi everyone, Is it possible to pass a character to another in MKIV, I mean, like XeTeX in which one can pass one unicode character to another one (this is done in some mapping files with some lines in it of the form U+0030 U+06F0 ) I'm not quite sure I understand you, but there is a mechanism so that you can write your own feature file with your own gsubs and gposs and then pass those along to luatex. This was broken in earlier versions of luatex; seems to be working now -- just checked. See below. Best wishes Idris ===verbose.fea== lookup NumericLookupDFLT { lookupflag 0 ; sub zero by z e r o ; sub one by o n e ; sub two by t w o ; sub three by t h r e e ; sub four by f o u r ; sub five by f i v e ; sub six by s i x ; sub seven by s e v e n ; sub eight by e i g h t ; sub nine by n i n e ; } NumericLookupDFLT ; feature verb { script DFLT ; language dflt ; lookup NumericLookupDFLT ; script latn; language dflt ; lookup NumericLookupDFLT ; language AZE exclude_dflt ; lookup NumericLookupDFLT ; language CRT exclude_dflt ; lookup NumericLookupDFLT ; language MOL exclude_dflt ; lookup NumericLookupDFLT ; language ROM exclude_dflt ; lookup NumericLookupDFLT ; language TRK exclude_dflt ; lookup NumericLookupDFLT ; } verb ; =verb.tex=== % engine=luatex % \setupoutput[pdftex] \starttext \installfontfeature[otf][verb] \definefontfeature [test][mode=node,language=dflt,script=latn,verb=yes,featurefile=verbose.fea] \font\test=lmroman10-regular*test at 20pt \test 1 2 3 4 \stoptext -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] startbodymatter question
Hi, How do you get rid of the doublesided document's page number on the blank page inserted after the last chapter ? Alan ConTeXt ver: 2008.07.10 08:40 MKIV fmt: 2008.7.10 int: english/english texmfstart texexec --lua test.tex --- start of code --- \setuppapersize [A4][A4] %\setuppagenumbering[alternative=singlesided] \setuppagenumbering[alternative=doublesided] \definepagebreak[myChapterPageBreak][yes,header,footer,right] \setuphead[chapter][page=myChapterPageBreak] \startsectionblockenvironment[frontpart] \setupheader[state=stop] \setupfooter[state=stop] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupheader[state=start] \setupfooter[state=start] \stopsectionblockenvironment \setupsectionblock[bodypart][page=no] % doesn't make a difference \startsectionblockenvironment[backpart] \setupheader[state=stop] \setupfooter[state=stop] \stopsectionblockenvironment \starttext \startstandardmakeup Title \blank[3*big] Author \stopstandardmakeup \startfrontmatter Table of Contents \blank[3*big] \placecontent \stopfrontmatter \startbodymatter \chapter{Chapter 1} \section{Section 1.1} \input knuth \blank \input knuth \blank \input knuth \section{Section 1.2} \input tufte \blank \input tufte \blank \input tufte \section{Section 1.3} \input zapf \blank \input zapf \blank \input zapf \chapter{Chapter 2} \section{Section 2.1} \input knuth \blank \input knuth \blank \input knuth \section{Section 2.2} \input tufte \blank \input tufte \blank \input tufte \section{Section 2.3} \input zapf \blank \input zapf \blank \input zapf \stopbodymatter \startbackmatter back cover \stopbackmatter \stoptext --- end of code --- ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
Dear Idris, سلام I tested your file. What I mean is more than that. In your file if I write 1 then it is printed as one. But I mean something like conversion command. For example look at the output of your file. The page number is 1. But what I mean is that engine prints every 1 as one for example. Let me explain in a different way. I declare \setupsection [chapter][conversion=persiannumerals] and the engine puts persiandecimalseparator character E8C8 between chapter numbers and section numbers. I am not satisfied with this character and like the separator character to be a period 002E. In XeTeX one of the font features is to assign the value of E8C8 to 002E. Then the engine automatically prints 002E whenever it has to print E8C8 (except in math mode for which there is a \XeTeXmathcode command). Best wishes On 7/22/08, Idris Samawi Hamid ادريس سماوي حامد [EMAIL PROTECTED] wrote: Dear Mehdi, سلام On Tue, 22 Jul 2008 08:48:46 -0600, Mehdi Omidali [EMAIL PROTECTED] wrote: Hi everyone, Is it possible to pass a character to another in MKIV, I mean, like XeTeX in which one can pass one unicode character to another one (this is done in some mapping files with some lines in it of the form U+0030 U+06F0 ) I'm not quite sure I understand you, but there is a mechanism so that you can write your own feature file with your own gsubs and gposs and then pass those along to luatex. This was broken in earlier versions of luatex; seems to be working now -- just checked. See below. Best wishes Idris ===verbose.fea== lookup NumericLookupDFLT { lookupflag 0 ; sub zero by z e r o ; sub one by o n e ; sub two by t w o ; sub three by t h r e e ; sub four by f o u r ; sub five by f i v e ; sub six by s i x ; sub seven by s e v e n ; sub eight by e i g h t ; sub nine by n i n e ; } NumericLookupDFLT ; feature verb { script DFLT ; language dflt ; lookup NumericLookupDFLT ; script latn; language dflt ; lookup NumericLookupDFLT ; language AZE exclude_dflt ; lookup NumericLookupDFLT ; language CRT exclude_dflt ; lookup NumericLookupDFLT ; language MOL exclude_dflt ; lookup NumericLookupDFLT ; language ROM exclude_dflt ; lookup NumericLookupDFLT ; language TRK exclude_dflt ; lookup NumericLookupDFLT ; } verb ; =verb.tex=== % engine=luatex % \setupoutput[pdftex] \starttext \installfontfeature[otf][verb] \definefontfeature [test][mode=node,language=dflt,script=latn,verb=yes,featurefile=verbose.fea] \font\test=lmroman10-regular*test at 20pt \test 1 2 3 4 \stoptext -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
On Tue, 22 Jul 2008 12:14:30 -0600, Mehdi Omidali [EMAIL PROTECTED] wrote: Dear Idris, سلام I tested your file. What I mean is more than that. In your file if I write 1 then it is printed as one. But I mean something like conversion command. For example look at the output of your file. The page number is 1. But what I mean is that engine prints every 1 as one for example. Let me explain in a different way. I declare \setupsection [chapter][conversion=persiannumerals] and the engine puts persiandecimalseparator character E8C8 between chapter numbers and section numbers. I am not satisfied with this character and like the separator character to be a period 002E. In XeTeX one of the font features is to assign the value of E8C8 to 002E. Then the engine automatically prints 002E whenever it has to print E8C8 (except in math mode for which there is a \XeTeXmathcode command). سلام Mehdi, Well, the easy way is to make E8C8 active then \define E8C8 to be the character 002E. It sounds like XeTeX has a dedicated mechanism. But since I don't use XeTeX maybe Mojca or one of the other XeTeX experts can look at this. You may not even need active char's: There should be a way to control the separator char in \setupsection. I'm at work right now but maybe I can look at this later. Can you send a sample file? Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
Dear Idris, سلام you are right. I found that \setupheads[separator=something] works, but I found a mysterious bug. Whatever one declares as a separator, when you make a reference to the chapter, section, etc, lua writes the number with periods.compile the attached file and look at the reference. Best regards, ps: I sent a test file, but it needs a moderator confirmation. I will send it to your email. %% % engine=luatex \setupheads[separator=--] \starttext \font\test=lmroman10-regular*test at 20pt \chapter{First} \section[one]{one} No matter what you have declared as section separator, here I am \in[one]. \stoptext %% On 7/22/08, Idris Samawi Hamid [EMAIL PROTECTED] wrote: On Tue, 22 Jul 2008 12:14:30 -0600, Mehdi Omidali [EMAIL PROTECTED] wrote: Dear Idris, سلام I tested your file. What I mean is more than that. In your file if I write 1 then it is printed as one. But I mean something like conversion command. For example look at the output of your file. The page number is 1. But what I mean is that engine prints every 1 as one for example. Let me explain in a different way. I declare \setupsection [chapter][conversion=persiannumerals] and the engine puts persiandecimalseparator character E8C8 between chapter numbers and section numbers. I am not satisfied with this character and like the separator character to be a period 002E. In XeTeX one of the font features is to assign the value of E8C8 to 002E. Then the engine automatically prints 002E whenever it has to print E8C8 (except in math mode for which there is a \XeTeXmathcode command). سلام Mehdi, Well, the easy way is to make E8C8 active then \define E8C8 to be the character 002E. It sounds like XeTeX has a dedicated mechanism. But since I don't use XeTeX maybe Mojca or one of the other XeTeX experts can look at this. You may not even need active char's: There should be a way to control the separator char in \setupsection. I'm at work right now but maybe I can look at this later. Can you send a sample file? Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
Dear Mojca, Thanks for your complete answer. In fact, in persian (and maybe arabic) documents, we need every digit be in persian, like chapter, section, figure, and even formula numbers (most of the people even prefer persian digits in formulas which is possible in xetex). As you know, the Mapping=farsidigits in a font definition works perfect in xelatex. Best wishes. On 7/22/08, Mojca Miklavec [EMAIL PROTECTED] wrote: On Tue, Jul 22, 2008 at 4:48 PM, Mehdi Omidali wrote: Hi everyone, Is it possible to pass a character to another in MKIV, I mean, like XeTeX in which one can pass one unicode character to another one (this is done in some mapping files with some lines in it of the form U+0030 U+06F0 ) There definitely is a way, but I don't know why you would want to do remap numbers on font level. You need such hacks in LaTeX where changing page numbers is a pain, but I would do that with conversions in ConTeXt. arabic (starting with U+0660) is already defined. If you need U+06F0, you might need to do minor modification in core-con.*, but try with normal arabic first. \setuppagenumbering [conversion=arabicnumerals] Here are the needed modifications: core-con.lua: ['arabic'] = { 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669 }, you need to add the same for extendedarabic ['extendedarabic'] = { 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669 }, core-con.mkiv: \def\arabicnumerals #1{\ctxlua{converters.alphabetic(\number#1,arabic)}} \def\extendedarabicnumerals #1{\ctxlua{converters.alphabetic(\number#1,extendedarabic)}} \defineconversion [arabicnumerals] [\arabicnumerals] \defineconversion [extendedarabicnumerals] [\extendedarabicnumerals] (You also need to modify core-con.mkii if you want the same feature to be available in XeTeX afterwards.) And then you should be able to use \setuppagenumbering [conversion=extendedarabicnumerals] You can also set up itemize to use arabic numbers. What exactly would you like to do with those numbers? Then you can probably get a more precise answer. 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
ِDear Idris, سلام Thank you. I will test that and let you know if it is what I realy want. And again another problem that I encountered in conversion to persiannumerals or arabicnumerals. I used an style you offered in one of your posts and modified it for persian typesetting. I declared \setuppagenumbering[conversion=persiannumerals] and unfortunately the page numbering started from zero. The same thing happens in footnote numbers even thouth I haven't use any conversion for footnotes. All chapters, sections, and ... numbers starts from zero. How can I solve this problem. Please see the attached files. Best regards, On 7/22/08, Idris Samawi Hamid ادريس سماوي حامد [EMAIL PROTECTED] wrote: Dear Mehdi, سلام On Tue, 22 Jul 2008 08:48:46 -0600, Mehdi Omidali [EMAIL PROTECTED] wrote: Hi everyone, Is it possible to pass a character to another in MKIV, I mean, like XeTeX in which one can pass one unicode character to another one (this is done in some mapping files with some lines in it of the form U+0030 U+06F0 ) I'm not quite sure I understand you, but there is a mechanism so that you can write your own feature file with your own gsubs and gposs and then pass those along to luatex. This was broken in earlier versions of luatex; seems to be working now -- just checked. See below. Best wishes Idris ===verbose.fea== lookup NumericLookupDFLT { lookupflag 0 ; sub zero by z e r o ; sub one by o n e ; sub two by t w o ; sub three by t h r e e ; sub four by f o u r ; sub five by f i v e ; sub six by s i x ; sub seven by s e v e n ; sub eight by e i g h t ; sub nine by n i n e ; } NumericLookupDFLT ; feature verb { script DFLT ; language dflt ; lookup NumericLookupDFLT ; script latn; language dflt ; lookup NumericLookupDFLT ; language AZE exclude_dflt ; lookup NumericLookupDFLT ; language CRT exclude_dflt ; lookup NumericLookupDFLT ; language MOL exclude_dflt ; lookup NumericLookupDFLT ; language ROM exclude_dflt ; lookup NumericLookupDFLT ; language TRK exclude_dflt ; lookup NumericLookupDFLT ; } verb ; =verb.tex=== % engine=luatex % \setupoutput[pdftex] \starttext \installfontfeature[otf][verb] \definefontfeature [test][mode=node,language=dflt,script=latn,verb=yes,featurefile=verbose.fea] \font\test=lmroman10-regular*test at 20pt \test 1 2 3 4 \stoptext -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ fcon.pdf Description: Adobe PDF document fcon.tex Description: TeX document far-env.tex Description: TeX document ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] all about \about
The \about cross reference command woks ok if I use \about[aa] It delivers the title (or part of it in this case) of the section marked aa. but when I try to give it some text it blows up on the text, e.g., \about{foo}[aa] So what if anything goes between the { and the }? What purpose do they serve? -- John Culleton Resources for every author and publisher: http://wexfordpress.com/tex/shortlist.pdf http://wexfordpress.com/tex/packagers.pdf http://www.creativemindspress.com/newbiefaq.htm http://www.gropenassoc.com/TopLevelPages/reference%20desk.htm ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] all about \about
On Tue, 22 Jul 2008, John Culleton wrote: The \about cross reference command woks ok if I use \about[aa] It delivers the title (or part of it in this case) of the section marked aa. but when I try to give it some text it blows up on the text, e.g., \about{foo}[aa] So what if anything goes between the { and the }? What purpose do they serve? \about does not support \about{...}[...] kind of references like \in or \at. Does some documentation say that this is supported? This is what core-ref.tex says \definecommand about {\dospecialabout} ... \unexpanded\def\dospecialabout[#1]% {...} This explains the error message that you get when you try \about{foo}[aa]. What do you want to achieve with \about{foo}[aa]? There may be some other way to do that. Aditya ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
On Tue, 22 Jul 2008, Mehdi Omidali wrote: Dear Idris, سلام you are right. I found that \setupheads[separator=something] works, but I found a mysterious bug. Whatever one declares as a separator, when you make a reference to the chapter, section, etc, lua writes the number with periods.compile the attached file and look at the reference. Unfortunately, this is an old bug. Hans is planning to revamp the handling of sections and references in mkiv. So, hopefully this will be corrected soon. If you really need this functionality now, there are ugly workarounds. I can post them when I get back to home computer. Aditya___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] all about \about
On Tuesday 22 July 2008 04:12:48 pm Aditya Mahajan wrote: On Tue, 22 Jul 2008, John Culleton wrote: The \about cross reference command woks ok if I use \about[aa] It delivers the title (or part of it in this case) of the section marked aa. but when I try to give it some text it blows up on the text, e.g., \about{foo}[aa] So what if anything goes between the { and the }? What purpose do they serve? \about does not support \about{...}[...] kind of references like \in or \at. Does some documentation say that this is supported? This is what core-ref.tex says \definecommand about {\dospecialabout} ... \unexpanded\def\dospecialabout[#1]% {...} This explains the error message that you get when you try \about{foo}[aa]. What do you want to achieve with \about{foo}[aa]? There may be some other way to do that. On page 167 of the Cont-en manual \about is defined as: \about{...}[ref] . . . text But you are right, if I want to change the text anyhow I can just ignore \about and put in the text I want. What I was trying to do was silly. Page 167 has been suitably defaced so I won't try that stupid trick again. -- John Culleton Resources for every author and publisher: http://wexfordpress.com/tex/shortlist.pdf http://wexfordpress.com/tex/packagers.pdf http://www.creativemindspress.com/newbiefaq.htm http://www.gropenassoc.com/TopLevelPages/reference%20desk.htm ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing unicode characters
Hi, Please look at the attached file. Why numbering starts from zero? % %-lang-far.tex \writestatus{loading}{Farsi Languages} \unprotect \setupheadtext [content=فهرست مطالب] \setupheadtext [tables=ليست جداول] \setupheadtext [figures=ليست تصاوير] \setupheadtext [graphics=ليست اشکال] \setupheadtext [index=نمايه] \setupheadtext [abbreviations=اختصارات] \setupheadtext [units=واحدها] \setuplabeltext [table=جدول ] \setuplabeltext [figure=شكل ] \setuplabeltext [graphic=طرح ] %D We don't set these here. One can do that in a style. \setuplabeltext [chapter=فصل ] % Chapter \setuplabeltext [section=بخش ] \setuplabeltext [subsection=زيربخش ] \setuplabeltext [subsubsection=زيرزيربخش ] \setuplabeltext [subsubsubsection=زيرزيرزيربخش ] \setuplabeltext [appendix=پيوست ] % Appendix \setuplabeltext [part=قسمت ] \setuplabeltext [line=خط ] \setuplabeltext [lines=خطهاي ] \setuplabeltext [january=ژانويه] \setuplabeltext [february=فوريه] \setuplabeltext [march=مارس] \setuplabeltext [april=آوريل] \setuplabeltext [may=مي] \setuplabeltext [june=ژوئن] \setuplabeltext [july=ژوييه] \setuplabeltext [august=آگوست] \setuplabeltext [september=سپتامبر] \setuplabeltext [october=اکتبر] \setuplabeltext [november=نوامبر] \setuplabeltext [december=دسامبر] \setuplabeltext [sunday=يکشنبه] \setuplabeltext [monday=دوشنبه] \setuplabeltext [tuesday=سهشنبه] \setuplabeltext [wednesday=چهارشنبه] \setuplabeltext [thursday=پنجشنبه] \setuplabeltext [friday=جمعه] \setuplabeltext [saturday=شنبه] %D Rather new ... \setuplabeltext [page=صفحه] \setuplabeltext [atpage=در صفحهٔ ] %\setuplabeltext [hencefore=كما وضحنا سابقا] %\setuplabeltext [hereafter=كما نوضح لاحقا] \setuplabeltext [see=نگاه کنيد به] %D ... and to be completed! \protect \endinput %-end %-far-env.tex--- %This file is designed by Mehdi Omidali for easy typesetting farsi in Context %File Versin:2008-7-20 \startenvironment far-env \usemodule[lang-far] \mainlanguage[arabic] % Font setup \definefontfeature [arabic] [mode=node,language=dflt,script=arab, init=yes,medi=yes,fina=yes,isol=yes, liga=yes,dlig=yes,rlig=yes,clig=yes, mark=yes,mkmk=yes,kern=yes,curs=yes,futerfile=verbose.fea] \starttypescript [serif] [arabic] \definefontsynonym [Farsi-Light][name:ScheherazadeRegOT.ttf] [features=arabic] \definefontsynonym [Farsi-Bold] [name:ScheherazadeRegOT.ttf] [features=arabic] \definefontsynonym [Farsi-Italic] [name:ScheherazadeRegOT.ttf] [features=arabic] \definefontsynonym [Farsi-Bold-Italic] [name:ScheherazadeRegOT.ttf] [features=arabic] \stoptypescript \starttypescript [serif] [arabic] [name] \usetypescript[serif][fallback] \definefontsynonym [Serif] [Farsi-Light] [features=arabic] \definefontsynonym [SerifItalic] [Farsi-Italic] [features=arabic] \definefontsynonym [SerifBold] [Farsi-Bold] [features=arabic] \definefontsynonym [SerifBoldItalic] [Farsi-Bold-Italic] [features=arabic] \stoptypescript \starttypescript [Farsi] \definetypeface [Farsi] [rm] [serif] [arabic] [default] \stoptypescript \def\FarsiGlobalDir {\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT} \def\FarsiParDir{\textdir TRT\pardir TRT} \def\FarsiTextDir {\textdir TRT} \def\LatinParDir {\textdir TLT\pardir TLT} \def\LatinTextDir{\textdir TLT} \def\LatinGlobalDir {\pagedir TLT\bodydir TLT\pardir TLT\textdir TLT} \define\setfarsi {\FarsiGlobalDir% \usetypescript[Farsi]% \setupbodyfont[Farsi,18pt]} \definestartstop [farsipar] [commands=\Farsi\FarsiParDir] \define[1]\RT {{\Farsi\FarsiTextDir#1}} \define\setlatin {\LatinGlobalDir% \usetypescript[lm]% \setupbodyfont[lm,18pt]} \definestartstop [latinpar] [commands=\Farsi\LatinParDir] \define[1]\LT {{\LatinTextDir#1}} \setuphead [chapter] [ page=yes, before=\hairline\blank, after=\nowhitespace\hairline, header=nomarking, textstyle=bold, numberstyle=bold, ] \setupheads[separator=\LT{--}] \setuppagenumbering[conversion=persiannumerals] \setupheadertexts[]%We put here because we want to define headertexts next. %\setupheadertexts[][pagenumber] \setupsection [chapter] [conversion=persiannumerals] \setupsection [section] [conversion=persiannumerals] \setupsection [subsection] [conversion=persiannumerals] \setupsection [subsubsection] [conversion=persiannumerals] \setupfootnotes [conversion=persiannumerals] \stopenvironment -end % engine=luatex \setupinteraction [state=start,
Re: [NTG-context] Passing unicode characters
On Tue, Jul 22, 2008 at 9:39 PM, Mehdi Omidali wrote: Dear Mojca, Thanks for your complete answer. In fact, in persian (and maybe arabic) documents, we need every digit be in persian, But when you write, you probably write numbers in persian already? like chapter, section, \chapter and \section are a bit buggy as far as numbering is concerned, but you can use \setuphead [section] [conversion=arabicnumerals] figure, and even formula numbers Try \defineconversion [ar] [numbers] [\arabicnumerals] This one doesn't work on sections (same argument as Aditya pointed out), but it does quite a lot already :) Can you try it out and report? I didn't try it out (no idea how to work with Arabic), but I consider it a much cleaner approach than redefining characters in fonts. (You could also use \setupformulas[conversion=arabicnumerals], similar for tables, ..., but in theory you should not need anything else but \defineconversion [ar] [numbers] [\arabicnumerals] in lang-ara.tex if that's of general interest.) (most of the people even prefer persian digits in formulas which is possible in xetex). As you know, the Mapping=farsidigits in a font definition works perfect in xelatex. I would say that ConTeXt lacks a nice interface for that at the moment. There is tlig/trep feature that works that way (remaps ' to rightquote for example), but it's spread all over the place and might be likely to change. One option are fea files (like the one Idris pointed you to). Still, I would go for conversion, not for redefining fonts. Redefining fonts is just an ugly hack that happens to solve a problem temporary. People use it just because it's too difficult to do it in some other way. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Bibliography Module -- footnote/endnote citation style possible?
Hi! Is there a possibility to use footnotes or endnotes with the citation system of the bib module? I didn't find anything about that topic in the mailing list archive, Context wiki or module documentation. Thanks. Best regards, michael. ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___