[NTG-context] TABLE 'last line' tag?
Hello, When formating tables the first row (top of the header) is easily formated by using for example: \setupTABLE[row][1][rulethickness=0.90pt,topframe=on] I was wondering whether there's an equivalent for specifically addressing the LAST row in a table? Something along the lines of \setupTABLE[row][last][rulethickness=0.90pt,topframe=on] \setupTABLE[row][-1][rulethickness=0.90pt,topframe=on]%python-like which both don't work ... Thanks for any hint, Joh ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] TABLE: 'distance' override?
Hello, In my quest for tables similar to what the 'booktabs' package in LaTeX produces, I have run into a problem: something like '\bTABLE[distance=7.5pt]' will give me the sought for gaps in horizontal lines, but I have trouble implementing an uninterrupted topframe for the first and bottomframe for the last row. Is there any way of overriding the 'distance' parameter locally, so that for example the topframe of the first (header) row is uninterrupted, while the bottomframe comes with the 'distance' dictated gaps? For clarification see the attached file. While the gaps are desired for 'bottomframe' of the header row(s), the 'topframe' should be continuous. It would be even more marvelous if I could modify bottomframe- and topframe-rule thickness independently ... A recent proposal on this list to achieve the desired effect involved putting the whole table into a frame and displaying it's top- and bottomframe. However, that doesn't work for tables to be split over multiple pages and I'm hunting for the most generic of all mechanisms ... Thanks for any thoughts on this, Joh\setupcaption[table][location=top] % Fixing multipage table according to Hans Hagen: \unprotect % in core-ntb : we check the flag \def\splittblbox#1% {\ifinsidesplitfloat \donetrue \else\ifinsidefloat \donefalse \else \donetrue \fi\fi \ifdone \executeifdefined{splittblbox\tbltblsplitmethod}\splittblboxa{#1}% \else \notsplittblbox{#1}% \fi} % in page-flt : we add a flag \newif\ifinsidesplitfloat % will become chardef \def\dosplitfloat[#1]#2% nog dubbele refs {\ifinsidecolumns% tzt ook nog figuren splitten % not yet supported \else \bgroup \insidefloattrue \insidesplitfloattrue \getparameters[\??si][#1]% \resetnumber[\??si]% \def\floatcaptionsuffix{\convertednumber[\??si]}% \TABLEcaptionheight\@@silines\lineheight % brrr \simplifypagebreak % \page becomes \goodbreak \dowithnextbox {\forgetall \dontcomplain \doloop {\setbox2\vsplit\nextbox to \lineheight \setbox2\vbox{\unvbox2} \ifdim\ht2\lineheight \incrementnumber[\??si]% \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint \let\floatcaptionsuffix\empty \fi \fi \bgroup #2{\unvbox2} \egroup \ifdim\nextboxht\zeropoint \page \decrementnumber[\floatcaptionnumber]% \fi \fi \ifdim\nextboxht\zeropoint\else \expandafter\exitloop \fi}% \egroup} \vbox \fi} \protect % beware: you need to set the splitmethod to b (boxed split) \defineXMLnested [splittable] { \defineXMLsave[caption] \defineXMLsave[header] \defineXMLsave[body] \defineXMLsave[footer] } { \splitfloat {\placetable[\XMLpar{table}{location}{here}][\XMLpar{table}{label}{unknown}]{\XMLflush{caption}}} { \setupTABLE[row][1][rulethickness=0.90pt,topframe=on] \setupTABLE[row][-1][rulethickness=0.90pt,bottomframe=on] \bTABLE[frame=off,split=repeat,splitmethod=b,distance=7.5pt,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}] \bTABLEhead\XMLflush{header}\eTABLEhead \bTABLEbody\XMLflush{body}\eTABLEbody \bTABLEfoot\XMLflush{footer}\eTABLEfoot \eTABLE } } \defineXMLnested [tr] [bottomframe=off,rulethickness=0.3pt] {\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}} {\eTR} \defineXMLnested [td] [rows=1,cols=1] {\expanded{\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}} {\par\eTD} \starttext \startXMLdata splittable caption F FF F F F F FF FF FFF FFF FF F FF FFF FF FF FFF FF FFF FFF F FFF F FF F F FF F FFF FFF F F FFF F FF F FFF FFF FFF F FF FF FFF F FFF FF F FFF FFF F FFF FF F. /caption header tr bottomframe=ontd rows=2YYY/tdtd cols=3YYY/tdtd rows=2YYY/tdtd rows=2YYY/tdtd rows=2YYY/td/trtr bottomframe=ontdYYY/tdtdYYY/tdtdYYY/td/tr /header body trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr
Re: [NTG-context] TABLE 'last line' tag?
On Wed, 19 Apr 2006 22:55:23 -0700, Johannes Graumann [EMAIL PROTECTED] wrote: Hello, When formating tables the first row (top of the header) is easily formated by using for example: \setupTABLE[row][1][rulethickness=0.90pt,topframe=on] I was wondering whether there's an equivalent for specifically addressing the LAST row in a table? Something along the lines of \setupTABLE[row][last][rulethickness=0.90pt,topframe=on] \setupTABLE[row][-1][rulethickness=0.90pt,topframe=on]%python-like which both don't work ... Do you want to do this? \setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on] Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Document Structuring
Hi all, I have a document with the following structure: \starttext \startstandardmakeup \maketitle \stopstandardmakeup \setupheadertexts[][{\sl \getmarking[chapter]}] \startfrontmatter \setuppagenumbering[conversion=romannumerals] \setuppagenumber[number=1] \chapter{Table des matières} \placecontent[alternative=c,criterium=all,interaction=all] \chapter{Liste des figures} \placelistoffigures[alternative=c,criterium=all,interaction=all] \component src/chapters/c_intro \stopfrontmatter \setupheadertexts[][{\sl \getmarking[section]}][{\sl \getmarking[chapter]}][] \startbodymatter \part{test I} \component src/chapters/c_simulation \component src/chapters/c_locomotion_robotique \component src/chapters/c_environnement \part{test II} \component src/chapters/c_locomotion_robot_serpent \component src/chapters/c_tda \part{test III} \component src/chapters/c_modelisation \component src/chapters/c_commande \part{test IV} \component src/chapters/c_conclusion % \component src/chapters/c_chap1 % \component src/chapters/c_chap2 \stopbodymatter \startappendices \chapter{test A} \chapter{test B} \stopappendices \setupheadertexts[][{\sl \getmarking[chapter]}] \startbackmatter \chapter{Bibliographie} \placepublications[criterium=all,interaction=all] \stopbackmatter \stoptext The normal behavior of this structure is for each part to reinit pages, chapters and figures numbering. My questions are: 1. How to change this behavior to obtain a continuous pages, chapters ... numbering ? 2. How to obtain a separated title page at the beginning of each parts (with doublesided mngt)? 3. How to obtain (I,II,III,IV) for part numbering ? Cheers, Renaud ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Document Structuring
On Thu, 20 Apr 2006 08:34:44 +0200, Renaud AUBIN [EMAIL PROTECTED] wrote: Hi all, I have a document with the following structure: [...] The normal behavior of this structure is for each part to reinit pages, chapters and figures numbering. My questions are: 1. How to change this behavior to obtain a continuous pages, chapters ... numbering ? 2. How to obtain a separated title page at the beginning of each parts (with doublesided mngt)? Maybe a start, but don't know about doublesided stuff nor roman numbering: \setuphead[part][header=empty,footer=empty, alternative=middle,placehead=yes,resetnumber=no] Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] help needed with difficult document structure
Karsten Heymann wrote: I cannot expect a ready-to-run solution, but any hints or best context practices would be highly appreciated! In ConTeXt you can define alternative heads and tocs quite easily, but the actual setup depends (of course) on the structure of your input files. Here are some relevant, slighly editted bits from a book I've been working on (it has two tocs with wildly varying formats): Hope this helps, Taco % \definehead[shortchapter][chapter] \definehead[shortpart][part] \definecombinedlist [shortcontent] [shortpart,shortchapter] [level=shortchapter, criterium=all] \setuplist [shortpart,shortchapter] [numbercommand=\gobbleoneargument,pagenumber=no] \def\startchapter[#1]% {\chapter{#1}% \expanded {\writetolist[shortchapter]{\getvalue{section-2number}}{#1}}} \def\stopchapter {\page } \starttext \startfrontmatter \subject{Short Contents} \placecombinedlist[shortcontent] \completecontent \stopfrontmatter \startbodymatter \shortpart{First part} \dorecurse{5} {\expanded{\startchapter[Chapter \recurselevel]} \dorecurse{5}{\section{My section} \input knuth } \stopchapter} \shortpart{Second part} \dorecurse{2} {\expanded{\startchapter[Chapter \recurselevel]} \dorecurse{5}{\input knuth } \stopchapter} \stopbodymatter \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] generating formats with newtexexec
Thomas A. Schmitz wrote: I'm having a slight problem with generating the formats when I use newtexexec. texmfstart newtexexec --make --all Try texmfstart newtexexec --verbose --make --all It should report something like at the end TeXExec | texformat: 20/04/2006 09:23:30 /home/taco/texmf/web2c/pdfetex/cont-en.fmt Cheers, taco But cont-en.fmt is never actually written to the disk. I searched high and low, but the only cont-en.fmt is the old one, written on Apr. 17; the same for cont-en.log. Generating the formats with texexec --make --all works. Is there anything I'm missing? ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] generating formats with newtexexec
Thomas A. Schmitz wrote: I'm having a slight problem with generating the formats when I use newtexexec. texmfstart newtexexec --make --all I get the expected output without any errors, e.g.: ConTeXt ver: 2006.04.18 22:36 fmt: 2006.4.19 int: english mes: english Beginning to dump on file cont-en.fmt (format=cont-en 2006.4.19) 41222 strings of total length 690675 555192 memory locations dumped; current usage is 21843 38558 multiletter control sequences \font\nullfont=nullfont 0 words of font info for 0 preloaded fonts 232 hyphenation exceptions Hyphenation trie of length 98729 has 4367 ops out of 35111 117 for language 37 31 for language 36 13 for language 34 31 for language 33 26 for language 32 21 for language 31 29 for language 30 207 for language 29 220 for language 28 265 for language 27 127 for language 26 60 for language 25 80 for language 24 181 for language 23 224 for language 22 181 for language 21 71 for language 19 248 for language 18 248 for language 17 63 for language 16 63 for language 15 194 for language 14 194 for language 13 194 for language 12 19 for language 11 7 for language 10 7 for language 9 35 for language 8 35 for language 7 235 for language 6 235 for language 5 88 for language 4 88 for language 3 265 for language 2 265 for language 1 No pages of output. Transcript written on cont-en.log. But cont-en.fmt is never actually written to the disk. I searched high and low, but the only cont-en.fmt is the old one, written on Apr. 17; the same for cont-en.log. Generating the formats with texexec --make --all works. Is there anything I'm missing? Don't you get a report saying something like: TeXExec | tex engine path: c:/data/develop/tex/texmf-mswin/web2c/pdfetex TeXExec | mps engine path: c:/data/develop/tex/texmf-mswin/web2c TeXExec | texformat: 18/04/2006 23:38:03 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/cont-cz.fmt TeXExec | texformat: 18/04/2006 23:37:38 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/cont-de.fmt TeXExec | texformat: 20/04/2006 10:52:56 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/cont-en.fmt TeXExec | texformat: 18/04/2006 23:37:51 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/cont-fr.fmt TeXExec | texformat: 18/04/2006 23:38:30 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/cont-it.fmt TeXExec | texformat: 20/04/2006 10:53:08 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/cont-nl.fmt TeXExec | texformat: 18/04/2006 23:38:16 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/cont-ro.fmt TeXExec | texformat: 09/06/2005 02:41:25 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/latex.fmt TeXExec | texformat: 20/04/2006 10:53:09 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/mptopdf.fmt TeXExec | texformat: 09/06/2005 02:16:52 c:/data/develop/tex/texmf-mswin/web2c/pdfetex/plain.fmt TeXExec | mpsformat: 20/04/2006 10:53:11 c:/data/develop/tex/texmf-mswin/web2c/metafun.mem TeXExec | mpsformat: 09/06/2005 02:16:54 c:/data/develop/tex/texmf-mswin/web2c/plain.mem TeXExec | runtime: 28.911 remove old instances in the web2c path! 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] No metapost compilation on files named file.001.tex
nico wrote: Hello, There's something wrong in using (old)texexec/metapost on an input file named file.001.tex (I guess that 001 could be any number): the mp graphic is not generated. If I change file.001.tex to file.tex, it works ok. I attach the test file used if it can be useful. works here; do you use the latest (new)texexec? 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] generating formats with newtexexec
Taco, Hans, ran it again with --verbose. What I get in the end is: TeXExec | tex engine path: .:/Users/tas/texmf/web2c//:!!/usr/local/ teTeX/share//share/texmf-local/web2c//:!!/usr/local/teTeX/share// share/texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c// pdfetex TeXExec | mps engine path: .:/Users/tas/texmf/web2c//:!!/usr/local/ teTeX/share//share/texmf-local/web2c//:!!/usr/local/teTeX/share// share/texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c TeXExec | mpsformat: 20/04/2006 09:59:07 /Users/tas/.:/Users/tas/ texmf/web2c/:!!/usr/local/teTeX/share/share/texmf-local/web2c/:!!/usr/ local/teTeX/share/share/texmf/web2c/:!!/usr/local/teTeX/share/share/ texmf-dist/web2c/pdfetex/.:/Users/tas/texmf/web2c/:!!/usr/local/teTeX/ share/share/texmf-local/web2c/:!!/usr/local/teTeX/share/share/texmf/ web2c/:!!/usr/local/teTeX/share/share/texmf-dist/web2c/metafun.mem TeXExec | runtime: 24.493336 TeXExec | option 'verbose' is set to 'true' TeXExec | option 'mainlanguage' is set to 'standard' TeXExec | option 'bodyfont' is set to 'standard' TeXExec | option 'language' is set to 'all' TeXExec | option 'engine' is set to 'standard' TeXExec | option 'distribution' is set to 'web2c' TeXExec | option 'texformats' is set to 'ennlmptopdf' TeXExec | option 'mpsformats' is set to 'metafun' TeXExec | option 'progname' is set to 'context' TeXExec | option 'interface' is set to 'standard' TeXExec | option 'runs' is set to '8' TeXExec | option 'backend' is set to 'standard' paths : mpost - .:/Users/tas/texmf/web2c//:!!/usr/local/teTeX/ share//share/texmf-local/web2c//:!!/usr/local/teTeX/share//share/ texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c paths : pdfetex - .:/Users/tas/texmf/web2c//:!!/usr/local/teTeX/ share//share/texmf-local/web2c//:!!/usr/local/teTeX/share//share/ texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c//pdfetex But AFAICS, no format file is written to the disk. Thomas On Apr 20, 2006, at 9:53 AM, Hans Hagen wrote: Don't you get a report saying something like: TeXExec | tex engine path: c:/data/develop/tex/texmf-mswin/web2c/ pdfetex TeXExec | mps engine path: c:/data/develop/tex/texmf-mswin/web2c TeXExec | texformat: 18/04/2006 23:38:03 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/cont-cz.fmt TeXExec | texformat: 18/04/2006 23:37:38 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/cont-de.fmt TeXExec | texformat: 20/04/2006 10:52:56 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/cont-en.fmt TeXExec | texformat: 18/04/2006 23:37:51 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/cont-fr.fmt TeXExec | texformat: 18/04/2006 23:38:30 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/cont-it.fmt TeXExec | texformat: 20/04/2006 10:53:08 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/cont-nl.fmt TeXExec | texformat: 18/04/2006 23:38:16 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/cont-ro.fmt TeXExec | texformat: 09/06/2005 02:41:25 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/latex.fmt TeXExec | texformat: 20/04/2006 10:53:09 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/mptopdf.fmt TeXExec | texformat: 09/06/2005 02:16:52 c:/data/develop/tex/ texmf-mswin/web2c/pdfetex/plain.fmt TeXExec | mpsformat: 20/04/2006 10:53:11 c:/data/develop/tex/ texmf-mswin/web2c/metafun.mem TeXExec | mpsformat: 09/06/2005 02:16:54 c:/data/develop/tex/ texmf-mswin/web2c/plain.mem TeXExec | runtime: 28.911 remove old instances in the web2c path! 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] help needed with difficult document structure
Hi Taco Taco Hoekwater wrote: In ConTeXt you can define alternative heads and tocs quite easily, but the actual setup depends (of course) on the structure of your input files. \setuplist [shortpart,shortchapter] [numbercommand=\gobbleoneargument,pagenumber=no] Thanks, that already helps a lot. And as I just found the writetolist command (don't know how I could overlook it yesterday), I think I'll get it right now :) Thanks alot, Karsten signature.asc Description: OpenPGP digital signature ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] generating formats with newtexexec
Thomas A. Schmitz wrote: Taco, Hans, ran it again with --verbose. What I get in the end is: TeXExec | tex engine path: .:/Users/tas/texmf/web2c//:!!/usr/local/ teTeX/share//share/texmf-local/web2c//:!!/usr/local/teTeX/share// share/texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c// pdfetex TeXExec | mps engine path: .:/Users/tas/texmf/web2c//:!!/usr/local/ teTeX/share//share/texmf-local/web2c//:!!/usr/local/teTeX/share// share/texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c TeXExec | mpsformat: 20/04/2006 09:59:07 /Users/tas/.:/Users/tas/ texmf/web2c/:!!/usr/local/teTeX/share/share/texmf-local/web2c/:!!/usr/ local/teTeX/share/share/texmf/web2c/:!!/usr/local/teTeX/share/share/ texmf-dist/web2c/pdfetex/.:/Users/tas/texmf/web2c/:!!/usr/local/teTeX/ share/share/texmf-local/web2c/:!!/usr/local/teTeX/share/share/texmf/ web2c/:!!/usr/local/teTeX/share/share/texmf-dist/web2c/metafun.mem TeXExec | runtime: 24.493336 TeXExec | option 'verbose' is set to 'true' TeXExec | option 'mainlanguage' is set to 'standard' TeXExec | option 'bodyfont' is set to 'standard' TeXExec | option 'language' is set to 'all' TeXExec | option 'engine' is set to 'standard' TeXExec | option 'distribution' is set to 'web2c' TeXExec | option 'texformats' is set to 'ennlmptopdf' TeXExec | option 'mpsformats' is set to 'metafun' TeXExec | option 'progname' is set to 'context' TeXExec | option 'interface' is set to 'standard' TeXExec | option 'runs' is set to '8' TeXExec | option 'backend' is set to 'standard' paths : mpost - .:/Users/tas/texmf/web2c//:!!/usr/local/teTeX/ share//share/texmf-local/web2c//:!!/usr/local/teTeX/share//share/ texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c paths : pdfetex - .:/Users/tas/texmf/web2c//:!!/usr/local/teTeX/ share//share/texmf-local/web2c//:!!/usr/local/teTeX/share//share/ texmf/web2c//:!!/usr/local/teTeX/share//share/texmf-dist/web2c//pdfetex But AFAICS, no format file is written to the disk. hm, maybe some split problem what does kpsewhich -show-path=fmt report? i'll send you a patched kpsefast.rb module for testing 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] feature request: \everytrypass
Dear ConTeXters, I am counting occurence of some macro in the text. Problem is when this macro is inside \bTABLE (and may be somewhere else). Due to try passes the increment is counter is incremented more then once and the result is multiplied. It is possible to implement some \everytrypass in which user can (e.g.) null incrementing? Or there is some another solution? Thanks Vit Minimal example: --- \newcount\C \def\doIncrement{\global\advance\C by1\relax} % \def\nullIncrement{\let\doIncrement\relax} % \appendtoks \nullIncrement to \everytrypass \starttext \bTABLE \bTR\bTD Counter\doIncrement\eTD\eTR \eTABLE \message{ Counter=\the\C }% \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] feature request: \everytrypass
Vit Zyka wrote: Dear ConTeXters, I am counting occurence of some macro in the text. Problem is when this macro is inside \bTABLE (and may be somewhere else). Due to try passes the increment is counter is incremented more then once and the result is multiplied. It is possible to implement some \everytrypass in which user can (e.g.) null incrementing? Or there is some another solution? Thanks Vit Minimal example: --- \newcount\C \def\doIncrement{\global\advance\C by1\relax} \def\doIncrement{\iftrialtypesetting \else\global\advance\C by1\relax\fi}% donno if this works correctly inside a TABLE... Greets, Peter % \def\nullIncrement{\let\doIncrement\relax} % \appendtoks \nullIncrement to \everytrypass \starttext \bTABLE \bTR\bTD Counter\doIncrement\eTD\eTR \eTABLE \message{ Counter=\the\C }% \stoptext ___ 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] emacs lisp for context in AucTeX
Thank you for this. I have written the following much more amateurish emacs lisp code in order to make it easier to enter natural tables and flowcharts. Perhaps someone may find it useful or can suggest improvements. I also added some keybindings for them. Johan (defun context-insert-nattab (rows columns) ;; Johan Sandblom 060128 Insert a TABLE skeleton (interactive nNumber of rows: \nnNumber of columns: \n) (newline) (insert \\bTABLE\n\\setupTABLE\[\]\n) ;; First a TABLE header (insert \\bTABLEhead\n\\bTR\\bTH \\eTH\n) (let ((column 1)) (while ( column (- columns 1)) (insert \\bTH \\eTH\n) (setq column (1+ column (insert \\bTH \\eTH\\eTR\n\\eTABLEhead\n\\bTABLEbody\n) ;; The rows and columns (let ((row 1)) (while (= row rows) (insert \\bTR\\bTD \\eTD\n) ;; The let expression makes sure that each loop starts at the ;; right place (let ((column 1)) (while ( column (- columns 1)) (insert \\bTD \\eTD\n) (setq column (1+ column))) (insert \\bTD \\eTD\\eTR\n) (setq row (1+ row (insert \\eTABLEbody\n\\eTABLE\n))) (defun context-insert-nattab-row (columns) Insert a row in a TABLE (interactive nNumber of columns: \n) (newline) (insert \\bTR\\bTD \\eTD\n) (let ((column 1)) (while ( column (- columns 1)) (insert \\bTD \\eTD\n) (setq column (1+ column))) (insert \\bTD \\eTD\\eTR\n))) (defun context-insert-nattab-column (optional arg) Insert a column in a TABLE (interactive P) (insert \\bTD \\eTD) (indent-for-tab-command) (newline) (backward-char 5)) (defun context-insert-FLOW-cell (n) ;; Johan Sandblom 060128 Insert a FLOWchart cell (interactive nNumber of cells: \n) (newline) (let ((x 1)) (while (= x n) (insert \\startFLOWcell\n) (insert \\name {}\n) (insert \\location {}\n) (insert \\shape {action}\n) (insert \\text {}\n) (insert \\connection[rl]{}\n) (insert \\stopFLOWcell\n) (setq x (1+ x) (add-hook 'ConTeXt-mode-hook '(lambda () (local-set-key \C-c\C-fc 'context-insert-FLOW-cells) (local-set-key \C-cnr 'context-insert-nattab-row) (local-set-key \C-cnc 'context-insert-nattab-column) (local-set-key \C-cnn 'context-insert-nattab) (local-set-key $ 'start-context-math))) 2006/4/20, Sanjoy Mahajan [EMAIL PROTECTED]: I wrote the following emacs lisp for my .emacs and pass it on (no copyright) in case others find it useful. I used variants for a decade with the old tex mode, but just rewrote it for auctex and for context's display math syntax (which deprecates $$...$$). The purpose: 1. If you type {, [, or (, the appropriate right delimiter is inserted for you and the insertion point is placed between them. So I never get unbalanced XYZ errors. If you think it's a misfeature, delete the last three local-set-key's in the TeX-mode-hook. 2. Same feature if you type $ for inline math: you get $insertion point here$. The old tex-mode code would do the same on typing a second $, so you'd get $$insertion point here$$ for tex's display math. The code below will also do that, except in context mode. 3. In context mode, typing the second $ will gobble up preceding whitespace and then insert \placeformula\startformula place insertion point here \stopformula The whitespace-deletion code in start-context-math is a bit pathetic and any improvements are welcome. I couldn't get re-search-backward to work for me because it wouldn't match greedily (so it would gobble up one space but not all of them, for example), so instead it just looks one character at a time and deletes what it should. -Sanjoy (defun insert-balanced (left right) Make a left, right delmiter pair and be poised to type inside of them. (interactive) (insert left) (save-excursion (insert right))) (defun start-context-math () (interactive) (let* ((start (max (point-min) (- (point) 1))) (stop (min (point-max) (+ (point) 1 ; if in the middle of a $$, turn inline math into context display math (if (equal $$ (buffer-substring-no-properties start stop)) (progn (delete-region start stop);get rid of the $$ ; delete preceding spaces, if any (while (and ( (point-min) (point)) (equal (buffer-substring-no-properties (- (point) 1) (point)) )) (backward-delete-char 1)) ; delete a preceding newline, if any (if (equal (buffer-substring-no-properties (- (point) 1) (point)) \n) (backward-delete-char 1)) ; place (insert
[NTG-context] using headnumber
Hi, I have a counter which I want to be incremented after every \section command and reset after every odd \section (don't ask why...). So I tried this approach: \setuphead[section] [command={{{\determineheadnumber[section]} \ifodd{\currentheadnumber[section]}\resetSlideNumber \incrementSlideNumber \else\incrementSlideNumber \fi}] But I'm getting errors: ! Missing number, treated as zero. to be read again { \@@kosectioncommand ...adnumber [section]}\ifodd { \currentheadnumber [sectio... \doplaceheadnumbertext ...ue {\??ko #1\c!command } {\dostartattributes {\??ko... \dodododoconstructhead ...{\finalsectionnumber }}} \writesection {#1} {#3}{#4}... Any pointers? Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] \=d in a table: weird behaviour
On 4/18/06, Hans Hagen wrote: Mojca Miklavec wrote: Hello, It seems that \= and table interact in a strange way in the following example: \starttable[|c|] \NC \=d \NC\NR \stoptable \=d alone works OK. I suggested to use $\rm\overline{d}$ to the one who asked me about it, so it's not really crutial to fix that, I just find it a bit strange. is dmacron a valid char? ... up to mojca Thanks, it works this way, but there's no need to add it to the definitions in the core since it's not even in unicode. (The only strange thing is that \=a (valid char) or \=d work OK in text flow, but not in the table, where faking the character seems to interact in a strange way with the table typesetting.) But this solution is OK for me, thanks again, Mojca \unprotect \startencoding[default] \definecommand Dmacron {\buildtextaccent\textmacron D} \definecommand dmacron {\buildtextaccent\textmacron d} \defineaccent = D {\Dmacron} \defineaccent = d {\dmacron} \stopencoding \starttable[|c|] \NC test \dmacron\ test\NC\NR \stoptable \end ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TABLE 'last line' tag?
nico wrote: Do you want to do this? \setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on] Yes, that's what I want, but it doesn't work for me. Joh ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] General Float Placement Question
Hi all,Is it possible to combine placement attributes when specifying a floating figure or table?\placefloat[.1.][ref,..]{.2.}{.3.} .1. left right here top bottom inleft inright inmargin margin page opposite always force tall .2. text .3. text In my case, I'd like to ensure that figures in a double-sided document appear together, with the first on the left page and the second on the right. What I have reads: \placefigure [90,opposite] [Fig:a] {Figure a caption goes here} \externalfigure[a][width=0.8\makeupheight]} \placefigure [90] [Fig:b] {Figure b caption goes here} \externalfigure[b][width=0.8\makeupheight]}For the first figure, will a location of [90,opposite] ensure a rotated left-page figure? Likewise, is it possible to ensure that the second figure is forced to the next right page? Cheers,Randall ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] using headnumber
Hi Thomas, Thomas A. Schmitz wrote: Hi, I have a counter which I want to be incremented after every \section command and reset after every odd \section (don't ask why...). So I tried this approach: \setuphead[section] [command={{{\determineheadnumber[section]} one opening brace too much If you problem remains, try to add a \expandafter in front of \ifodd. Sometimes it is also helpful to enclose the number expression by \numexpr ... \relax (for conversion). Greets, Peter \ifodd{\currentheadnumber[section]}\resetSlideNumber \incrementSlideNumber \else\incrementSlideNumber \fi}] But I'm getting errors: ! Missing number, treated as zero. to be read again { \@@kosectioncommand ...adnumber [section]}\ifodd { \currentheadnumber [sectio... \doplaceheadnumbertext ...ue {\??ko #1\c!command } {\dostartattributes {\??ko... \dodododoconstructhead ...{\finalsectionnumber }}} \writesection {#1} {#3}{#4}... Any pointers? Thomas ___ 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] emacs lisp for context in AucTeX
Strange that I did not run into these issues, I use GNU emacs as well, version 22.0.50.1, so presumably a difference in the versions. C-c C-f is not bound to TeX-font for me, which is odd. Sorry about the cell/cells issue, I renamed the function just before sending it. Of course it is ok to put it on the wiki (and thank you for doing that), the code can be used and altered entirely according to anyone's taste. Johan 2006/4/20, Sanjoy Mahajan [EMAIL PROTECTED]: Great. Mojca suggested that I wikify my Emacs lisp. It's now at http://wiki.contextgarden.net/Text_editor. Following that method ('a method is a trick I use twice.' --Polya), I've put your elisp there too -- hope that's okay. I removed the (local-set-key $ 'start-context-math) so that your code can stand alone (in case people want one or the other). I had to change a few things at the end (some maybe because I'm using GNU Emacs rather than XEmacs, not sure). Below is the diff and I've attached the resulting version. Most of the trouble was in the keybindings: (local-set-key \C-c\C-fc 'context-insert-FLOW-cells) doesn't work because C-c C-f is already defined as TeX-font, so it can't be a prefix as well. So I chose \C-cnF. Also the function name needed an s at the end. These two: (local-set-key \C-cnn 'context-insert-nattab) (local-set-key \C-cnr 'context-insert-nattab-row) have a related problem, in that \C-cn is not a prefix yet, so \C-cnn and \C-cnr are not valid sequences. So I changed the first use of \C-cn as a prefix to use define-key(), which seems to make a prefix-map automatically as I eventually learnt by inspecting tex.el. So: (define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells) Then the following local-set-key's work. As I say, this is on Emacs 21.4, and the tricks may be different on XEmacs. -Sanjoy --- a/tables.el 2006-04-20 10:46:16.0 -0400 +++ b/tables.el 2006-04-20 10:43:41.0 -0400 @@ -1,5 +1,5 @@ (defun context-insert-nattab (rows columns) - ;; Johan Sandblom 060128 + ;; Johan Sandblom 2006-01-28 Insert a TABLE skeleton (interactive nNumber of rows: \nnNumber of columns: \n) (newline) @@ -44,8 +44,8 @@ (newline) (backward-char 5)) -(defun context-insert-FLOW-cell (n) - ;; Johan Sandblom 060128 +(defun context-insert-FLOW-cells (n) + ;; Johan Sandblom 2006-01-28 Insert a FLOWchart cell (interactive nNumber of cells: \n) (newline) @@ -62,8 +62,7 @@ (add-hook 'ConTeXt-mode-hook '(lambda () - (local-set-key \C-c\C-fc 'context-insert-FLOW-cells) + (define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells) (local-set-key \C-cnr 'context-insert-nattab-row) (local-set-key \C-cnc 'context-insert-nattab-column) - (local-set-key \C-cnn 'context-insert-nattab) -(local-set-key $ 'start-context-math))) + (local-set-key \C-cnn 'context-insert-nattab))) -- Johan Sandblom N8, MRC, Karolinska sjh t +46851776108 17176 Stockholm m +46735521477 Sweden What is wanted is not the will to believe, but the will to find out, which is the exact opposite - Bertrand Russell ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] emacs lisp for context in AucTeX
C-c C-f is not bound to TeX-font for me, which is odd. Maybe an earlier AUCTeX? I have 11.82 (from Debian testing/unstable). -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] emacs lisp for context in AucTeX
Great. Mojca suggested that I wikify my Emacs lisp. It's now at http://wiki.contextgarden.net/Text_editor. Following that method ('a method is a trick I use twice.' --Polya), I've put your elisp there too -- hope that's okay. I removed the (local-set-key $ 'start-context-math) so that your code can stand alone (in case people want one or the other). I had to change a few things at the end (some maybe because I'm using GNU Emacs rather than XEmacs, not sure). Below is the diff and I've attached the resulting version. Most of the trouble was in the keybindings: (local-set-key \C-c\C-fc 'context-insert-FLOW-cells) doesn't work because C-c C-f is already defined as TeX-font, so it can't be a prefix as well. So I chose \C-cnF. Also the function name needed an s at the end. These two: (local-set-key \C-cnn 'context-insert-nattab) (local-set-key \C-cnr 'context-insert-nattab-row) have a related problem, in that \C-cn is not a prefix yet, so \C-cnn and \C-cnr are not valid sequences. So I changed the first use of \C-cn as a prefix to use define-key(), which seems to make a prefix-map automatically as I eventually learnt by inspecting tex.el. So: (define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells) Then the following local-set-key's work. As I say, this is on Emacs 21.4, and the tricks may be different on XEmacs. -Sanjoy --- a/tables.el 2006-04-20 10:46:16.0 -0400 +++ b/tables.el 2006-04-20 10:43:41.0 -0400 @@ -1,5 +1,5 @@ (defun context-insert-nattab (rows columns) - ;; Johan Sandblom 060128 + ;; Johan Sandblom 2006-01-28 Insert a TABLE skeleton (interactive nNumber of rows: \nnNumber of columns: \n) (newline) @@ -44,8 +44,8 @@ (newline) (backward-char 5)) -(defun context-insert-FLOW-cell (n) - ;; Johan Sandblom 060128 +(defun context-insert-FLOW-cells (n) + ;; Johan Sandblom 2006-01-28 Insert a FLOWchart cell (interactive nNumber of cells: \n) (newline) @@ -62,8 +62,7 @@ (add-hook 'ConTeXt-mode-hook '(lambda () - (local-set-key \C-c\C-fc 'context-insert-FLOW-cells) + (define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells) (local-set-key \C-cnr 'context-insert-nattab-row) (local-set-key \C-cnc 'context-insert-nattab-column) - (local-set-key \C-cnn 'context-insert-nattab) -(local-set-key $ 'start-context-math))) + (local-set-key \C-cnn 'context-insert-nattab))) (defun context-insert-nattab (rows columns) ;; Johan Sandblom 2006-01-28 Insert a TABLE skeleton (interactive nNumber of rows: \nnNumber of columns: \n) (newline) (insert \\bTABLE\n\\setupTABLE\[\]\n) ;; First a TABLE header (insert \\bTABLEhead\n\\bTR\\bTH \\eTH\n) (let ((column 1)) (while ( column (- columns 1)) (insert \\bTH \\eTH\n) (setq column (1+ column (insert \\bTH \\eTH\\eTR\n\\eTABLEhead\n\\bTABLEbody\n) ;; The rows and columns (let ((row 1)) (while (= row rows) (insert \\bTR\\bTD \\eTD\n) ;; The let expression makes sure that each loop starts at the ;; right place (let ((column 1)) (while ( column (- columns 1)) (insert \\bTD \\eTD\n) (setq column (1+ column))) (insert \\bTD \\eTD\\eTR\n) (setq row (1+ row (insert \\eTABLEbody\n\\eTABLE\n))) (defun context-insert-nattab-row (columns) Insert a row in a TABLE (interactive nNumber of columns: \n) (newline) (insert \\bTR\\bTD \\eTD\n) (let ((column 1)) (while ( column (- columns 1)) (insert \\bTD \\eTD\n) (setq column (1+ column))) (insert \\bTD \\eTD\\eTR\n))) (defun context-insert-nattab-column (optional arg) Insert a column in a TABLE (interactive P) (insert \\bTD \\eTD) (indent-for-tab-command) (newline) (backward-char 5)) (defun context-insert-FLOW-cells (n) ;; Johan Sandblom 2006-01-28 Insert a FLOWchart cell (interactive nNumber of cells: \n) (newline) (let ((x 1)) (while (= x n) (insert \\startFLOWcell\n) (insert \\name {}\n) (insert \\location {}\n) (insert \\shape {action}\n) (insert \\text {}\n) (insert \\connection[rl]{}\n) (insert \\stopFLOWcell\n) (setq x (1+ x) (add-hook 'ConTeXt-mode-hook '(lambda () (define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells) (local-set-key \C-cnr 'context-insert-nattab-row) (local-set-key \C-cnc 'context-insert-nattab-column) (local-set-key \C-cnn 'context-insert-nattab))) ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] emacs lisp for context in AucTeX
Yes, I have 11.55. I will adopt your suggestion to avoid updating problems. Still, strange though, seems to be an old feature. Do you know a convenient way of finding where these bindings are defined? Perhaps it is a matter of order of precedence differing between the emacs versions. Johan 2006/4/20, Sanjoy Mahajan [EMAIL PROTECTED]: C-c C-f is not bound to TeX-font for me, which is odd. Maybe an earlier AUCTeX? I have 11.82 (from Debian testing/unstable). -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1. -- Johan Sandblom N8, MRC, Karolinska sjh t +46851776108 17176 Stockholm m +46735521477 Sweden What is wanted is not the will to believe, but the will to find out, which is the exact opposite - Bertrand Russell ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] itemize question
Hello, is it normal, that the first margin=5em is not taken into account, but the with \setupitemize it works? Perhaps I misunderstand the second argument of \startitemize. \starttext \startitemize[packed][margin=5em] \item bla \item bla \stopitemize \setupitemize[margin=5em] \startitemize[packed] \item bla \item bla \stopitemize \stoptext 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] \synchronizeoutput does not help here...
On Wed, 19 Apr 2006, Hans Hagen wrote: \starttext \section{bla} \subsection{bla} \startitemize \dorecurse{21}{\item bla} \stopitemize \placetable{a table}{\vbox to 8cm{bla}} \section{bla} \subsection{bla} \synchronizeoutput % this does not help here... \bTABLE[split=repeat] \bTABLEhead\bTR\bTH bla\eTH\eTR\eTABLEhead \bTABLEbody\dorecurse{100}{\bTR\bTD bla\eTD\eTR}\eTABLEbody \eTABLE \stoptext it's a boundary case: when the subsection is placed, the pagetotal is pretty large because the previous page is not yet flushed, so ther eis no room for a table piece you can put something \strut \vskip-\lineheight \nobreak This does not work... before the table, which triggers the otr or say: \setuphead[section][before={\testpage[10]\blank}] Thanks for your fast answer, this works very well! 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] TABLE 'last line' tag?
Johannes Graumann wrote: nico wrote: Do you want to do this? \setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on] \setupTABLE[r][last][] Use only the short forms (r=row and c=column) and it should work. I had to look in an old table, where I had the same problems (I guess). Should be wikified.. Greets, Peter Yes, that's what I want, but it doesn't work for me. Joh ___ 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] using headnumber
Hi Peter, thanks for the help! The additional { must have been a fluke with copy/paste; wasn't in my file. By sheer stubbornness, I tried until I found something that works: command={{\determineheadnumber[section]}\ifodd\currentheadnumber \resetSlideNumber\incrementSlideNumber \else\incrementSlideNumber \fi}] So after \determineheadnumber[something], \currentheadnumber appears to have that value and doesn't take an argument. Thanks, and best Thomas On Apr 20, 2006, at 5:14 PM, Peter Rolf wrote: Hi Thomas, Thomas A. Schmitz wrote: Hi, I have a counter which I want to be incremented after every \section command and reset after every odd \section (don't ask why...). So I tried this approach: \setuphead[section] [command={{{\determineheadnumber[section]} one opening brace too much If you problem remains, try to add a \expandafter in front of \ifodd. Sometimes it is also helpful to enclose the number expression by \numexpr ... \relax (for conversion). Greets, Peter ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] splitting table into columns
Hello, how could I split a table into columns in a clean manner? To show, what I want, I prepared the following example file: - the first page is ok for me, you see just the issue mentioned in http://context.literatesolutions.com/collector/15 - the 5th page looks clean - the 6th page looks also clean but should be balanced - all other pages are not ok... TIA for any hints, Peter \definecolumnset[example][n=3] \starttext \input tufte \section{Try with columns and tables} \startcolumns[n=3] \starttablehead \HL \NC A \NC B \NC\SR \HL \stoptablehead \starttabletail \HL \stoptabletail \starttables[|l|l|] \dorecurse{200}{\NC bla \NC bla \NC\AR} \stoptables \stopcolumns \page \input tufte \section{Try with columnset and tables} \startcolumnset[example] \starttablehead \HL \NC A \NC B \NC\SR \HL \stoptablehead \starttabletail \HL \stoptabletail \starttables[|l|l|] \dorecurse{200}{\NC bla \NC bla \NC\AR} \stoptables \stopcolumnset \page \input tufte \section{Try with columns and TABLE} \startcolumns[n=3] \bTABLE[split=repeat] \bTABLEhead \bTR \bTH A \eTH \bTH B \eTH \eTR \eTABLEhead \bTABLEbody \dorecurse{200}{\bTR \bTD bla \eTD \bTD bla \eTD \eTR} \eTABLEbody \eTABLE \stopcolumns \page \input tufte \section{Try with columnset and TABLE} \startcolumnset[example] \bTABLE[split=repeat] \bTABLEhead \bTR \bTH A \eTH \bTH B \eTH \eTR \eTABLEhead \bTABLEbody \dorecurse{200}{\bTR \bTD bla \eTD \bTD bla \eTD \eTR} \eTABLEbody \eTABLE \stopcolumnset \stoptext -- http://pmrb.free.fr/contact/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Convert Shell files to Batch files?
All, Anyone know how to convert these shell files to batch files for a PC? #! /bin/sh for fig in section*figs.tex; do echo Processing file $fig (first run); texexec $fig nul; echo Processing file $fig (second run); texexec $fig nul; done #! /bin/sh for figlib in figlibSection*.xml; do echo Processing file $figlib; texexec --pdf --use=fig-make --mod=letter $figlib nul; done #! /bin/sh ./makefigs ./makefiglibs ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TABLE 'last line' tag?
On Thu, 20 Apr 2006, Johannes Graumann wrote: nico wrote: Do you want to do this? \setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on] Yes, that's what I want, but it doesn't work for me. Could you send a minimal example? This works here: \starttext \setupTABLE[frame=off] \setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on] \bTABLE \bTR\bTD bla \eTD\bTD bla \eTD\eTR \bTR\bTD bla \eTD\bTD bla \eTD\eTR \eTABLE \stoptext 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] TABLE 'last line' tag?
Peter Münster wrote: On Thu, 20 Apr 2006, Johannes Graumann wrote: nico wrote: Do you want to do this? \setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on] Yes, that's what I want, but it doesn't work for me. Could you send a minimal example? This works here: Same for me. Perhaps it is a grouping issue? This fails: \setupTABLE[frame=off] {\setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on]} \bTABLE ... \eTABLE Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] using headnumber
\determineheadnumber[section] Thanks for mentioning that command, which I'd been looking for. I couldn't quite get it to work, but reading the code near its definition helped me solve another problem. Each chapter has a section for exercises, and each exercise is a subsection with a short title (a few words). e.g. \exercise{Batteries} What is the cost of energy from a 9V battery? From a wall socket (the mains)? I want the exercises to be numbered just by the exercise number (e.g. 7), not for example 1.6.7 (if the exercises are the 6th section in chapter 1). Hence this setup: \definehead[exercise][subsection] \def\choptwo#1.#2.{} \def\processtwo#1{\expandafter\choptwo#1\relax} \setuphead[exercise][style=italic, numbercommand={\processtwo{\currentheadnumber} \gobbleoneargument}] If there's an easier way using \determineheadnumber, I'll be happy to use it instead but the above probably fragile hack works for me. The more obvious try \def\choptwo#1.#2.{} \setuphead[subsection][numbercommand={\expandafter\choptwo}] produced 200 lines of complaint, starting with: ERROR: Argument of \choptwo has an extra }. In the following minimal example of my attempt to use determineheadnumber, the subsection numbers are missing (instead of being the chapter number): \setuphead[subsection] [numbercommand={\determineheadnumber[chapter] \gobbleoneargument}] \starttext \chapter{One} \section{A1} hi \subsection{B1} hi \subsection{B2} hi \stoptext \setuphead[section] [command={{{\determineheadnumber[section]} one opening brace too much That's why I want the editor to insert } for me automatically when I type { (in the earlier thread about AUCTeX/Emacs). -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] using headnumber
So after \determineheadnumber[something], \currentheadnumber appears to have that value and doesn't take an argument. Thanks, that information answers the question I just sent to the list. -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] problem with \setupTABLE[c][odd][bottom=XX]
On Thu, 20 Apr 2006, Peter Münster wrote: as you already know, I use \setupTABLE[bottom=] to attach some tokens to a table-cell: \starttext \setupTABLE[c][odd][bottom=XX] \setupTABLE[c][even][bottom=YY] \bTABLE \bTR\bTD bla \eTD\bTD bla \eTD\bTR \eTABLE \stoptext But here, I get a second line with XX. How could I avoid this? Excuse me, problem solved: \bTR must be \eTR of course... Pardon for the noise... Cheers, Peter -- http://pmrb.free.fr/contact/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Sudden compilation-preventing font issue
I can't figure this out ... happily working on my project and all of a sudden I get this error upon texexecing: bodyfont: 12pt rm is loaded kpathsea: Running mktextfm ec-lmr12 mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ec-lmr12 This is METAFONT, Version 2.71828 (Web2C 7.5.4) kpathsea: Running mktexmf ec-lmr12 ! I can't find file `ec-lmr12'. * ...ljfour; mag:=1; nonstopmode; input ec-lmr12 Please type another input file name ! Emergency stop. * ...ljfour; mag:=1; nonstopmode; input ec-lmr12 Transcript written on mfput.log. grep: ec-lmr12.log: No such file or directory mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ec-lmr12' failed to make ec-lmr12.tfm. kpathsea: Appending font creation commands to missfont.log. ! Font \*12ptrmtf*=ec-lmr12 not loadable: Metric (TFM) file not found. to be read again \relax \xxdododefinefont ...tspec {#4}\newfontidentifier \let \localrelativefontsiz... \fontstrategy ...ame #1\csname #2#3#4#5\endcsname \tryingfontfalse \fi inserted text ...yle \fontalternative \fontsize \fi \iftryingfont \fontstr... \synchronizefont ...strategy \the \fontstrategies \relax \fi \ifskipfontchar... argument \getvalue [EMAIL PROTECTED]@ \fontstyle } \edef \fontstyle {\fontstyle }\if... ... l.1 % interface=en output=pdftex Does anybody have any clue as to what what I screwed up here? Thanks, Joh ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Sudden compilation-preventing font issue
Something broke my lmodern installation on debian unstable ... reinstalling it fixed this. Joh Johannes Graumann wrote: I can't figure this out ... happily working on my project and all of a sudden I get this error upon texexecing: bodyfont: 12pt rm is loaded kpathsea: Running mktextfm ec-lmr12 mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ec-lmr12 This is METAFONT, Version 2.71828 (Web2C 7.5.4) kpathsea: Running mktexmf ec-lmr12 ! I can't find file `ec-lmr12'. * ...ljfour; mag:=1; nonstopmode; input ec-lmr12 Please type another input file name ! Emergency stop. * ...ljfour; mag:=1; nonstopmode; input ec-lmr12 Transcript written on mfput.log. grep: ec-lmr12.log: No such file or directory mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ec-lmr12' failed to make ec-lmr12.tfm. kpathsea: Appending font creation commands to missfont.log. ! Font \*12ptrmtf*=ec-lmr12 not loadable: Metric (TFM) file not found. to be read again \relax \xxdododefinefont ...tspec {#4}\newfontidentifier \let \localrelativefontsiz... \fontstrategy ...ame #1\csname #2#3#4#5\endcsname \tryingfontfalse \fi inserted text ...yle \fontalternative \fontsize \fi \iftryingfont \fontstr... \synchronizefont ...strategy \the \fontstrategies \relax \fi \ifskipfontchar... argument \getvalue [EMAIL PROTECTED]@ \fontstyle } \edef \fontstyle {\fontstyle }\if... ... l.1 % interface=en output=pdftex Does anybody have any clue as to what what I screwed up here? Thanks, Joh ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TABLE 'last line' tag?
Figured out what's going on and would appreciate some advice on the issue: My actual code interprets XML and reads: \defineXMLnested [splittable] { \defineXMLsave[caption] \defineXMLsave[header] \defineXMLsave[body] \defineXMLsave[footer] } { \splitfloat {\placetable[\XMLpar{table}{location}{here}][\XMLpar{table}{label {unknown}]{\XMLflush{caption}}} { \setupTABLE[row][1][rulethickness=0.30pt,topframe=on] \setupTABLE[row][last][rulethickness=0.30pt,bottomframe=on] \bTABLE[frame=off,split=repeat,splitmethod=b,distance=7.5pt,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}] \bTABLEhead\XMLflush{header}\eTABLEhead \bTABLEbody\XMLflush{body}\eTABLEbody \bTABLEfoot\XMLflush{footer}\eTABLEfoot \eTABLE } } \defineXMLnested [tr] [bottomframe=] {\expanded{\bTR[bottomframe=\XMLop{bottomframe}]}} {\eTR} What's happening here is that the the 'tr' bottomframe statement (which I need for formating) overrides the '\setupTABLE[row]' bit. Is there any way to make 'tr's bottomframe-statement be ineffectual in case of being the last raw? Joh ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] syntax for numbercommand and \gobbleoneargument
This minimal file [case 1]: \setuphead[chapter][numbercommand={\gobbleoneargument} ] \starttext \chapter{One} \stoptext fails. Whereas if the first two lines are replaced by [case 2]: \setuphead[chapter][numbercommand={\gobbleoneargument}, ] or [case 3]: \setuphead[chapter][numbercommand={\gobbleoneargument}] then it's fine. Is this a bug or a feature of TeX's tricky spacing rules? And how can I think about ConTeXt's parsing in way that the difference between cases 1 and 2,3 is obvious? The error is (with tex : pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4), context : ver: 2006.04.17 23:14): ERROR: Argument of \gobbleoneargument has an extra }. --- TeX said --- inserted text \par to be read again } \@@kochapternumbercommand -{\gobbleoneargument } argument ...{\??ko \v!chapter \c!numbercommand } {\setstrut \begstrut \exec... \@@ko::normal ...numbercontent \setbox 0\hbox {{#1 }\hskip \numberheaddistanc... \doplaceheadnumbertext ...utes \dostopattributes } }\fi \endheadplacement {#1... ... l.4 \chapter{One} ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] colored, marginal chapter numbers
I get colored chapter text and numbers with: \setupcolors[state=start] \setuphead[chapter][color=blue] \starttext \chapter{One} \stoptext But if I drive the numbers into the left margin, they escape the blue paintbrush (but the text is still blue): \def\sectionnumber#1{\inleft{#1}} \setupcolors[state=start] \setuphead[chapter][numbercolor=blue,color=blue, deepnumbercommand=\sectionnumber] \starttext \chapter{One} \stoptext Is there a recommended way of doing this? I could put blue into the \sectionnumber command, but I'd prefer to specify the color only once (the numbercolor and color specifications were an attempt at overkill). Plus I'd like to understand what's going on. [ConTeXt ver: 2006.04.17 23:14 fmt: 2006.4.19] -Sanjoy ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] colored, marginal chapter numbers
[...] Is there a recommended way of doing this? I could put blue into the \sectionnumber command, but I'd prefer to specify the color only once (the numbercolor and color specifications were an attempt at overkill). Plus I'd like to understand what's going on. I can't test it right now, but did you tried with: \setupcolors[state=start] \setupheads[alternative=inmargin] \setuphead[chapter][color=blue] \starttext \chapter{One} \stoptext Miguel Queirós ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] colored, marginal chapter numbers
On Thu, 20 Apr 2006 15:26:12 -0400, Sanjoy Mahajan [EMAIL PROTECTED] wrote: I get colored chapter text and numbers with: \setupcolors[state=start] \setuphead[chapter][color=blue] \starttext \chapter{One} \stoptext But if I drive the numbers into the left margin, they escape the blue paintbrush (but the text is still blue): \def\sectionnumber#1{\inleft{#1}} \setupcolors[state=start] \setuphead[chapter][numbercolor=blue,color=blue, deepnumbercommand=\sectionnumber] \starttext \chapter{One} \stoptext What about this? \setuphead[chapter][numbercolor=blue,color=blue,alternative=inmargin] Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] syntax for numbercommand and \gobbleoneargument
On Thu, 20 Apr 2006, Sanjoy Mahajan wrote: This minimal file [case 1]: \setuphead[chapter][numbercommand={\gobbleoneargument} ] \starttext \chapter{One} \stoptext fails. Whereas if the first two lines are replaced by [case 2]: \setuphead[chapter][numbercommand={\gobbleoneargument}, ] or [case 3]: \setuphead[chapter][numbercommand={\gobbleoneargument}] then it's fine. Is this a bug or a feature of TeX's tricky spacing rules? And how can I think about ConTeXt's parsing in way that the difference between cases 1 and 2,3 is obvious? A newline is treated in general as a space, so you have unwanted space in case 1. case 2 shows just a ConTeXt feature: space after a , in an option list is gobbled. case 3 is the normal way to write \setup-commands If you really want a newline as in case 1, then consider case 4: \setuphead[chapter][numbercommand={\gobbleoneargument}% ] 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] \=d in a table: weird behaviour
Mojca Miklavec wrote: On 4/18/06, Hans Hagen wrote: Mojca Miklavec wrote: Hello, It seems that \= and table interact in a strange way in the following example: \starttable[|c|] \NC \=d \NC\NR \stoptable \=d alone works OK. I suggested to use $\rm\overline{d}$ to the one who asked me about it, so it's not really crutial to fix that, I just find it a bit strange. is dmacron a valid char? ... up to mojca Thanks, it works this way, but there's no need to add it to the definitions in the core since it's not even in unicode. (The only strange thing is that \=a (valid char) or \=d work OK in text flow, but not in the table, where faking the character seems to interact in a strange way with the table typesetting.) But this solution is OK for me, thanks again, that's because \= is defined as a TaBLe command 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] No metapost compilation on files named file.001.tex
nico wrote: nico wrote: Hello, There's something wrong in using (old)texexec/metapost on an input file named file.001.tex (I guess that 001 could be any number): the mp graphic is not generated. If I change file.001.tex to file.tex, it works ok. I attach the test file used if it can be useful. On Thu, 20 Apr 2006 07:34:49 +0200, Thomas A. Schmitz [EMAIL PROTECTED] wrote: Yes, that's a known problem. Have a look at this thread: http://archive.contextgarden.net/message/ 20050912.154547.be0e5d5c.en.html Does it work with newtexexec? On Thu, 20 Apr 2006 09:57:11 +0200, Hans Hagen [EMAIL PROTECTED] wrote: works here; do you use the latest (new)texexec? The problem appears only for the old perl texexec. Testing with the ruby one does not produce the problem. I guess it's a problem with the OS: in the thread the problem occured on OS X, and I've the trouble on a FreeBSD machine (and OS X is FreeBSD). BTW, sorry for that stupid question, but is there a safe or recommended way to install and use newtexexec? For testing I only did ruby /usr/local/share/texmf-local/scripts/context/ruby/newtexexec.rb try2.001.tex. export TEXMFSTART_MODE=experimental (or adapt the texexec stub) 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] colored, marginal chapter numbers
From:Miguel Queiros [EMAIL PROTECTED] \setupcolors[state=start] \setupheads[alternative=inmargin] \setuphead[chapter][color=blue] \starttext \chapter{One} \stoptext Thanks, that works great. Is there a recommended way of doing this? In ConTeXt the answer, I've found, is always yes. The only problem is finding it! -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] colored, marginal chapter numbers
From:nico [EMAIL PROTECTED] What about this? \setuphead[chapter][numbercolor=blue,color=blue,alternative=inmargin] Thanks, that also works great. -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] syntax for numbercommand and \gobbleoneargument
Thanks for the useful explanations. A newline is treated in general as a space, so you have unwanted space in case 1. Right, but what confused me was that I expected the closing brace in numbercommand={\gobbleoneargument} to bound what numbercommand was set to. If you really want a newline as in case 1, then consider case 4: I'm happy to put the ] on the same line. I had ended up with case 1 by mistake after a bunch of experiments with exercise numbering, and then it took me a while to figure out the change that was causing the error. -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] using headnumber
Thomas A. Schmitz wrote: Hi Peter, thanks for the help! The additional { must have been a fluke with copy/paste; wasn't in my file. By sheer stubbornness, I tried until I found something that works: command={{\determineheadnumber[section]}\ifodd\currentheadnumber \resetSlideNumber\incrementSlideNumber \else\incrementSlideNumber \fi}] why not directly use the slidenumber \def\SlideNumber{1} command={\ifodd\SlideNumber\gdef\SlideNumber{1}\else\doglobal\increment\SlideNumber\fi}} command={\ifodd\SlideNumber\gdef\SlideNumber{1}\else\gdef\SlideNumber{2}\fi}} command={\xdef\SlideNumber{\ifodd\SlideNumber\space1\else2\fi}} \def\SlideNumber{\ifconditional\OddSlide1\else2\fi} command=\ifodd\settrue\OddSlide\else\setfalse\OddSlide\fi etc etc So after \determineheadnumber[something], \currentheadnumber appears to have that value and doesn't take an argument. Thanks, and best Thomas On Apr 20, 2006, at 5:14 PM, Peter Rolf wrote: Hi Thomas, Thomas A. Schmitz wrote: Hi, I have a counter which I want to be incremented after every \section command and reset after every odd \section (don't ask why...). So I tried this approach: \setuphead[section] [command={{{\determineheadnumber[section]} one opening brace too much If you problem remains, try to add a \expandafter in front of \ifodd. Sometimes it is also helpful to enclose the number expression by \numexpr ... \relax (for conversion). Greets, Peter ___ 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] Convert Shell files to Batch files?
David Arnold wrote: All, Anyone know how to convert these shell files to batch files for a PC? #! /bin/sh for fig in section*figs.tex; do echo Processing file $fig (first run); texexec $fig nul; echo Processing file $fig (second run); texexec $fig nul; done why two runs? texexec does this automatically texexec sectionfigs*.tex or use runtools.rb : file: makefigs.rb $job = Job.new Dir.glob(section*figs.tex).each do |file| $job.execute_script(texexec #{file}) end # etc etc runtools makefigs.rb #! /bin/sh for figlib in figlibSection*.xml; do echo Processing file $figlib; texexec --pdf --use=fig-make --mod=letter $figlib nul; done #! /bin/sh ./makefigs ./makefiglibs ___ 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
[NTG-context] Forbidden things in bookmarks
Hello, The heading bookmarks don't accept some macros, like \copyright. In latex there's a handy feature that allows to define the text to put in the TOC and the text in the heading itself, like \chapter[Title in the TOC]{Actual Title in the doc}. Is it possible to do it in context? If not, maybe it could be an interesting feature to add. Example crashing if \placebookmarks used: \setupcolors[state=start] \setupinteraction[state=start] % also generate pdf bookmarks \placebookmarks [chapter,section,subsection] \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \starttext \chapter{A \copyright} a a a \stopbodymatter \stoptext Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] syntax for numbercommand and \gobbleoneargument
Sanjoy Mahajan wrote: This minimal file [case 1]: \setuphead[chapter][numbercommand={\gobbleoneargument} ] \starttext \chapter{One} \stoptext fails. Whereas if the first two lines are replaced by [case 2]: in this case the command is {\gobbleoneargument} and {\gobbleoneargument} {some text} will fail because gobble runs into an } \setuphead[chapter][numbercommand={\gobbleoneargument}, ] in this case the command is {\gobbleoneargument and \gobbleoneargument{some text} work sok or [case 3]: \setuphead[chapter][numbercommand={\gobbleoneargument}] then it's fine. Is this a bug or a feature of TeX's tricky spacing rules? And how can I think about ConTeXt's parsing in way that the difference between cases 1 and 2,3 is obvious? idem it's [key=value] [key=value, nextkey=nextvalue] (spaces are dropped after the comma) so in [key=value ,nextkey=nextvalue] the comma before the , is part of key's value - 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] [Fwd: problems with right bracket in Antykwa Torunska -- fixed]
updates of antikwa are available, see forwarded mail -- - 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 - ---BeginMessage--- The new distribution of Janusz's fonts (under the same version number) can be found at: http://jmn.pl/pliki/AntykwaTorunska-tex-2_05.zip http://jmn.pl/pliki/Kurier-tex-0_94.zip http://jmn.pl/pliki/Iwona-tex-0_94.zip Cheers. -- Jacko ---End Message--- ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] using headnumber
Fascinating, but... The slidenumber needs to be reset according to the criterion whether we're starting an odd or an even section. If anybody's wondering why I want such a bizarre setup: this is the manuscript of my course for the entire term. Every class consists of two lectures = two sections in my manuscript, but because the lectures are back-to-back, I have one pdf presentation for both and want the marks for the slides in my manuscript numbered consecutively for section 1+2, then reset and numbered for 3+4 etc. Btw, I laboriously wrote my own macro to get nice marks for the slides in my manuscripts and then I discovered the \definelabel command... Best Thomas On Apr 20, 2006, at 10:44 PM, Hans Hagen wrote: why not directly use the slidenumber \def\SlideNumber{1} command={\ifodd\SlideNumber\gdef\SlideNumber{1}\else\doglobal \increment\SlideNumber\fi}} command={\ifodd\SlideNumber\gdef\SlideNumber{1}\else\gdef \SlideNumber{2}\fi}} command={\xdef\SlideNumber{\ifodd\SlideNumber\space1\else2\fi}} \def\SlideNumber{\ifconditional\OddSlide1\else2\fi} command=\ifodd\settrue\OddSlide\else\setfalse\OddSlide\fi etc etc ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] feature request: \everytrypass
Vit Zyka wrote: Dear ConTeXters, I am counting occurence of some macro in the text. Problem is when this macro is inside \bTABLE (and may be somewhere else). Due to try passes the increment is counter is incremented more then once and the result is multiplied. \iftrialtypesetting ... \else ... \fi It is possible to implement some \everytrypass in which user can (e.g.) null incrementing? Or there is some another solution? Thanks Vit Minimal example: --- \newcount\C \def\doIncrement{\global\advance\C by1\relax} % \def\nullIncrement{\let\doIncrement\relax} % \appendtoks \nullIncrement to \everytrypass \starttext \bTABLE \bTR\bTD Counter\doIncrement\eTD\eTR \eTABLE \message{ Counter=\the\C }% \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
[NTG-context] footnotes in natural tables
With the following file the footnotes are typeset on top of each other. What am I doing wrong? Johan \starttext \startlocalfootnotes[n=0, location={text, none}] \bTABLE \bTR \bTD Sinuit \eTD \bTD penicillin V \eTD \bTD amoxicillin, pivampicillin, cefalosporin\footnote[cef]{Ej cefadroxil eller cefalexin pga H infl}, doxycyklin, trim-sulfa \eTD \eTR \bTR \bTD Otit \eTD \bTD penicillin V \eTD \bTD amoxicillin, pivampicillin, makrolid\footnote{Endast vid allergi}, cefalosporin\note[cef], trim-sulfa \eTD \eTR \eTABLE\stoplocalfootnotes%} \placelocalfootnotes \stoptext -- Johan Sandblom N8, MRC, Karolinska sjh t +46851776108 17176 Stockholm m +46735521477 Sweden What is wanted is not the will to believe, but the will to find out, which is the exact opposite - Bertrand Russell ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] MathML to PDF conversion
Eugene A. Herman wrote: Pragma: I downloaded your free software that is supposed to enable me to convert my XML files (which include some MathML) to PDF. I cannot find any documentation on how to use these files to do the conversion. (I'm on a Debian Linux network.) Please just give me an example of the Unix command that would convert a file named foo.xml to foo.pdf Thank you for providing this free software! there is a wiki (contextgarden.org) that tells some bits and pieces in order to process xml, you need to make a setup: mydoc.tex == \usemodule[mathml] \defineXMlenvironment [document] {\title{Table of contents} \placelist[chapter,section]} \defineXMLargument [chapter] {\chapter} \defineXMLargument [section] {\section} \starttext \processXMLfilegrouped{whatever.xml} \stoptext whatever.xml = ?xml version='1.0'? document chapterSomething/chapter bla bla mathapplysin/cix/ci/apply/math /document = command = texexec --pdf mydoc.tex One can also make mydoc into a style (in which case the \starttext ... is omitted) and say: texexec --env=mydoc whatever.xml (you can get more info on the context mailing list; there are users there working with mathml) 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] General Float Placement Question
Randall Skelton wrote: Hi all, Is it possible to combine placement attributes when specifying a floating figure or table? \placefloat[.1.][ref,..]{.2.}{.3.} .1. left right here top bottom inleft inright inmargin margin page opposite always force tall .2. text .3. text In my case, I'd like to ensure that figures in a double-sided document appear together, with the first on the left page and the second on the right. What I have reads: \placefigure [90,opposite] [Fig:a] {Figure a caption goes here} \externalfigure[a][width=0.8\makeupheight]} \placefigure [90] [Fig:b] {Figure b caption goes here} \externalfigure[b][width=0.8\makeupheight]} For the first figure, will a location of [90,opposite] ensure a rotated left-page figure? Likewise, is it possible to ensure that the second figure is forced to the next right page? \starttext test \startspread \placefigure [90] [Fig:a] {Figure a caption goes here} {\externalfigure[a][width=0.8\makeupheight]} \placefigure [90] [Fig:b] {Figure b caption goes here} {\externalfigure[b][width=0.8\makeupheight]} \stopspread \stoptext - 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] 2c considerations about win installer
Dear all, I'm using conTeXt to create automatic documentation about sound classification. The idea is that starting from an html file collecting infos about sounds my program can generate some schematic images using R and POV-Ray and to create a conTeXt file including both images and textual information. Now, I'd like to share this work with my students. I'm on macosx, they're typically on win. My program is in python so it's cross-platform, so no problem. Obviously they can annotate sounds, generate images and include them manually in a MS word file. But I'd prefer that they compile the conTeXt file. On two win machines I tried to install conTeXt using the complete package (shipped with Scite: nice). I had always (different) troubles (on each machine) with environment variable (e.g. for Perl): actually I'm not able to run conTeXt. Hacking a bit, eventually asking the list, I think I will solve the problem. But I don't think that my students can do, as I suspect that they probably not even know what is PATH. And I cannot help them on each installation. So, more generally, I was asking myself if it would not be possible (and better) to have an .exe installer as usual happens in win, including Perl, maybe Ruby (+ or- 20 Mb doesn't change too much). Double click, and it set ups all the installation parameters. A completely autonomous installer would allow many people to try, use and get fond conTeXt (and maybe to leave Word) without having to struggle with problems which typically lead people to leave out. It seems to me that a similar installer would be a refinement in the spirit of the actual mswincontext distro. At the end, it's not that far form Gerben's distro on macosx. It does everything for me... Or maybe am I missing something? Just my 2 c Best -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TABLE 'last line' tag?
nico wrote: Why don't you test if the attribute is set before applying it to the TR? You see the problem on the last row, but the fact is that you force the bottomframe clear for every row (which is dirty IMHO). It's not that easy, since the bottomframe - once set - is persistent ... so every row underneath my header (e.g.) will have 'bottomframe=on' set. So if I set the bottomframe to separate header from body, I have to clear it from the next line (at least) in order to keep the body bottomframe free ... and than I run into trouble with the last row, which is body, but where I explicitly WANT the bottomframe. Am I not getting something here? Joh ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context