Re: [NTG-context] Small caps as a separate font
Here is the output of mtxrun. Note that there are two versions: T (title) and ST (subtitle). I want the title version. mtxrun --script fonts --list --all --pattern=DTL identifier familyname fontname filenamesubfont instances dtldocumentaitalic dtldocumenta dtldocumentasansstitalic DTL Documenta Sans ST Italic.otf dtldocumentanormal dtldocumenta dtldocumentasansstitalic DTL Documenta Sans ST Italic.otf dtldocumentaregulardtldocumenta dtldocumentasansst DTL Documenta Sans ST Regular.otf dtldocumentasansst dtldocumenta dtldocumentasansst DTL Documenta Sans ST Regular.otf dtldocumentasansstitalic dtldocumenta dtldocumentasansstitalic DTL Documenta Sans ST Italic.otf dtldocumentasansstregular dtldocumenta dtldocumentasansst DTL Documenta Sans ST Regular.otf dtldocumentasanst dtldocumenta dtldocumentasanst DTL Documenta Sans T Regular.otf dtldocumentasanstcaps dtldocumenta dtldocumentasanstcaps DTL Documenta Sans T Caps Regular.otf dtldocumentasanstcapsregular dtldocumenta dtldocumentasanstcaps DTL Documenta Sans T Caps Regular.otf dtldocumentasansteuro dtldocumenta dtldocumentasansteuro DTL Documenta Sans T Euro.otf dtldocumentasanstitalicdtldocumenta dtldocumentasanstitalic DTL Documenta Sans T Italic.otf dtldocumentasanstregular dtldocumenta dtldocumentasanst DTL Documenta Sans T Regular.otf I tried \definefontfamily[DTL-Documenta-Sans-T][ss][DTL-Documenta-Sans-T] but it does not work with \sc. On Wed, May 25, 2022 at 10:30 PM Henning Hraban Ramm via ntg-context < ntg-context@ntg.nl> wrote: > Am 25.05.22 um 22:23 schrieb Stefan Nedeljkovic via ntg-context: > > Dear list, > > > > A quick question about a font that has a separate file for small caps. I > > have the following: > > > > > > \starttypescript [sans] [dtl-documenta-sans-t] > > \definefontsynonym[Sans] [name:dtldocumentasanst][features=default] > > \definefontsynonym[SansItalic] > > [name:dtldocumentasanstitalic][features=default] > > \definefontsynonym[SansCaps][name:dtldocumentasanstcaps][features=default] > > > \stoptypescript > > > > > > \starttypescript [sans] [dtl-documenta-sans-t-sc] > > \definefontsynonym[Sans] [name:dtldocumentasanstcaps][features=default] > > \definefontsynonym[SansItalic] > > [name:dtldocumentasanstcapsitalic][features=default] > > \stoptypescript > > > > > > How can I define dtl-documenta-sans such that I can do: > > > > \setupbodyfont[dtl-documenta-sans,rm,10pt] > > > > \starttext > > \setff{smallcaps}{Small Caps Hamburgerfons}, \setff{smallcaps}{\it Small > > Caps Italic Hamburgerfons}, > > \stoptext > > Single smallcaps fonts work the traditional way with \sc, not via > OpenType features (if I’m not mistaken and this gets mapped automagically). > > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Small caps as a separate font
Am 25.05.22 um 22:23 schrieb Stefan Nedeljkovic via ntg-context: Dear list, A quick question about a font that has a separate file for small caps. I have the following: \starttypescript [sans] [dtl-documenta-sans-t] \definefontsynonym[Sans] [name:dtldocumentasanst][features=default] \definefontsynonym[SansItalic] [name:dtldocumentasanstitalic][features=default] \definefontsynonym[SansCaps][name:dtldocumentasanstcaps][features=default] \stoptypescript \starttypescript [sans] [dtl-documenta-sans-t-sc] \definefontsynonym[Sans] [name:dtldocumentasanstcaps][features=default] \definefontsynonym[SansItalic] [name:dtldocumentasanstcapsitalic][features=default] \stoptypescript How can I define dtl-documenta-sans such that I can do: \setupbodyfont[dtl-documenta-sans,rm,10pt] \starttext \setff{smallcaps}{Small Caps Hamburgerfons}, \setff{smallcaps}{\it Small Caps Italic Hamburgerfons}, \stoptext Single smallcaps fonts work the traditional way with \sc, not via OpenType features (if I’m not mistaken and this gets mapped automagically). 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Small caps as a separate font
Dear list, A quick question about a font that has a separate file for small caps. I have the following: \starttypescript [sans] [dtl-documenta-sans-t] \definefontsynonym[Sans] [name:dtldocumentasanst][features=default] \definefontsynonym[SansItalic] [name:dtldocumentasanstitalic][features=default] \stoptypescript \starttypescript [sans] [dtl-documenta-sans-t-sc] \definefontsynonym[Sans] [name:dtldocumentasanstcaps][features=default] \definefontsynonym[SansItalic] [name:dtldocumentasanstcapsitalic][features=default] \stoptypescript How can I define dtl-documenta-sans such that I can do: \setupbodyfont[dtl-documenta-sans,rm,10pt] \starttext \setff{smallcaps}{Small Caps Hamburgerfons}, \setff{smallcaps}{\it Small Caps Italic Hamburgerfons}, \stoptext Sincerely, Stefan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Small caps and bold
Hello, On Thu, 14 Dec 2017 10:16:33 +0100, Hans Hagenwrote: On 12/14/2017 8:37 AM, Procházka Lukáš Ing. wrote: Hello, I'm trying to typeset some text in bold + smallcaps. But even the sample on wiki: http://wiki.contextgarden.net/Bold_small_caps extended to: \starttext \setff{smallcaps} Normal and \bf bold Small Caps. {\sc Normal and \bf bold Small Caps.} \stoptext doesn't produce bold small caps - see the attached files. So - how to get bold small caps? at least you need a bold font that has smallcaps ... how do I get list of fonts which provide bold+smallcaps? With "mtxrun --script font --list --all ..." somehow? Rest regards, Lukas Hans -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Small caps and bold
Hello, I'm trying to typeset some text in bold + smallcaps. But even the sample on wiki: http://wiki.contextgarden.net/Bold_small_caps extended to: \starttext \setff{smallcaps} Normal and \bf bold Small Caps. {\sc Normal and \bf bold Small Caps.} \stoptext doesn't produce bold small caps - see the attached files. So - how to get bold small caps? Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396 BfSc.mkiv Description: Binary data BfSc.pdf Description: Adobe PDF 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Small caps from otf in luatex.
On Sat, 10 Aug 2013 19:24:17 +0200 Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de wrote: Hi John! ···date: 2013-08-10, Saturday···from: john Culleton··· I have asked everywhere else to no avail. In (plain) luatex how do I specify the small cap version of an otf font? I use context for non-fiction but pdftex and now luatex for fiction. Plain uses a feature syntax similar to Xetex___s: \font \foo = file:Iwona-Regular.otf:+smcp \foo whatever \bye the expression after the second colon is the same as ___smcp=yes___ in Context. Multiple definitions are separated by semicola, e.g.: \font \foo = file:Iwona-Regular.otf:+smcp;mode=base;+tlig Best regards, Philipp Thanks! Now my latest book project can move forward. I never thought to look in xetex for an answer about luatex. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: Create Book Covers with Scribus available at http://www.booklocker.com/books/4055.html ___ 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] Small caps from otf in luatex.
I have asked everywhere else to no avail. In (plain) luatex how do I specify the small cap version of an otf font? I use context for non-fiction but pdftex and now luatex for fiction. -- John Culleton ___ 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] Small caps from otf in luatex.
Hi John! ···date: 2013-08-10, Saturday···from: john Culleton··· I have asked everywhere else to no avail. In (plain) luatex how do I specify the small cap version of an otf font? I use context for non-fiction but pdftex and now luatex for fiction. Plain uses a feature syntax similar to Xetex’s: \font \foo = file:Iwona-Regular.otf:+smcp \foo whatever \bye the expression after the second colon is the same as “smcp=yes” in Context. Multiple definitions are separated by semicola, e.g.: \font \foo = file:Iwona-Regular.otf:+smcp;mode=base;+tlig Best regards, Philipp pgpjSKkfeNnpq.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] Small caps?
On 2012-07-25 Shriramana Sharma samj...@gmail.com wrote: Hi Shriramana, Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob): loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{} simplefonts is a MkIV module, you are using MkII. If you don't have a particular reason to use MkII with XeTeX I would recommend to switch to MkIV and LuaTeX. The difference is basically compiling with “context file.tex” instead of “texexec --xetex file.tex”. And it is also recommended to use an up-to-date context installation (since apparently your version is quite old). You'll find more info about installing an up-to-date MkIV on the wiki: http://wiki.contextgarden.net/ConTeXt_Standalone Marco ___ 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] Small caps?
On 25-7-2012 04:33, Shriramana Sharma wrote: Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like walking ants (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose super-duper typography on users when they are willing to settle for less? Sure, but one problem with a mkii fake approach is that it is fragile when something else than 8 bit characters shows up in the content stream. In mkiv that's less an issues as there completely different solutions are used. 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] Small caps?
On Wed, Jul 25, 2012 at 9:35 AM, Hans Hagen wrote: On 25-7-2012 04:33, Shriramana Sharma wrote: Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like walking ants (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose super-duper typography on users when they are willing to settle for less? Sure, but one problem with a mkii fake approach is that it is fragile when something else than 8 bit characters shows up in the content stream. Is that also true for XeTeX? (What is an 8-bit character when talking of XeTeX?) As far as I remember converting uppercase into lowercase or vice versa should work out of the box in XeTeX (all the lccodes and uccodes are properly set already). [But I have no idea how that black magic with \Words \Caps and their zillions of variants works.] In mkiv that's less an issues as there completely different solutions are used. But it lacks Indic scripts, so it's not an option for him, at least not yet. 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] Small caps?
On Wed, Jul 25, 2012 at 9:04 AM, Marco wrote: On 2012-07-25 Shriramana Sharma wrote: Hi Shriramana, Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob): loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{} simplefonts is a MkIV module, you are using MkII. If you don't have a particular reason to use MkII with XeTeX He does. He just explained that he wants to use Indic scripts and unless someone writes support for them ... However this means that t-simplefonts are not an option either. Btw: shouldn't the module check that it's running MKIV and complain if it doesn't (with a clear error message as opposed to undefined command)? 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] Small caps?
On 25-7-2012 09:41, Mojca Miklavec wrote: On Wed, Jul 25, 2012 at 9:35 AM, Hans Hagen wrote: On 25-7-2012 04:33, Shriramana Sharma wrote: Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like walking ants (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose super-duper typography on users when they are willing to settle for less? Sure, but one problem with a mkii fake approach is that it is fragile when something else than 8 bit characters shows up in the content stream. Is that also true for XeTeX? (What is an 8-bit character when talking of XeTeX?) On the one hand less, as a token can be an utf character, but fo rother bits and pieces of the input it is still tricky. Given the earlier posted code: \smallcaps{àáâãäå Watch out for returns.} That works, but the next doesn't: \smallcaps{àáâãäå Watch out for \TEX\ returns.} So, a parser would have to deal with things like this: \TEX {\bold test} \hbox{test} There are some token processors in mkii that deal with some of these aspects. But it lacks Indic scripts, so it's not an option for him, at least not yet. Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable). 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] Small caps?
Hi thanks everyone for their responses. On Wed, Jul 25, 2012 at 1:23 PM, Hans Hagen pra...@wxs.nl wrote: But it lacks Indic scripts, so it's not an option for him, at least not yet. Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable). Hi -- I'm curious to know about your future plans for Indic. Are you going to use HarfBuzz? Even in Indic, I have specific minority orthography requirements due to which I'm using Graphite-enabled fonts. HarfBuzz (new one, not old one) supports Graphite and so my requirements would be met if that is used, but if you are going to develop yet another rendering system (please don't tell me it's so) it would be quite difficult... -- Shriramana Sharma ___ 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] Small caps?
On Wed, Jul 25, 2012 at 10:16 AM, Shriramana Sharma samj...@gmail.comwrote: Hi thanks everyone for their responses. On Wed, Jul 25, 2012 at 1:23 PM, Hans Hagen pra...@wxs.nl wrote: But it lacks Indic scripts, so it's not an option for him, at least not yet. Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable). Hi -- I'm curious to know about your future plans for Indic. Are you going to use HarfBuzz? Even in Indic, I have specific minority orthography requirements due to which I'm using Graphite-enabled fonts. HarfBuzz (new one, not old one) supports Graphite and so my requirements would be met if that is used, but if you are going to develop yet another rendering system (please don't tell me it's so) it would be quite difficult... ok, we don't tell it to you. -- luigi ___ 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] Small caps?
On 25-7-2012 10:16, Shriramana Sharma wrote: Hi thanks everyone for their responses. On Wed, Jul 25, 2012 at 1:23 PM, Hans Hagen pra...@wxs.nl wrote: But it lacks Indic scripts, so it's not an option for him, at least not yet. Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable). Hi -- I'm curious to know about your future plans for Indic. Are you going to use HarfBuzz? Even in Indic, I have specific minority orthography requirements due to which I'm using Graphite-enabled fonts. HarfBuzz (new one, not old one) supports Graphite and so my requirements would be met if that is used, but if you are going to develop yet another rendering system (please don't tell me it's so) it would be quite difficult... luatex does not use specific libraries but assumes all to be done in lua .. the otf machinery in mkiv is lua based (independent, extensible) and support for indic runs on top of that (the additional code is written by some dutchies who need it for high end academic publishing) ... I don't know about specific monorities but demos of several variants were shown 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] Small caps?
On Jul 25, 2012, at 1:06 AM, Shriramana Sharma wrote: On Wed, Jul 25, 2012 at 10:29 AM, Rogers, Michael K mrog...@emory.edu wrote: Here's a hack, which sort of works, definitely doesn't handle return -- there must be a better way. I hope you don't mind my using your text as text. :-) Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob): loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{} I checked and the package context-modules is installed on my system. Sorry about that. You should load your font in your usual way. As has been pointed out, this is not a robust solution. % load your favorite font here \def\smallcaps{\begingroup\let\par=\space\obeylines\obeyspaces\let\myspace=\space\dosmallcaps} \def\dosmallcaps#1{\dosc#1\end\endgroup} \def\dosc#1{% assumes #1 is a sequence of characters \ifx#1\end \let\next=\relax \else\if#1\space \myspace\let\myspace=\relax% skip repeated spaces \else\ifnum\lccode`#1=`#1{\tfx \uppercase{#1}}% change \tfx to your desired size \else #1\fi \let\myspace=\space \fi \let\next=\dosc \fi\next} \starttext Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like walking ants \smallcaps{(from MS Word)} to be provided by \TeX\ macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose \smallcaps{super-duper Typography} on users when they are willing to settle for less? \smallcaps{Look, returns now work} %\smallcaps{but \TeX\ and other control sequences do not.} \stoptext This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). ___ 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] Small caps?
Am 25.07.2012 um 09:43 schrieb Mojca Miklavec: On Wed, Jul 25, 2012 at 9:04 AM, Marco wrote: On 2012-07-25 Shriramana Sharma wrote: Hi Shriramana, Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob): loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{} simplefonts is a MkIV module, you are using MkII. If you don't have a particular reason to use MkII with XeTeX He does. He just explained that he wants to use Indic scripts and unless someone writes support for them ... However this means that t-simplefonts are not an option either. Btw: shouldn't the module check that it's running MKIV and complain if it doesn't (with a clear error message as opposed to undefined command)? This doesn’t happen anymore with the new version where I include a XeTeX version of the module which I has lying on my system. 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 ___
[NTG-context] Small caps?
Hello. I'm a veritable noob to both TeX and ConTeXT, so please bear with my ignorance. I request your kind guidance. (BTW as I use Indic scripts a lot, my typesetting engine is XeTeX.) I want to produce small caps like those I can get in LibreOffice by doing Right Click Character Font Effects Effects Small Capitals. Basically the capital letters would be shown in their regular size and the small letters would be shown as small size capital letters. Using \sc seems to select a particular font and ignore my current font selection. (I am using DejaVu Sans Condensed font.) \kap or \cap seems to produce all small caps which is not what I want -- only the small letters in the text should be shown as small caps and the capital letters in the text should be left alone. Can anyone please advise me what to do to get small caps in my current font like in LibO and other popular GUI word-processing systems? Thanks! -- Shriramana Sharma ___ 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] Small caps?
Am 24.07.2012 um 21:11 schrieb Shriramana Sharma: Hello. I'm a veritable noob to both TeX and ConTeXT, so please bear with my ignorance. I request your kind guidance. (BTW as I use Indic scripts a lot, my typesetting engine is XeTeX.) I want to produce small caps like those I can get in LibreOffice by doing Right Click Character Font Effects Effects Small Capitals. Basically the capital letters would be shown in their regular size and the small letters would be shown as small size capital letters. Using \sc seems to select a particular font and ignore my current font selection. (I am using DejaVu Sans Condensed font.) \kap or \cap seems to produce all small caps which is not what I want -- only the small letters in the text should be shown as small caps and the capital letters in the text should be left alone. Can anyone please advise me what to do to get small caps in my current font like in LibO and other popular GUI word-processing systems? \definehighlight[smallcaps][style=\setff{smallcaps}] \setupbodyfont[pagella] \starttext upright {\it italic} {\sc smallcaps} upright {\it italic} {\it\setff{smallcaps}smallcaps} upright {\it italic} {\it\smallcaps{smallcaps}} \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 ___
Re: [NTG-context] Small caps?
On Wed, Jul 25, 2012 at 12:55 AM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: \definehighlight[smallcaps][style=\setff{smallcaps}] Hello and thanks for your help but even if I copy-paste your example into TeXWorks and typeset it (remember, I'm using ConTeXT with XeTeX) I get the error: Undefined control sequence. l.1 \definehighlight [smallcaps][style=\setff{smallcaps}] -- Shriramana Sharma ___ 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] Small caps?
On 2012-07-25 Shriramana Sharma samj...@gmail.com wrote: Can anyone please advise me what to do to get small caps in my current font like in LibO and other popular GUI word-processing systems? My guess is that DejaVu Sans Condensed has no small caps. That's why you get the unexpected result. LibO might fake the small caps, which should usually be avoided, since it often leads to typographically bad results. If you need caps, select a font which provides them. Marco ___ 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] Small caps?
On 24-7-2012 21:29, Shriramana Sharma wrote: On Wed, Jul 25, 2012 at 12:55 AM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: \definehighlight[smallcaps][style=\setff{smallcaps}] Hello and thanks for your help but even if I copy-paste your example into TeXWorks and typeset it (remember, I'm using ConTeXT with XeTeX) I get the error: Undefined control sequence. l.1 \definehighlight [smallcaps][style=\setff{smallcaps}] you probably run an ancient mkiv .. this command has been around for a while 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] Small caps?
On Tue, Jul 24, 2012 at 11:21:22PM +0200, Hans Hagen wrote: On 24-7-2012 21:29, Shriramana Sharma wrote: On Wed, Jul 25, 2012 at 12:55 AM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: \definehighlight[smallcaps][style=\setff{smallcaps}] Hello and thanks for your help but even if I copy-paste your example into TeXWorks and typeset it (remember, I'm using ConTeXT with XeTeX) I get the error: Undefined control sequence. l.1 \definehighlight [smallcaps][style=\setff{smallcaps}] you probably run an ancient mkiv .. this command has been around for a while He is using XeTeX, no MkIV for him. Regards, Khaled ___ 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] Small caps?
Thanks to all who replied. On Wed, Jul 25, 2012 at 1:04 AM, Marco net...@lavabit.com wrote: My guess is that DejaVu Sans Condensed has no small caps. That's why you get the unexpected result. LibO might fake the small caps, which should usually be avoided, since it often leads to typographically bad results. If you need caps, select a font which provides them. Hi -- is there absolutely no way for obtaining these fake small caps in ConTeXT? The thread http://www.tug.org/pipermail/xetex/2008-July/010325.html seems to contain some hints but they are fotr for LaTeX. I don't want to switch to LaTeX just for this. Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like walking ants (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose super-duper typography on users when they are willing to settle for less? -- Shriramana Sharma ___ 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] Small caps?
On Wed, 25 Jul 2012, Shriramana Sharma wrote: On Wed, Jul 25, 2012 at 1:04 AM, Marco net...@lavabit.com wrote: My guess is that DejaVu Sans Condensed has no small caps. That's why you get the unexpected result. LibO might fake the small caps, which should usually be avoided, since it often leads to typographically bad results. If you need caps, select a font which provides them. Hi -- is there absolutely no way for obtaining these fake small caps in ConTeXT? The thread http://www.tug.org/pipermail/xetex/2008-July/010325.html seems to contain some hints but they are fotr for LaTeX. I don't want to switch to LaTeX just for this. See http://archive.contextgarden.net/message/20060818.041218.86ea7e08.en.html Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like walking ants (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose super-duper typography on users when they are willing to settle for less? Slightly modified version of the above macro: \def\fakesmallcaps{\let\processword\dofakesmallcapped\processwords} \def\dofakesmallcapped#1{\dostartfakesmallcapped#1\dostopfakesmallcapped} \def\dostartfakesmallcapped#1#2\dostopfakesmallcapped{\cap{#1\cap{#2}}} \starttext \fakesmallcaps{Introduction Again} \stoptext (Stictly speaking, this is not faking small caps rather it is forcing the first letter of each work to be captial) 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Small caps?
Hello Aditya and thanks for your help. However, the following file still does not my particular selected font to be shown in faux small caps: \def\fakesmallcaps{\let\processword\dofakesmallcapped\processwords} \def\dofakesmallcapped#1{\dostartfakesmallcapped#1\dostopfakesmallcapped} \def\dostartfakesmallcapped#1#2\dostopfakesmallcapped{\cap{#1\cap{#2}}} \font\fontlatin = Gentium Basic at 12 pt \font\fontlatintwo = DejaVu Sans Condensed at 16 pt \starttext \fontlatin \fakesmallcaps{Testing This} \fontlatintwo \fakesmallcaps{Testing This} \stoptext -- Shriramana Sharma ___ 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] Small caps?
On Jul 24, 2012, at 10:33 PM, Shriramana Sharma wrote: Hi -- is there absolutely no way for obtaining these fake small caps in ConTeXT? Here's a hack, which sort of works, definitely doesn't handle return -- there must be a better way. I hope you don't mind my using your text as text. :-) \usemodule[simplefonts] \setmainfont[DejaVuSansCondensed] \def\smallcaps{\begingroup\obeyspaces\let\myspace=\space\dosmallcaps} \def\dosmallcaps#1{\dosc#1\end\endgroup} \def\dosc#1{% \ifx#1\end \let\next=\relax \else\if#1\space \myspace\let\myspace=\relax% skip repeated spaces \else\ifnum\lccode`#1=`#1{\tfx \uppercase{#1}}% change \tfx to your desired size \else #1\fi \let\myspace=\space \fi \let\next=\dosc \fi\next} \starttext Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose \smallcaps{super-duper Typography} on users when they are willing to settle for less? \smallcaps{Watch out for returns.} \stoptext Alternatively, you could settle for a font that has small caps. This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). ___ 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] Small caps?
On Wed, Jul 25, 2012 at 10:29 AM, Rogers, Michael K mrog...@emory.edu wrote: Here's a hack, which sort of works, definitely doesn't handle return -- there must be a better way. I hope you don't mind my using your text as text. :-) Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob): loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{} I checked and the package context-modules is installed on my system. -- Shriramana Sharma ___ 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] Small caps problem/bug with some fonts
Barry Schwartz wrote: Are there fonts that have a or b in the numr and dnom features but where they do not work in frac? that is unrelated, the replacement rules refer to glyphs an doften they stick to digits so you get a/b with a large a and b and the fractional slash which then gives an ugly overlap 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] Small caps problem/bug with some fonts
Hans Hagen pra...@wxs.nl skribis: so, its not that frac itself is the problem dealing with in the engine, because if so, many features would be a problem, it's just that font makers stick to a couple of simple rules like: (1) replace all digits slash digits by sup digits overlapping frac slash sub digits (1) replace all digits slash digits by sup digits overlapping frac slash sub digits and if they have rule 2, it will mess up things like a/b Is rule (2) missing? I see (1) twice. Are there fonts that have a or b in the numr and dnom features but where they do not work in frac? ___ 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] Small caps problem/bug with some fonts
Barry Schwartz wrote: Hans Hagen pra...@wxs.nl skribis: Barry Schwartz wrote: If base mode uses the traditional TeX mechanism for ligatures, I don't see any way the font can be blamed. Ant does the same thing, I believe, using the OT tables and heuristics to run the TeX processor. That's okay, as long as the results aren't blamed on the font. :) well, that's alway sa bit hard to determine, maybe not in this case but there definitely are dubious cases and heuristics that works in one case migh tfail in another; also, as context base mode is mostly meant for simple cases (and as said, it might be wise in the case of snallcaps to not enable ligatures) and therefore suits most cases, but as reference (and for more advanced work) node mode has to be used ... actually, when users report bugs with fonts i kind of assume node mode in the perspective of the oriental tex project (related to luatex/mkiv) a complex font is being made and quite some time goes into figuring out what exactly the common ground in ot is (we've decided to settle for uniscribe/volt for final decisions as that's the most advanced machinery) for instance there are more combinations possible on otf than the font generating programs can handle and some combinations are only handled by some renderers. of course the mkiv machinery can be blamed for much, but so can the specification itself, the font generating tools as wel as fonts the best we can do is to try to deal with all but eventually i think that i'll end up with a couple of extra features / checks / etc; there's also already a patch mechanism in place having more advanced fonts is nice, but unfortunately (for commercial reasons, or for stability reasons or ...) font vendors have no real bug fix and upgrade policy but at least i can fix my own bugs -) btw, in most cases it helps to nail down problems when we have the font, which not always is the case, so in such cases we might need to gamble where the problem sits 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] Small caps problem/bug with some fonts
Barry Schwartz wrote: Hans Hagen pra...@wxs.nl skribis: but even then, if a font is not clear about issues, then one can get unwanted side effects (the frac feature for instance is often quite bugged and can only be applied selectively) Yeah, I think trying to be fancy with contextual substitutions is a bit like getting drunk. I'm not even sure why there was a frac tag when it was originally intended to be converted to numr and dnom tags. (I just looked at http://www.microsoft.com/typography/otspec160/features_fj.htm#frac to see what it says nowadays and now want to go get drunk.) actually the frac featurs, like most features is a rather generic one and as such it should work out of the box (some of the justitication features use gpos and/or assume specific renderer support, and some of that is rather undefined) so, its not that frac itself is the problem dealing with in the engine, because if so, many features would be a problem, it's just that font makers stick to a couple of simple rules like: (1) replace all digits slash digits by sup digits overlapping frac slash sub digits (1) replace all digits slash digits by sup digits overlapping frac slash sub digits and if they have rule 2, it will mess up things like a/b of course it can be properly dealt with ... just make proper rules now, one reason that metafont kind of design tools never were accepted as basic tool for font design is that designers are no programmers; and one needs programmers (or at least some of the related mindset) to make the more complex ot fonts (or one needs teams) actually, as many fonts do have the sup/sub digits its rather trivial to provide proper frac's in mkiv but till now i had no reason (time, project, etc) for doing it i fear the moment when designers start giving me rules like use this or that font and turn on those features assuming dtp like control and tweaking of the text (one reason for spending much time on fonts in mkiv is that it will give me control over bad behaving fonts; think of wrong glyph to unicode mapping and such) 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 ___
[NTG-context] Small caps problem/bug with some fonts
Hello all, For some reason, the snippet below outputs 'ThOMAS' instead of 'THOMAS.' This seems to be font dependent; at least Adobe Jenson Pro and Adobe Garamond Pro produce 'Th,' while the other fonts that I've tried produce 'TH', as expected. I don't know whether the bug exists in the fonts themselves or in the way they are handled by ConTeXt or the Simplefonts module, or possibly some other part of the system. In any case, could you suggest a work-around, please? I'm using ConText version 2009.09.16 20:07 and Simplefonts version 2009.09.15. \usemodule[simplefonts] \setmainfont[Adobe Jenson Pro] \starttext {\sc Thomas} \stoptext Thanks in advance, Mika ___ 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] Small caps problem/bug with some fonts
Derek CORDEIRO wrote: \usemodule[simplefonts] Question for wolfgang ... do you enable node mode? in basemode, it might be that ligatures are loaded after smallcaps (and base mode is static) and then it's the order of features in the font that determines what happens, if so, then maybe we should disable ligatures in the smallcaps featureset definition (as i don't expect many smallcaps ligs anyway and it might be less confusing) 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] Small caps problem/bug with some fonts
Derek CORDEIRO wrote: That does not work for me at all. The following does work with generating the same ThOMAS another test: \definefontfeature[default] [default] [mode=node] \definefontfeature[smallcaps][smallcaps][mode=node] \definefontfeature[oldstyle] [oldstyke] [mode=node] 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] Small caps problem/bug with some fonts
Barry Schwartz wrote: Hans Hagen pra...@wxs.nl skribis: could it be a bug in the font? i.e. a Th ligature showing up in smallcaps? if so, then simplefonts should disable ligatures in smallcaps I'm looking at AGaramondPro-Regular in fontforge and it has the lookup for small caps well above the lookup for ligatures. The software must be reading the lookup table out of order. no, it's just that basemode gets two features and replacement and ligatures are both applied due to the definition of the smallcaps featureset, so it's expected behaviour - either adapt the definition of the smallcaps featureset (i'll do that in the next beta) - or switch to nodemode (in your case nodemode applies smallcaps before ligatures) 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] Small caps problem/bug with some fonts
On Fri, Sep 18, 2009 at 11:31 PM, Hans Hagen pra...@wxs.nl wrote: Derek CORDEIRO wrote: That does not work for me at all. The following does work with generating the same ThOMAS another test: \definefontfeature[default] [default] [mode=node] \definefontfeature[smallcaps][smallcaps][mode=node] \definefontfeature[oldstyle] [oldstyle] [mode=node] This works well too. Regards, Derek ___ 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] Small caps problem/bug with some fonts
Hans Hagen pra...@wxs.nl skribis: Barry Schwartz wrote: Hans Hagen pra...@wxs.nl skribis: could it be a bug in the font? i.e. a Th ligature showing up in smallcaps? if so, then simplefonts should disable ligatures in smallcaps I'm looking at AGaramondPro-Regular in fontforge and it has the lookup for small caps well above the lookup for ligatures. The software must be reading the lookup table out of order. I should have said lookup list table. no, it's just that basemode gets two features and replacement and ligatures are both applied due to the definition of the smallcaps featureset, so it's expected behaviour The font is unambiguous about it, though. Are you sure the software isn't performing the feature list in order rather than lookup list? Or is the software performing substitutions in its own ad hoc order? Now I _make_ opentype fonts with small caps and ligatures and so want the software to do what I tell it (except when it was I who made the error). :) ___ 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] Small caps problem/bug with some fonts
Am 18.09.2009 um 19:57 schrieb Hans Hagen: Question for wolfgang ... do you enable node mode? No. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Small caps problem/bug with some fonts
Barry Schwartz wrote: If base mode uses the traditional TeX mechanism for ligatures, I don't see any way the font can be blamed. sure 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] Small caps problem/bug with some fonts
Hans Hagen pra...@wxs.nl skribis: Barry Schwartz wrote: If base mode uses the traditional TeX mechanism for ligatures, I don't see any way the font can be blamed. Ant does the same thing, I believe, using the OT tables and heuristics to run the TeX processor. That's okay, as long as the results aren't blamed on the 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 ___
Re: [NTG-context] Small caps problem/bug with some fonts
Hans Hagen pra...@wxs.nl skribis: but even then, if a font is not clear about issues, then one can get unwanted side effects (the frac feature for instance is often quite bugged and can only be applied selectively) Yeah, I think trying to be fancy with contextual substitutions is a bit like getting drunk. I'm not even sure why there was a frac tag when it was originally intended to be converted to numr and dnom tags. (I just looked at http://www.microsoft.com/typography/otspec160/features_fj.htm#frac to see what it says nowadays and now want to go get drunk.) ___ 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] small caps and old numbers with open type fonts
On Wed, Apr 16, 2008 at 11:59 AM, Antoine Junod [EMAIL PROTECTED] wrote: Hi Wolfgang! Wolfgang Schuster [EMAIL PROTECTED] writes: On Sun, Apr 13, 2008 at 8:39 PM, Antoine Junod [EMAIL PROTECTED] wrote: Hello list, I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? It the same with the \sc command. \definefont[boum][MyFont at 12pt] \definefont[scboum][MyFont*smallcaps at 12pt] Wow, beautifull, thanks :) Where is the * and what we can put after (smallcaps for example) described? I have the strong feeling to search in the wrong place without any result. The * is used to assign a feature to the font and you could find a description in font-ini.tex /grep for \definefontfeature) but the better way is to use typescripts for your fonts. ConTeXt has the following features predefined: - default - smallcaps - oldstyle It is also possible to change the features of a font within the text with the command \setfontfeature{...}. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] small caps and old numbers with open type fonts
Hi, Thanks a lot for your reply :) Henning Hraban Ramm [EMAIL PROTECTED] writes: Am 2008-04-13 um 20:39 schrieb Antoine Junod: I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? Yes. You should set up your fonts with a typescript and access small caps / oldstyle as features. Okay. I've digged a bit about typescripts. If I've understood what I read, I need to use the \definefontsysnonym command. But I'm currently not able to find any doc about \definefontsynonym (a grammar or a definition or something identical). Texshow does not contain it, nor does the context commands manual. I've seen a bit about it in the Fonts in Context manual (mfonts.pdf) but nothing about the 'feature' as in type-otf.tex [1]. I'll try to copy / paste in an clever way (hum :) but would be relly interesting if someone could point me to a complete doc. Thanks for you reply and greetings from Lake Léman, not Constance :) -AJ [1] http://source.contextgarden.net/type-otf.tex ___ 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] small caps and old numbers with open type fonts
Hi Wolfgang! Wolfgang Schuster [EMAIL PROTECTED] writes: On Sun, Apr 13, 2008 at 8:39 PM, Antoine Junod [EMAIL PROTECTED] wrote: Hello list, I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? It the same with the \sc command. \definefont[boum][MyFont at 12pt] \definefont[scboum][MyFont*smallcaps at 12pt] Wow, beautifull, thanks :) Where is the * and what we can put after (smallcaps for example) described? I have the strong feeling to search in the wrong place without any result. Best regards, -AJ ___ 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] small caps and old numbers with open type fonts
Wolfgang Schuster [EMAIL PROTECTED] writes: On Wed, Apr 16, 2008 at 11:59 AM, Antoine Junod [EMAIL PROTECTED] wrote: Hi Wolfgang! Wolfgang Schuster [EMAIL PROTECTED] writes: On Sun, Apr 13, 2008 at 8:39 PM, Antoine Junod [EMAIL PROTECTED] wrote: Hello list, I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? It the same with the \sc command. \definefont[boum][MyFont at 12pt] \definefont[scboum][MyFont*smallcaps at 12pt] Wow, beautifull, thanks :) Where is the * and what we can put after (smallcaps for example) described? I have the strong feeling to search in the wrong place without any result. The * is used to assign a feature to the font and you could find a description in font-ini.tex /grep for \definefontfeature) but the better way is to use typescripts for your fonts. Okay. That's what I'm trying to do right now. ConTeXt has the following features predefined: - default - smallcaps - oldstyle Yep, I saw them in font-ini.tex, as you pointed me to. It is also possible to change the features of a font within the text with the command \setfontfeature{...}. But, if I've understood the point, there is no reason to do that if I use a proper typescript. Right? Best regards, -AJ ___ 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] small caps and old numbers with open type fonts
On Wed, Apr 16, 2008 at 12:34 PM, Antoine Junod [EMAIL PROTECTED] wrote: Wolfgang Schuster [EMAIL PROTECTED] writes: On Wed, Apr 16, 2008 at 11:59 AM, Antoine Junod [EMAIL PROTECTED] wrote: Hi Wolfgang! Wolfgang Schuster [EMAIL PROTECTED] writes: On Sun, Apr 13, 2008 at 8:39 PM, Antoine Junod [EMAIL PROTECTED] wrote: Hello list, I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? It the same with the \sc command. \definefont[boum][MyFont at 12pt] \definefont[scboum][MyFont*smallcaps at 12pt] Wow, beautifull, thanks :) Where is the * and what we can put after (smallcaps for example) described? I have the strong feeling to search in the wrong place without any result. The * is used to assign a feature to the font and you could find a description in font-ini.tex /grep for \definefontfeature) but the better way is to use typescripts for your fonts. Okay. That's what I'm trying to do right now. ConTeXt has the following features predefined: - default - smallcaps - oldstyle Yep, I saw them in font-ini.tex, as you pointed me to. You could also define your own font features with \definefontfeature It is also possible to change the features of a font within the text with the command \setfontfeature{...}. But, if I've understood the point, there is no reason to do that if I use a proper typescript. Right? It depends what do you want, normally no but you could use it to change the figures in a table to tabular figures. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] small caps and old numbers with open type fonts
On Sun, Apr 13, 2008 at 8:39 PM, Antoine Junod [EMAIL PROTECTED] wrote: Hello list, I'm still playing with a few otf fonts and enjoying the way ConTeXt works :) I'm now playing with a beautiful Garamond. I try to typeset a few things with old-style numbers and, well, the output contains old-style numbers but not in my Garamond (it seems to be in latin modern). What should I do to use the old-style numbers of my font? Did a miss a doc about that? Or did I missunderstood the \os command (I thought it was a switch to the old-style of the font but it seems rather to change of font)? I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? It the same with the \sc command. \definefont[boum][MyFont at 12pt] \definefont[scboum][MyFont*smallcaps at 12pt] \starttext \boum ABCabc123 \scboum ABCabc123 \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] small caps and old numbers with open type fonts
Hello list, I'm still playing with a few otf fonts and enjoying the way ConTeXt works :) I'm now playing with a beautiful Garamond. I try to typeset a few things with old-style numbers and, well, the output contains old-style numbers but not in my Garamond (it seems to be in latin modern). What should I do to use the old-style numbers of my font? Did a miss a doc about that? Or did I missunderstood the \os command (I thought it was a switch to the old-style of the font but it seems rather to change of font)? I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? It the same with the \sc command. Thanks a lot for your reply, -AJ ___ 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] small caps and old numbers with open type fonts
Am 2008-04-13 um 20:39 schrieb Antoine Junod: I actually use my font as simple as possible with a \definefont[boum][MyFont at 12pt]. Is it the problem? Yes. You should set up your fonts with a typescript and access small caps / oldstyle as features. Sorry, can't help you further at the moment, but there were a lot of mails/threads on similar subjects in the last few weeks. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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] small caps italic and font switching inside math
Mojca Miklavec wrote: On 7/1/06, Taco Hoekwater wrote: Mojca Miklavec wrote: On 6/29/06, Taco Hoekwater wrote: {\bf A test \variant[Caps] in small caps} Does this work on your computer? (I don't get any caps here.) No it doesn't, it was a leftover from a failed experiment I did not follow the thread closely but can it help you http://wiki.contextgarden.net/Pseudo_Small_Caps ? vit ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Mojca Miklavec wrote: It works perfect except in a single case: \title{\molecule{SF_6}} I had seen that, but not yet bothered to fix it. Still, it is fairly easy to change the macro, try the version below. Sorry, I thought you were talking about the spacing between F and 6. Didn't work in titles either (or I did something strange) :( But If I write a couple of explicit \lohi-s, it will still be OK. Good, but it can be fixed, by changing the definition of \domolecule to: \def\domolecule#1% {\expandafter\scantokens\expandafter {\detokenize{#1\finishchem}}\egroup} This re-tokenizes the argument (needed because it was grabbed by \title already before \molecule had a chance to change the catcodes.) I didn't really understand the \iffluor-part of the code ... but don't bother too much. It is there to trigger a negative italic superscript correction (TeX doesn't have a primitive for that :-)) Thanks a lot for the trickery again (I'm still impressed by the \uppercase part), That is actually a fairly standard trick, not something I invented Greetings, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
On 7/2/06, Taco Hoekwater wrote: Mojca Miklavec wrote: It works perfect except in a single case: \title{\molecule{SF_6}} I had seen that, but not yet bothered to fix it. Still, it is fairly easy to change the macro, try the version below. Sorry, I thought you were talking about the spacing between F and 6. ;) great. You solved two problems now ;) Didn't work in titles either (or I did something strange) :( But If I write a couple of explicit \lohi-s, it will still be OK. Good, but it can be fixed, by changing the definition of \domolecule to: \def\domolecule#1% {\expandafter\scantokens\expandafter {\detokenize{#1\finishchem}}\egroup} This re-tokenizes the argument (needed because it was grabbed by \title already before \molecule had a chance to change the catcodes.) Seems like understanding \expandafter would solve 90% of my problems. I tried to understand that part in TeX book, but it's so cryptic (too short) ... I understand the concept, but I'm not able to write the code for it yet :( Thanks! I didn't really understand the \iffluor-part of the code ... but don't bother too much. It is there to trigger a negative italic superscript correction (TeX doesn't have a primitive for that :-)) Oh, great! Thanks a lot for the trickery again (I'm still impressed by the \uppercase part), That is actually a fairly standard trick, not something I invented But it's nevertheless nice ;) I never saw it (probably because I didn't read and write enough of TeX sources). Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Mojca Miklavec wrote: Seems like understanding \expandafter would solve 90% of my problems. I tried to understand that part in TeX book, but it's so cryptic (too short) ... I understand the concept, but I'm not able to write the code for it yet :( The trick to \expandafter is that you (normally) write it backwards until reaching a moment in time where TeX is not scanning an argument. Say you have a macro that contains some stuff in it to be typeset by \type: \def\mystuff{Some literal stuff} Then you begin with \type{\mystuff} but that obviously doesn't work, you want the final input to look like \type{Some literal stuff} Since \expandafter expands the token that follows the after next token -- whatever the next token is -- you have to insert it backwards across the opening brace of the argument, like so: \type\expandafter{\mystuff} But this wouldn't work, yet: you are still in the middle of an expression (the \type expects an argument, and it gets \expandafter as it stands). Luckily, \expandafter *itself* is an expandable command, so you jump back once more and insert another one: \expandafter\type\expandafter{\mystuff} Now you are on 'neutral ground', and can stop backtracking. Easy, once you get the hang of it. Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Mojca Miklavec wrote: On 6/29/06, Taco Hoekwater wrote: {\bf A test \variant[Caps] in small caps} Does this work on your computer? (I don't get any caps here.) No it doesn't, it was a leftover from a failed experiment Thanks for the magnificent macro! I replaced minus by $-$ and I had to Does that really look better? You can have bold endashes, but you will not get a bold minus. remove [left] because that one is only good for isotopes such as ah. i misunderstood that. It works perfect except in a single case: \title{\molecule{SF_6}} I had seen that, but not yet bothered to fix it. Still, it is fairly easy to change the macro, try the version below. It only moves a lone subscript because i like ions better if the count and charge are aligned, and I also added an italic correction. It is possible to get everything looking perfect (of course), but that would require spending much more time fine-tuning super- and sub scripts. Positive ions look absolutely awful in latin modern btw. The plus from CM is dead-ugly when used in this fashion. Taco \newbox\chemlowbox \def\chemlow#1% {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}} \def\chemhigh#1% {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}% \else \/\lohi{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi } \def\finishchem% {\ifvoid\chemlowbox \else \iffluor \fluorfalse \kern-.1em \fi\low{\box\chemlowbox}\fi} \newif\iffluor \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}% \dostepwiserecurse {65}{90}{1} {\catcode \recurselevel = \active \uccode`\~=\recurselevel \uppercase{\edef~{\noexpand\finishchem \rawcharacter{\recurselevel% \uccode `\~=`\F \uppercase{\def~{\finishchem F\fluortrue}}% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \loggingall \domolecule }% ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
On 7/1/06, Taco Hoekwater wrote: Mojca Miklavec wrote: On 6/29/06, Taco Hoekwater wrote: {\bf A test \variant[Caps] in small caps} Does this work on your computer? (I don't get any caps here.) No it doesn't, it was a leftover from a failed experiment OK. I thought so :( Thanks for the magnificent macro! I replaced minus by $-$ and I had to Does that really look better? You can have bold endashes, but you will not get a bold minus. emm ... I didn't think about that. And I don't notice any big difference on the monitor to be honest. I'll use endash, but it doesn't really matter that much. It works perfect except in a single case: \title{\molecule{SF_6}} I had seen that, but not yet bothered to fix it. Still, it is fairly easy to change the macro, try the version below. Didn't work in titles either (or I did something strange) :( But If I write a couple of explicit \lohi-s, it will still be OK. It only moves a lone subscript because i like ions better if the count and charge are aligned, and I also added an italic correction. Thanks! It is possible to get everything looking perfect (of course), but that would require spending much more time fine-tuning super- and sub scripts. I don't need that perfect solution. The way it is now is already great. Positive ions look absolutely awful in latin modern btw. The plus from CM is dead-ugly when used in this fashion. I may not bother about it - I can't redesign the font and I'll worry about switching to some other font at the end if necessary, now it's time to concentrate on content. (A pitty that Knuth wasn't a chemist as well. The chemists would desperately need something similar for chemistry what TeX offers for mathematics.) \newbox\chemlowbox \def\chemlow#1% {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}} \def\chemhigh#1% {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}% \else \/\lohi{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi } \def\finishchem% {\ifvoid\chemlowbox \else \iffluor \fluorfalse \kern-.1em \fi\low{\box\chemlowbox}\fi} \newif\iffluor \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}% \dostepwiserecurse {65}{90}{1} {\catcode \recurselevel = \active \uccode`\~=\recurselevel \uppercase{\edef~{\noexpand\finishchem \rawcharacter{\recurselevel% \uccode `\~=`\F \uppercase{\def~{\finishchem F\fluortrue}}% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \loggingall \domolecule }% I didn't really understand the \iffluor-part of the code ... but don't bother too much. Thanks a lot for the trickery again (I'm still impressed by the \uppercase part), Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
On 6/29/06, Taco Hoekwater wrote: {\bf A test \variant[Caps] in small caps} Does this work on your computer? (I don't get any caps here.) \newbox\chemlowbox \def\chemlow#1% {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}} \def\chemhigh#1% {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}% \else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi } \def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi} \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}% \dostepwiserecurse {65}{90}{1} {\catcode \recurselevel = \active \uccode`\~=\recurselevel \uppercase{\edef~{\noexpand\finishchem \rawcharacter{\recurselevel% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \domolecule }% \def\domolecule#1{#1\finishchem\egroup} \starttext \molecule{HSO_4^{-}} \molecule{H_2SO_4} {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{sf_6}} {\bsb A story about \molecule{SF_6}} \stoptext Thanks for the magnificent macro! I replaced minus by $-$ and I had to remove [left] because that one is only good for isotopes such as _8^16O (I defined another command for them: they usually don't appear in formulas anyway), \molecule{SO_4^{2+}} would be weird otherwise. It works perfect except in a single case: \title{\molecule{SF_6}} But please do not lose too much time on it. I can still use explicit \high and \low in titles (I didn't think about them before you two reminded me about its existence and I'm very grateful for that). i didt follow this thread, so i may be wrong, but doesn't the ppchtex (see manuals) module does that kind of stuff? It doesn't retain font styles (at least, I could not make it do that) Same here. I first had my own simple definition \def\molecule#1{$\rm #1$}, but I didn't know how to change the font automatically. \chemical{H_2O} is almost the same as the definition above (of course the latter is much more powerful, but I only needed it for very simple formulas). In general it's probably not a good idea to typeset the formulas in bold and/or italic, but that was for some rather special occasion (very simple formulas often being part of titles, italic/bold text and so on, ...). Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Aditya Mahajan wrote: Maybe what is needed is a \beforemathswitch token set. Then one could do \appendtoks \boldmath to \beforemathswitch Already present: \everymathematics ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Mojca Miklavec wrote: It only gets the size right, not the boldnes. But it can be argued that that is the correct behaviour anyways. Not so long ago you argued that \alpha-sheet, \beta-helix, \gamma-rays, ... should be part of text flow (a reason why the el companion encoding should have it), not a mathematical thing. I have a lot of simple formulas such as \molecule{SF_6} and they look a-kind-of-ugly with a tiny script. So you noticed I was trying to weasly out of something, did you? ;-) Taco % The next macro only works as long as you code the subscripts % before the superscripts! \newbox\chemlowbox \def\chemlow#1% {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}} \def\chemhigh#1% {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}% \else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi } \def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi} \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}% \dostepwiserecurse {65}{90}{1} {\catcode \recurselevel = \active \uccode`\~=\recurselevel \uppercase{\edef~{\finishchem \rawcharacter{\recurselevel% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \loggingall \domolecule }% \def\domolecule#1{#1\finishchem\egroup} \starttext \molecule{HSO_4^{-}} {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{SF_6}} {\bsb A story about \molecule{SF_6}} \stoptext You could compare it to {\bf How to loose a guy in $10$ days}. I have a strange feeling that handling fonts in math is rather limited, but no knowledge how to fix anything (just remembering that I still don't know how to properly switch to bold math with some other fancy font except with dirty tricks). I guess that it should be possible to remember the font before switching to math and then switch to that font again, but that's all black magic for me. A site on ConTeXt garden solves that for titles in such a way that there's an additional command provided which also appends bold to all the mathematics in titles, but that's useful for titles only. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Sorry, messed up something. New version followws: \newbox\chemlowbox \def\chemlow#1% {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}} \def\chemhigh#1% {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}% \else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi } \def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi} \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}% \dostepwiserecurse {65}{90}{1} {\catcode \recurselevel = \active \uccode`\~=\recurselevel \uppercase{\edef~{\noexpand\finishchem \rawcharacter{\recurselevel% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \domolecule }% \def\domolecule#1{#1\finishchem\egroup} \starttext {\bf A test \variant[Caps] in small caps} \molecule{HSO_4^{-}} \molecule{H_2SO_4} {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{sf_6}} {\bsb A story about \molecule{SF_6}} \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Hans Hagen wrote: i didt follow this thread, so i may be wrong, but doesn't the ppchtex (see manuals) module does that kind of stuff? It doesn't retain font styles (at least, I could not make it do that) Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Taco Hoekwater wrote: Sorry, messed up something. New version followws: \newbox\chemlowbox \def\chemlow#1% {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}} \def\chemhigh#1% {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}% \else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi } \def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi} \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}% \dostepwiserecurse {65}{90}{1} {\catcode \recurselevel = \active \uccode`\~=\recurselevel \uppercase{\edef~{\noexpand\finishchem \rawcharacter{\recurselevel% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \domolecule }% \def\domolecule#1{#1\finishchem\egroup} \starttext {\bf A test \variant[Caps] in small caps} \molecule{HSO_4^{-}} \molecule{H_2SO_4} {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{sf_6}} {\bsb A story about \molecule{SF_6}} i didt follow this thread, so i may be wrong, but doesn't the ppchtex (see manuals) module does that kind of stuff? 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] small caps italic and font switching inside math
Hello, I have to tiny questions: 1. How do I get small caps [bold] italic (except with the \definedfont[ec-lmxxx])? 2. I defined \molecule to be \def\molecule#1{$\rm#1$}, an usage example would be: \molecule{HSO_4^{-}} But how should I modify this it so that it would also work properly with examples such as: {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{SF_6}} {\bsb A story about \molecule{SF_6}} As a workaround I now keep hardcoding \molecule{\bsb SF_6}. Thanks, Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
On Wed, 28 Jun 2006, Mojca Miklavec wrote: Hello, I have to tiny questions: 1. How do I get small caps [bold] italic (except with the \definedfont[ec-lmxxx])? No idea. 2. I defined \molecule to be \def\molecule#1{$\rm#1$}, better use {\mathematics{\rm #1}} so that you can also write in equations. an usage example would be: \molecule{HSO_4^{-}} But how should I modify this it so that it would also work properly with examples such as: {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{SF_6}} {\bsb A story about \molecule{SF_6}} As a workaround I now keep hardcoding \molecule{\bsb SF_6}. Some catcode trickery might work. This is all I could manage. % \def\molecule#1{\mathematics{ {\rm #1}}} \bgroup \catcode`\_=\active \catcode`\^=\active \gdef\activatelohi% {\catcode`\_=\active \def_{\low} \catcode`\^=\active \def^{\high}} % This does not work. Why? % \gdef\molecule#1{\activatelohi #1} \glet\molecule=\activatelohi \egroup \starttext {\bfa A story about {\molecule SF_6}} {\scx A story about {\molecule SF_6}} {\bsb A story about {\molecule SF_6}} \stoptext Though this uses a different syntax than what you had. I have not looked into it, but doesn't one of context's chem module fit this need? Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
On Jun 28, 2006, at 7:44 PM, Mojca Miklavec wrote: Hello, I have to tiny questions: 1. How do I get small caps [bold] italic (except with the \definedfont[ec-lmxxx])? Mojca, this is a bit more complicated than it sounds. Have a look at Adam's MyWay, section 4 explains how to do it. Best Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
Aditya Mahajan wrote: On Wed, 28 Jun 2006, Mojca Miklavec wrote: Hello, I have to tiny questions: 1. How do I get small caps [bold] italic (except with the \definedfont[ec-lmxxx])? No idea. Same for me. I know that theoreticallu something would be possible using \Var and special typescripts, but I do not know how that is supposed to be done in actual code. Some catcode trickery might work. This is all I could manage. This does not work well, because HSO\low{4}\high{-} is not correct. % \def\molecule#1{\mathematics{ {\rm #1}}} \bgroup \catcode`\_=\active \catcode`\^=\active \gdef\activatelohi% {\catcode`\_=\active \def_{\low} \catcode`\^=\active \def^{\high}} % This does not work. Why? % \gdef\molecule#1{\activatelohi #1} (For educational purposes only, it cannot be used by Mojca this way because of the staggered scripts) Your macro has already parsed the argument. This way \def\molecule#1{{\activatelohi \scantokens{#1}}} it would work (because \scantokens re-evaluates the argument). And this way it does not need etex, nor the \gdef: \def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\low}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\high}% \domolecule }% \def\domolecule#1{#1\egroup} I have not looked into it, but doesn't one of context's chem module fit this need? \usemodule[chemic] \let\molecule\chemical It only gets the size right, not the boldnes. But it can be argued that that is the correct behaviour anyways. Cheers, taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
On 6/28/06, Taco Hoekwater wrote: Aditya Mahajan wrote: Some catcode trickery might work. This is all I could manage. This does not work well, because HSO\low{4}\high{-} is not correct. True, but if I'm aware of it, I can use \lohi{4}{$-$} if needed, which works even better in some cases, see below. I converted the document from LaTeX and I didn't came to the idea of using low and high (perhaps just because that's not possible there). % \def\molecule#1{\mathematics{ {\rm #1}}} Thank you for the note. I would never use it inside formulas, but I would never though about such interference in more complex definitions either. \bgroup \catcode`\_=\active \catcode`\^=\active \gdef\activatelohi% {\catcode`\_=\active \def_{\low} \catcode`\^=\active \def^{\high}} % This does not work. Why? % \gdef\molecule#1{\activatelohi #1} (For educational purposes only, it cannot be used by Mojca this way because of the staggered scripts) To be honest: in the particular document I never use any stacking (so this just perfectly suits my needs) except in one particular case: for typesetting isotopes. I completely forgot about the \lohi command which I never saw in practice until now (at least the command itself is documented, but there's no example and as can be reconstructed from the archives it seems that Hans added added the option [left] for usage in chemistry). Thank you, Hans! In the math mode I would have to use phantoms and such befere being able to achive the same effect, so something like $\rm _8^16O$ is wrong (ugly) anyway. Taco and Aditya: thanks a lot for the pointers to \low and \high and for showing me the trick. I appreciate the elegance of Taco's last solution, although I would never have come to it (I didn't know that something like that could work and I'm stil not quite sure what miracle happens in the last step ;). Your macro has already parsed the argument. This way \def\molecule#1{{\activatelohi \scantokens{#1}}} it would work (because \scantokens re-evaluates the argument). And this way it does not need etex, nor the \gdef: \def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\low}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\high}% \domolecule }% \def\domolecule#1{#1\egroup} I have not looked into it, but doesn't one of context's chem module fit this need? \usemodule[chemic] \let\molecule\chemical It only gets the size right, not the boldnes. But it can be argued that that is the correct behaviour anyways. Not so long ago you argued that \alpha-sheet, \beta-helix, \gamma-rays, ... should be part of text flow (a reason why the el companion encoding should have it), not a mathematical thing. I have a lot of simple formulas such as \molecule{SF_6} and they look a-kind-of-ugly with a tiny script. You could compare it to {\bf How to loose a guy in $10$ days}. I have a strange feeling that handling fonts in math is rather limited, but no knowledge how to fix anything (just remembering that I still don't know how to properly switch to bold math with some other fancy font except with dirty tricks). I guess that it should be possible to remember the font before switching to math and then switch to that font again, but that's all black magic for me. A site on ConTeXt garden solves that for titles in such a way that there's an additional command provided which also appends bold to all the mathematics in titles, but that's useful for titles only. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps italic and font switching inside math
On Thu, 29 Jun 2006, Mojca Miklavec wrote: On 6/28/06, Taco Hoekwater wrote: Aditya Mahajan wrote: Some catcode trickery might work. This is all I could manage. This does not work well, because HSO\low{4}\high{-} is not correct. True, but if I'm aware of it, I can use \lohi{4}{$-$} if needed, which works even better in some cases, see below. Or use some more catcode trickery to ensure that - is equivalent to \mathematics{-} ;) I converted the document from LaTeX and I didn't came to the idea of using low and high (perhaps just because that's not possible there). Latex is not all that bad :) It has \textsuperscript and \textsubscript (though most people still write 29$^\text{th}$ June rather than 29\textsuperscipt{th} June) You could compare it to {\bf How to loose a guy in $10$ days}. I have a strange feeling that handling fonts in math is rather limited, but no knowledge how to fix anything (just remembering that I still don't know how to properly switch to bold math with some other fancy font except with dirty tricks). The wrapping in \hbox is not that bad. A lot of math trickery happens inside a \hbox. The example on contextgarden (http://wiki.contextgarden.net/Bold_Math) is not too different from how bm.sty implements bold symbols in latex (which is the best bold math implementation in latex, AIUI). However, the \boldmath definition on contextgarden lacks 1. Use of pmb (poor man's bold) when a true bold character is not present. \boldsymbol{\sum} does not work. 2. Does not take care of the math spacing \formula{ a \boldsymbol{=} a } does not look correct. 3. Does not take care of delimiters \formula { \boldsymbol{\left(}\frac 1n\right)} does not work. 4. bm.sty goes into some trouble to define bold accents. So \bm{\hat}{a} produces a bold accent over a non-bold a. (I can not understand why would someone ever use that). Hans, why is [boldmath] not defined by default in all the typescripts? I guess that it should be possible to remember the font before switching to math and then switch to that font again, but that's all black magic for me. A site on ConTeXt garden solves that for titles in such a way that there's an additional command provided which also appends bold to all the mathematics in titles, but that's useful for titles only. It can be used everywhere. For example \def\myrmbf{\boldmath\rm\bf} {\myrmbf How to loose a guy in $10$ days} It will be nice if one could write \def\mybf{\boldmath\previousfont\bf} Maybe what is needed is a \beforemathswitch token set. Then one could do \appendtoks \boldmath to \beforemathswitch Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps
On Mar 2, 2005, at 10:59 AM, Adam Lindsay wrote: Hold on one minute... we're talking about encodings for alternate glyphs, right? That's orthogonal to what Unicode is about. 'a' and 'Asmall' pretty much take up the same unicode slot. Only 'a' appears in the .cmap.xml file. No, of course you're right. I thought that they were given a value in the FFxx range, but that's not right; they don't appear in the cmap, only in the afm. So the only thing I can think of: there are only so many ways to refer to small caps, Xsmall or X.small or X_small or even X-small. We could provide alternatives for that in perl, making additions as we go. It's a brute-force attack, kind of aiming with a machine gun, but since fonts are such moving targets... Now that would be a useful thing, regardless. I don't know, but I'll have a look. I suspect we'll have to create one ourselves. An idle thought (with the corresponding devilishness) occurs to me: all that information is in ConTeXt already. Hmm... What form would be the best? Some simple XML? A perl-friendly list? For the time being, I'm thinking of a very simple list that could just serve as a pattern for arranging the lines I get from processing the cmap.xml. I'm just thinking, not writing code yet... Best Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps
Hans Hagen said this at Wed, 2 Mar 2005 11:54:35 +0100: about code ... wybo dekker has cleaned up the texfont code, so that will be the starting point for extensions Wow. Thanks, Wybo! -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED] Lancaster University, InfoLab21+44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps
Thomas A.Schmitz wrote: For the time being, I'm thinking of a very simple list that could just serve as a pattern for arranging the lines I get from processing the cmap.xml. I'm just thinking, not writing code yet... about code ... wybo dekker has cleaned up the texfont code, so that will be the starting point for extensions 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps
Adam, I feel like a complete idiot now. I had been so proud about this idea, but after re-reading you MyWay about OpenType, I see that I had been reinventing the wheel: this is exactly the solution you had been suggesting almost two years ago. Thanks for being generous about this... However, your post made me think: I know nothing about XSLT, but enough perl to shoot myself in the foot. I guess if I had a version of texnansi.enc with the unicode values in addition to the names, that would be a good starting point. I was thinking of this route: 1. use ftxdumperfuser to produce cmap.xml, 2. use perl to reduce it to two values: glyphName % UNICODE_VALUE 3. use perl to extract the lines corresponding to a given encoding and put them in the right order. Sounds feasible? Do you know where I could get such a unicode-aware version of texnansi.enc? Best Thomas On Feb 27, 2005, at 10:39 AM, Adam Lindsay wrote: Indeed, that's one of the reasons why I came up with the unicode (symbol[1]) scripts... there are common utilities (ttx and Apple's ftx suite) that work well at associating canonical characters with glyph names specific to a font. I'm sure some enterprising XSLT hacker could take my scripts as a starting point and make them work with specific TeXy encodings, not just individual Unicode vectors. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps
Adam Lindsay wrote: This is good stuff. I've tried to advocate a naming convention that would be appropriate to this. I would suggest calling this texnansi-osfsc.enc, as baseencoding-variant.enc. This is so a modified encoding can masquerade as the base encoding within ConTeXt. i'll add the encoding to the distribution (i just made the formatted file with the info sent) [of course users will need to generate the tfm files themselves] once we have made the switch from map files to inline map code, we can apply different encodings more easily at the typescript level (no more need for map files) another thing coming is that pdftex will provide primitives to set those encodings independently of other characteristics (hartmut is working on this); 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] small caps
In the last days, I played around with some truetype fonts, preparing them for use with ConTeXt by creating tfms via the texnansi encoding. Some of these truetypes have expert features embedded into their glyphs. texnansi automatically takes care of integrating the ff, ffi and ffl ligatures. In order to extract small caps and old-style numerals, I created a modified texnansi encoding. Here it comes: /TeXnANSISCEncoding [ /.notdef % 0 /Euro % /Uni20AC 1 /.notdef % 2 /.notdef % 3 /fraction % 4 /dotaccent %5 /hungarumlaut % 6 /ogonek % 7 /fl % 8 /.notdef % /fraction % 9 not used (see 4), backward compatability only /cwm% 10 not used, except boundary char internally maybe /ff%11 /fi%12 /.notdef % /fl% 13 not used (see 8), backward compatability only /ffi %14 /ffl %15 /dotlessi % 16 /dotlessj % 17 /grave %18 /acute %19 /caron %20 /breve %21 /macron % 22 /ring %23 /cedilla % 24 /germandbls % 25 /AEsmall% 26 /OEsmall% 27 /Oslashsmall % 28 /AE%29 /OE%30 /Oslash % 31 /space %32 % /suppress in TeX text /exclam % 33 /quotedbl % 34 % /quotedblright in TeX text /numbersign % 35 /dollar % 36 /percent % 37 /ampersand %38 /quoteright % 39 % /quotesingle in ANSI /parenleft %40 /parenright % 41 /asterisk % 42 /plus %43 /comma %44 /hyphen % 45 /period % 46 /slash %47 /zerooldstyle %48 /oneoldstyle %49 /twooldstyle %50 /threeoldstyle %51 /fouroldstyle %52 /fiveoldstyle %53 /sixoldstyle %54 /sevenoldstyle %55 /eightoldstyle %56 /nineoldstyle %57 /colon %58 /semicolon %59 /less %60 % /exclamdown in Tex text /equal %61 /greater % 62 % /questiondown in TeX text /question % 63 /at % 64 /A %65 /B %66 /C %67 /D %68 /E %69 /F %70 /G %71 /H %72 /I %73 /J %74 /K %75 /L %76 /M %77 /N %78 /O %79 /P %80 /Q %81 /R %82 /S %83 /T %84 /U %85 /V %86 /W %87 /X %88 /Y %89 /Z %90 /bracketleft % 91 /backslash %92 % /quotedblleft in TeX text /bracketright % 93 /circumflex % 94 % /asciicircum in ASCII /underscore % 95 % /dotaccent in TeX text /quoteleft %96 % /grave accent in ANSI /Asmall % 97 /Bsmall % 98 /Csmall % 99 /Dsmall % 100 /Esmall % 101 /Fsmall % 102 /Gsmall % 103 /Hsmall % 104 /Ismall % 105 /Jsmall % 106 /Ksmall % 107 /Lsmall % 108 /Msmall % 109 /Nsmall % 110 /Osmall % 111 /Psmall % 112 /Qsmall % 113 /Rsmall % 114 /Ssmall % 115 /Tsmall % 116 /Usmall % 117 /Vsmall % 118 /Wsmall % 119 /Xsmall % 120 /Ysmall % 121 /Zsmall % 122 /braceleft %123 % /endash in TeX text /bar %124 % /emdash in TeX test /braceright % 125 % /hungarumlaut in TeX text /tilde %126 % /asciitilde in ASCII /dieresis % 127 not used (see 168), use higher up instead /Lslash % 128 this position is unfortunate, but now too late to fix /quotesingle % 129 /quotesinglbase % 130 /florin % 131 /quotedblbase % 132 /ellipsis % 133 /dagger % 134 /daggerdbl %135 /circumflex % 136 /perthousand % 137 /Scaron % 138 /guilsinglleft %139 /OE%140 /Zcaron % 141 /asciicircum % 142 /minus %143 /lslash % 144 /quoteleft %145 /quoteright % 146 /quotedblleft % 147 /quotedblright %148 /bullet % 149 /endash % 150 /emdash % 151 /tilde %152 /trademark %153 /scaron % 154 /guilsinglright % 155 /oe%156 /zcaron % 157 /asciitilde % 158 /Ydieresis %159 /nbspace % 160 % /space (no break space) /exclamdown % 161 /cent %162 /sterling % 163 /currency % 164 /yen %165 /brokenbar %166 /section % 167 /dieresis % 168 /copyright %169 /ordfeminine % 170 /guillemotleft %171 /logicalnot % 172 /sfthyphen %173 % /hyphen (hanging hyphen) /registered % 174 /macron % 175 /degree % 176 /plusminus %177 /twosuperior % 178 /threesuperior %179 /acute %180 /mu%181 /paragraph %182 /periodcentered % 183 /cedilla % 184 /onesuperior % 185 /ordmasculine % 186 /guillemotright % 187 /onequarter % 188 /onehalf % 189 /threequarters %190 /questiondown % 191 /Agrave % 192 /Aacute % 193 /Acircumflex % 194 /Atilde % 195 /Adieresis %196 /Aring %197 /AE%198 /Ccedilla % 199 /Egrave % 200 /Eacute %
Re: [NTG-context] small caps
Thomas A.Schmitz said this at Sat, 26 Feb 2005 10:13:00 +0100: In the last days, I played around with some truetype fonts, preparing them for use with ConTeXt by creating tfms via the texnansi encoding. Hello (again) Thomas, This is good stuff. I've tried to advocate a naming convention that would be appropriate to this. I would suggest calling this texnansi-osfsc.enc, as baseencoding-variant.enc. This is so a modified encoding can masquerade as the base encoding within ConTeXt. Given this encoding with my suggested name, you could therefore run texfont as following: texfont --encoding=texnansi --variant=osfsc --[other options] Variants that select rarer features that Old Style Figures and Small Caps may need to be given font-specific names, as rare glyph names tend to vary wildly between fonts. Cheers, adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED] Lancaster University, InfoLab21+44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] small caps
This is good stuff. I've tried to advocate a naming convention that would be appropriate to this. I would suggest calling this texnansi-osfsc.enc, as baseencoding-variant.enc. This is so a modified encoding can masquerade as the base encoding within ConTeXt. Given this encoding with my suggested name, you could therefore run texfont as following: texfont --encoding=texnansi --variant=osfsc --[other options] That is by far the most elegant solution indeed! I have renamed my encoding file. Variants that select rarer features that Old Style Figures and Small Caps may need to be given font-specific names, as rare glyph names tend to vary wildly between fonts. Sadly, you are absolutely right about this. And it's not only rare glyphs that get wildly different names. There was some rumor on the TeX on OS X list that people couldn't get the beautiful HoeflerText font to work with TeX; it turned out that this was true for newer versions of the font only. I looked into it, and it turns out that Apple (?) has given new names even to quite normal characters - eacute becomes e_acute etc. So if you want to produce a tfm for that font, you have to invent a specific encoding vector. Once you know how this works, it's easy enough, but really annoying. So, the variant scheme in texfont is at least a convenient way to cope with this mess. Best Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context