Re: [dev-context] Help regarding context architecture and compilation
Anyway: being the reference, the garden minimals are the starting point. If one chooses for luatex/mkiv only only a fraction is needed: it could be nice study to see how small it can get. I think the point is that if you want to do nice typography and / or support many different scripts and languages, you need a lot of fonts, which have the potential to make the size explode with virtually no limits (think CJKV...). That is anyway one of the conclusions that have been reached during the recent thread on the TeX Live list (about a hypothetical modern scheme for TeX Live). Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] [NTG-context] mkII with minimals
I have a feeling that somebody on the list already has such a repository There is the ConTeXt revisions repository at the Supélec foundry (http://foundry.supelec.fr/projects/contextrev/), but I don't have the impression that Taco maintains it any more. I could have start storing all the experimental versions, full-blown, on the server, but that would be a killing consumer of space, most probably adding some 100MB on the server every day. I do have quite a lot of ConTeXt zips on my laptop, which I've been collecting since approximately one year (probably not all, but definitely a lot). It is big, but not that terrible (1.7GB). The main ConTeXt zip is only 7MB after all. Of course, it is around 30MB uncompressed. Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] luatex beta 0.36.0
I have some problems with compilation. Did other Mac users manage to compile LuaTeX without problems? I had no problem on my end, using build.sh to compile the native binary on Intel Mac OS 10.5.4 Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] [Context] How to ignore specific tree when extracting version from SVN?
Any volunteer to send me one-liner to fix that? I'm able to write a ruby script to filter that out, but I'm sure that there must be some extremely simple one-liner (or three-liner) in bash to solve that. All the actual source code resides in texk and libs. So you may want to simply run svn info in those two directories and compute the maximum of the respective last revisions (in that case, 820, last November). Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] format() without formatting
Hello, For a string with a single float you can play a bit with the output of string.format. The following few lines strip all the trailing zeroes from strings that look a formatted float: function string.optimize_format(form, ...) local formatted_string = string.format(form, ...) local optimized_string = formatted_string:gsub('^(%d*\.%d-)(0*)$', '%1') return optimized_string end print(string.optimize_format(0.003)) print(string.optimize_format(0.07)) print(string.optimize_format(120)) print(string.optimize_format(Hello, world!)) but of course this doesn't work if you have a format like %s %s l; you would have to parse all the arguments to format. Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] format() without formatting
local optimized_string = formatted_string:gsub('^(%d*\.%d-)(0*)$', '%1') Actually, I just realized that the primitive tostring does exactly the same transformation (probably in a much safer way), so we can use it in the much more complete code: -- Thank you, Lua-users wiki :-) -- http://lua-users.org/wiki/VarargTheSecondClassCitizen Issue #7 -- The first two functions below implement a map over a ... list local function map_rec(f, n, a, ...) if n 0 then return f(a), map_rec(f, n-1, ...) end end local function map(f, ...) return map_rec(f, select('#', ...), ...) end -- Our better formatting function function string.better_format(form, ...) -- Every number-kind-of-format - %s form = form:gsub('%%[0-9]-%.?[0-9]-f', '%%s') form = form:gsub('%%d', '%%s') form = form:gsub('%%i', '%%s') -- Then make every argument in the list into a string return(string.format(form, map(tostring, ...))) end -- Now Lua will happily strip the trailing zeroes print(string.better_format(%f %f m, 94.486000, 30.000)) print(string.better_format(%5f %.7f l, .577, 2.7828)) print(string.better_format(%5f %.7f %d l, 3.14000, 2.7828, 3)) Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] format() without formatting
okay then, let's go educational ... a better stripper: local digit = lpeg.R(09) Yes, I started writing a format string parser in LPeg before I realized that there was the tostring function as well :-) Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] format() without formatting
this is a bit weird case ... on the one hand you specify %5f and such but that's ignored i.e. becomes %s so why not use %s in the first place then Actually, this was precisely my intention: to show that one could use the original format string with different formatting requirements (I don't know where that format string is going to come from, if Peter is going to type or if it's going to be inserted by some lower-level function). But I agree that if the user is going to type it himself, he'd better use %s for convenience (Lua is so tolerant anyway). anyway, originally i used %s but when taco and i played with the converter and did some performance tests we found out that %f is faster (unless 6 digits specified) I suppose that when Lua sees a %s format with an argument that is not a string, he calls tostring which must be much slower. Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] context program, mtxrun question?
Who's lud? Lua :-) ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] context program, mtxrun question?
few? afaik all windows and linux systems -) No :-) I have to insist like one year ago, *no* Linux machine I have an account on does set TMP or TEMP (using various distributions). Maybe that's a shell problem, I don't know, but on any case you can't rely on it. anyhow, taco and i decided now to default as follows: if CACHEPATH is not set: cachepath = os.env[TEXMFCACHE] or os.env[TMP] or os.env[TEMP] or os.env[TMPDIR] or os.get[HOME] or os.env[HOMEPATH] or nil Sounds reasonable, but why not test for the existence of the /tmp directory also? Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] context program, mtxrun question?
weird because what then is the purpose of that variable But if there is no such variable, what's the point of looking for its purpose? :-) I suppose that on Unix, functions like mkstemp have to be preferred for truly temporary directories. Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] context program, mtxrun question?
So, assuming /opt/tex/texmf-linux/bin, it attempts the following directories, in this order: [/opt/tex/texmf]/web2c% two parents up [/opt/tex/texmf-linux]/texmf/web2c% one parent up [/opt/tex]/texmf-local/web2c [/opt/tex/texmf-linux]/texmf-local/web2c Thats's great! It works on my machine without the need to set any environment variable (I even tried two different arrangments of the directories). Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] context program, mtxrun question?
well, you need to set the path i assume -) Yes, sure :-) But it's much easier to control than all the variables set by setuptex. Now I can switch between the minimals and TeX Live by simply changing my PATH. Great! By the way, the rsync minimals have been updated, so it also works with them now. Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] context program, mtxrun question?
hm, but that not much more keying than calling setuptex -) No, it's very different, because it's reversible: once you've sourced setuptex, there's no going back unless you unset dozens of variables. Up to now I had to use diiferent shells for TeX Live and the Minimals. and setuptex is then the only way to keep interference away Yes, that's definitely true. Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] cyrillic glyphs
Looks nicer now :-) By the way, was there a bug in table.serialize or some other “public” function? Something to worry about? Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] XeTeX and font-selection problems
if getvariable('engine') == xetex then ok = true end Cool. I guess 'engine' is a typo for 'texengine'? This solves the problem here. Arthur ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] mailarchive 2007?
I should have this (in plain mbox format); just give some time to unpack my things from the long trip from Bachotek to Paris through Dordrecht and I'll come back to you ;-) ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context
Re: [dev-context] Footer for ntg-context mailing list, to encourage feedback
For links in the footer, tinyurl or something similar is preferred, as it saves bandwidth. I think it's not really the point here: the idea is to have permanent (and possibly easy to remember) links to relevant locations; but there is a tradeoff to be found between the density of information and the legibility of the footer; in that respect, the example I cited certainly has too much links, but having only one might not be a good idea either because there are different aspects to address (contributing to the wiki, reporting bugs, etc.). ___ dev-context mailing list dev-context@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-context