Super- and sub-script in text mode, or, fonts in math mode
Hi, A minor problem: I'm trying to place superscripted text in the text body -- things like '2^nd March'. I can't see anything like 2{\sup nd}, so my only known solution at the moment is math mode: $2^{nd}$. Despite this not being 'math', I don't really have an aversion to it. However, there's a problem with it: the superscripted text appears in italic Computer Modern. I'm using Gentium Book Basic as my body font, using XeTeX. The Gentium typeface is used perfectly everywhere, including the '2' in '2^nd', with the exception of the superscripted text. So what solutions are to hand? Is there either (1) super/sub commands in text mode, or (2) a way of fixing this in math mode? (Also, would this be a problem with ConTeXt or with XeTeX?) James Fisher
Am 02.03.10 22:58, schrieb James Fisher:
Hi,
A minor problem: I'm trying to place superscripted text in the text body -- things like '2^nd March'. I can't see anything like 2{\sup nd}, so my only known solution at the moment is math mode: $2^{nd}$. Despite this not being 'math', I don't really have an aversion to it. However, there's a problem with it: the superscripted text appears in italic Computer Modern. I'm using Gentium Book Basic as my body font, using XeTeX. The Gentium typeface is used perfectly everywhere, including the '2' in '2^nd', with the exception of the superscripted text.
So what solutions are to hand? Is there either (1) super/sub commands in text mode, or (2) a way of fixing this in math mode?
(Also, would this be a problem with ConTeXt or with XeTeX?) a\high{x}b\low{x}c\highlow{x}{y}d\lowhigh{x}{y}
Wolfgang
Hi Wolfgang, Thanks, that gets me closer (though \highlow and \lowhigh result in "undefined control sequence" here). However, the superscripted text is not reduced in size at all. This seems to be XeTeX-specific, as using PDFTeX works fine. The same issue arises using \small{} in XeTeX, whether standing alone or in combination with \high{}. Some light could be shed on this by observing that *all* text produced by XeTeX, when in comparison with PDFTeX, looks like has gone through \small. I suppose this is possible as I note that \small can't be applied recursively (i.e. \small{\small{x}} == \small{x} ). Thoughts? James On Tue, Mar 2, 2010 at 10:02 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 02.03.10 22:58, schrieb James Fisher:
Hi,
A minor problem: I'm trying to place superscripted text in the text body -- things like '2^nd March'. I can't see anything like 2{\sup nd}, so my only known solution at the moment is math mode: $2^{nd}$. Despite this not being 'math', I don't really have an aversion to it. However, there's a problem with it: the superscripted text appears in italic Computer Modern. I'm using Gentium Book Basic as my body font, using XeTeX. The Gentium typeface is used perfectly everywhere, including the '2' in '2^nd', with the exception of the superscripted text.
So what solutions are to hand? Is there either (1) super/sub commands in text mode, or (2) a way of fixing this in math mode?
(Also, would this be a problem with ConTeXt or with XeTeX?)
a\high{x}b\low{x}c\highlow{x}{y}d\lowhigh{x}{y}
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
___________________________________________________________________________________
That's better. Also, for the record, I've been working with Mark IV today, and LuaTeX doesn't seem to have XeTeX's problem with \small. On Wed, Mar 3, 2010 at 2:07 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 03.03.10 13:04, schrieb James Fisher:
Hi Wolfgang,
Thanks, that gets me closer (though \highlow and \lowhigh result in "undefined control sequence" here).
\hilo and \lohi
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
___________________________________________________________________________________
Hi, I followed http://wiki.contextgarden.net/rsfs and compile the sample file in this page with MKIV and got the following error: ! Undefined control sequence. \scr ->\fam \purefamily {scriptfamily} l.18 ${\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ ?
On Wed, 3 Mar 2010, Mehdi Omidali wrote:
Hi, I followed http://wiki.contextgarden.net/rsfs and compile the sample file in this page with MKIV and got the following error:
Those instructions only work for MKII. I am not sure how to incorporate RSFS with MKIV. Unicode only has type of math script letters. Aditya
2010/3/4 Mehdi Omidali
Hi, I followed http://wiki.contextgarden.net/rsfs and compile the sample file in this page with MKIV and got the following error:
! Undefined control sequence.
\scr ->\fam \purefamily
{scriptfamily}
l.18 ${\scr
ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
?
1. put the archive keep file structure to "\context\tex\texmf\fonts " 2. luatools --generate 3. context --make test \starttypescript [math] [modern,computer-modern,latin-modern,ams] [size] \definebodyfont [17.3pt,14.4pt,12pt,11pt,10pt,9pt][mm][mc=rsfs10 sa 1] \definebodyfont [8pt,7pt] [mm] [mc=rsfs7 sa 1] \definebodyfont [6pt,5pt,4pt] [mm] [mc=rsfs5 sa 1] \stoptypescript \definefamilysynonym [default] [scriptfamily] [mc] \definefont [ralfsmithfs] [RalfSmithFormalScript sa \currentfontscale] \def\scr #1{\ifmmode\hbox{\ralfsmithfs #1}\else\ralfsmithfs #1\fi} \definetypeface [modern] [mm] [math] [modern] [ams] [encoding=texnansi] \setupbodyfont[reset,modern,11pt] \starttext $\scr {ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \stoptext
Thank you very much. Just a comment: it is better to define \def\scr #1{\text{\ralfsmithfs #1}} In this way, font sizes (superscript and subscript) are also available. MO On 3/5/2010 2:15 PM, views63 wrote:
2010/3/4 Mehdi Omidali
: Hi, I followed http://wiki.contextgarden.net/rsfs and compile the sample file in this page with MKIV and got the following error:
! Undefined control sequence.
\scr ->\fam \purefamily
{scriptfamily}
l.18 ${\scr
ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
?
1. put the archive keep file structure to "\context\tex\texmf\fonts "
2. luatools --generate
3. context --make
test
\starttypescript [math] [modern,computer-modern,latin-modern,ams] [size] \definebodyfont [17.3pt,14.4pt,12pt,11pt,10pt,9pt][mm][mc=rsfs10 sa 1] \definebodyfont [8pt,7pt] [mm] [mc=rsfs7 sa 1] \definebodyfont [6pt,5pt,4pt] [mm] [mc=rsfs5 sa 1] \stoptypescript
\definefamilysynonym [default] [scriptfamily] [mc]
\definefont [ralfsmithfs] [RalfSmithFormalScript sa \currentfontscale] \def\scr #1{\ifmmode\hbox{\ralfsmithfs #1}\else\ralfsmithfs #1\fi}
\definetypeface [modern] [mm] [math] [modern] [ams] [encoding=texnansi]
\setupbodyfont[reset,modern,11pt]
\starttext
$\scr {ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
\stoptext
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Fri, Mar 5, 2010 at 11:45, views63 wrote:
1. put the archive keep file structure to "\context\tex\texmf\fonts "
No, better put them to texmf-local or texmf-fonts, not to texmf, else they will be deleted when you synchronize the archive next time. Mojca
2010/3/7 Mojca Miklavec
On Fri, Mar 5, 2010 at 11:45, views63 wrote: No, better put them to texmf-local or texmf-fonts, not to texmf, else they will be deleted when you synchronize the archive next time.
Thank you very much. now I can use first-setup without "--keep" synchronize the archive
Hi, I want to use simplefont to define an arabic script font. I couldn't find any thing in the manual and on the web. (Thanks Wolfgang for the great module). Mehdi Omidali
Am 08.03.10 07:41, schrieb Mehdi Omidali:
I want to use simplefont to define an arabic script font. I couldn't find any thing in the manual and on the web. \usemodule[simplefonts]
\setmainfont[<name of your font>][features=arabic] \starttext ... \stoptext Wolfgang
On 8-3-2010 8:26, Wolfgang Schuster wrote:
Am 08.03.10 07:41, schrieb Mehdi Omidali:
I want to use simplefont to define an arabic script font. I couldn't find any thing in the manual and on the web. \usemodule[simplefonts]
\setmainfont[<name of your font>][features=arabic]
\starttext
....
\stoptext
keep in mind that what features are applied also depends on the font 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 -----------------------------------------------------------------
Hi, I want to write a multi-line formula of the form first-part=second-part (some comments instead of a formula number) =third-part (some cooments) =forth-part (some comments) I have read "Display Math in Context" (by Aditya) but I couldn't find the answer to my question. Mehdi Omidali
Please ignore my previous email. I found the way. On 3/9/2010 11:47 AM, Mehdi Omidali wrote:
Hi, I want to write a multi-line formula of the form first-part=second-part (some comments instead of a formula number) =third-part (some cooments) =forth-part (some comments)
I have read "Display Math in Context" (by Aditya) but I couldn't find the answer to my question. Mehdi Omidali
This code for example \startformula \startmathalignment[m=2,distance=4em] \NC x^2+y^2\NC = z^2\NC\NC\text{(By Theorem Bla)}\NR \NC\NC=w^2\NC\NC\text{(By Theorem BlaBla)}\NR \stopmathalignment \stopformula Is this the best way? On 3/9/2010 12:10 PM, luigi scarso wrote:
On Tue, Mar 9, 2010 at 9:34 AM, Mehdi Omidali
wrote: Please ignore my previous email. I found the way.
And which is your way ?
I have to say that my way is not perfect enough. In fact, I want to have aligned formulas like what you see in the attached file. The attached file is the output of amsmath. Any comment is wellcome. Mehdi On 3/9/2010 12:10 PM, luigi scarso wrote:
On Tue, Mar 9, 2010 at 9:34 AM, Mehdi Omidali
wrote: Please ignore my previous email. I found the way.
And which is your way ?
On Tue, 9 Mar 2010, Mehdi Omidali wrote:
Hi, I want to write a multi-line formula of the form first-part=second-part (some comments instead of a formula number) =third-part (some cooments) =forth-part (some comments)
I have read "Display Math in Context" (by Aditya) but I couldn't find the answer to my question.
See Sec 9.2 of using \startalign and friends http://dl.contextgarden.net/myway/mathalign.pdf Aditya
Thanks. On 3/9/2010 1:56 PM, Aditya Mahajan wrote:
On Tue, 9 Mar 2010, Mehdi Omidali wrote:
Hi, I want to write a multi-line formula of the form first-part=second-part (some comments instead of a formula number) =third-part (some cooments) =forth-part (some comments)
I have read "Display Math in Context" (by Aditya) but I couldn't find the answer to my question.
See Sec 9.2 of using \startalign and friends http://dl.contextgarden.net/myway/mathalign.pdf
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 ___________________________________________________________________________________
Hi, I have faced a problem during upgrade to the latest minimal. I have attached a picture that explain the problem. MO
Am 13.03.2010 11:10, schrieb Mehdi Omidali:
Hi, I have faced a problem during upgrade to the latest minimal. I have attached a picture that explain the problem. MO
Hello, it seems to be the same problem how on my windows (win7 64 bit and winxp 32 bit). On Wed, Mar 10, 2010 at 17:00, Helmut Schwertner wrote:
Hello, I'm using contextminimals with win7 64bit. Since a few days i get the following two messages when I try to update or to do a new install of contextminimals. The message (error report) for two times is:
pdftex.exe – Einsprungpunkt nicht gefunden
Der Prozedureinsprungpunkt „sfseek64“ wurde in der DLL „kpathsearch510.dll“ nicht gefunden.
Context (mkiv) is working ; texexec (mkii) is broken.
What can I do? I need to ask Akira - I suspect that there are two incompatible versions of the library with the same name. Mojca
Thanks, Helmut eMail: helmut.schwertner@gmx.de
Yes they are the same problem. I replaced luatex.dll with of the latest version (.51) with the previous one (.50) and the problem disappeared, though the problem still exists for pdftex.dll. It seems that something is wrong with compilation of luatex and pdftex on windows. MO On 3/13/2010 4:06 PM, Helmut Schwertner wrote:
Am 13.03.2010 11:10, schrieb Mehdi Omidali:
Hi, I have faced a problem during upgrade to the latest minimal. I have attached a picture that explain the problem. MO
Hello,
it seems to be the same problem how on my windows (win7 64 bit and winxp 32 bit).
On Wed, Mar 10, 2010 at 17:00, Helmut Schwertner wrote:
Hello, I'm using contextminimals with win7 64bit. Since a few days i get the following two messages when I try to update or to do a new install of contextminimals. The message (error report) for two times is:
pdftex.exe – Einsprungpunkt nicht gefunden
Der Prozedureinsprungpunkt „sfseek64“ wurde in der DLL „kpathsearch510.dll“ nicht gefunden.
Context (mkiv) is working ; texexec (mkii) is broken.
What can I do? I need to ask Akira - I suspect that there are two incompatible versions of the library with the same name. Mojca
Thanks,
Helmut
eMail: helmut.schwertner@gmx.de ___________________________________________________________________________________
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 ___________________________________________________________________________________
On Sat, Mar 13, 2010 at 11:10, Mehdi Omidali wrote:
Hi, I have faced a problem during upgrade to the latest minimal. I have attached a picture that explain the problem.
Is it better now? (I need to fix some hardcoded commands, but I keep postponing that for way too long.) The problem is not with binaries, but with wrong libraries that we recombine on the garden (my fault). Mojca
Yes it is OK now. Both MKII and MKIV works fine. Thanks. On 3/13/2010 11:42 PM, Mojca Miklavec wrote:
On Sat, Mar 13, 2010 at 11:10, Mehdi Omidali wrote:
Hi, I have faced a problem during upgrade to the latest minimal. I have attached a picture that explain the problem.
Is it better now? (I need to fix some hardcoded commands, but I keep postponing that for way too long.)
The problem is not with binaries, but with wrong libraries that we recombine on the garden (my fault).
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 ___________________________________________________________________________________
Hi, I use tikz with MKIV and need to switch to \scriptsize in math font. \scriptsize doesn't work. What is its equivalent in MKIV? Thanks MO
Am 05.03.10 19:40, schrieb Mehdi Omidali:
Hi, I use tikz with MKIV and need to switch to \scriptsize in math font. \scriptsize doesn't work. What is its equivalent in MKIV? \starttext
$a$ $\tx a$ $\txx a$ $a$ $\scriptstyle a$ $\scriptscriptstyle a$ \stoptext Wolfgang
On Fri, 5 Mar 2010, Wolfgang Schuster wrote:
Am 05.03.10 19:40, schrieb Mehdi Omidali:
Hi, I use tikz with MKIV and need to switch to \scriptsize in math font. \scriptsize doesn't work. What is its equivalent in MKIV? \starttext
$a$ $\tx a$ $\txx a$
$a$ $\scriptstyle a$ $\scriptscriptstyle a$
\stoptext
Also see the "documentation" in font-ini %D This leaves us two more commands: \type{\tx} and %D \type{\txx}. These activate a smaller and even more smaller %D font than the current one and adapt themselves to the %D current alternative, so when \type{\bf} is active, %D \type{\tx} gives a smaller boldface, which in turn can be %D called directly by \type{\bfx}. %D %D These two smaller alternatives are specified by the bodyfont %D environment and therefore not necessarily have similar sizes %D as \type{\scriptsize} and \type{\scriptscriptsize}. The main %D reason for this incompatibility (which can easily be undone) %D lays in the fact that we often want a bit bigger characters %D than in math mode. In \CONTEXT\ for instance the \type{\tx} %D and \type{\txx} commands are used for surrogate %D \cap{smallcaps} which support both nesting and alternatives, %D like in {\bf\cap{a \cap{small} world}}, which was typeset by %D %D \starttyping %D \bf\cap{a \cap{small} world} %D \stoptyping %D %D And compare $\rm \scriptstyle THIS$ with the slightly larger %D \cap{THIS}: \ruledhbox{$\rm \scriptstyle scriptstyle: THIS$} %D or \ruledhbox{\cap{x style: THIS}} makes a big difference. Aditya
Am 05.03.10 20:05, schrieb Aditya Mahajan:
Also see the "documentation" in font-ini
%D These two smaller alternatives are specified by the bodyfont %D environment and therefore not necessarily have similar sizes %D as \type{\scriptsize} and \type{\scriptscriptsize}. But ConTeXt has no \scriptsize and \scriptscriptsize commands as you can think from the sentence above.
Wolfgang
Thanks, Apparently tikz is not able to handle these font styles as you can see in the following file. But it is not a big problem as one can use \tx for example whenever I need it. MO \usemodule[tikz] \usetikzlibrary{arrows,matrix} \starttext \starttikzpicture[description/.style={fill=white,inner sep=2pt}] \matrix (m) [matrix of math nodes, row sep=3em, column sep=2.5em, text height=1.5ex, text depth=0.25ex] { A&A\\ A&A\\ }; \path[->,font=\txx] (m-1-1) edge node[auto] {$A$} (m-1-2); \path[->] (m-2-1) edge node[auto] {$\tx A$} (m-2-2); \stoptikzpicture \stoptext On 3/5/2010 10:30 PM, Wolfgang Schuster wrote:
Am 05.03.10 19:40, schrieb Mehdi Omidali:
Hi, I use tikz with MKIV and need to switch to \scriptsize in math font. \scriptsize doesn't work. What is its equivalent in MKIV? \starttext
$a$ $\tx a$ $\txx a$
$a$ $\scriptstyle a$ $\scriptscriptstyle a$
\stoptext
Wolfgang
participants (9)
-
Aditya Mahajan
-
Hans Hagen
-
Helmut Schwertner
-
James Fisher
-
luigi scarso
-
Mehdi Omidali
-
Mojca Miklavec
-
views63
-
Wolfgang Schuster