Re: [NTG-context] horizontal space in CJK document
Sylvain Hubert via ntg-context 于2023年2月21日周二 03:43写道: > > Dear list, > > Does anyone know how to insert a horizontal space in a CJK document with > \setscript[hanzi]? > > \setscript[hanzi] > \definefontfamily[mainface][rm][notoserifcjkhk][] > \setupbodyfont[mainface] > \starttext > 口口\hspace[big]口口 % with \setscript[hanzi], the \hspace is ignored > > \dorecurse{100}{口} % without \setscript[hanzi], the line is not properly > wrapped > \stoptext > > Many thanks, > Sylvain 测\kern 1em 试。 -- Best regards, Li Yanrui ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] horizontal space in CJK document
Thanks, but I guess the space width would be fixed. I just found a hack: 口口\hspace[big]\hbox{}口口 does the trick. On Tue, 21 Feb 2023 at 06:46, fv leung via ntg-context wrote: > Maybe the ideographic space U+3000 works. > > 在 2023年2月21日週二 03:42,Sylvain Hubert via ntg-context > 寫道: > >> Dear list, >> >> Does anyone know how to insert a horizontal space in a CJK document with >> \setscript[hanzi]? >> >> \setscript[hanzi] >> \definefontfamily[mainface][rm][notoserifcjkhk][] >> \setupbodyfont[mainface] >> \starttext >> 口口\hspace[big]口口 % with \setscript[hanzi], the \hspace is ignored >> >> \dorecurse{100}{口} % without \setscript[hanzi], the line is not properly >> wrapped >> \stoptext >> >> Many thanks, >> Sylvain >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] horizontal space in CJK document
Maybe the ideographic space U+3000 works. 在 2023年2月21日週二 03:42,Sylvain Hubert via ntg-context 寫道: > Dear list, > > Does anyone know how to insert a horizontal space in a CJK document with > \setscript[hanzi]? > > \setscript[hanzi] > \definefontfamily[mainface][rm][notoserifcjkhk][] > \setupbodyfont[mainface] > \starttext > 口口\hspace[big]口口 % with \setscript[hanzi], the \hspace is ignored > > \dorecurse{100}{口} % without \setscript[hanzi], the line is not properly > wrapped > \stoptext > > Many thanks, > Sylvain > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Horizontal space and framedtext
Thanks ! Le dim. 3 nov. 2019 à 22:54, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Fabrice Couvreur schrieb am 03.11.2019 um 22:46: > > Hi Wolfgang, > I know it takes a predefined argument, but I wanted to quote the name of > the command as such \hspace[]. Nevertheless, it does not work with this : > > \usecolors[xwi] > \starttext > \startframedtext[width=fit,frame=off, > > background=color,backgroundcolor=paleturquoise] > > {\it lancers}\unknown > > {\it dé}\unknown > > Tant que {\it dé}\unknown Faire > > > *\unknown* > *\hspace[big]\unknow*n > > Fin Tant que > \stopframedtext > \stoptext > > > \hspace works only in horizontal mode and when you try the command at the > start of a paragraph you need \dontleavehmode to start the paragraph. > > \starttext > > \hspace[big]\unknown > > \dontleavehmode\hspace[big]\unknown > > \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://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] Horizontal space and framedtext
Fabrice Couvreur schrieb am 03.11.2019 um 22:46: Hi Wolfgang, I know it takes a predefined argument, but I wanted to quote the name of the command as such \hspace[]. Nevertheless, it does not work with this : \usecolors[xwi] \starttext \startframedtext[width=fit,frame=off, background=color,backgroundcolor=paleturquoise] {\it lancers}\unknown {\it dé}\unknown Tant que {\it dé}\unknown Faire *\unknown * *\hspace[big]\unknow*n Fin Tant que \stopframedtext \stoptext \hspace works only in horizontal mode and when you try the command at the start of a paragraph you need \dontleavehmode to start the paragraph. \starttext \hspace[big]\unknown \dontleavehmode\hspace[big]\unknown \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Horizontal space and framedtext
Hi Wolfgang, I know it takes a predefined argument, but I wanted to quote the name of the command as such \hspace[]. Nevertheless, it does not work with this : \usecolors[xwi] \starttext \startframedtext[width=fit,frame=off, background=color,backgroundcolor=paleturquoise] {\it lancers}\unknown {\it dé}\unknown Tant que {\it dé}\unknown Faire *\unknown* *\hspace[big]\unknow*n Fin Tant que \stopframedtext \stoptext Thanks. Fabrice Le dim. 3 nov. 2019 à 11:54, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Fabrice Couvreur schrieb am 03.11.2019 um 10:56: > > Hello, > The \hspace [ ] command has no effect in an environment framedtext. > Why ? > > The \hspace command expects a named/predefined argument, e.g. > \hspace[small] and all unknown names result in a horizontal skip of 0pt. > > 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://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] Horizontal space and framedtext
Fabrice Couvreur schrieb am 03.11.2019 um 10:56: Hello, The \hspace [ ] command has no effect in an environment framedtext. Why ? The \hspace command expects a named/predefined argument, e.g. \hspace[small] and all unknown names result in a horizontal skip of 0pt. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Horizontal space in math subscript generated by Lua
On 15-12-2010 6:11, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, On Wed, 15 Dec 2010 13:06:42 +0100, Hans Hagen pra...@wxs.nl wrote: actually, the luacode was doing the right thing as there is a protect/unprotect mismatch (will be fixed); puttingthis at the top of you file works: \catcodetable\ctxcatcodes thank you, Hans. This makes both solutions (Ctx generated and Lua generated) equal - [wider] spacing is the same. Just my point of view - the previous native Ctx result (= narrower spacing in subscript when mixing upper and lower case letters) - seemed to me a bit prettier; wouldn't be better to keep the old Ctx look (= result without \catcodetable\ctxcatcodes) and to drive Lua to give the same result? no, the question is why the spacing in math is there, the catcode regime should indeed be ctxcatcodes ... more something for aditya to figure out 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] Horizontal space in math subscript generated by Lua
On 14-12-2010 12:25, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, I encountered a strange effect. Let's have a code that generates the same math, firstly by Ctx and secondly by Lua: --- \starttext \startformula M_{t,WnT} = 1000 \stopformula \startluacode context.startformula() context(M_{t,WnT} = 1000) context.stopformula() \stopluacode \stoptext --- You can see the result - the space between W and n in lower index is smaller when generated (natively) by Ctx than that in math generated by Lua. (The latter case may affect a bit disturbingly to the reader.) It seems also that space between (subscript) T and = varies. So why these differences? How to avoid the extra-space when Lua generates math subscript? actually, the luacode was doing the right thing as there is a protect/unprotect mismatch (will be fixed); putting this at the top of you file works: \catcodetable\ctxcatcodes I have no clue yet where the space comes from (that's taco's speciality) 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] Horizontal space in math subscript generated by Lua
Hello, On Wed, 15 Dec 2010 13:06:42 +0100, Hans Hagen pra...@wxs.nl wrote: actually, the luacode was doing the right thing as there is a protect/unprotect mismatch (will be fixed); puttingthis at the top of you file works: \catcodetable\ctxcatcodes thank you, Hans. This makes both solutions (Ctx generated and Lua generated) equal - [wider] spacing is the same. Just my point of view - the previous native Ctx result (= narrower spacing in subscript when mixing upper and lower case letters) - seemed to me a bit prettier; wouldn't be better to keep the old Ctx look (= result without \catcodetable\ctxcatcodes) and to drive Lua to give the same result? Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ 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] horizontal space in \inframed and \hskip
On Thu, Jan 15, 2009 at 6:44 AM, Michael Green merely.ridicul...@gmail.comwrote: On Thu, Jan 15, 2009 at 1:04 AM, Luigi Scarso wrote: There is a space in between \ClassDate{..} and \ClassTopic{..}: \ClassDate{Monday, January 26} \ClassTopic{glaucon's challenge} Is my pdf right ? -- luigi Oh thank you, that's exactly what I wanted. It's hard to believe that didn't occur to me. A space takes space. Imagine that! mjg In TeX, not always a space takes space (unfortunatly) ; so one must be always becareful with macro/spaces/hmode/vmode . And I did not see these spaces until I copied your code in a emacs buffer , so editor fonts play their role too . Puff... -- 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] horizontal space in \inframed and \hskip
On Thu, Jan 15, 2009 at 1:04 AM, Luigi Scarso wrote: There is a space in between \ClassDate{..} and \ClassTopic{..}: \ClassDate{Monday, January 26} \ClassTopic{glaucon's challenge} Is my pdf right ? -- luigi Oh thank you, that's exactly what I wanted. It's hard to believe that didn't occur to me. A space takes space. Imagine that! mjg ___ 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] horizontal space
Matthias Schleiff wrote: Hello, I'm a newbe to ConTeXt but have allready done some documents in LaTeX. Want to switch to ConTeXt. There's something that I neither find in the manuals nor at contextgarden. Maybe you could help?! To realize my micro-typographic needs I'm using LaTeX-commands for defined, possibly non-breakable, horizontal spaces. Those are \, \enspace \quad and \hspace{0.25em} or \hspace*{0.125em}. Now when testing with contextlive @ contextgarden the commands \, \enspace \quad seem to work. Are they plainTeX? But what about \hspace ? It would be cool to have something like \hspace*{0.125em} in ConTeXt. Is there something like it or a way to make it work or to define it on my own? \definehspace[notthatbig][.123456em] \definehspace[ratherbig] [12.3456em] test \hspace[notthatbig] test \hspace[ratherbig] test so, it's a symbolic definition vertical spacing is done with blank (and \defineblank) watch how hspace cleans up preceding spaces and ignores following ones 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