[NTG-context] \doifelse inside MP(code|graphic)
Hi, \doifelse does not work inside any MP environment. Something really strange happens if you try to use it. \loggingall tells me what exactly is happening, but I do not know enough low-level TeX to understand why this is happening. Conside this test file %-- \def\test{string} \starttext \doifelse{\test}{string}{test is a string}{or not} \loggingall \startMPcode draw \doifelse{\test}{string}{fullcircle}{fullsquare} scaled 5cm ; \stopMPcode \stoptext % It does not compile correctly. Intesting pieces from the log file (actually the MKII log, since that is more interesting) \dostartMPcode #1\stopMPcode ->\startuseMPgraphic {@@}#1\stopuseMPgraphic \useMPgraphic {@@}\endgroup #1<-draw \doifelse {\test }{string}{fullcircle}{fullsquare} scaled 5cm ; ... \doifelse #1#2->\edef \!!stringa {#1}\edef \!!stringb {#2}\ifx \!!stringa \!!stringb \expandafter \firstoftwoarguments \else \expandafter \secondoftwoargument s \fi #1<-\test #2<-string \!!stringa ->currentcolor \test ->string \!!stringb ->black {no mode: \ifx: (level 5) entered on line 11} {false} {\else: \ifx (level 5) entered on line 11} {\expandafter} {\fi: \ifx (level 5) entered on line 11} . \ascii -> draw \edef currentcolor{string}\edef black{string}fullsquare scaled 5cm ; {changing \MPascii=undefined} {into \MPascii=macro:-> draw \edef currentcolor{string\ETC.} {\the} Notice the first line of \ascii, and compare that with the definition of \doifelse. The command \!!stringa inside the definition of \doifelse gets expanded too soon. Is there any way to get this work, other than doing the comparison outside the MP code. 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 ___
[NTG-context] context mkii bug: infinity loops
Hi, the following file make mkii run into infinity loops. after commenting the hz feature or the emdash definition, it will run normally. Yue Wang c.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 ___
Re: [NTG-context] bold small caps with latin modern
you should apply a font feature to bold font. On Tue, Nov 18, 2008 at 4:07 AM, Peter Münster <[EMAIL PROTECTED]> wrote: > Hello > > Is it possible to get bold small caps with latin modern and MKIV, and if > yes, how? > I would like to get working this example file: > > \starttext > \sc Normal and \bf bold Small Caps. > \stoptext > > Thanks in advance for any help, Peter > > -- > http://pmrb.free.fr/contact/ > > ___ > 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] Fonts with XeTeX
Arthur, This works! Thanks for your help. Bart On Monday 17 November 2008 02:25:15 pm Arthur Reutenauer wrote: > Hello Bart, > > Try > > \starttypescript[serif][caslon][uc] > > \definefontsynonym[CaslonRegular][name:CaslonOldFaceBT-Roman][encoding=uc] > \definefontsynonym[CaslonItalic][name:CaslonOldFaceBT-Italic][encoding=uc] > \definefontsynonym[CaslonBold][name:CaslonOldFaceBT-Heavy][encoding=uc] > \stoptypescript > > \starttypescript[serif][caslon][name] > \definefontsynonym [Serif] [CaslonRegular] > \definefontsynonym [SerifItalic] [CaslonItalic] > \definefontsynonym [SerifBold] [CaslonBold] > \stoptypescript > > \starttypescript[caslon][uc] > \definetypeface[caslon][rm][serif][caslon][default][encoding=uc] > \stoptypescript > > \usetypescript[caslon][uc] > \setupbodyfont[caslon, 12pt] > > \starttext > Testing {\bf Testing} {\it Testing} > \stoptext > > Note the two changes: \definetypeface's in the first typescript have > been replaced with \definefontsynonym commands, and the font names have > been prepended with "name:", forcing XeTeX to look for an installed font > instead of a TFM (in plain XeTeX, you get the same result by surrounding > the font name with double quotes). > > I am unable to test the typescript because I don't have Caslon Old > Face, but it works when I replace the font names with the appropriate > faces from Adobe Caslon, which I have. > > Arthur > ___ > 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] Fonts with XeTeX
Hello Bart, Try \starttypescript[serif][caslon][uc] \definefontsynonym[CaslonRegular][name:CaslonOldFaceBT-Roman][encoding=uc] \definefontsynonym[CaslonItalic][name:CaslonOldFaceBT-Italic][encoding=uc] \definefontsynonym[CaslonBold][name:CaslonOldFaceBT-Heavy][encoding=uc] \stoptypescript \starttypescript[serif][caslon][name] \definefontsynonym [Serif] [CaslonRegular] \definefontsynonym [SerifItalic] [CaslonItalic] \definefontsynonym [SerifBold] [CaslonBold] \stoptypescript \starttypescript[caslon][uc] \definetypeface[caslon][rm][serif][caslon][default][encoding=uc] \stoptypescript \usetypescript[caslon][uc] \setupbodyfont[caslon, 12pt] \starttext Testing {\bf Testing} {\it Testing} \stoptext Note the two changes: \definetypeface's in the first typescript have been replaced with \definefontsynonym commands, and the font names have been prepended with "name:", forcing XeTeX to look for an installed font instead of a TFM (in plain XeTeX, you get the same result by surrounding the font name with double quotes). I am unable to test the typescript because I don't have Caslon Old Face, but it works when I replace the font names with the appropriate faces from Adobe Caslon, which I have. Arthur ___ 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] Fonts with XeTeX
On Nov 17, 2008, at 9:39 PM, Bart C. Wise wrote: > I am having difficulties writing a typescript for the Caslon font > that's on my > system. > > The following works: > > \definetypeface[Caslon-Bold][rm][Xserif][CaslonOldFaceBT-Heavy] > \definetypeface[Caslon-Italic][rm][Xserif][CaslonOldFaceBT-Italic] > \definetypeface[Caslon-Regular][rm][Xserif][CaslonOldFaceBT-Roman] > > \starttext > Testing > \switchtobodyfont[Caslon-Regular] Testing > \switchtobodyfont[Caslon-Bold] Testing > \switchtobodyfont[Caslon-Italic] Testing > \stoptext > > > However, I tried to write a simple typescript for the same font. I > came up > with the following: > > \starttypescript[serif][caslon][uc] >\definetypeface[CaslonRegular][CaslonOldFaceBT-Roman][encoding=uc] >\definetypeface[CaslonItalic][CaslonOldFaceBT-Italic][encoding=uc] >\definetypeface[CaslonBold][CaslonOldFaceBT-Heavy][encoding=uc] > \stoptypescript > > \starttypescript[serif][caslon][name] >\definefontsynonym [Serif] [CaslonRegular] >\definefontsynonym [SerifItalic] [CaslonItalic] >\definefontsynonym [SerifBold] [CaslonBold] > \stoptypescript > > \starttypescript[caslon][uc] >\definetypeface[caslon][rm][serif][caslon][default][encoding=uc] > \stoptypescript > > \usetypescript[caslon][uc] > \setupbodyfont[caslon, 12pt] > > \starttext > Testing {\bf Testing} {\it Testing} > \stoptext > > It fails to compile on the \setupbodyfont line. > > I know I'm doing something wrong, but every variation I've tried > ends up with > a compile error, or the caslon font is never loaded and it reverts > back to the > default font. > Fonts in XeTeX are still a mystery to me, but from what I've learned in the last months, it seems that the syntax for luatex typescripts can and should also be used for XeTeX. This works on my system (latest beta): file: type-caslon.tex % \starttypescript [serif] [caslon] \definefontsynonym [Caslon-Roman] [file:ACaslonPro- Regular] [features=default] \definefontsynonym [Caslon-Bold] [file:ACaslonPro-Bold] [features=default] \definefontsynonym [Caslon-Italic] [file:ACaslonPro- Italic] [features=default] \definefontsynonym [Caslon-Bold-Italic][file:ACaslonPro- BoldItalic] [features=default] \definefontsynonym [Caslon-SmallCaps] [file:ACaslonPro- Regular] [features=smallcaps] \stoptypescript \starttypescript [serif] [caslon] \usetypescript[serif][fallback] \definefontsynonym [Serif] [Caslon-Roman] [features=default] \definefontsynonym [SerifItalic] [Caslon-Italic] [features=default] \definefontsynonym [SerifBold] [Caslon-Bold] [features=default] \definefontsynonym [SerifBoldItalic] [Caslon-Bold-Italic] [features=default] \definefontsynonym [SerifCaps] [Caslon-SmallCaps] [features=smallcaps] \stoptypescript \starttypescript [Caslon] \definetypeface [Caslon] [rm] [serif] [caslon] [default] \stoptypescript %% and then: \usetypescriptfile[type-caslon] \usetypescript[Caslon] \setupbodyfont[Caslon,12pt] \starttext Hello World! \stoptext HTH 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Fonts with XeTeX
I am having difficulties writing a typescript for the Caslon font that's on my system. The following works: \definetypeface[Caslon-Bold][rm][Xserif][CaslonOldFaceBT-Heavy] \definetypeface[Caslon-Italic][rm][Xserif][CaslonOldFaceBT-Italic] \definetypeface[Caslon-Regular][rm][Xserif][CaslonOldFaceBT-Roman] \starttext Testing \switchtobodyfont[Caslon-Regular] Testing \switchtobodyfont[Caslon-Bold] Testing \switchtobodyfont[Caslon-Italic] Testing \stoptext However, I tried to write a simple typescript for the same font. I came up with the following: \starttypescript[serif][caslon][uc] \definetypeface[CaslonRegular][CaslonOldFaceBT-Roman][encoding=uc] \definetypeface[CaslonItalic][CaslonOldFaceBT-Italic][encoding=uc] \definetypeface[CaslonBold][CaslonOldFaceBT-Heavy][encoding=uc] \stoptypescript \starttypescript[serif][caslon][name] \definefontsynonym [Serif] [CaslonRegular] \definefontsynonym [SerifItalic] [CaslonItalic] \definefontsynonym [SerifBold] [CaslonBold] \stoptypescript \starttypescript[caslon][uc] \definetypeface[caslon][rm][serif][caslon][default][encoding=uc] \stoptypescript \usetypescript[caslon][uc] \setupbodyfont[caslon, 12pt] \starttext Testing {\bf Testing} {\it Testing} \stoptext It fails to compile on the \setupbodyfont line. I know I'm doing something wrong, but every variation I've tried ends up with a compile error, or the caslon font is never loaded and it reverts back to the default font. ___ 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] bold small caps with latin modern
Hello Is it possible to get bold small caps with latin modern and MKIV, and if yes, how? I would like to get working this example file: \starttext \sc Normal and \bf bold Small Caps. \stoptext Thanks in advance for any help, Peter -- http://pmrb.free.fr/contact/ ___ 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] French punctuation again...
Ah. I now understand the subtlety of "active" characters. Both solutions worked, but also broke elsewhere first: with every colon in my reference keys for the \cite command with BibTeX. I guess I shouldn't do that, so I changed my keys and now everything runs perfect. Thanks a lot! Jeff On Sun, Nov 16, 2008 at 15:05, Hans Hagen <[EMAIL PROTECTED]> wrote: > \useencoding[ffr] > > best not mess around with active colons in an other way since there are > precausions takne for this kind of hackery all over context (you don't > want to know where active colons can play havoc) ___ 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] What is the command to define the behavior of \goto?
On Mon, 17 Nov 2008, Yue Wang wrote: > Hi: > > I don't want bold font for \goto, Where can I change it? \setupinteraction[style=] % default is style=bold 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 ___
[NTG-context] What is the command to define the behavior of \goto?
Hi: I don't want bold font for \goto, Where can I change it? BTW, some users here suggest that maybe we can define a hypperref-like linkcolor, citecolor, urlcolor in \setupinteraction, I think it will be a good idea. Yue Wang ___ 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] context mkii/mkiv bug: columnset lines dont work
Hi, Hans: I think there is a bug in context. the last example in your columns.pdf doesn't work anymore. would you please have a look? Yue Wang ___ 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] How to randomize points in a given area?
Oh! Cool! Thank you, Hans, you really help! On Mon, Nov 17, 2008 at 8:30 AM, Hans Hagen <[EMAIL PROTECTED]> wrote: > Yue Wang wrote: >> Hi, Hans: >> >> On Sun, Nov 16, 2008 at 10:57 PM, Hans Hagen <[EMAIL PROTECTED]> wrote: >>> Yue Wang wrote: Hi, Hans, In your "metapost graphics" pdf document, I can find a card which randomizes points in a path of Christmas tree, how to do that? thanks. >>> just use 'uniformdevisate' or metafun operators like 'ramdomized' >> >> How to ensure the point is in your christmas tree path? > > if i remember right, by following the path of the tree > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 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 : 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] stretching smallcaps with a style command
Bob Reynolds wrote: > > \define [1] \StretchedSmallCaps {\smallcaps {\stretchedlowercase {#1}}} You need a more low-level definition of this command because of macro expansion issues inside the logo processing. It works fine with this: \unexpanded\def\StretchedSmallCaps#1% {\smallcaps {\stretchedlowercase {#1}}} It is not easy to explain why precisely this is needed, so I am not going to try :-) Best wishes, Taco ___ 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] How to randomize points in a given area?
Yue Wang wrote: > Hi, Hans: > > On Sun, Nov 16, 2008 at 10:57 PM, Hans Hagen <[EMAIL PROTECTED]> wrote: >> Yue Wang wrote: >>> Hi, Hans, >>> >>> In your "metapost graphics" pdf document, I can find a card which >>> randomizes points in a path of Christmas tree, how to do that? thanks. >> just use 'uniformdevisate' or metafun operators like 'ramdomized' > > How to ensure the point is in your christmas tree path? if i remember right, by following the path of the tree - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Testing the build
Mohamed Bana wrote: > Hi, > > Do the developers run the trunk against a set of test cases? For > instance, testing the new release against files that compile > successfully under the current stable release? I ask as I often see > people complain that the new beta isn't working and so forth. the beta not working concerns mkiv which is a moving target and we do have test files for specific issues; however one source of potential problems is that taco and my machine run full blown trees as well as minimals and we dont't test all permutations (so, if for instance a file is renamed a problem might not be seen due to the fact that we still have such a file somewhere else in the system); anyhow, that's why they're betas and we're lucky that we have testers Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Feature request: 4SIDE
2008/11/16 Willi Egger <[EMAIL PROTECTED]>: > one could make this definition. If I understand it correctly though, > then the 4SIDE would mean 4 pages on one sheet op paper, single sided > > 1 - 2 > 3 - 4 > > This is easily accomplished with \setuparranging[XY] and \setuppaper > [nx=2,ny=2] I guess it should be more of 1-2-3-4 as 3SIDE (you wrote that for me, remember?) is 1-2-3 But even that should be possible with XY... Greetlings, Hraban ___ 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 ___