Re: [NTG-context] run a ruby script and use the standard output ???
Renaud AUBIN wrote: Taco Hoekwater a écrit : And all you need now is the latest pdftex -) http://sarovar.org/project/showfiles.php?group_id=106release_id=752 Taco Is it normal that pdfetex.pool is no more built ? Yes. There is now only one executable, pdftex. It contains all code that was previously in pdfetex and the `bare' pdftex is gone. Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Problem with ConTeXt installation
Hi, Looks like your update went fine excep that you have an old format file still on your disk: FatalError : Your format does not match the base files! Context source version used to generate cont-en.fmt: FormatVersion : 2006.07.14 12:08 Current (runtime) source version: FilesVersion: 2006.09.28 22:43 Search the stale cont-en.fmt and delete it. Greetings, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bug?: interaction between columns and background
[ConTeXt on contextgarden.net] Hey! Wait a minute! I was hoping that you would understand that it was only a joke (didn't it sound ironic enough?). It is definitely *NOT* Patrick's fault, but I needed some sort of excuse ;) I did take it as a joke, but seriously: if any user of the live ConTeXt would like to see some changes, please tell me. I know that running the installer more often is nothing major, but just in case anybody misses a special feature... I can't promise that it would be done right away, but I'd write it down and implement it when I find some time. Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Problem with ConTeXt installation
Search for the stale cont-en.fmt and delete it. Right -- most likely produced by fmtutil before you commented out the automatic regeneration of context formats. Same problem happens with other Unix installations, e.g. I got bit a few times on Debian and Ubuntu. Here's one way to find the cont-en.fmt that you are using: $ kpsewhich -engine=pdfetex cont-en.fmt /home/sanjoy/.texmf-var/web2c/pdfetex/cont-en.fmt (when pdfetex finishes turning into pdftex, as in the latest pdftex releases, the engine line should I guess change to pdftex) Then you can look at it's date and make sure it's the one you just generated. kpsewhere does a more general tex path search, which looks in each TEXMF tree (kpsewhich tells you only the first one it finds): $ kpsewhere -engine=pdfetex cont-en.fmt /home/sanjoy/.texmf-var/web2c/pdfetex/cont-en.fmt -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] btex..etex fails in reusableMPgraphic (2006.09.28 beta)
btex.tex === \starttext \startreusableMPgraphic{fig} label(btex in b/e tex etex, origin); \stopreusableMPgraphic outside btex..etex\quad \reuseMPgraphic{fig} \stoptext works here Hmm, it works on the garden as well. With more testing I found that it fails when I use \runMPTEXgraphicstrue (set in my cont-sys.tex), but works when that parameter is false. Just tested it again, and I think I had it backwards. This fails (2006.09.28 22:43 beta): === \runMPgraphicstrue \runMPTEXgraphicsfalse \starttext \startreusableMPgraphic{fig} label(btex sun etex, origin); \stopreusableMPgraphic \reuseMPgraphic{fig} \stoptext === This works: === \runMPgraphicstrue \runMPTEXgraphicstrue \starttext \startreusableMPgraphic{fig} label(btex sun etex, origin); \stopreusableMPgraphic \reuseMPgraphic{fig} \stoptext === Should one always turn on runMPTEXgraphics along with runMPgraphics? Or just give up on btex..etex and use \sometxt, which works fine with either setting of runMPTEXgraphics? -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] MPenvironment \def gives Parameters must be numbered consecutively
never try to do tricky stuff like definitions inside MPenvironement, because it is parsed and changed slightly. I'm learning that lesson too. Another one: don't use btex..etex instead use \sometxt. So I now try to use the MPenvironment only for font and size switching (e.g. if I want the figures to be in a smaller font). I wikified a small example of converting to \sometxt: http://wiki.contextgarden.net/Mpgraphic#startMPenvironment. It's probably not in the right place on the wiki though. \def\a{abc} \starttext \startMPcode label(\sometxt{\a},origin); \stopMPcode \stoptext Would that kind of approach satisfy your needs? It would. I've used this sed script to help me convert my standalone metapost files: sed 's/btex (.*) etex/\\sometxt{\1}/' standalone.mp But for the next chapter's figures, I'll write a python script that will do the other transformations: e.g. turn each beginfig into \startstaticMPfigure -- or is it \startstaticMPgraphic? I always have to check, hence I'll put it in a script and have *it* remember. I know that metafun was made for integrating backgrounds and the like, not for standalone figures, so it may seem strange to convert all of one's standalone figures into metafun figures and place them in the .tex source file. But I like having the source for the standalone figures in the same file near their use: it's figure--text integration (one theme of Tufte's books), done in the source file. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] MPenvironment \def gives Parameters must be numbered consecutively
works ok ; maybe i should add that command to the core but anyhow you can wikify it Using btex..etex is becoming complex with all the interactions, so instead I wikified an example of converting from btex..etex to \sometxt -- preaching what I am trying to practice. Instead I'll use the MPenvironment just for font and size switching (e.g. to use a different size for figures than for main text). (i didn't expect users to cook up all kind of commands in environments; when i have to do that, I normally put them in an environment and load that in the mp graphic (since one loads tex files there) I hadn't thought of that. Do you mean something like (which I couldn't get to compile): \starttext \startreusableMPgraphic{fig} \def\hello{hhh} % perhaps in an environment file label(\sometxt{\hello}, origin); \stopreusableMPgraphic \reuseMPgraphic{fig} \stoptext -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] ## in \def in \sometxt fails with static MP figure
Now that \sometxt works with static figures (thanks!), I'm converting from using btex..etex to using \sometxt, to avoid MPenvironments (instead put it in the general .tex environment). But I ran into an error with macro arguments and static figures. Let me know if it's not worth fixing in view of the Mk IV cleanup, and I'll switch to reusable figures (and eventually Linux will support dual core CPUs + suspend to ram, and then I won't notice the processing time much). Here is a small example file: = y.tex \def\2#1#2{\vbox{\halign{##\hfil\cr#1\cr#2\cr}}} \starttext \startstaticMPfigure{fig} label(\sometxt{\2{h}{x}}, origin); \stopstaticMPfigure \usestaticMPfigure[fig] \stoptext = y.tex It produces this texexec.tex (2006.09.28 22:43 beta): texexec.tex = \setupoutput[pdftex] \setupcolors[state=start] \global \loadfontfileoncetrue \starttext \startMPpage beginfig(1); label(\sometxt{\vbox {\halign {##\hfil \cr h\cr x\cr }}}, origin); endfig; \stopMPpage \stoptext texexec.tex = The ## in the expanded argument to \sometxt causes a problem: === texexec.log == ! Only one # is allowed per tab. l.1 \vbox {\halign {## \hfil \cr h\cr x\cr }} \doTeXtext ... \startcurrentcolor \scantokens {#3} \stopcurrentcolor }\global... \dodofiltersometxt ...er \TeXtext \txtcounter {#1} \expandafter \filtersometx... argument ...halign {##\hfil \cr h\cr x\cr }}}, o rigin); endfig; \flushTeXtexts ...llectedmptexts \filtersometxt #1 \sometxt {}\empty \relax \... \writecheckedMPgraphic ...phic \flushTeXtexts {#1} \writeMPgraphic {#1} ... l.9 endfig; \stopMPpage ? === texexec.log == Alas using \def\2#1#2{\vbox{\halign{#\hfil\cr#1\cr#2\cr}}} leads to a different error (illegal parameter number). But using a reusable graphic works: yy.tex = \def\2#1#2{\vbox{\halign{##\hfil\cr#1\cr#2\cr}}} \starttext \startreusableMPgraphic{fig} label(\sometxt{\2{h}{x}}, origin); \stopreusableMPgraphic \reuseMPgraphic{fig} \stoptext yy.tex = -Sanjoy `A society of sheep must in time beget a government of wolves.' -- Bertrand de Jouvenal ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Problem with ConTeXt installation
On Saturday 30 September 2006 09:55, Sanjoy Mahajan wrote: Search for the stale cont-en.fmt and delete it. Right -- most likely produced by fmtutil before you commented out the automatic regeneration of context formats. Same problem happens with other Unix installations, e.g. I got bit a few times on Debian and Ubuntu. Here's one way to find the cont-en.fmt that you are using: $ kpsewhich -engine=pdfetex cont-en.fmt /home/sanjoy/.texmf-var/web2c/pdfetex/cont-en.fmt (when pdfetex finishes turning into pdftex, as in the latest pdftex releases, the engine line should I guess change to pdftex) Then you can look at it's date and make sure it's the one you just generated. kpsewhere does a more general tex path search, which looks in each TEXMF tree (kpsewhich tells you only the first one it finds): $ kpsewhere -engine=pdfetex cont-en.fmt /home/sanjoy/.texmf-var/web2c/pdfetex/cont-en.fmt -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. OK, I regenerated texexec --make en de nl; texexec --make metafun and checked to see what was created: # for f in `kpsewhere -engine=pdfetex cont-en.fmt`; do ls -l ${f}; done -rw-r--r-- 1 root root 6642152 Sep 30 16:04 /root/.texmf-var/web2c/pdfetex/cont-en.fmt -rw-r--r-- 1 root root 6562550 Sep 29 15:21 /var/lib/texmf/web2c/cont-en.fmt -rw-r--r-- 1 root root 6562550 Sep 29 15:21 /var/lib/texmf/web2c/cont-en.fmt -rw-r--r-- 1 root root 6562550 Sep 29 15:21 /var/lib/texmf/web2c/cont-en.fmt So, today (Sept 30) /root/.texmf-var/web2c/pdfetex/cont-en.fmt was created. So I simply copied /root/.texmf-var/web2c/pdfetex/* /var/lib/texmf/web2c/ texexec new.tex seems to run OK now, without error. I'll investigate further. THANKS. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Problem with ConTeXt installation
So I simply copied /root/.texmf-var/web2c/pdfetex/* /var/lib/texmf/web2c/ texexec new.tex seems to run OK now, without error. I'll investigate further. You run texexec as root, I'm guessing, so that the formats will be visible to all users. However, that means they go into root's .texmf-var/ directory because the TEXFORMATS kpse variable contains the home-directory .texmf-var before /var/lib/texmf. Here's how to check: $ kpsewhich --expand-path='$TEXFORMATS' .:/home/sanjoy/.texmf-var/web2c:/home/sanjoy/texmf/web2c:/var/lib/texmf/web2c:/usr/local/share/texmf/web2c:/usr/share/texmf/web2c:/usr/share/texmf-tetex/web2c Yup, ~/.texmf-var/web2c comes first. That's due to these lines in /etc/texmf/texmf.cnf, at least on my Ubuntu (teTeX 3.0) system: TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFMAIN,!!$TEXMFDIST} TEXFORMATS = .;$TEXMF/web2c/{$engine,} The TEXMFVAR is short for $HOME/.texmf-var and is what means the formats go in /root/.texmf-var/. So, you need to change TEXFORMATS for the texexec run, telling it to place them in /var/lib/texmf: # TEXFORMATS='/var/lib/texmf/web2c/{$engine,}' texexec --make --all Or slightly more general, in case TEXMFSYSVAR changes someday from /var/lib/texmf (note all the horrid quoting): # TEXFORMATS=`kpsewhich --expand-path='$TEXMFSYSVAR'`'/web2c/{$engine,}' \ texexec --make --all I just tried it as root, and it seemed to work -- I got brand-new formats in /var/lib/texmf/web2c/pdfetex: # ls /var/lib/texmf/web2c/pdfetex/*.fmt /var/lib/texmf/web2c/pdfetex/cont-nl.fmt /var/lib/texmf/web2c/pdfetex/mptopdf.fmt /var/lib/texmf/web2c/pdfetex/cont-en.fmt # for f in `kpsewhere -engine=pdfetex cont-en.fmt`; do ls -l ${f}; done Or slightly simpler (using -U to preserve the order produced by kpsewhere): # ls -lU `kpsewhere -engine=pdfetex cont-en.fmt` or # kpsewhere -engine=pdfetex cont-en.fmt | xargs ls -Ul -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context