Re: [NTG-context] Commands based on previously defined comm ands, DA with fixed values for šrguments
Even if this is completely unrelated to ConTeXt, allow me to mention this since I find it so funny: The message to which I'm replying has the following weird subject: # Subject: Re: [NTG-context] Commands based on previously defined commands, # DA with fixed values for šrguments Notice the word "DA" at the beginning of the second line, and the word "šrguments"? This was obviously not in Vedran's original message: # Subject: [NTG-context] Commands based on previously defined commands, # with fixed values for arguments Let me venture an explanation about how this happened: when replying to the first message, René's e-mail transformed the subject as such: # Subject: [NTG-context] # =?UTF-8?Q?Re:__Commands_based_on_previously_defined_commands, # =D=A_with_fixed_values_for_=9arguments?= This is quoted-printable, where all the characters but the "basic" ones are quoted using their code point in the current encoding (here UTF-8): hence the end line characters (carriage return + line feed) have been rewritten as =D and =A respectively, in hexadecimal (it's 13 and 10 in decimal), and the tabulation character as =9 (for some reason, there was a tab before the word "arguments"). But this is actually not correct, the character codes should be formatted using two hexadecimal digits (hence =0D, =0A and =09). This is probably why when replying to René, Vedran's e-mail agent has interpreted the "=D" and "=A" sequences as plain 'D' and 'A', and, upon seeing the sequence "=9arguments", it has use the letter 'a' in "arguments" as an exadecimal digit! Which it has interpreted as a Windows-1252 character (Microsoft's extension of latin-1), where 0x9A is 'š', thus producing this rather weird result. This is a particularily disturbing example of mojibake (http://en.wikipedia.org/wiki/Mojibake). Arthur ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Commands based on previously defined commands, with fixed values for arguments
> Are there any rules where the space should be and where it should not? The way you wrote the macro originally, the spaces were part of the macro. If you use your original definition of \HelloTwo, you can write \HelloOne as follows: \def \HelloOne #1 {\HelloTwo {#1}{Vedran} } and it works. \GoodByeOne{Arthur} ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Commands based on previously defined commands, with fixed values for arguments
2010/8/7 Aditya Mahajan : > Can you post a complete example? This works for me > > \def\HelloTwo#1#2{Hello, #1 and #2!} > \def\HelloOne#1{\HelloTwo{#1}{Vedran}} > > \starttext > \HelloOne {One} > \stoptext Same here, it works. From what I see, you removed the spacing, and if I add it back it doesn't work again. Are there any rules where the space should be and where it should not? -- Vedran Miletić ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Commands based on previously defined commands, with fixed values for arguments
On Sat, 7 Aug 2010, Vedran Miletić wrote: How can I define a command by reusing the already defined command? \def \HelloTwo #1#2 {Hello, #1 and #2!} \def \HelloOne #1 {\HelloTwo{#1}{Vedran}} This gives me a "Runaway argument". Can you post a complete example? This works for me \def\HelloTwo#1#2{Hello, #1 and #2!} \def\HelloOne#1{\HelloTwo{#1}{Vedran}} \starttext \HelloOne {One} \stoptext Aditya___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Commands based on previously defined comm ands, DA with fixed values for šrguments
2010/8/7 R. Bastian : > On Sat, 7 Aug 2010 18:03:22 +0200 > Vedran Miletić scribit: > >> How can I define a command by reusing the already defined command? >> >> \def \HelloTwo #1#2 {Hello, #1 and #2!} >> \def \HelloOne #1 {\HelloTwo{#1}{Vedran}} >> >> This gives me a "Runaway argument". >> >> -- >> Vedran Miletić > > where is #2 for HelloTwo ? > The code \def \HelloOne #1 {\HelloTwo{#1}{Vedran} } compiles. #2 should be fixed to "Vedran", but it comes out empty. -- Vedran Miletić ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] =?UTF-8?Q?Re:__Commands_based_on_previously_defined_commands, =D=A_with_fixed_values_for_=9arguments?=
On Sat, 7 Aug 2010 18:03:22 +0200 Vedran Miletić scribit: > How can I define a command by reusing the already defined command? > > \def \HelloTwo #1#2 {Hello, #1 and #2!} > \def \HelloOne #1 {\HelloTwo{#1}{Vedran}} > > This gives me a "Runaway argument". > > -- > Vedran Miletić where is #2 for HelloTwo ? > ___ > 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 : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ -- René Bastian www.pythoneon.org www.musiques-rb.org http://www.soundsurvey.org.uk/ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Commands based on previously defined commands, with fixed values for arguments
How can I define a command by reusing the already defined command? \def \HelloTwo #1#2 {Hello, #1 and #2!} \def \HelloOne #1 {\HelloTwo{#1}{Vedran}} This gives me a "Runaway argument". -- Vedran Miletić ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] abbreviations as macros
On Sat, 7 Aug 2010, ivo welch wrote: Hi Hans: This is asking Armin Varmaz' question in a different way, although I know even less. I would like to define a macro that is just an abbreviation. For example, say I want to define a snippet \NPV which provides the text NPV$_0$, and NPV is in textfont while 0 is in mathfont. This should work everywhere---formulas, subscripts, footnotes, etc., and automatically appear in the correct sizing. In LaTeX, this is easy to do: \newcommand{\NPV}{\text{NPV\ensuremath{_0}}} I can now use \NPV\ in formulas, footnotes, subscripts, titles, etc., and it is properly sized everywhere. If you never need to use a full form of the abbreviation, then you can just use the same in ConTeXt. The equivalent of \ensuremath is \math; everything else is the same. \define\NPV{\text{NPV\math{_0}} I would, however, write this slightly differently (even in LaTeX) as \math{\text{NPV}_0} but that is just a stylistic issue. Is there a recommended way to do this on conTeXt? The usual way of defining abbreviations in ConTeXt is \abbreviation [NPV] {\math{\text{NPV}_0}} {full form} Then you can use \NPV\ for a short form of the abbreviation and \infull{NPV} for the full form. The advantage is that you can also get a list of used abbreviations. Aditya ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] abbreviations as macros
Hi Hans: This is asking Armin Varmaz' question in a different way, although I know even less. I would like to define a macro that is just an abbreviation. For example, say I want to define a snippet \NPV which provides the text NPV$_0$, and NPV is in textfont while 0 is in mathfont. This should work everywhere---formulas, subscripts, footnotes, etc., and automatically appear in the correct sizing. In LaTeX, this is easy to do: \newcommand{\NPV}{\text{NPV\ensuremath{_0}}} I can now use \NPV\ in formulas, footnotes, subscripts, titles, etc., and it is properly sized everywhere. Is there a recommended way to do this on conTeXt? regards, /iaw ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with cross references
On Sat, 7 Aug 2010 14:22:32 +0200 Robert Blackstone wrote: Hi all, I would like to get some advice concerning a problem, or rather a nuisance, with internal references. I am making a longish document with several chapters, all of which are separate .tex-files to be input into the main file, which contains all setups and the skeleton of the document. There are a number of cross references between elements that sit in different files. With some simple test files I checked that this worked and that I use the proper commands. However, with the real files it does not work, that is, not immediately. Even after 4 or 5 runs I still get ?? instead of page numbers, and then suddenly things are OK. I have no idea what happened between failure and success and I have no idea what I have to do to get the proper result immediately. It is a nuisance because I cannot be sure the thing worked till I have checked the entire output after each run, which is rather time consuming. Im using the latest version of TeXShop with the minimals of july 20, but older versions show the same symptoms. Thanks for any advice. Robert Blackstone Difficult to analyze, of course, but one thing that occurred to me: are you using a proper project structure, with the chapters as components, as described in chapter 2.3 of the manual, or just using \input for the chapters? Right now, I'm editing a book (~ 300 pages) with cross-references between chapters, and I don't see any of the problems you describe. Btw, the version of TeXshop is irrelevant to the problem, but you may want to update your minimals. Thomas ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Problem with cross references
Hi all, I would like to get some advice concerning a problem, or rather a nuisance, with internal references. I am making a longish document with several chapters, all of which are separate .tex-files to be input into the main file, which contains all setups and the skeleton of the document. There are a number of cross references between elements that sit in different files. With some simple test files I checked that this worked and that I use the proper commands. However, with the real files it does not work, that is, not immediately. Even after 4 or 5 runs I still get ?? instead of page numbers, and then suddenly things are OK. I have no idea what happened between failure and success and I have no idea what I have to do to get the proper result immediately. It is a nuisance because I cannot be sure the thing worked till I have checked the entire output after each run, which is rather time consuming. I’m using the latest version of TeXShop with the minimals of july 20, but older versions show the same symptoms. Thanks for any advice. Robert Blackstone ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] an issues with punk module
In latest beta the punk module was normal and the PunkNova font is working. Thanks to all. -- Best regards, Huang Ze ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \qedhere equivalent in ConTeXt
You are absolutely right. Thanks to all. 2010/8/7 Thomas Schmitz : > On Sat, 7 Aug 2010 10:54:52 +0200 > Emanuele Sacco wrote: >> >> Thank you very much, but still does not work to me.. >> >> %%% >> >> \definedescription >> [proof] >> [text=Proof.] >> >> \setupdescriptions >> [proof] >> [width=broad, >> distance=0.5em, >> location=serried, >> headstyle=it, >> indentnext=yes, >> indenting=yes, >> closesymbol=\mathematics{\square}, >> closecommand=\ifmmode\eqno\else\wordright\fi] >> >> >> >> \starttext >> >> \startproof >> Questa \`e una dimostrazione >> \startformula >> a=b. >> \stopformula >> \stopproof >> >> \stoptext >> >> %% > > This works with mkiv, but not with mkii. Wolfgang couldn't know which you > were using since your replies were always rather short on details. > > Thomas > ___ > 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 : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ > -- Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema binario e quelli che non lo conoscono. ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \qedhere equivalent in ConTeXt
On Sat, 7 Aug 2010 10:54:52 +0200 Emanuele Sacco wrote: Thank you very much, but still does not work to me.. %%% \definedescription [proof] [text=Proof.] \setupdescriptions [proof] [width=broad, distance=0.5em, location=serried, headstyle=it, indentnext=yes, indenting=yes, closesymbol=\mathematics{\square}, closecommand=\ifmmode\eqno\else\wordright\fi] \starttext \startproof Questa \`e una dimostrazione \startformula a=b. \stopformula \stopproof \stoptext %% This works with mkiv, but not with mkii. Wolfgang couldn't know which you were using since your replies were always rather short on details. Thomas ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \qedhere equivalent in ConTeXt
Thank you very much, but still does not work to me.. %%% \definedescription [proof] [text=Proof.] \setupdescriptions [proof] [width=broad, distance=0.5em, location=serried, headstyle=it, indentnext=yes, indenting=yes, closesymbol=\mathematics{\square}, closecommand=\ifmmode\eqno\else\wordright\fi] \starttext \startproof Questa \`e una dimostrazione \startformula a=b. \stopformula \stopproof \stoptext %% systems : begin file esempio at line 19 ! Missing } inserted. } \endgroup \@@stopdescription ...l \dostopparbasedattributes \endgroup \descriptionpara... l.26 \stopproof ? H I've inserted something that you may have forgotten. (See the above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing `2' now; then my insertion and my current dilemma will both disappear. ? Emanuele Sacco 2010/8/6 Wolfgang Schuster : > Am 05.08.10 22:17, schrieb Emanuele Sacco: >> >> >> >> \definedescription >> [proof] >> [text=Proof.] >> >> \setupdescriptions[proof] >> [width=broad,distance=0.5em, >> location=serried, >> headstyle=it, >> indentnext=yes, >> indenting=yes, >> closesymbol=$\square$] > > \setupdescriptions > [proof] > [width=broad, > distance=0.5em, > location=serried, > headstyle=it, > indentnext=yes, > indenting=yes, > closesymbol=\mathematics{\square}, > closecommand=\ifmmode\eqno\else\wordright\fi] > > Wolfgang > -- Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema binario e quelli che non lo conoscono. ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___