[NTG-context] KR itemize fails with latest beta

2009-05-20 Thread Matthijs Kooijman
Hi, I've downloaded the beta today, which fails on one of my itemizes using the KR numbering scheme. I'm using MkIV context, with the following file: \starttext \startitemize[KR] \item Foo \stopitemize \stoptext When compiling this file, I get the below errors. When using R instead of

Re: [NTG-context] KR itemize fails with latest beta

2009-05-28 Thread Matthijs Kooijman
I've downloaded the beta today, which fails on one of my itemizes using the KR numbering scheme. I'm using MkIV context, with the following file: fixed in next beta Thanks! Gr. Matthijs signature.asc Description: Digital signature

[NTG-context] Verbatim / prettyprinting in mkIV

2009-06-08 Thread Matthijs Kooijman
Hi all, I've been struggling with verbatim printing in MkIV for a while now and found some confusing things. I did finally get things working, but after quite some effort. I'd like to hear if my conclusions are correct, perhaps I can put them on the wiki then. I was trying to set up some custom

[NTG-context] \typebuffer with typing style

2009-06-08 Thread Matthijs Kooijman
Hi, I'm trying to use a buffer together with a custom typing style using the latest beta with MkIV, but so far I've only managed to do this using \startFOO and \stopFOO inside the buffer: \definetyping[FOO][option=FOO] \startbuffer[bar] \startFOO baz \stopFOO \stopbuffer \getbuffer[bar]

Re: [NTG-context] \typebuffer with typing style

2009-06-08 Thread Matthijs Kooijman
Hi all, since \startFOO \getbuffer[bar] \stopFOO gives me compile errors. Actually, that turned out to be my own typo. However, this doesn't give me what I want, but just a verbatim \getbuffer[bar]... Gr. Matthijs signature.asc Description: Digital signature

Re: [NTG-context] \typebuffer with typing style

2009-06-09 Thread Matthijs Kooijman
Hi all, Snip question about styled \typebuffer Shortly after sending my email, I realized the actual problem I was trying to solve was not the one I posted, so perhaps I can clarify that a bit. What I'm trying to do, is pass some text to a custom command, which should then be displayed in a

[NTG-context] Limited with rule?

2009-06-10 Thread Matthijs Kooijman
Hi all, I've been trying to create a horizontal rule of limited width, using MkIV. My best approach so far is using a \framed with only a bottom frame: \framed[frame=off,bottomframe=on,width=.5\textwidth]{} However, this is not quite elegant. Context provides two commands for drawing lines,

Re: [NTG-context] \typebuffer with typing style

2009-06-10 Thread Matthijs Kooijman
Hi Peter, \setuptyping[option=TEX] This is what I am using now, but this changes the global settings and requires resetting them afterwards. Not so pretty. I was hoping for a better method to achieve this, but I'm starting to doubt there is one currently. I've been trying to give \typebuffer a

Re: [NTG-context] Limited with rule?

2009-06-10 Thread Matthijs Kooijman
Hi Hans, \blackrule[width=10cm,height=1pt,depth=1pt,color=red] That seems to work, thanks! Is there any particular difference between all these line commands (\hairline, \thinrule, \blackrule), apart from the options they support? Are they meant for different situations, or is there some other

Re: [NTG-context] finding out what font are available

2009-06-11 Thread Matthijs Kooijman
Hi Ciro, I type: sudo mtxrun -script fonts --list and I get: sudo: unable to execute /usr/bin/mtxrun: No such file or directory Considering that mtxrun exist, I suspect the interpreter of the script does not exist, which is texlua on my system: $ head -1 /usr/bin/mtxrun

[NTG-context] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-06-11 Thread Matthijs Kooijman
Hi all, while working on a custom pretty printer, I was having the need to keep some state variables for the duration of one buffer, and reset them again for the next buffer. With the current hooks a pretty printer has available, this is not possible, since you never know what the first and last

Re: [NTG-context] finding out what font are available

2009-06-12 Thread Matthijs Kooijman
Hi Ciro, How do I solve the problem then? You should probably just install the luatex package (IIRC you were running Ubuntu, which should ship it, Debian does at least). Gr. Matthijs signature.asc Description: Digital signature

Re: [NTG-context] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-06-15 Thread Matthijs Kooijman
-- comment : Pretty printing of (extended) lambda calculus -- author : Matthijs Kooijman, Universiteit Twente, NL -- copyright: Matthijs Kooijman -- license : None local utf = unicode.utf8 if not buffers then buffers = { } end if not buffers.visualizers

Re: [NTG-context] Example of passing unexpanded text between \startfoo ... \stopfoo into Lua?

2009-06-19 Thread Matthijs Kooijman
Hi Kevin, A colleague and I are experimenting with strategies to implement a literate programming module for ConTeXt, and we'd like to have something like Im not exactly sure what you're trying to achieve, but perhaps you could do this using a prettyprinter? A pretty printer gets passed each

Re: [NTG-context] Mark IV Syntax highlighting support

2009-06-30 Thread Matthijs Kooijman
Hey all, ./tex/texmf-context/tex/context/base/verb-.*\.lua ! Actually, in newer versions (since a month or so), that's pret-*.lua. Where to start with this topic (current state in Mark IV, roadmap, ...) ? I've been struggling with this a bit as well lately and found there was next to no

Re: [NTG-context] support for SUBSCRIPT THREE etc. ?

2009-07-21 Thread Matthijs Kooijman
Hi Peter Khaled, I think there is a way to use ConTeXt commands inside verbatim environments, but I don't recall it. I think this is the option=commands option for setuptyping friends. AFAIK this means you need to use /TEX /ETEX around your commands or something, but I'm not completely sure.

Re: [NTG-context] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-07-22 Thread Matthijs Kooijman
Hi, any chance of looking at and perhaps committing this patch? Is there any place where lua pretty printers are documented? The wiki seems to say only wait for lua, but not how to use them. If there isn't, I'll try to put something useful on the wiki. I've created [1] to document the

Re: [NTG-context] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-08-04 Thread Matthijs Kooijman
Hi Hans, i uploaded a beta zip with two extra hooks I see the hooks, but I can't find the spot where they are called? It seems you missed this part of my patch? Also, I think you didn't update the definition of \type to use the typesingle lua function I proposed, which means that \type{}

Re: [NTG-context] git repository

2009-08-11 Thread Matthijs Kooijman
Hi Patrick, I don't know if you have noticed that the git repository has been replaced by a newer one. I'm surprised that there is even a git repository at all. On the wiki and all documents I've seen so far, there is only talk about rsyncing from an ftp, git is never mentioned. However,

Re: [NTG-context] git repository

2009-08-11 Thread Matthijs Kooijman
well, such messages would not help much unless they would be detailed (and then should be done for each file); as i work on all files at the same time it would cost me way to much time and it gains me nothing; looking at the diff in a git gui is more informative A git commit contains

Re: [NTG-context] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-08-13 Thread Matthijs Kooijman
(I've sent this mail before, but I think the mailing list troubles might have eaten it). Hi Hans, i uploaded a beta zip with two extra hooks I see the hooks, but I can't find the spot where they are called? It seems you missed this part of my patch? Also, I think you didn't update the

Re: [NTG-context] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-08-25 Thread Matthijs Kooijman
Hi Hans, any chance of replying to this mail? Currently, you only applied half of the patch, so it's not usable yet at all. Gr. Matthijs On Thu, Aug 13, 2009 at 12:10:54PM +0200, Matthijs Kooijman wrote: (I've sent this mail before, but I think the mailing list troubles might have eaten

[NTG-context] Current beta says it needs luatex 0.42, but really needs 0.43

2009-08-25 Thread Matthijs Kooijman
Hi, I just upgraded to the latest beta, and got an error saying I need luatex 0.42. I have 0.42, but a quick glance at context.mkiv shows that it really wants luatex 0.43 (so the error message is wrong). Gr. Matthijs signature.asc Description: Digital signature

[NTG-context] Why are pretty printer names uppercased?

2009-08-26 Thread Matthijs Kooijman
Hi all, according to the wiki, and the current code, the arguments to \installprettytype should be uppercased. E.g.: \installprettytype [PHP][PHP] Referring to them should be uppercased as well: \definetyping[PHP] [option=PHP] \setuptyping[option=PHP] However, the filename

Re: [NTG-context] Why are pretty printer names uppercased?

2009-08-26 Thread Matthijs Kooijman
Hi Hans, according to the wiki, and the current code, the arguments to \installprettytype should be uppercased. E.g.: \installprettytype [PHP][PHP] because want uppercase \startTEX \stopTEX Well, those would be coming from the first argument of definetyping. AFAIU, neither

[NTG-context] Command version of \em

2009-08-28 Thread Matthijs Kooijman
Hi all, is there any command version of \em, like there is for \bold and friends? I can write either \bold{foo} of {\bold foo}, but only {\em foo} and not \em{foo}. Is there any way to do this already, or should I just define \emph myself or something like that? Gr. Matthijs signature.asc

[NTG-context] Using \startalign outside of math mode?

2009-08-28 Thread Matthijs Kooijman
Hi, I'm using a custom pretty printer to apply some formatting to a buffer. However, I'm not using a monospaced font, but some sans serif font to display the result. In the original text, I have some lines that are nicely aligned using leading spaces. For example: foo = bar | baz

Re: [NTG-context] Using \startalign outside of math mode?

2009-08-28 Thread Matthijs Kooijman
Hi all, foo = bar | baz it seems I found some sort of a solution. Using the \setwidthof I found at [1], I wrote the following: \def\setwidthof#1\to#2% {\bgroup \setbox\scratchbox\hbox{#1}% \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}} foo = bar \setwidthof{foo

Re: [NTG-context] oldstyle numbers

2009-09-16 Thread Matthijs Kooijman
Hi, \definefontfeature[default][default][onum=yes] Just for rerefence, this works for me as well using MkIV and luatex. Gr. Matthijs signature.asc Description: Digital signature ___ If your question is of

Re: [NTG-context] metaobj and luatex 0.42.0

2009-09-16 Thread Matthijs Kooijman
Hi Matthew, I've been playing with metaobj and luatex 0.43 for a bit, and faced similar problems. Lots of stuff about redundant equations and other stuff I didn't understand. However, I've found that cleaning up your objects when you're done pretty much solves all my problems. For example, just

[NTG-context] \overrightarrow not working in mathmode in Metapost?

2009-09-18 Thread Matthijs Kooijman
Hi, I've been trying to use the \overrightarrow command within a metapost graphic, but it doesn't work. Math mode does work, for example \vec works like expected. Outside of metapost, \overrightarrow works as expected. To illustrate the problem, I've created the following simple testcase:

[NTG-context] vardef with @# not working within context

2009-09-21 Thread Matthijs Kooijman
Hi all, I've been fiddling around with metaobj a bit, but defining my own objects failed. After some debugging, I've reduced this to a metapost / context MkIV issue (so no metaobj specifics anymore). What happens, is that vardefs that use @# as a placeholder in their name only work when they are

Re: [NTG-context] vardef with @# not working within context

2009-09-22 Thread Matthijs Kooijman
Hi Hans, it's more that tex likes to duplicate the # internally Ah, yes, I've seen some mentions on @## in error messages, but I thought that was just part of the way metapost handled @#. Apparently not :-) how about adding let @## = @# ; to mp-tool.mp (you need to remake the context

Re: [NTG-context] metaobj and luatex 0.42.0

2009-09-23 Thread Matthijs Kooijman
Hi Matthew, However, I've found that cleaning up your objects when you're done pretty much solves all my problems. For example, just add a clearObj line to your code makes it work for me: I've found that using save to declare the values as local also works. For example: \startMPinclusions

Re: [NTG-context] LinLibertine and MkIV (Was: problem with today's beta)

2009-09-28 Thread Matthijs Kooijman
Hi Thomas, linlibertineo LinLibertineO LinLibertine_Re-4.4.1.otf I've been struggling a bit with linlibertine as well, I've found that there seems to be an issue with some characters in the font filenames (probably the _ or ., I haven't figured out which ones exactly). I've got the

[NTG-context] What does hangsidefloat do?

2009-09-29 Thread Matthijs Kooijman
Hi all, I've been fiddling around with floats a bit, and seeing a lot of references to hangsidefloat. It seems to be the solution to all sorts of floating problems, but I can't really see what it _does_. Looking around the source doesn't really tell me either, so anyone care to tell me what it

[NTG-context] Passing variables into context

2009-09-30 Thread Matthijs Kooijman
Hi all, I've been trying to make a metapost graphic, based on the \textwidth. However, it seems I can't just pass in \textwidth as an option. For example, the following breaks: \startuniqueMPgraphic{HLine} draw origin -- (\MPvar{width}, 0mm); \stopuniqueMPgraphic \starttext

Re: [NTG-context] Passing variables into context

2009-09-30 Thread Matthijs Kooijman
Hi Taco, You should try \the\textwidth Thanks, that works. Could you enlighten me as to what \the does and why this helps? Does Context treat \the specially within metapost code (which seems so, since there are more \the examples in the metafun manual), or is it expanded before getting inserted

Re: [NTG-context] OT: Kindle

2009-10-08 Thread Matthijs Kooijman
I guess the question is whether or not you are happy with being able to order from the Amazon store alone. Here is a (i think) useful comparison chart (by iReX, a competitor): I saw a presentation form iRex yesterday, and got to hold a few of their projects. Pretty neat, the latest ones even

[NTG-context] \setupquotation affecting \quote

2009-10-09 Thread Matthijs Kooijman
Hi, I've been trying to use \setupquotation, but it seems it doesn't just affect \quotation, but also \quote. In particular, setting style to tfb enlarges the font used by \quote and somehow removes the quotes from around it. Seeing that there is also a \setupquote, and from looking at the code,

Re: [NTG-context] Figure referencing problems

2009-10-12 Thread Matthijs Kooijman
Hi Wolfgang, \setupinteraction[color=] That does not work in the latest version. The style parameter is recognized, but ot the color parameter. Following produces red links, even if green is selected. I've been fiddling with this a bit as well, and found that the color parameter is only used

Re: [NTG-context] Figure referencing problems

2009-10-12 Thread Matthijs Kooijman
Hi all, The following makes all links black again for me: \setupinteraction[state=start,color=,contrastcolor=] Thank you. That was the trick. For completeness, I've documented the setupinteraction command a bit better at http://wiki.contextgarden.net/Interaction as well. Gr. Matthijs

Re: [NTG-context] obscure luatex error

2009-10-15 Thread Matthijs Kooijman
Hi, luatex: ../../../source/texk/web2c/luatexdir/tex/printing.c:266: print: Assertion `c 256' failed. [329.327MTXrun | fatal error, no return code, message: luatex: execution interrupted A quick glance at the code, shows it's in the following part: /* An entire string is output by

[NTG-context] Lua error on unailable fonts

2009-10-29 Thread Matthijs Kooijman
Hi, after upgrading to the latest context beta, I'm fased with the following lua error: define font | forced type otf of lmmono8-regular not found define font | font with name lmmono8-regular is not found [...] ! LuaTeX error /usr/share/texmf/tex/context/base/math-vfu.lua:366: table

[NTG-context] \attachment not working in MkIV

2009-10-29 Thread Matthijs Kooijman
Hi, I've been trying to get \attachment to work, but I get a Lua error. The following example, (taken from scrn-int.mkiv and stripped a bit) provides an error: \setupinteraction[state=start] \useattachment[whatever][test.tex] \starttext \attachment[whatever] \stoptext The tail of the

Re: [NTG-context] \label equivalent in a section?

2009-10-29 Thread Matthijs Kooijman
Hi Pau, \section{Introduction} \label{intro} In Section \ref{intro}, we show an example of labelling \section[intro]{Introduction} In

Re: [NTG-context] \attachment not working in MkIV

2009-10-29 Thread Matthijs Kooijman
add \registerctxluafile{scrn-int}{1.001} to scrn-int.mkiv as it seems that it's not loaded Yup, that removed the error. I even get something icon in the file, but acrobat reader somehow silently fails to open the file... Oh well, let's do without it. Gr. Matthijs signature.asc

Re: [NTG-context] \overrightarrow not working in mathmode in Metapost?

2009-10-30 Thread Matthijs Kooijman
Hi Taco, Have you tried the new current yet? There was a whole bunch of extra \unexpanded-s in it already. You're right, thanks! I had built the new context but forgot to install it on this particular machine :-) Sorry for the noise, Matthijs signature.asc Description: Digital signature

Re: [NTG-context] Getting the width of an expression inside lua

2009-11-02 Thread Matthijs Kooijman
Hi Hans, thanks for the instant reply :-) I haven't tried your suggestion yet, but I've got a few questions first. \startluacode function document.step_one(str) tex.sprint(\\setbox0\\hbox{,str,}) Would there be any danger of overwriting an existing box by doing this? I'm not quite sure

[NTG-context] \usemodule doesn't complain when module is not found?

2009-11-19 Thread Matthijs Kooijman
Hi all, I've been trying my first steps into the land of ConTeXt modules, without much success. What has been particularly annoying is that the \usemodule command seems to give no error or other indication that a particular module was not found. Consider below example: \usemodule{foobar}

Re: [NTG-context] \usemodule doesn't complain when module is not found?

2009-11-19 Thread Matthijs Kooijman
\usemodule{foobar} Right, this should have been \usemodule[foobar] (square brackets instead of curlies...). It would been nice if this would error out, but well... When fixing this, there is a module foobar not found message, though it doesn't error out. So, never mind and sorry for the

[NTG-context] How to not gobble space after a command

2009-11-20 Thread Matthijs Kooijman
Hi all, I'm working with a few custom macros to simplify typing a bit, like: \def\VHDL{\small{VHDL}} However, when I use this macro in text, like \VHDL this, it gobbles the space after it. I've seen some references that say to solve this by writing \VHDL{} instead, but that is of course very

Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread Matthijs Kooijman
\autoinsertnextspace is the context version of \xspace (could be mkii only) Woah, that works (in MkIV). Thanks! Gr. Matthijs signature.asc Description: Digital signature ___ If your question is of interest to

Re: [NTG-context] How to not gobble space after a command

2009-11-20 Thread Matthijs Kooijman
Hi Luigi, hm , some problem here # context --version MTXrun | main context file: context.tex MTXrun | current version: 2009.11.10 13:30 Your example works fine for me on an older beta: $ context --version MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex MTXrun

Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread Matthijs Kooijman
Hi Luigi, hm , some problem here # context --version MTXrun | main context file: context.tex MTXrun | current version: 2009.11.10 13:30 Your example works fine for me on an older beta:  $ context --version  MTXrun | main context file:

Re: [NTG-context] How to not gobble space after a command

2009-11-30 Thread Matthijs Kooijman
Hi Luigi, forget my last post. I was in a hurry last week and put a \def\autoinsertnextspace{} in my document just to get it compiling on context 2009.11.24. If I remove that, it stops working with texexec --lua (as well as just context) with the same undefined control sequence error. It

[NTG-context] inothermargin overlaps

2009-12-02 Thread Matthijs Kooijman
Hi all, I've been using \inmargin to put some stuff in the margin of my text, but when I use multiple \inmargin's close together, the stuff in the margin will overlap. Is there any way to let ConTeXt just move things down to prevent overlap? I'm not forced to move my \inmargin's around, guessing

Re: [NTG-context] inothermargin overlaps

2009-12-02 Thread Matthijs Kooijman
W00ps, forgot to include the testcase I made: \starttext Foo \inmargin{Blerf} Bar \inmargin {Baz} \stoptext signature.asc Description: Digital signature ___ If your question is of interest to others as well, please

Re: [NTG-context] inothermargin overlaps

2009-12-02 Thread Matthijs Kooijman
Try \starttext Foo Baz \inmargin {Blerf \\ Baz} \stoptext Hmm, that might work, but my real case is slightly more complicated. I have the \inmargin wrapped in a \refdef command, that references some topic on some page. So I say \refdef{foo} and it looks up both the text and page number for foo

[NTG-context] \setupfloat[..][..., after=\stopframedtext] not working?

2009-12-02 Thread Matthijs Kooijman
Hi all, the following example is not working for me: \setupfloat[intermezzo][before=\startframedtext[width=10cm],after=\stopframedtext] \starttext \placeintermezzo{Caption}{Text} \stoptext It fails with the following message: ! Undefined control sequence. \stopframedtext

Re: [NTG-context] \setupfloat[..][..., after=\stopframedtext] not working?

2009-12-02 Thread Matthijs Kooijman
Hi Hans, however, floats can have frames anyway so you don't need the framedtext I was not after the frame, but after the width. I want to put some text in a float and have the main body text wrap around that. I can do this by putting the startframedtext inside the placeintermezzo call, but I'd

Re: [NTG-context] inothermargin overlaps

2009-12-02 Thread Matthijs Kooijman
Hi Hans, % \setupinmargin[left][sidemethod=2] % \setupinmargin[left][sidemethod=3] % \setupinmargin[left][sidemethod=4] I've tried each of them (with both left and right). In my minimal example, there is no difference. In my complete document, I noticed sidemethod=3 caused on margin text to

[NTG-context] Biblography list does not show numbers

2009-12-05 Thread Matthijs Kooijman
Hey all, I'm trying to use a bibliography, but it seems no numbers are show in the biblography that is generated. The following example: Test.tex: = \usemodule[bib] \setupbibtex[database=Test] \starttext \section{foo} Blaa \cite[foo] Bar

Re: [NTG-context] Biblography list does not show numbers

2009-12-05 Thread Matthijs Kooijman
I'm trying to use a bibliography, but it seems no numbers are show in the biblography that is generated. The following example: Ah, using \setuppublications[numbering=yes] solves this. Any reason this is not the default? I'll put this on the wiki (and stress the completeness of the manual

Re: [NTG-context] Biblography list does not show numbers

2009-12-06 Thread Matthijs Kooijman
Hi Taco, I have assumed that ConTeXt has more authors that need APA like citations than bracketed numbers. ConTeXt has never had a very strong presence in the exact sciences. If that's the case, then the \cite command does the wrong thing by default, since it generates references as bracketed

[NTG-context] Selectively not using a font feature

2009-12-06 Thread Matthijs Kooijman
Hi all, I'm currently using old-style numerals in my document using the onum otf font feature: \definefontfeature[default][default][onum=yes] This gives very nice results, except for the cases where a 0 appears by itself in the text. In these cases, it appears just like an o instead of a 0.

Re: [NTG-context] Selectively not using a font feature

2009-12-07 Thread Matthijs Kooijman
Hi Hans, it assumes that you know what is provided by the font ... you cam play with addff and subff and addfs and subfs (individual features cq. current set) I couldn't get the addff/subff stuff working to remove the font feature, but the following did the trick:

[NTG-context] page[no] not working?

2009-12-07 Thread Matthijs Kooijman
Hi all, I've come to understand taht using the \page[no] command should prevent a pagebreak at that particular spot whenever possible. However, this seems to be not working for me. My actual problem is with a \startframed directly after a description header, but the problem is easily reproduced

Re: [NTG-context] page[no] not working?

2009-12-08 Thread Matthijs Kooijman
Hi Wolfgang, As you don't provide a example with a description where you have the problem I can't make a test but this could work in MkIV I reckoned that the \page[no] command by itself was already broken, so I first want to fix that before making things more complicated (like doing stuff with

Re: [NTG-context] page[no] not working?

2009-12-08 Thread Matthijs Kooijman
Hi Wolfgang, \page[no] did work but only when you use it in the correct way. snip exapmles Aha, page[no] only works directly after a paragraph break. I haven't seen that documented anywhere. I'll put it up on the \page reference page. Is only after a paragraph break the right usage