[NTG-context] The bug with the scale of fallback fonts
Hi, See this example about Chinese fonts as fallback fonts. The Latin font's scale rate is less than the fallback font from \tf to \tfd. The size of the fallback font is almost two times of the Latin font with \tfd. \starttypescript[serif][myfonts] \definefontsynonym[hereos][name:texgyreherosregular] \definefontfallback[song][name:adobesongstd][0x00400-0x2FA1F] \definefontsynonym[fbsong][hereos][fallbacks=song] \definefontsynonym[Serif][fbsong] \stoptypescript \definetypeface[myfonts][rm][serif][myfonts] \setupbodyfont[myfonts,rm,11pt] \starttext 夹杂 English 的中文文本\blank {\tfa 夹杂 English 的中文文本}\blank {\tfb 夹杂 English 的中文文本}\blank {\tfc 夹杂 English 的中文文本}\blank {\tfd 夹杂 English 的中文文本} \stoptext -- 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 / 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] xtables: stretch a single column
Hi, xtables offers option=stretch to stretch the whole table evenly. Is there also a way (without manually calculating the width) to stretch the whole table using a given column? Short use case: I have a table with three columns. Column 1 has an external figure, column 3 a variable length (but still short) text/string and column 2 has either no text at all or maybe a longer phrase. Columns 1 and 3 should be auto-sized (i.e as small as possible) while column 2 should be as width as necessary, to make the whole table fit perfectly onto the page (width-wise; height doesn't matter for now). I think with natural tables it was possible to set width=broad for a certain column. Is something like that possible with xtables as well? Thanks! -- Best Regards, Andreas ___ 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] Bibliography problem
I'm having a problem with bibliographies. Example file \setupbibtex[database=test] \setuppublications[alternative=apa] \starttext Here is a cite command: \cite[hh2010a] %\placepublications[criterium=all] \stoptext test.bib @STRING{hh = {Hans Hagen}} @ARTICLE{hh2010a, author = hh, title = {The Font Name Mess}, journal = {MAPS}, year = {2010}, volume = {40}, pages = {2-8}, keywords = {context}, } Log This is LuaTeX, Version beta-0.70.1-2011051908 (rev 4277) \write18 enabled. (2012bib.tex ConTeXt ver: 2012.01.25 14:16 MKIV fmt: 2012.1.26 int: english/english system cont-new.mkiv loaded (/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) system 2012bib.top loaded (2012bib.top) fontslatin modern fonts are not preloaded languageslanguage en is active publications wrote a new auxiliary file \jobname.aux This is BibTeX, Version 0.99d (TeX Live 2011) The top-level auxiliary file: 2012bib.aux The style file: cont-no.bst Database file #1: test.bib publications loading formatting style from bibl-apa (/Users/michaelgreen/Applications/context/tex/texmf-context/tex/context/bib/bibl-apa.tex){/Users/michaelgreen/Applications/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} fontspreloading latin modern fonts (second stage) fontstypescripts unknown: library 'loc' {/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/michaelgreen/Applications/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map} fontsfallback modern rm 12pt is loaded checkmissing or ungrouped '=' after 'pubs' in line 5 (68:) publications loading database from 2012bib.bbl (2012bib.bbl) ! Extra \endgroup. system tex error on line 5 in file 2012bib.tex: Extra ... 1 \setupbibtex[database=test] 2 \setuppublications[alternative=apa] 3 4 \starttext 5 Here is a cite command: \cite[hh2010a] 6 7 %\placepublications[criterium=all] 8 9 \stoptext \docite ...else \donumberedcite {#1}\fi \endgroup to be read again l.5 Here is a cite command: \cite[hh2010a] ? ___ 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] LuaTeX Function Arguments Variables Parameters List ConTeXt Lua \startluacode
Hi List, I am trying to program with Lua but there are concepts I must not understand, and the documentation is somewhat lacking. The only useful thing I could use is Hans' manual, thanks to him. If someone could help me just understanding the concept I must me missing in this simple example I would appreciate it. So here it is. Running the following code, variable a should not be modified by my function, and stay (1,2), but it does get modified and becomes (4,2) like the new variable b I am creating. What is wrong with my code ? Thank you for any hint ! Mathieu \starttext \startluacode function myFunc(arg) local var = arg var[1] = var[1] + 3 return var end local a = {1,2} context(a = \\{) context(a[1]) context(,\\;) context(a[2]) context(\\}\\par) context(\\blank) local b = myFunc(a) context(a = \\{) context(a[1]) context(,\\;) context(a[2]) context(\\}\\par) context(\\blank) context(b = \\{) context(b[1]) context(,\\;) context(b[2]) context(\\}\\par) \stopluacode \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 ___
Re: [NTG-context] LuaTeX Function Arguments Variables Parameters List ConTeXt Lua \startluacode
Hi Mathieu, On 2012-01-27 19:06, Mathieu Dupont wrote: Hi List, Running the following code, variable a should not be modified by my function, and stay (1,2), but it does get modified and becomes (4,2) like the new variable b I am creating. Tables are references. Using the “local” keyword, you generate a local variable that still points to the original table. Instead, you need to (deep) copy the table explicitly. · \starttext \startluacode function myFunc(arg) local var = table.copy(arg) var[1] = var[1] + 3 return var end local a = {1,2} local b = myFunc(a) context.type(table.serialize(a)) context[[\par\blank]] context.type(table.serialize(b)) context[[\par\blank]] \stopluacode \stoptext \endinput · There’s also a function table.fastcopy(), see http://wiki.contextgarden.net/table_manipulation#table.fastcopy.28table_t.2C_.5Bboolean_meta.5D.29 Hth, Philipp What is wrong with my code ? Thank you for any hint ! Mathieu \starttext \startluacode function myFunc(arg) local var = arg var[1] = var[1] + 3 return var end local a = {1,2} context(a = \\{) context(a[1]) context(,\\;) context(a[2]) context(\\}\\par) context(\\blank) local b = myFunc(a) context(a = \\{) context(a[1]) context(,\\;) context(a[2]) context(\\}\\par) context(\\blank) context(b = \\{) context(b[1]) context(,\\;) context(b[2]) context(\\}\\par) \stopluacode \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 ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpEAMlmRkn38.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] LuaTeX Function Arguments Variables Parameters List ConTeXt Lua \startluacode
Great, thank you very much Philipp. I will also read this page you pointed and I should understand better Lua then. http://wiki.contextgarden.net/table_manipulation Mathieu ___ 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 ___