Re: [NTG-context] minimals
On Wed, Sep 26, 2012 at 11:39 PM, Hans Hagen wrote: Hi, Is minimals.contextgarden.net offline? Until we figure out what exactly is wrong one can use the mirror: rsync://metatex.org/minimals/ http://minimals.metatex.org/ 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 ___
[NTG-context] xits font: some spacing and scaling problems
Hi there, Not quite sure if this is the right place. I wanted to send this directly to Khaled Hosny, but then I thought it might be good to have some additional opinion on some of these issues (I am not quite sure if some of this is intended behaviour). I have collected some examples for which I think there are some scaling and spacing problems in xits. Also, small caps are not supported. Is this intended?! Thanks for your help. Cheers, Andreas MINIMAL EXAMPLE \setupbodyfont[xits,11pt] \starttext $\diamond$ % too small?! $\square$ % OK?! $\blacktriangleright$ % too big?! $\blacktriangleleft$ % too big?! $\blacktriangle$ % too big?! $\blacktriangledown$ % too big?! {\sc Word} % not supported ?! $\tilde{W}^i$ $W^i$ % using a superscript in case % an accent is used results in % a too small distance between letter % and superscript $f^i$ % distance too small (seems to be just the case for $f$, see e.g. $h^i$ $t^i$) \stoptext MINIMAL EXAMPLE ___ 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] \define a command with square-bracket arguments
Hi all, As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands. \define[2]\mycommand{code code code} defines a command to be invoked with \mycommand{...}{...} Can I use \define, or a related command, to define a command that takes square-bracket arguments, like so: \mycommand[...][...] ? When I type \define[1][2]\mycommand{code code code} that doesn't work. Cheers, Sietse ___ 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] \define a command with square-bracket arguments
On 09/27/2012 05:45 PM, Sietse Brouwer wrote: Hi all, As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands. \define[2]\mycommand{code code code} defines a command to be invoked with \mycommand{...}{...} Can I use \define, or a related command, to define a command that takes square-bracket arguments, like so: \mycommand[...][...] ? When I type \define[1][2]\mycommand{code code code} that doesn't work. Cheers, Sietse ___ You know the wiki better than most, but I wonder: are you looking for this page? http://wiki.contextgarden.net/Commands_with_optional_arguments Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \define a command with square-bracket arguments
2012-09-27 Sietse Brouwer sbbrou...@gmail.com: Hi Sietse, As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands. \define overwrites existing commands with pleasure. In contrast to \def it prints a message to the log file: “\mycommand is already defined”. Can I use \define, or a related command, to define a command that takes square-bracket arguments, like so: \mycommand[...][...] \def\mycommand {\dodoubleempty\domycommand} \def\domycommand [#1][#2] {first: #1, second: #2} \mycommand [foo] [bar] \mycommand [foo][bar] \mycommand [foo] Question for the others: What's the difference of \dodoubleargument and \dodoubleempty? I expected \dodoubleargument to throw an error since the arguments are supposed to be mandatory. 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 ___
[NTG-context] Parsing [key=value, key2=value2, ...] with Lua
Hi all, I've found a helper function that does this: utilities.parsers.settings_to_hash('ape=1, note=2, mice=3') -- { [ape] = 1, [note] = 2, [mice] = 3 } This makes me very happy. This function and its friends are stored under utilities.parsers, and defined in util-prs.lua; I've listed them below. Perhaps they'll be useful to somebody else, too. I should probably add this info to http://wiki.contextgarden.net/Commands_with_KeyVal_arguments, but dinner first. Cheers, Sietse First some examples of what the most important functions: utilities.parsers.settings_to_hash('ape=1, note=2, mice=3') -- { [ape] = 1, [note] = 2, [mice] = 3 } -- settings_to_hash takes an option 'strict', -- I assume that has to do with space-trimming. utilities.parsers.settings_to_array('ape, note=2, mice, ape') -- { ape, note=2, mice, ape } utilities.parsers.settings_to_array('ape, note=2, mice, ape') -- { [ape]=true, [note=2]=true, [mice]=true,} Complete list of functions (and one table) in utilities.parsers: T.add_settings_to_array T.arguments_to_table T.array_to_string T.getparameters T.hash_to_string T.listitem T.make_settings_to_hash_pattern T.patterns: table: 0x9a67680 T.patterns.settings_to_array : userdata: 0x9a6c904 T.patterns.settings_to_hash_a : userdata: 0x9a6a694 T.patterns.settings_to_hash_b : userdata: 0x9a6ad6c T.patterns.settings_to_hash_c : userdata: 0x9a6b424 T.settings_to_array T.settings_to_hash T.settings_to_hash_strict T.settings_to_hash_tolerant T.settings_to_set T.simple_hash_to_string T.splitthousands ___ 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] xits font: some spacing and scaling problems
On Thu, Sep 27, 2012 at 04:58:11PM +0200, Andreas Mang wrote: Hi there, Not quite sure if this is the right place. I wanted to send this directly to Khaled Hosny, but then I thought it might be good to have some additional opinion on some of these issues (I am not quite sure if some of this is intended behaviour). I have collected some examples for which I think there are some scaling and spacing problems in xits. Also, small caps are not supported. Is this intended?! Thanks for your help. Cheers, Andreas MINIMAL EXAMPLE \setupbodyfont[xits,11pt] \starttext $\diamond$ % too small?! $\square$ % OK?! $\blacktriangleright$ % too big?! $\blacktriangleleft$ % too big?! $\blacktriangle$ % too big?! $\blacktriangledown$ % too big?! None of those glyphs were changed in XITS, they are exactly the same as the ones in STIX fonts, so possibly ConTeXt is using the wrong Unicode character for those symbols. The later two are smaller with LaTeX package unicode-math. {\sc Word} % not supported ?! Right, there is no smallcaps, probably you can use some other Times-like font for smallcaps. $\tilde{W}^i$ $W^i$ % using a superscript in case % an accent is used results in % a too small distance between letter % and superscript Looks like a ConTeXt issue, both render the same with (xe|lua)latex (using unicode-math). $f^i$ % distance too small (seems to be just the case for $f$, see e.g. $h^i$ $t^i$) Looks fine here. 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] xits font: some spacing and scaling problems
On Thu, 27 Sep 2012, Khaled Hosny wrote: On Thu, Sep 27, 2012 at 04:58:11PM +0200, Andreas Mang wrote: Hi there, Not quite sure if this is the right place. I wanted to send this directly to Khaled Hosny, but then I thought it might be good to have some additional opinion on some of these issues (I am not quite sure if some of this is intended behaviour). I have collected some examples for which I think there are some scaling and spacing problems in xits. Also, small caps are not supported. Is this intended?! Thanks for your help. Cheers, Andreas MINIMAL EXAMPLE \setupbodyfont[xits,11pt] \starttext $\diamond$ % too small?! $\square$ % OK?! $\blacktriangleright$ % too big?! $\blacktriangleleft$ % too big?! $\blacktriangle$ % too big?! $\blacktriangledown$ % too big?! None of those glyphs were changed in XITS, they are exactly the same as the ones in STIX fonts, so possibly ConTeXt is using the wrong Unicode character for those symbols. The later two are smaller with LaTeX package unicode-math. That is most likely the issue. I never really understood what all these triangles should map to. Should we target unicode-math the reference implmentation? 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] xits font: some spacing and scaling problems
On Thu, Sep 27, 2012 at 01:01:35PM -0400, Aditya Mahajan wrote: On Thu, 27 Sep 2012, Khaled Hosny wrote: None of those glyphs were changed in XITS, they are exactly the same as the ones in STIX fonts, so possibly ConTeXt is using the wrong Unicode character for those symbols. The later two are smaller with LaTeX package unicode-math. That is most likely the issue. I never really understood what all these triangles should map to. Should we target unicode-math the reference implmentation? As unicode-math table is based on BB’s STIX symbol table, I think it is the closest we have to an authoritative Unicode → TeX csnames mapping (incidentally, I have recent version of BB’s table, if anyone wants it). 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 ___
[NTG-context] Problem with ConTeXt (MkIV), Hebrew and ligatures
This is a problem originally posted in TeX/StackExchange. However, since I have not had any luck in finding a solution I post it here too. I am confident that somebody here should know the answer. http://tex.stackexchange.com/questions/73970/problem-with-context-mkiv-hebrew-and-ligatures Since I last played with the latest ConTeXt MkIV, there has been introduced this new feature. It now seems to combine Hebrew characters automatically when possible to ligatures. So for example. If I have a word with following two characters: U+05D5 (HEBREW LETTER VAV) U+05BC (HEBREW POINT DAGESH OR MAPIQ) ConTeXt will combine these to: U+FB35 (HEBREW LETTER VAV WITH DAGESH) However, I would need to disable this feature for a number of reasons. For example, this breaks my little database query, because the query key is changed before(?) macro gets it. So if somebody would know how to turn this off and maybe also that what has changed. Sincerely, Simo Ojala smsoj...@gmail.com ___ 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] verbatim text: \type, \tex and co.
Hello, Can someone indicate how to typeset $L_{α+β}$ as verbatim text? (\arg{} doesn't help here...) Furthermore, I suppose that typesetting Greek characters verbatim depends also upon which \tt font is being used. Alan ___ 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] verbatim text: \type, \tex and co.
Can someone indicate how to typeset $L_{α+β}$ as verbatim text? (\arg{} doesn't help here...) Untested: \type{...} should work. (Definitely did work a couple of months ago). Furthermore, I suppose that typesetting Greek characters verbatim depends also upon which \tt font is being used. CM Unicode has a good coverage of greek characters in typewriter font. 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] Current source directory.
Thank you for yor time, Peter. But this is not what I wanted... :-( Is there a way to know the directory of the currently being processed source file? This works with mkiv: \starttext PWD: \cldcontext{io.popenpwd:read()} \stoptext This gives the directory where the context command was called from. I want the directory where the tex file being processed lives in. For example, I have a component products/product/article.tex Inside a product products/product.tex I produce it by calling context products/product.tex I want to know a function that returns /fullpath_to_project/products/ when I call it from the script products/product.tex. And I want it to return /fullpath_to_project/products/product/ when I call it from the script products/product/article.tex. Cheers, André Caldas. ___ 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] [tabulate] colored background
Hi all, the background mechanism of tabulations is quite simplistic: it extends only to the first line of a cell irrespective of its length. Example: ··· \starttext \starttabulate[|p|r|] \CM [red] \input knuth \NC was said by The Don \NC \AR \stoptabulate \stoptext ··· Is there a way to get the whole cell covered? (Textbackgrounds only color the area where text is, not the entire cell.) Regards Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpI4XzTcBYb4.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] [tabulate] colored background
On Fri, 28 Sep 2012, Philipp Gesang wrote: Hi all, the background mechanism of tabulations is quite simplistic: it extends only to the first line of a cell irrespective of its length. Example: ··· \starttext \starttabulate[|p|r|] \CM [red] \input knuth \NC was said by The Don \NC \AR \stoptabulate \stoptext ··· Is there a way to get the whole cell covered? (Textbackgrounds only color the area where text is, not the entire cell.) The TABLE macros are more flexible than tabulate. (Untested) \startsetups table:setup \setupTABLE[frame=off] \setupTABLE[r][1][background=color, color=red, width=0.5\hsize] \stopsetups \startTABLE[setups={table:setup}] \NC \input knuth \NC was said by the Don \NC \NR \stopTABLE 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] Current source directory.
I want to know a function that returns /fullpath_to_project/products/ when I call it from the script products/product.tex. And I want it to return /fullpath_to_project/products/product/ when I call it from the script products/product/article.tex. Finally found it, after lots of trial-and-erroring through likely-looking table names in file-job.lua: the stack of input files is kept in resolvers.inputstack. Assuming (absolute path of invocation dir) + (path of file relative to invocation dir) = the desired path, the following should work. \cldcontext{ environment.runpath .. '/' .. file.pathpart(resolvers.inputstack[#resolvers.inputstack]) } You may or may not want to parse out any ./ and ../ components. (If you do: helpful filename manipulation functions (such as file.pathpart, indeed) may be found in l-file.lua.) Hope this helps, Sietse On Fri, Sep 28, 2012 at 12:38 AM, Andre Caldas andre.em.cal...@gmail.com wrote: Thank you for yor time, Peter. But this is not what I wanted... :-( Is there a way to know the directory of the currently being processed source file? This works with mkiv: \starttext PWD: \cldcontext{io.popenpwd:read()} \stoptext This gives the directory where the context command was called from. I want the directory where the tex file being processed lives in. For example, I have a component products/product/article.tex Inside a product products/product.tex I produce it by calling context products/product.tex Cheers, André Caldas. ___ 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 ___ ___ 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] Referring to multiple elements
Hi Marco, (PS for Hans), Marco wrote: \in{figure}[alpha,beta,gamma] This outputs “figure 1”. What I'd like to have is “figure 1-3”. The attached quasi-module seems to do it! On my computer, at least. (I call it 'quasi' because it is really nothing more than code in a file of its own. No configurability whatsoever, except to the extent that I tried to comment well, and split things up into functions.) I'd have written it so that it properly identifies runs like '1.2.1, 1.2.2, 1.2.3', too, but I can't find a function that will turn reference strings into such a prefixed strings. I hope it does what you want! Let me know if you want/need any alterations, or discover bugs. Sietse PS @Hans: if figure numbers have prefix segments, is there any (combination of) helper function that will return e.g. the string '1.2.3' given the reference string ref:fig-three? I found commands.savedlistprefixednumber(nil, numberinlist), but that is a wrapper around sections.typesetnumber; and that last function injects the string into the TeX stream instead of returning it. Is there another function I haven't found yet that will do this, or are prefixes implemented print-only at the moment? inwithranges.mkiv Description: Binary data inwithranges.lua Description: Binary data test-inwithranges.tex Description: TeX document test-inwithranges.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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___