Re: [NTG-context] Colored labels with MetaPost in MkII
On Fri, Oct 24, 2008 at 2:15 PM, Aditya Mahajan [EMAIL PROTECTED] wrote: On Fri, 24 Oct 2008, Wolfgang Schuster wrote: Hi all, what is the best method to format MetaPost labels in MkII with \doattributes. \startMPenvironment[global] \setupcolors[state=start] \def\labelstyle{bold} \def\labelcolor{red} \stopMPenvironment This gives you only bold label. \starttext \startMPcode label(textext(\doattributes{label}{style}{color}{Label}),origin) ; \stopMPcode \stoptext Tex colors do not work inside textext. Try label(textext(\startcolor[red] red \stopcolor), origin) ; One way to get around this is to use \sometxt. label(\sometxt{\doattributes{label}{style}{color}{Label}},(5cm,0)) ; But then you have to be careful about the differences between \sometxt in MKII and MKIV (which I need to summarize on the wiki). Here is a new example where I can't even use \sometxt. \setupcolors[state=start] \def\labelstyle{bold} \def\labelcolor{red} \starttext \resetMPdrawing \startMPdrawing label(textext(\doattributes{label}{style}{color}{Label}),origin) ; label(\sometxt{\doattributes{label}{style}{color}{Label}},origin) ; \stopMPdrawing \MPdrawingdonetrue \getMPdrawing \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] A problem with itemizations
Dnia Sat, Oct 25, 2008 at 03:42:04PM +0200, Marcin Borkowski napisa#322;(a): Hi, I have a problem with \startitemize ... \stopitemize. Sometimes (I have no idea when, but this effect is fully repeatable!) I get a page break just before a \startitemize. It is nested (second level) and follows one line of another item at the 1st level. It seems that adding [intro] won't help. The problem occurs with [columns,two]; I don't know whether this has any influence - when I change the setup (in the preamble) the page breaks fall in different places, and all my 2nd level itemizations are 2nd level (and I have quite a lot of them). Any ideas? I know that the above is rather vague, but it's difficult to prepare a minimal example etc. So, it took a while, but I got kind of a minimal example: \starttext \startitemize[intro] \dorecurse{12}{% \item \dorecurse{\recurselevel}{This is some intro. }Intro ends here. \startitemize[intro,columns,two] \dorecurse{4}{% \item \dorecurse{1}{This is a test. }End of the test. }% \stopitemize }% \stopitemize \stoptext (This shows the problem in the online ConTeXt.) Also, Hans, do I get it correctly that the itemization code will get rewritten in MkIV? If yes, is there any chance of having unpacked itemizations in 2 and more columns? And any chance of having an explicit column break (or a preference) in multicolumn itemizations? And one more request (not really urgent, but would be nice): if there's an \item followed directly by another \startitemize (possibly two-column), a line break is enforced. Does it have to be? Thanks greets -- Marcin Borkowski (http://mbork.pl) _ __ __ __ _ __ __ __ ## ## ## ## ## ## | \ | / \ | \ / \| \ | / \ | \ / \ | |_/ | | | | | | ||_/ | | | | | | | | ## ## ## ## ## ## | \ | |--| | | |--|| \ | |--| | | |--| | |_/ | | | |__/ | | / |_/ | | | |__/ | | . ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- Marcin Borkowski (http://mbork.pl) Stłumiony głos w końcu wypowie słowo prawdy - otworzą się usta! Prawda - choćby zdeptana - zawsze pozostanie prawdą! Żadna przemoc, chamstwo, kłamstwo nie uczynią z niej ofiary! (Izaiash) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bib module error with context 2008.10.23
Michael Green wrote: I noticed that the modules.contextgarden.net/bib page says you're editing the apa style. Here are two corrections I made. Perhaps they will help. I just uploaded a new version to the garden, with your patches for bibl-apa.tex. Please give it a try: http://modules.contextgarden.net/bib Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Reference to a subitem
2008/10/25 Marcin Borkowski [EMAIL PROTECTED]: Dnia Sat, Oct 25, 2008 at 02:58:24AM +0200, Diego Depaoli napisa#322;(a): 2008/10/23 Wolfgang Schuster [EMAIL PROTECTED]: \def\ItemNumber#1% {\expandafter\doItemNumber#1..\relax} \def\doItemNumber#1.#2.#3\relax {\doifelsenothing{#2} {#1} {#2}} \definereferenceformat[initem][left=\ItemNumber] Since I don't speak that language, someone could explain why this code doesn't work when I put a stopper in subitemization? The standard dot isn't a stopper itself? This code seems to work (approximately) like this: it expands the full reference, which is: number dot number dot something, probably space and selects everything from the first dot up to the second one (w/o the dots themselves). So I consider it to be a bit dirty hack (sorry, Wolfgang;)), in a sense that it is not very flexible. It's just hack at user level, a dirty hack would redefine core macros but this is what I try to avoid. If your stopper is, say ) (and the second one, say, ], so you have references in a strange form like 1)2]), you might want to say something like \def\doItemNumber #1)#2]#3\relax (the space after \doItemNumber is gobbled by TeX, so it might be present here or not, it is a matter of taste only). If you have different stoppers, another approach might be reasonable. I can see two possibilities: 1. Get to know _where_ ConTeXt really keeps the relevant info about labels; if the info about the values (w/o stoppers) is preserved, we are saved, if not, we've got a problem; 2. so in the latter case we have to (?) use this kind of hacky solution, which might be something like this (assuming that \stopper and \stopperr are the first- and second level stoppers respectively): \edef\sometemporarymacroname{% \def\noexpand\doItemNumber ##1\stopper ##2\stopperr ##3\relax {\noexpand\doifelsenothing{##2} {##1} {##2}}% }% \sometemporarymacroname (I'm not sure whether the last percentage sign is needed, but a good rule of thumb is to put them everywhere after closing brace newline, so that the newlines don't get translated into spaces.) You don't need the comment sign at the end of the macro in outer level but you need it for local definitons in other macros if your're in horizontal mode. I'm not sure whether this works, though, *please* check it and tell me (maybe I'm doing some stupid error, please the TeX gurus correct me if yes). I hope this is ok, though, because then it my first post to this list containing actually an _answer_ and not a _question_:))). Thanks to explain my solution. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XML
On Sun, Oct 26, 2008 at 3:05 PM, Johannes Graumann [EMAIL PROTECTED] wrote: This is sending me down the right paths (at least showing me the sign post ;0) - I know I'm a pain in the neck, but the attached minimal (mirroring your proposal with the colored snippet fixed) compiles to to black tests ... What's wrong? Hans used \colored and you use \color. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Load context format at runtime (from luatex)
Hi, I would like to run (if possible) the context format at runtime. In fact, I'd like to create a custom format for my own document and I want my format to inherit ConTeXt (mostly because of utf-8 support). At the beginning of my document, I added: \input format And at the beginning of format.tex, I added: \input context But now, when I execute the document using (pdf)luatex, I get an error in some lua chunk: pdfluatex document.tex This is LuaTeX, Version snapshot-0.25.4-2008091110 (Web2C 7.5.7) (document.tex (format.tex (/usr/share/texmf-dist/tex/context/base/context.tex (/usr/share/texmf-dist/tex/context/base/syst-pln.tex) (/usr/share/texmf-dist/tex/context/base/syst-prm.tex) (/usr/share/texmf-dist/tex/context/base/luat-env.tex ! LuaTeX error [string luas[0]]:1: attempt to call field 'luafilechunk' (a ni l value). \ctxluabyteload ...nvironment.luafilechunk(#1) } \ ...fproductionrun \else \ctxluabyteload {#1}{#2} \fi \global \everyloadluac... l.168 \registerctxluafile{luat-env}{1.001} ? If I use context instead of (pdf)luatex, it seems there is an infinite loop when context.tex is loaded from my format in the file /usr/share/texmf-dist/tex/context/base/syst-prm.tex If I remove the inclusion of context in my format (the \input line) I get another error (but I can't find where it is). The last lines looks like: context document.tex MtxRun | loading configuration for /usr/share/texmf/web2c from /home/mildred/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/trees/f7d1b3c25487ab1e1035aff1c53b90da (./document.tex ConTeXt ver: 2008.05.21 15:21 MKIV fmt: 2008.10.27 int: english/english language : language en is active report utilityfile: not present system : cont-new loaded (/usr/share/texmf-dist/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/usr/share/texmf-dist/tex/context/base/cont-new.mkiv lua: used config path - /usr/share/texmf/web2c/texmf.cnf lua: used cache path - /home/mildred/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028 ) (/usr/share/texmf-dist/tex/context/base/cont-mtx.tex)) system : cont-old loaded (/usr/share/texmf-dist/tex/context/base/cont-old.tex loading: Context Old Macros ) system : cont-fil loaded (/usr/share/texmf-dist/tex/context/base/cont-fil.tex loading: Context File Synonyms ) system : cont-sys.rme loaded (/usr/share/texmf-dist/tex/context/user/cont-sys.rme (/usr/share/texmf-dist/tex/context/base/type-tmf.tex) (/usr/share/texmf-dist/tex/context/base/type-siz.tex) (/usr/share/texmf-dist/tex/context/base/type-otf.tex)) bodyfont : 12pt rm is loaded specials : tex loaded system : document.top loaded (./document.top specials : loading definition file tpd (/usr/share/texmf-dist/tex/context/base/spec-tpd.tex specials : loading definition file fdf (/usr/share/texmf-dist/tex/context/base/spec-fdf.tex (/usr/share/texmf-dist/tex/context/base/spec-fdf.mkiv)) specials : fdf loaded ) specials : fdf loaded ) (./format.tex) ! Missing } inserted. inserted text } to be read again \endgroup \stopitemgroup ...mdepth }\egroup \else \endgroup \global \advance \itemdept... l.28 ? Do you know how I can create my format based on ConTeXt? It doesn't seems that easy :/ And I would prefer not to be dependant from ConTeXt (that is if I want to use another format for my document instead of ConTeXt, I want to be able to do that). And I also would prefer using the generic (pdf)luatex instead of context. Thanks. Mildred -- Mildred Ki'Lya ╭─ mildred593@online.fr ── │ Jabber, GoogleTalk: [EMAIL PROTECTED] │ Site: http://ki.lya.online.fr GPG ID: 9A7D 2E2B │ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Reference to a subitem
2008/10/25 Marcin Borkowski [EMAIL PROTECTED]: Dnia Sat, Oct 25, 2008 at 02:58:24AM +0200, Diego Depaoli napisa#322;(a): This code seems to work (approximately) like this: it expands the full reference, which is: number dot number dot something, probably space and selects everything from the first dot up to the second one (w/o the dots themselves). So I consider it to be a bit dirty hack (sorry, Wolfgang;)), in a sense that it is not very flexible. Thanks for clarification, here I begin to understand If your stopper is, say ) (and the second one, say, ], so you have references in a strange form like 1)2]), you might want to say something like \def\doItemNumber #1)#2]#3\relax ... I tried before posting... doesn't work \edef\sometemporarymacroname{% \def\noexpand\doItemNumber ##1\stopper ##2\stopperr ##3\relax {\noexpand\doifelsenothing{##2} {##1} {##2}}% }% \sometemporarymacroname Here I stop understand and I can't get this code working. Could you give me a full example? I'm not sure whether this works, though, *please* check it and tell me (maybe I'm doing some stupid error, please the TeX gurus correct me if yes). I hope this is ok, though, because then it my first post to this list containing actually an _answer_ and not a _question_:))). This time will never come for me. Cheers -- Diego Depaoli ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Reference to a subitem
Another curiosity... why have such kind of reference since we get more flexibility with \in[item]\in[subitem]? -- Diego Depaoli ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bib module error with context 2008.10.23
Taco Hoekwater wrote: Michael Green wrote: I noticed that the modules.contextgarden.net/bib page says you're editing the apa style. Here are two corrections I made. Perhaps they will help. I just uploaded a new version to the garden, with your patches for bibl-apa.tex. Please give it a try: http://modules.contextgarden.net/bib Best wishes, Taco Thanks! It works fine. I found a different problem with footnotes that I'm pretty sure is unrelated. I'll post a separate message. mjg___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] footnote n=0 error
\setupfootnotes[n=0,columndistance=3em,] seems to cause a problem with context ver: 2008.10.23 When it's commented out, everything is fine. When it is left in, I get the error below. Thanks! mjg ConTeXt ver: 2008.10.23 17:32 MKIV fmt: 2008.10.27 int: english/ english [snip] fonts : resetting map file list {/Volumes/Data/Users/mjg14747/Applications/context/tex/texmf-context/ fonts/map/pdftex/context/original-empty.map} fonts : using map file: original-base {/Volumes/Data/Users/mjg14747/Applications/context/tex/texmf-context/ fonts/map/pdftex/context/original-base.map} fonts : using map file: lm-math {/Volumes/Data/Users/mjg14747/Applications/context/tex/texmf/fonts/map/ dvips/lm/lm-math.map} fonts : using map file: lm-rm {/Volumes/Data/Users/mjg14747/Applications/context/tex/texmf/fonts/map/ dvips/lm/lm-rm.map} fonts : using map file: original-ams-base {/Volumes/Data/Users/mjg14747/Applications/context/tex/texmf-context/ fonts/map/pdftex/context/original-ams-base.map} fonts : using map file: original-ams-euler {/Volumes/Data/Users/mjg14747/Applications/context/tex/texmf-context/ fonts/map/pdftex/context/original-ams-euler.map} fonts : using map file: original-public-lm {/Volumes/Data/Users/mjg14747/Applications/context/tex/texmf-context/ fonts/map/pdftex/context/original-public-lm.map} [1.1] ! Missing } inserted. inserted text } to be read again \unvbox \doplacenoteinserts ...ing \unvcopy \else \unvbox \fi \currentnoteins \or \i... \next3 ...oprocessnotes {\doplacenoteinserts }{#1} \doprocesscommaitem argument \relax footnote, endnote,linenote \doprocesscommalist ...aitem \gobbleoneargument #1 ,]\relax \global \advance ... ... l.120 \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] beta
On 10/27/08, Hans Hagen [EMAIL PROTECTED] wrote: Mehdi Omidali wrote: Thanks Hans, I followed what you said and successfully generated persian interface and now want to test it. How can I compile a file with an specific interface. I tried context --interface=cont-pe file but it compiled the file with en interface. can you send me the files you use (+ a test file) Hans I will send you the files in two days. I am out of town now. Mehdi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Load context format at runtime (from luatex)
Mildred Ki'Lya wrote: Hi, I would like to run (if possible) the context format at runtime. In fact, I'd like to create a custom format for my own document and I want my format to inherit ConTeXt (mostly because of utf-8 support). At the beginning of my document, I added: \input format And at the beginning of format.tex, I added: \input context But now, when I execute the document using (pdf)luatex, I get an error in some lua chunk: you cannot use context this way (at least not currently) pdfluatex document.tex This is LuaTeX, Version snapshot-0.25.4-2008091110 (Web2C 7.5.7) (document.tex (format.tex (/usr/share/texmf-dist/tex/context/base/context.tex (/usr/share/texmf-dist/tex/context/base/syst-pln.tex) (/usr/share/texmf-dist/tex/context/base/syst-prm.tex) (/usr/share/texmf-dist/tex/context/base/luat-env.tex ! LuaTeX error [string luas[0]]:1: attempt to call field 'luafilechunk' (a ni l value). \ctxluabyteload ...nvironment.luafilechunk(#1) } \ ...fproductionrun \else \ctxluabyteload {#1}{#2} \fi \global \everyloadluac... l.168 \registerctxluafile{luat-env}{1.001} ? when making the format, we also make a lua stub file (with code that implements file handling etc) Do you know how I can create my format based on ConTeXt? It doesn't i have no clue what you mean with 'my own format based on context' what you can do is copy cont-en.tex to cont-my.tex and load additional stuff before dumping (as long as you don't preload fonts in mkiv since they are not stored in the format) seems that easy :/ And I would prefer not to be dependant from ConTeXt (that is if I want to use another format for my document instead of ConTeXt, I want to be able to do that). And I also would prefer using the generic (pdf)luatex instead of context. then you have to roll out your own code, (i.e why bother about context if you want to use your own code) at some time in the future i will provide a system based on independent components, so that one can make a 'small context like thing' but it has a real low priority (unless someone pays for the effort) 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] XML
! Undefined control sequence. l.1 \colored [r=1,g=0.2,b=0.27] \WhatAMess ...ocument.commands.somehexcolor(#1)} l.16 {test \WhatAMess{\letterhash FF3344} test} ? That's why I went color ... Joh Wolfgang Schuster wrote: On Sun, Oct 26, 2008 at 3:05 PM, Johannes Graumann [EMAIL PROTECTED] wrote: This is sending me down the right paths (at least showing me the sign post ;0) - I know I'm a pain in the neck, but the attached minimal (mirroring your proposal with the colored snippet fixed) compiles to to black tests ... What's wrong? Hans used \colored and you use \color. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Load context format at runtime (from luatex)
Le Mon 27/10/2008 à 19:55 Hans Hagen à écrit: Mildred Ki'Lya wrote: At the beginning of my document, I added: \input format And at the beginning of format.tex, I added: \input context you cannot use context this way (at least not currently) Ok. It seems that was the way to get the Plain TeX macros, so I thought it would be the same for ConTeXt, apparently I was wrong. Do you know how I can create my format based on ConTeXt? i have no clue what you mean with 'my own format based on context' I want to be able to tun a TeX document which uses macros that are specific to the document I create. And I would like to separate the macros from the actual document. I thought that I could run my own set of macros (I guess this is called a format, like Plain TeX, LaTeX, ConTeXt, ...). And to ease my work (espacially around the utf-8 encoding) I wanted to use ConTeXt which already provides high level features. I guess I'm trying to do some kind of unsupported things. then you have to roll out your own code, (i.e why bother about context if you want to use your own code) Because ConTeXt provides some high level features (like utf-8, I have no idea how to read utf-8 documents in plain TeX). at some time in the future i will provide a system based on independent components, so that one can make a 'small context like thing' but it has a real low priority (unless someone pays for the effort) That, I can understand :) So, I'll dig a little bit more to see what I can do. Thanks for the answers. Mildred -- Mildred Ki'Lya ╭─ mildred593@online.fr ── │ Jabber, GoogleTalk: [EMAIL PROTECTED] │ Site: http://ki.lya.online.fr GPG ID: 9A7D 2E2B │ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Reference to a subitem
Dnia Mon, Oct 27, 2008 at 10:56:32AM +0100, Wolfgang Schuster napisa#322;(a): 2008/10/25 Marcin Borkowski [EMAIL PROTECTED]: Dnia Sat, Oct 25, 2008 at 02:58:24AM +0200, Diego Depaoli napisa#322;(a): 2008/10/23 Wolfgang Schuster [EMAIL PROTECTED]: \def\ItemNumber#1% {\expandafter\doItemNumber#1..\relax} \def\doItemNumber#1.#2.#3\relax {\doifelsenothing{#2} {#1} {#2}} \definereferenceformat[initem][left=\ItemNumber] Since I don't speak that language, someone could explain why this code doesn't work when I put a stopper in subitemization? The standard dot isn't a stopper itself? This code seems to work (approximately) like this: it expands the full reference, which is: number dot number dot something, probably space and selects everything from the first dot up to the second one (w/o the dots themselves). So I consider it to be a bit dirty hack (sorry, Wolfgang;)), in a sense that it is not very flexible. It's just hack at user level, a dirty hack would redefine core macros but this is what I try to avoid. OK, sorry - probably we have different semantics of dirty (or, more probably, we're talking about different levels of dirtiness). Here I meant roughly that this hack is not very flexible. If your stopper is, say ) (and the second one, say, ], so you have references in a strange form like 1)2]), you might want to say something like \def\doItemNumber #1)#2]#3\relax (the space after \doItemNumber is gobbled by TeX, so it might be present here or not, it is a matter of taste only). If you have different stoppers, another approach might be reasonable. I can see two possibilities: 1. Get to know _where_ ConTeXt really keeps the relevant info about labels; if the info about the values (w/o stoppers) is preserved, we are saved, if not, we've got a problem; 2. so in the latter case we have to (?) use this kind of hacky solution, which might be something like this (assuming that \stopper and \stopperr are the first- and second level stoppers respectively): \edef\sometemporarymacroname{% \def\noexpand\doItemNumber ##1\stopper ##2\stopperr ##3\relax {\noexpand\doifelsenothing{##2} {##1} {##2}}% }% \sometemporarymacroname (I'm not sure whether the last percentage sign is needed, but a good rule of thumb is to put them everywhere after closing brace newline, so that the newlines don't get translated into spaces.) You don't need the comment sign at the end of the macro in outer level but you need it for local definitons in other macros if your're in horizontal mode. Shame on me, being a mathematician and being sooo imprecise:):) I'm not sure whether this works, though, *please* check it and tell me (maybe I'm doing some stupid error, please the TeX gurus correct me if yes). I hope this is ok, though, because then it my first post to this list containing actually an _answer_ and not a _question_:))). Thanks to explain my solution. You're welcome:). Wolfgang Greets -- Marcin Borkowski (http://mbork.pl) Jeść. Pić. Spać. Wstać. Kupić. Sprzedać. Mieć. Możesz więcej chcieć - czegoś więcej! (40i30na70) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] --arrange vs. --pdfarrange
Dnia Mon, Oct 27, 2008 at 09:20:48PM +0100, Willi Egger napisa#322;(a): Hi, --arrange means you typeset af tex-file and arrange it. --pdfarrange means that you arrange pages already contained in a pdf file. e.g. you have a book in pdf and you want the pages of that book arranged into sections thanks! Willi Greets -- Marcin Borkowski (http://mbork.pl) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Reference to a subitem
Dnia Mon, Oct 27, 2008 at 05:24:56PM +0100, Diego Depaoli napisa#322;(a): 2008/10/25 Marcin Borkowski [EMAIL PROTECTED]: Dnia Sat, Oct 25, 2008 at 02:58:24AM +0200, Diego Depaoli napisa#322;(a): This code seems to work (approximately) like this: it expands the full reference, which is: number dot number dot something, probably space and selects everything from the first dot up to the second one (w/o the dots themselves). So I consider it to be a bit dirty hack (sorry, Wolfgang;)), in a sense that it is not very flexible. Thanks for clarification, here I begin to understand If your stopper is, say ) (and the second one, say, ], so you have references in a strange form like 1)2]), you might want to say something like \def\doItemNumber #1)#2]#3\relax ... I tried before posting... doesn't work Could you please send me a minimal example? \edef\sometemporarymacroname{% \def\noexpand\doItemNumber ##1\stopper ##2\stopperr ##3\relax {\noexpand\doifelsenothing{##2} {##1} {##2}}% }% \sometemporarymacroname Here I stop understand and I can't get this code working. Could you give me a full example? As above; send me a file, I'll try to do something. Still, I'm not really sure this would work, it was only a rough idea. I'll explain it later (it's 1:30 AM here in Poland;)). I'm not sure whether this works, though, *please* check it and tell me (maybe I'm doing some stupid error, please the TeX gurus correct me if yes). I hope this is ok, though, because then it my first post to this list containing actually an _answer_ and not a _question_:))). This time will never come for me. If you follow the path of TeX, your expertise will gradually rise;). You'll never notice, though, until people start coming to you asking questions, and will be baffled by your expert-like, impossible-to-understand-and-technical answers;). Cheers -- Diego Depaoli Greets -- Marcin Borkowski (http://mbork.pl) - Gandalf! A ja myślałem, że nie żyjesz. Co prawda o sobie też byłem tego zdania. Sam Gamgee ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PhD Thesis in ConTeXt
Hi Aditya, I've tried compiling your thesis. It failed with; texmfstart texexec thesis.tex TeXExec | processing document 'thesis.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file thesis.top TeXExec | using randomseed 104 TeXExec | tex engine: luatex TeXExec | tex format: cont-en (thesis.tex ConTeXt ver: 2008.09.16 15:06 MKIV fmt: 2008.9.16 int: english/english language : language en is active system : cont-new loaded (C:/context/tex/texmf-local/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (C:/context/tex/texmf-local/tex/context/base/cont-new.mkiv lua: used config path - C:/context/tex/texmf/web2c/texmf.cnf lua: used cache path - C:/context/tex/texmf-cache/luatex-cache/context/2fea56f92e5267d7cc9662e4d5f52e1e ) (C:/context/tex/texmf-local/tex/context/base/cont-mtx.tex)) system : cont-old loaded (C:/context/tex/texmf-local/tex/context/base/cont-old.tex loading: Context Old Macros ) system : cont-fil loaded (C:/context/tex/texmf-local/tex/context/base/cont-fil.tex loading: Context File Synonyms ) system : cont-sys loaded (C:/context/tex/texmf-context/tex/context/user/cont-sys.tex (C:/context/tex/texmf-local/tex/context/base/type-tmf.tex) (C:/context/tex/texmf-local/tex/context/base/type-siz.tex) (C:/context/tex/texmf-local/tex/context/base/type-otf.tex)) bodyfont : 12pt rm is loaded specials : tex loaded system : thesis.top loaded (thesis.top specials : loading definition file tpd (C:/context/tex/texmf-local/tex/context/base/spec-tpd.tex specials : loading definition file fdf (C:/context/tex/texmf-local/tex/context/base/spec-fdf.tex (C:/context/tex/texmf-local/tex/context/base/spec-fdf.mkiv)) specials : fdf loaded (C:/context/tex/texmf-local/tex/context/base/spec-tpd.mkiv)) specials : fdf loaded ) (thesis.tuo) (thesis.tuo) systems: begin file thesis at line 2 systems: begin file env-thesis at line 4 (env-thesis.tex system : module abr-aditya not found system : module bib loaded (t-bib.tex publications : loading formatting style from bibl-apa (C:/context/tex/texmf-local/tex/context/bib/bibl-apa.tex) publications : loading database from thesis.bbl (thesis.bbl)) system : module ctags not found publications : loading formatting style from bibl-ssa (bibl-ssa.tex) (C:/context/tex/texmf-local/tex/context/base/type-tmf.tex) (C:/context/tex/texmf-local/tex/context/base/type-siz.tex) (C:/context/tex/texmf-local/tex/context/base/type-otf.tex) (C:/context/tex/texmf-local/tex/context/base/type-tmf.tex) (C:/context/tex/texmf-local/tex/context/base/type-siz.tex) (C:/context/tex/texmf-local/tex/context/base/type-otf.tex) (delicious.tex (C:/context/tex/texmf-local/tex/context/base/type-tmf.tex) (C:/context/tex/texmf-local/tex/context/base/type-siz.tex) (C:/context/tex/texmf-local/tex/context/base/type-otf.tex) (delicious.tex) (C:/context/tex/texmf-local/tex/context/base/type-tmf.tex) (C:/context/tex/texmf-local/tex/context/base/type-siz.tex) (C:/context/tex/texmf-local/tex/context/base/type-otf.tex) (delicious.tex)) system : module mathsets not found ! Undefined control sequence. recently read \definemathset l.377 \definemathset [EXP] [text={\doublestroke{E}}] ? I removed the following from env-thesis.tex; \definetypeface [mainface] [rm] [serif] [palatino] [default] [features=default] \definetypeface [mainface] [ss] [sans] [delicious] [default] [features=default, rscale=1.1] \definetypeface [mainface] [tt] [mono] [modern] [default] [features=default, rscale=1.1] \definetypeface [mainface] [mm] [math] [palatino] [default] [encoding=texnansi] %\definetypeface [mainface] [mm] [math] [euler] [euler] [encoding=texnansi, rscale=1.03] \setupbodyfont[mainface,12pt] Thanks Mohamed Aditya Mahajan wrote: On Tue, 21 Oct 2008, Piotr wrote: Hello, I have spent some time with google in order to find an answer to the following questions. Unfortunatly, I was not satisfied with the answers, which I now hope to find here. It is my plan not to use the MS Office suite for the production of my PhD thesis (in chemistry). I have used Miktex some years ago during my studies for some project reports, and I remember beeing quite satisfied with the results. My Master thesis, on the other hand, I wrote in word.. and although I remember not having too many difficulties, there were some nasty obstacles to be overcome. Obstacles which I simply do not want to risk having repeated a second time on a much bigger scale. I this mailing list I read several reports of people who either had written their thesis in Latex or ConTeXt. There was a mention of Latex beeing designed for mathematic purposes, while ConTeXt was said to be better suited for the intergration of graphics or