Re: [NTG-context] texexec
On Fri, 5 May 2006, Hans Hagen wrote: > Hi, > > I'd like to make the ruby version of texexec the default. Are there any > strong objections to this? Is ruby stable with respect to system calls? Is the behaviour consistent on Linux and Windows? Are there active Ruby users on the list who can comment on this? I have debugged my recent failure of metapost graphics to using one-click installer (RC2) for windows. From tex.rb report(command) if getvariable('verbose') ok = system(command) if ok && File.appended(mptex, "\\end\n") then This is failing on my system. Can others using windows test this. 1. Create a file called mp-test-01.mp mp-test-01.mp beginfig(1) label(btex This is a test etex, origin) endfig; end -- 2. Create a file called test.rb ---test.rb- def test(command) puts command puts Kernel.system(command) puts $? puts "---" end test("mpto mp-test-01.mp") test("mpto mp-test-01.mp > mp-test-01-test.tex") - 3. Go to cmd.exe and source setuptex.bat. 4. What is the output of ruby --version ruby test.rb I get. F:\tmp\cont-test\test>ruby --version ruby 1.8.4 (2005-12-24) [i386-mswin32] F:\tmp\cont-test\test>ruby test.rb mpto mp-test-01.mp \gdef\mpxshipout{\shipout\hbox\bgroup \setbox0=\hbox\bgroup} \gdef\stopmpxshipout{\egroup \dimen0=\ht0 \advance\dimen0\dp0 \dimen1=\ht0 \dimen2=\dp0 \setbox0=\hbox\bgroup \box0 \ifnum\dimen0>0 \vrule width1sp height\dimen1 depth\dimen2 \else \vrule width1sp height1sp depth0sp\relax \fi\egroup \ht0=0pt \dp0=0pt \box0 \egroup} \mpxshipout% line 2 mp-test-01.mp This is a test\stopmpxshipout \end{document} true 0 --- mpto mp-test-01.mp > mp-test-01-test.tex false 0 --- Notice that the second test is failing. So, in tex.rb, the system command fails and I do not get mp-test-01-test.tex file! Can anyone else using one-click installer for ruby on windows confirm this? Thanks, Aditya -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Description nesting
On Sat, 06 May 2006 10:30:24 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote: > nico wrote: >> Hello, >> >> Is there a way to nest some descriptions, where the nested descriptions >> respect the enclosing indentation? >> > btw, we need some test files for descriptions in the test-suite I've added two tests under core-des.tex/, one about basic combination of location and width options, the other about the footnotes. Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Float caption feature request
On 5/5/06, Hans Hagen wrote: > \placefigure > {\select{caption}{zapf}{\input zapf \relax}} > {} > > \stoptext > > i'll add selectors to the core Very nice feature! What about \select[caption]{zapf}{\input zapf \relax} syntax instead? (You're the boss and the designer, but square brackets seem more consistent with other ConTeXt commands; at least to me.) Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Footnotes lost in description terms
On Sat, 06 May 2006 09:51:38 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote: > nico wrote: >> Hello, >> >> When some footnotes are put in description terms, their number appears >> in >> the terms but their text don't appear at the bottom of the page. Is it a >> known limitation? >> > of boxed stuff, indeed, so we need to postpone and flush Thanks, it works fine. But as a side effect (not introduced by the patch) it seems that putting footnotes in a term sets a fixed width to this term: in the example the term wraps, even if I set width=broad in the description definition. If the term does not contain a footnote, it is not wrapped. Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Description nesting
On Sat, 06 May 2006 10:29:56 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote: > nico wrote: >> Hello, >> >> Is there a way to nest some descriptions, where the nested descriptions >> respect the enclosing indentation? >> > you can play with this patch Ok, it works fine, thanks! It also makes the indentation of a hanging description put in an itemize more consistent. BTW, I wonder if it should not be also applied to location=left. Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] typing midaligned
On Sat, 6 May 2006, Hans Hagen wrote: > you mean that you want centered verbatim? Yes! A very nice solution would be: \starttyping[location=middle] or \setuptyping[location=middle] Cheers, Peter -- http://pmrb.free.fr/contact/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] ConTeXt + MetaUML
Hi all, Ovidiu Gheorghies has sent to me an intermediate-release yesterday, I'll test it and if same problems occur I'll try to modify the metauml structure by myself in interaction with Ovidiu (according th Hans's advice). I'll do that as soon as I have the time... ;) Cheers, Renaud Hans Hagen a écrit : Renaud AUBIN wrote: Hi Hans, The example with clearboxes's crash: this is probably due to the fact that clearboxes hooks into endfig \setupoutput[pdftex] \starttext \startMPinclusions input boxes; \stopMPinclusions \startuseMPgraphic{my_uml_figure} input metauml; Class.A("Point") ("+x: int", "+y: int") (); Class.B("Circle") ("radius: int") ("+getRadius(): int", "+setRadius(r: int):void"); topToBottom(45)(A, B); drawObjects(A, B); clink(aggregationUni)(A, B); \stopuseMPgraphic \placefigure[here]{none}{\useMPgraphic{my_uml_figure}} \stoptext this only works when in boxes.mp, we have: extra_beginfig := extra_beginfig & "boxjoin();save pic_,sproc_,pproc_;def clearboxes=enddef;"; extra_endfig := extra_endfig & " clearboxes"; (space added before clearboxes in string) (maybe i should clean up boxes.mp and preload that in metafun if only i know what it's meant for) i suggest that you contact the author of metauml: - rename the util_* files into metauml_util_* in order to prevent clashes with other util_* files - load all files into the main file, so that you get rid of the redundant file reads (loading quits when the files are already loaded,but best do some testing before they are input) - provide a metauml_preload.mp file that preloads e.g. boxes.mp so that you can do \startMPinclusions input metauml_preload; \stopMPinclusions \startuseMPgraphic{my_uml_figure} input metauml; \stopuseMPgraphic - provide "load_metauml" that loads once only, so that you can do \startMPinclusions input metauml_preload; \stopMPinclusions \startuseMPgraphic{my_uml_figure} load_metauml; \stopuseMPgraphic \startuseMPgraphic{my_second_uml_figure} load_metauml; \stopuseMPgraphic and get only one load when you collect graphics instead of runtime processing Hans - 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 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] typing midaligned
Taco Hoekwater wrote: > Peter M�nster wrote: > >> Hello, >> such things are really easy and straightforward with LaTeX (parbox and >> minipage), but with ConTeXt I have still a lot of difficulties. This is >> what I do to align some typing in the middle: >> >> \starttext >> \input tufte >> >> \setuptyping[before=\vskip-\lineheight,after=\vskip-0.13\lineheight] >> \startalignment[middle] >> \dontleavehmode >> \framed[align=lohi,frame=off]{% >> \starttyping >> bla bla bla >> bla bla bla bla bla bla bla bla bla >> \stoptyping >> } >> \stopalignment >> \input tufte >> \stoptext >> >> The result is correct, but can't this be done much easier? >> > > I've been staring at this for a while now. I would have expected > this to work: > > \setuptyping > [before={\startframedtext > [width=fit,align=lohi,frame=off,location=middle]}, > after={\stopframedtext}] > \starttyping > bla bla bla > bla bla bla bla bla bla bla bla bla > \stoptyping > > but it doesn't. > you mean that you want centered verbatim? - 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] Description nesting
nico wrote: > Hello, > > Is there a way to nest some descriptions, where the nested descriptions > respect the enclosing indentation? > btw, we need some test files for descriptions in the test-suite Hans - 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] Description nesting
nico wrote: > Hello, > > Is there a way to nest some descriptions, where the nested descriptions > respect the enclosing indentation? > > Funnily the wiki speaks about the subject > (http://wiki.contextgarden.net/Description) but doesn't give any solution > (btw, the given solution to have several paragraphs in a description looks > obsolete since \start \stop works pretty well). > you can play with this patch \setvalue{@@description\v!hanging}[#1]#2% {\@@dostartdescription[#1]{\def\\{\crlf}}{#2}% % adds \c!margin to \leftskip \noindent\ignorespaces \advance\leftskip -\leftskipadaption \relax \ifdim\leftskipadaption=\zeropoint \leftskipadaption1.5em % just some default \ifnum\insidedefinition=\plusone \ifdim\leftskip>\zeropoint \relax \leftskipadaption\leftskip \fi \fi \fi \ifnum\insidedefinition>\zerocount \advance\leftskip \leftskipadaption \fi \hskip-\leftskipadaption \ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox \kern\ifdim\!!widthb=\zeropoint .75em\else\!!widthb\fi \ignorespaces \@@dodescription} > Here is an example that I would like to see working: > > \definedescription[descr][ >headstyle=bold,style=normal,align=left,location=hanging, >width=broad,margin=1cm] > > \setupwhitespace[medium] > > \starttext > > \startdescr{Para} >This is a shorter item label, and some text that talks about it. >The text is wrapped into a paragraph, with successive lines indented. > >This is another paragraph under the "Para" item. > >\startdescr{SubPara1} >This is a shorter item label, and some text that talks about it. >The text is wrapped into a paragraph, with successive lines indented. >\stopdescr >\startdescr{SubPara2} >This is a shorter item label, and some text that talks about it. >The text is wrapped into a paragraph, with successive lines indented. >\stopdescr > \stopdescr > > \stoptext > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- - 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] Footnotes lost in description terms
nico wrote: > Hello, > > When some footnotes are put in description terms, their number appears in > the terms but their text don't appear at the bottom of the page. Is it a > known limitation? > of boxed stuff, indeed, so we need to postpone and flush \def\@@makedescription#1% in core-des.tex {\postponefootnotes % added, we assume grouped usage \def\currentdescription{#1}% \executeifdefined {@@description\descriptionparameter\c!location} {\getvalue{@@description\v!left}}} this gives me 7 footnotes > Here is an example: > > \definedescription[descr][ >headstyle=bold,style=normal,align=left,location=hanging, >width=broad,margin=1cm] > > \setupwhitespace[medium] > > \starttext > > Here is a footnote\footnote{In a simple paragraph}. > > \startdescr{This\footnote{A footnote} term contains\footnote{Another one} a > footnote} > This is a shorter item label, and some text\footnote{What about this?} > that talks about it. > The text is wrapped into a paragraph, with successive lines indented. > \stopdescr > > \startdescr{This\footnote{More footnotes} term contains\footnote{Another > again} a > footnote} > This is a shorter item label, and some text that talks about it. > The text is wrapped into a paragraph, with successive lines indented. > \stopdescr > > Here is a footnote\footnote{After the descriptions}. > > \stoptext > > Regards, > BG > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- - 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] typing midaligned
Peter Münster wrote: > Hello, > such things are really easy and straightforward with LaTeX (parbox and > minipage), but with ConTeXt I have still a lot of difficulties. This is > what I do to align some typing in the middle: > > \starttext > \input tufte > > \setuptyping[before=\vskip-\lineheight,after=\vskip-0.13\lineheight] > \startalignment[middle] > \dontleavehmode > \framed[align=lohi,frame=off]{% > \starttyping > bla bla bla > bla bla bla bla bla bla bla bla bla > \stoptyping > } > \stopalignment > \input tufte > \stoptext > > The result is correct, but can't this be done much easier? I've been staring at this for a while now. I would have expected this to work: \setuptyping [before={\startframedtext [width=fit,align=lohi,frame=off,location=middle]}, after={\stopframedtext}] \starttyping bla bla bla bla bla bla bla bla bla bla bla bla \stoptyping but it doesn't. Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context