Re: [NTG-context] bug in beta: extra \else
Hans Hagen wrote: Vit Zyka wrote: Hans Hagen wrote: Wolfgang Schuster wrote: On Fri, 13 Oct 2006 19:16:58 -0400 (EDT) Aditya Mahajan [EMAIL PROTECTED] wrote: On Fri, 13 Oct 2006, Vit Zyka wrote: Hans Hagen wrote: Vit Zyka wrote: Hans Hagen wrote: Vit Zyka wrote: Hi all, there is some deep bug that was discovered translating Beginners manual. Let take single chapter e.g. ma-cb-cz-alignments.tex With today beta I got .log attached (error ! Extra \else) This will appear in both modes screen and normal. Interesting is that no error appears in context 2006-05-28. quite some code is being rewritten / adapted to context mkiv so there could be low level differences can you make a small example, since this else problem can come from other places than reported There are demonstrative files. Please, run texmfstart texexec --pdf ma-cb-cz-test.tex and texmfstart texexec --pdf --mode=screen ma-cb-cz-test.tex this file: ma-cb-env-cz.tex refers to itself and probably should be : \startenvironment ma-cb-env-cz \environment ma-cb.tex \mainlanguage[cz] \language[en] \enableregime[latin2] \stopenvironment Sorry, my fault but it does not solve the problem. I obtain the same error with fresh context and corrected version of this file: - \startenvironment ma-cb-env-cz \mainlanguage[cz] \language[en] \enableregime[latin2] \stopenvironment - There is something wrong with ma-cb environment files. The file ma-cb-en does not compile. I get an error ! Undefined control sequence. \@@olbackground -\StatusAchtergrond \doifvaluesomething ...inga {\csname #1\endcsname }\ifx \!!stringa \empty \e... \stoplocalframed ...ing {\@@framed \c!background } \dobackedbox \handleframed... \PlaatschapterStatus ... [\v!chapter \v!number ]}} \vskip 0pt plus \scratchc... argument \PlaatschapterStatus {}{}{} \firstoftwoarguments #1#2-#1 ... l.19 \Introduction {Introduction} I tried making minimal example of the file that you posted, but always get the same error. I am pretty certain that ma-cb-en.tex used to compile in the past. Aditya Hi Aditya, I had the same problems in past in solved them by myself. The problems are dutch commands in the style-files and a typo. I attached my corrected style-files, because it is faster to replace send you the files than I need to look where I made corrections. The files did not correct the problem with the backgrounds in the headers Vit has mentioned. \edef\StatusAchtergrond {StatusAchtergrond% \ifodd\realpageno R\else\ifdoublesided L\else R\fi\fi}% \ifdubbelzijdig - \ifdoublesided this low level if has been changed, ad a result tex's 'fast if then else ' skip routine does not see the \ifdubbelzijdig is if and gets confused Hans Great, thank you Hans! Let us process to teh next two problems also visible in the test file. 1. In the chapter ornament (a gray spiral with red dots) the red dots are not dots but lines. that was a tough one (esp because my by-now reference mkiv converter also had this problem) in meta-pdf.mkii patch: \def\flushconcatMPsegment {\ifcase\getMPkeyword\relax \flushMPconcatmoveto \resetMPmoveto \doMPconcat{\gMPs1}\a{\gMPs2}\b% \PDFcode{\!MP\a\space\!MP\b\space l}% \or \flushMPconcatmoveto \resetMPmoveto \doMPconcat{\gMPs1}\a{\gMPs2}\b% \doMPconcat{\gMPs3}\c{\gMPs4}\d% \doMPconcat{\gMPs5}\e{\gMPs6}\f% \PDFcode{\!MP\a\space\!MP\b\space \!MP\c\space\!MP\d\space \!MP\e\space\!MP\f\space c}% \or \bgroup \noMPtranslate \flushMPconcatmoveto \PDFcode{\!MP\lastMPmoveX\space \!MP\lastMPmoveY\space l S} \egroup \resetMPmoveto \or % \flushMPconcatmoveto % \resetMPmoveto \fi} Great Hans, it works well! Thank you Vit ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bug in beta: extra \else
Hans Hagen wrote: Aditya Mahajan wrote: On Mon, 16 Oct 2006, Aditya Mahajan wrote: On Sun, 15 Oct 2006, Vit Zyka wrote: Great, thank you Hans! Let us process to teh next two problems also visible in the test file. 1. [snip] 2. Accented characters inside \typebuffer are type set as \dochar {225} This seems to be a bug. In utf-8 encoding, if an accented character is the first character of a buffer, it gets typed correctly. All other accented charaters come out as \dochar {225}. \getbuffer works fine. I forgot to attach the test file. I am attaching it, hoping that the encoding will come out correctly. Can TeX choose the input encoding while writing files? If not, there may be really no robust way to solve this problem. Aditya in core-buf we need to treat the upper half of the vector: \recatcodeuppercharacterstrue % --- \setcatcodetable\vrbcatcodes in startbuffer It also works well. Thank you Vit ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Presentation style: customizing the right interaction menu (list-related thread)
Hi all, I'm trying to make a custom presentation style using pre-original. Considering the following piece of code extracted from s-pre-01.tex \startinteractionmenu[right] \placelist [Topic] [alternative=f, % command, % none, maxwidth=\hsize, width=\hsize, offset=0pt, criterium=all, align=left, style=\setsmallbodyfont\bfx] \stopinteractionmenu I would like to know if it is possible to obtain the following behavior: 1. The sample code: __ \starttext \TitlePage{Title Page\\pre-original} \Topics{Some Nice Quotes} \Topic{A Few} \Subject{Knuth} \input knuth \Subject{Tufte} \input tufte \Topic{Some More} \Subject{Zapf} \input zapf \Subject{Bryson} \input bryson \stoptext __ 2. The resulting right interaction menus: (page 1) - ok, placelist[Topic]... (page 2) - Topics page, idem (page 3) - \Topic{A few}, idem (page 4) - \Subject{Knuth}, here I would have the following right menu (probably with smaller interline skips between the current Topic and his Subject(s) and with a smaller font): A few Knuth (highlighted) Tufte Some more (page 5) - \Subject{Tufte} A few Knuth Tufte (highlighted) Some more (page 6) - \Topic{Some more} A few Some more (highlighted) (page 7) etc... Now, I'm sure you all understand what I need ;) Possible ? (I defend my PhD soon and it'll be nice to have this nice feature) Renaud ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] draw fill
Hi all, [maybe this is a bit off topic and you think that the Metapost mailing list is the right place for such stuff. But I have quit this list quite some time ago, as there was more spam than regular posts. Try to forgive me... :D ] After buying the 'Metafont' manual, I'm now playing around with some mp macro programming. The problem in the attached example is, that the 'draw' variants of the [hv]line macro always work with a *fixed* pen size of 1pt (and I can't figure out why). I'm clueless.. Greetings, Peter \setupoutput[pdftex] \setupcolors[state=start] \starttext \startMPinclusions % default unit u:= .5 ; % u:=1 works, u:=2 doesn't pen upen ; upen = makepen(unitsquare scaled u shifted -(.5u,.5u)) ; % width, height, shift-x, shift-y, color def fill_square(expr w,h,a,b,c)= fill unitsquare xyscaled(w*u,h*u) shifted (a*u,b*u) withcolor c enddef ; def fill_hline(expr w,a,b,c)= fill_square(w,u,a,b,c) enddef ; def fill_vline(expr h,a,b,c)= fill_square(u,h,a,b,c) enddef ; % the drawing macros always use a pen of 1pt ; % even with an extra defined pen def draw_hline(expr w,a,b,c)= draw (.5u,.5u)--(w*u-.5u,.5u) withpen upen shifted (a*u,b*u) withcolor c enddef ; def draw_vline(expr h,a,b,c)= draw (.5u,.5u)--(.5u,h*u-.5u) withpen pensquare scaled u shifted (a*u,b*u) withcolor c enddef ; def draw_frame(expr w,h,a,b,c)= draw (.5u,.5u)--(w*u-.5u,.5u)--(w*u-.5u,h*u-.5u)--(.5u,h*u-.5u)--cycle withpen pensquare scaled u shifted (a*u,b*u) withcolor c enddef ; \stopMPinclusions \startMPpage fill_hline(20,5,5,red) ; fill_vline(20,5,5,red) ; draw_vline(20,5,25,blue) ; draw_hline(20,25,5,blue) ; draw_frame(50,50,0,0,black) ; \stopMPpage \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] multipage tables
Thanks Hans, in the point of installing upon a given distribution I am a DAU. On Mon, Oct 16, 2006 at 10:02:40PM +0200, Hans Hagen wrote: updating context is not that much related to debian; - make sure that you have the latest latin modern fonts installed (can be fetched from ctan) I have downloaded a complete directory of lm with ec-lmb10.tfm etc from tug.ctan.org. - then unzip the context zip in some local tree I have downloaded cont-tmf.zip and unzipped it to dirs from bibtex to web2c. - make sure that the stubs are ok (there are stubs in the zip) I don't know stubs. Now, where can I install to with which script? Gerhard -- Gerhard Kugler Psychotherapeut Bensheim (Germany) http://www.psychotherapie-kugler.de ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] U3D and presentation
A solution consists to use \setuptexttexts[][] then \setuptexttexts[\GotoNextPage][] on the next slide to recover the \GotoNextPage behavior Renaud AUBIN a crit: How to inhibit locally the interaction setted by pre-original ? ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] draw fill
Hi Peter, def draw_vline(expr h,a,b,c)= draw (.5u,.5u)--(.5u,h*u-.5u) withpen pensquare scaled u That scales the whole draw statement, just like if you had said: draw (.5u,.5u)--(.5u,h*u-.5u) scaled u withpen pensquare So you need to do it like this: draw (.5u,.5u)--(.5u,h*u-.5u) withpen (pensquare scaled u) Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] draw fill
Taco Hoekwater wrote: Hi Peter, def draw_vline(expr h,a,b,c)= draw (.5u,.5u)--(.5u,h*u-.5u) withpen pensquare scaled u That scales the whole draw statement, just like if you had said: draw (.5u,.5u)--(.5u,h*u-.5u) scaled u withpen pensquare So you need to do it like this: draw (.5u,.5u)--(.5u,h*u-.5u) withpen (pensquare scaled u) Hi Taco, thanks for the answer. Sadly I doesn't work here; all drawn lines are still fixed to 1pt. Even my own defined pen (upen) in draw_hline is completely ignored. Greetings, Peter Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context \setupoutput[pdftex] \setupcolors[state=start] \starttext \startMPinclusions % default unit u:= 2 ; % u:=1 works, u:=2 doesn't pen upen ; upen = makepen(unitsquare scaled u shifted -(.5u,.5u)) ; % width, height, shift-x, shift-y, color def fill_square(expr w,h,a,b,c)= fill unitsquare xyscaled(w*u,h*u) shifted (a*u,b*u) withcolor c enddef ; def fill_hline(expr w,a,b,c)= fill_square(w,u,a,b,c) enddef ; def fill_vline(expr h,a,b,c)= fill_square(u,h,a,b,c) enddef ; % the drawing macros always use a pen of 1pt ; % even with an extra defined pen def draw_hline(expr w,a,b,c)= draw (.5u,.5u)--(w*u-.5u,.5u) withpen upen shifted (a*u,b*u) withcolor c enddef ; def draw_vline(expr h,a,b,c)= draw (.5u,.5u)--(.5u,h*u-.5u) withpen (pensquare scaled u) shifted (a*u,b*u) withcolor c enddef ; def draw_frame(expr w,h,a,b,c)= draw (.5u,.5u)--(w*u-.5u,.5u)--(w*u-.5u,h*u-.5u)--(.5u,h*u-.5u)--cycle withpen (pensquare scaled u) shifted (a*u,b*u) withcolor c enddef ; \stopMPinclusions \startMPpage fill_hline(20,5,5,red) ; fill_vline(20,5,5,red) ; draw_vline(20,5,25,blue) ; draw_hline(20,25,5,blue) ; draw_frame(50,50,0,0,black) ; \stopMPpage \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Context and CD labels
Hi, Has anyone ever tried to use Context to create music CD labels? Any tips on what should I do, pages I can read or results I can expect? Thanks, Maurício ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] multipage tables
Gerhard Kugler wrote: I don't know stubs. Now, where can I install to with which script? \scripts\context\stubs\unix|mswin -- - 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
Re: [NTG-context] Context and CD labels
Am 2006-10-18 um 20:34 schrieb Maurício: Has anyone ever tried to use Context to create music CD labels? Any tips on what should I do, pages I can read or results I can expect? Dou you mean what gets printed on the CD (or a separate label to be stuck on the CD)? Why not use a page of 12x12cm? Or what's your problem? If you mean booklets or inlays, I could send you my setup for backup CDs. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer) ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Context and CD labels
Maurício a écrit : Has anyone ever tried to use Context to create music CD labels? Any tips on what should I do, pages I can read or results I can expect? Hi Mauricio, I have never tried to create CD labels but from my experience you should use overlay... Could you describe the geometry of the labels you use (if you use some) ? I can make an example without it but it can help to provide a full one... I need: - width and height of the page (if non-standard) - number of label per page and position of each label's center relatively to a corner of the page... A 2 min experiment gives: \setuppapersize[A4][A4] \setuppagenumbering[state=stop] \setupcolors[state=start] \startuseMPgraphic{CDShape} draw fullcircle scaled 12cm; draw fullcircle scaled 4cm; \stopuseMPgraphic \starttext \startproperty[hidden] I need some text to get the page... but also need to hide this text ! \stopproperty \definelayer[PageLayer][position=yes] \setupbackgrounds[page][background=PageLayer] \setuplayer[PageLayer][position=no,corner=bottom,height=\paperheight] % sample geometry \setlayer[PageLayer][x=.5\paperwidth,y=.25\paperheight,location=c]{\useMPgraphic{CDShape}} \setlayer[PageLayer][x=.5\paperwidth,y=.75\paperheight,location=c]{\useMPgraphic{CDShape}} \page \startproperty[hidden] I need some text to get the page... but also need to hide this text ! \stopproperty % another sample geometry \setlayer[PageLayer][x=.35\paperwidth,y=.30\paperheight,location=c]{\useMPgraphic{CDShape}} \setlayer[PageLayer][x=.65\paperwidth,y=.70\paperheight,location=c]{\useMPgraphic{CDShape}} \stoptext You can draw, clip, write whatever you want and where you want... The circular shape are just to demonstrate positionning and can help to check... You could use Metafun to do some advanced text manipulation (like shaped texts or followtoken texts...) No more to say... Renaud ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Bug in ctxtools --purge
Aditya Mahajan wrote: Hi Hans, ctxtools --purge file.tex does not behave the same as ctxtools --purge file (no extension). This causes texexec --purge filename to misbehave. With ctxtools --purge test-04.tex I get f:\tmp\context\testctxtools --purge test-04.tex CtxTools | purging temporary files : test-04.tex CtxTools | checking files that match 'test-04.tex-*.*' CtxTools | checking files that match 'test-04.tex.*' CtxTools | removed files : 0 CtxTools | kept files : 0 CtxTools | persistent files : 0 CtxTools | reclaimed bytes : 0 which does not delete the temp files. However with ctxtools --purge test-04 the temp files are deleted. f:\tmp\context\testctxtools --purge test-04 CtxTools | purging temporary files : test-04 CtxTools | checking files that match 'test-04-*.*' CtxTools | checking files that match 'test-04.*' CtxTools | removed : test-04-mpgraph.mp CtxTools | removed : test-04.tui CtxTools | removed : test-04.log CtxTools | removed : test-04.tmp CtxTools | not removed : test-04.tuo CtxTools | removed files : 4 CtxTools | kept files : 1 CtxTools | persistent files : 0 CtxTools | reclaimed bytes : 23960 Shouldn't both the commands be equivalent. As a consequence of this, texexec --purge does not delete temp files. I get CtxTools | purging temporary files : test-04.tex CtxTools | checking files that match 'test-04.tex-*.*' CtxTools | checking files that match 'test-04.tex.*' CtxTools | removed : mpgraph.mp CtxTools | removed files : 1 CtxTools | kept files : 0 CtxTools | persistent files : 0 CtxTools | reclaimed bytes : 6 Only mpgraph.mp is removed. you can play with this (nosuf): at the top: require 'base/file' and in the purge method: report(purging#{if purgeall then ' all' end} temporary files : #{pattern.join(' ')}) pattern.each do |pat| nosuf = File.unsuffixed(pat) globbed = if recurse then **/#{nosuf}-*.* else #{nosuf}-*.* end report(checking files that match '#{globbed}') files = Dir.glob(globbed) globbed = if recurse then **/#{nosuf}.* else #{nosuf}.* end report(checking files that match '#{globbed}') files.push(Dir.glob(globbed)) end - 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
Re: [NTG-context] Context and CD labels
Has anyone ever tried to use Context to create music CD labels? Any tips on what should I do, pages I can read or results I can expect? I have never tried to create CD labels but from my experience you should use overlay... Could you describe the geometry of the labels you use (if you use some) ? I don't have the exact dimenstions. You can check it here (Open Office document): www.pimaco.com.br/files/gabaritos/Gabarito_CDpply_CARTA.sxw I can make an example without it but it can help to provide a full one... I need: - width and height of the page (if non-standard) - number of label per page and position of each label's center relatively to a corner of the page... (...) You can draw, clip, write whatever you want and where you want... The circular shape are just to demonstrate positionning and can help to check... You could use Metafun to do some advanced text manipulation (like shaped texts or followtoken texts...) I will learn Metafun right now. Do you think I can get Context to write a music list in a way that the text fits automatically into the label? I would like to create a standard template for labels so that I could change only the music list and title. That list could be as small as 3 songs or as big as 30 songs organized into sections. Maurício ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context