[NTG-context] typefile behaviour
Dear ConTeXt list, I encountered a weird behaviour while using typefile. Here is a minimal example, to illustrate what I am saying. We have two files, test.txt and test.tex, respectively (between the -). - 1 2 3 4 5 --- \setuptyping [before={\startframedtext}, after={\stopframedtext}] \starttext \typefile[start=2,stop=4]{test.txt} \typefile[start=2,stop=5]{test.txt} \stoptext --- Now, if you save those lines into test.txt and test.tex, and if you compile the tex file, you get the exact same boxes. As far as I understand it, ConTeXt works as I expect when there is no empty line, meaning that it typeset the lines between start and stop. However, when there is an empty line right after the last line, ConTeXt also includes it. I don't really understand that behaviour. Perhaps it is something to do with different paragraphs, I don't know. However, what I do know is that it is annoying. It adds an empty line at an unwanted place, and it looks unprofessional in my text. So, my question is the following : 1. Why does it behave like that? Is that a bug? 2. What should I do to solve that problem? Regards, Géry D. ___ 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] Testing non-existent counter in Lua
Thanx Taco, can I learn about these things somewhere read more? I tried luatexref-t.pdf and I didnt in fact guided. Thanx Jaroslav Dne 22.6.2010 7:55, Taco Hoekwater napsal(a): Jaroslav Hajtmar wrote: Hi, all. How do I know (due Lua) that the counter has not been defined in ConTeXt (through the command newcount)? I am trying testing : if tex.count.mycount == nil then... or if tex.count.mycount == 'error' then... then when counter isnt defined due \newcount\mycount, then test ending with error message. When counter is defined due \newcount\mycount, \mycount=1 then test if tex.count.mycount == 1 then... if token.command_name(token.create('mycount')) == 'assign_int' and tex.count.mycount == 1 then ... end 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Omitting hyphenation
On Mon, 21 Jun 2010 20:03:22 +0200, Wolfgang Schuster wrote: [...] > \starttext > \dontleavehmode\hbox{test} text text > \blank > \mbox{test} text text > \stoptext What about using |test|? Marco ___ 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] Testing non-existent counter in Lua
Jaroslav Hajtmar wrote: Hi, all. How do I know (due Lua) that the counter has not been defined in ConTeXt (through the command newcount)? I am trying testing : if tex.count.mycount == nil then... or if tex.count.mycount == 'error' then... then when counter isnt defined due \newcount\mycount, then test ending with error message. When counter is defined due \newcount\mycount, \mycount=1 then test if tex.count.mycount == 1 then... if token.command_name(token.create('mycount')) == 'assign_int' and tex.count.mycount == 1 then ... end 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Omitting hyphenation
On 21-6-2010 10:16, Wolfgang Schuster wrote: \unexpanded\def\mbox {\ifmmode\normalmbox\else\dontleavehmode\normalhbox\fi} as i never use this command it won't break my documents -) thanks, this looks good in retrospect it's tricky ... \setbox0\mbox{...} will break then - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \writetolist fails in footnotes when interaction is on
On 21-6-2010 7:11, Michael Saunders wrote: \setupinteraction[state=start,color=,contrastcolor=,option=fit] \definelabel[demonum][text=,before=,after=,way=bytext] \definelist[demos] \setuplist[demos][interaction=all,alternative=b,after=] \starttext \footnote{\writetolist[demos]{\nextdemonum}{demo title}} \stoptext Is there a way around this? fixed in next beta - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Omitting hyphenation
On 21-6-2010 10:22, Wolfgang Schuster wrote: Am 21.06.10 22:00, schrieb Hans Hagen: Wolfgang (who wonders why there is no context alternative for \hyphenation) so there is room for improvements \starttext \dorecurse{50}{\kern\recurselevel\dimexpr.2pt\relax {\nohyphens nothyphenatedword}, hyphenatedword } \stoptext i should explain what i mean: when you try to make hyphenation exceptions for different languages you need currently \language[en]\hyphenation{expection list for english} \language[de]\hyphenation{expection list for german} but it would be nice to combine both in a single command, e.g. \setuphyphenation{exception list for the current active language} % like \hyphenation{...} \setuphyphenation[de]{exception list for german} % like \language[de]\hyphenation{...} how about \startexceptions[de] ... \stopexceptions - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] problem with \setcharacterspacing
Hello, The setting is lost in the header: \setcharacterspacing[frenchpunctuation] \setupheadertexts[bla: bla] \starttext bla: bla \stoptext Workaround: \setupheadertexts[{\setcharacterspacing[frenchpunctuation]bla: bla}] Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] Testing non-existent counter in Lua
Jaroslav Hajtmar wrote: > Thanx Taco, > can I learn about these things somewhere read more? I tried > luatexref-t.pdf and I didnt in fact guided. It is in there, but as it goes in reference manuals, you have to know what to look for. At this moment, there are no tutorials or something like that about the token interface (mostly because I am not quite happy with how it works right now). 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Omitting hyphenation
Am 22.06.10 09:18, schrieb Hans Hagen: On 21-6-2010 10:22, Wolfgang Schuster wrote: Am 21.06.10 22:00, schrieb Hans Hagen: Wolfgang (who wonders why there is no context alternative for \hyphenation) so there is room for improvements \starttext \dorecurse{50}{\kern\recurselevel\dimexpr.2pt\relax {\nohyphens nothyphenatedword}, hyphenatedword } \stoptext i should explain what i mean: when you try to make hyphenation exceptions for different languages you need currently \language[en]\hyphenation{expection list for english} \language[de]\hyphenation{expection list for german} but it would be nice to combine both in a single command, e.g. \setuphyphenation{exception list for the current active language} % like \hyphenation{...} \setuphyphenation[de]{exception list for german} % like \language[de]\hyphenation{...} how about \startexceptions[de] ... \stopexceptions i have no problem with the name, mine was only meant to describe the function 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Omitting hyphenation
Am 22.06.10 09:10, schrieb Hans Hagen: On 21-6-2010 10:16, Wolfgang Schuster wrote: \unexpanded\def\mbox {\ifmmode\normalmbox\else\dontleavehmode\normalhbox\fi} as i never use this command it won't break my documents -) thanks, this looks good in retrospect it's tricky ... \setbox0\mbox{...} will break then at the cost of a box register even this works \def\mbox {\ifmmode\normalmbox\else\specialmbox\fi} \newbox\textmbox \def\specialmbox {\normalhbox\bgroup \dowithnextbox{\global\setbox\textmbox\box\nextbox\egroup\dontleavehmode\box\textmbox}\normalhbox} \starttext \hbox{text} text text \mbox{text} text text \setbox0\hbox{bar}\setbox1\mbox{foo}\box1\box0 \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \setcharacterspacing[frenchpunctuation] in mkiv
Hi Hans, and all gurus, I noticed that the mkiv command \setcharacterspacing[frenchpunctuation] influences even the \type environment: is this behavior wanted or is it a side effect? Have a look at the following example in which \type{http://wiki.contextgarden.net} results in a space between « http » and « :// » as if the \type command were ignored regarding spacing. Best regards: OK %%% french-punctuation.tex \mainlanguage[fr] \setcharacterspacing[frenchpunctuation] \setupinteraction [state=start,color=darkgreen] \useURL [wiki] [http://wiki.contextgarden.net/] [] [{\tt http://wiki.contextgarden.net/}] \starttext Here we are following the French rule of typesetting semicolumn: did you see? However this rule should not be followed in \type{\type}\dots \from[wiki] \blank \useURL{\type{http://wiki.contextgarden.net/Main_Page}} \blank \starttyping http://wiki.contextgarden.net/Main_Page \stoptyping \blank since otherwise the interaction in the latter example is broken. Indeed there should not be a space between \type{http} and \type{://}. \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Wrong typesetting of "pages" in AMS-style publication list
Hi, I've encountered an issue with the AMS-style publication list (Mark IV). When the bibliography items in my document are typeset in the publication list, the attribute "pages" (from the .bib file; a range of pages is specified, e.g. "pages = {12--34}") is sometimes preceded by "p." (e.g. for "@incollection"), sometimes by "pp." (which I would think of being correct) and sometimes there is nothing (e.g. for "@article"): no "pp."/"p." and not even a point afterwards ending the bib item. Is this behaviour intended? I took a look inside the file "bibl-ams.tex" where (afaik) the setup is defined. The calls of \insertpages there differ a lot: \insertpages{, p. }{. }{. } %from book, l.203 \insertpages{\unskip, p.~}{. }{\unskip. } %from incollection, l.306 \insertpages{\unskip, }{}{} %from article, l.165 \insertpages{\unskip, \fixpp.~}{. }{\unskip. } %from inproceedings, l.344 It seems to me that the last one actually is what every call should look like. But maybe I'm getting this wrong. Any suggestions and/or explanations appreciated. Best regards, Stefan. -- ___ ey, leute, ich hab so lange gebraucht um mir plan a auszudenken, fragt jetzt doch nicht auch noch nach plan b! GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 ___ 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] Wrong typesetting of "pages" in AMS-style publication list
Stefan Müller wrote: > Hi, > > I've encountered an issue with the AMS-style publication list (Mark > IV). When the bibliography items in my document are typeset in the > publication list, the attribute "pages" (from the .bib file; a range > of pages is specified, e.g. "pages = {12--34}") is sometimes preceded > by "p." (e.g. for "@incollection"), sometimes by "pp." (which I would > think of being correct) and sometimes there is nothing (e.g. for > "@article"): no "pp."/"p." and not even a point afterwards ending the > bib item. Is this behaviour intended? Well, when bibl-ams.tex was written, there was no good specification so I just implemented something based on some fuzzy examples. If you (or anyone else for that matter) know how it should look, just send a patch and it will be fixed. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \setcharacterspacing[frenchpunctuation] in mkiv
On Tue, Jun 22 2010, Otared Kavian wrote: > I noticed that the mkiv command > \setcharacterspacing[frenchpunctuation] > influences even the \type environment: is this behavior wanted or is it a > side effect? Hello, I don't know, but I have these line in most of my environments: \setuptype[style={\setcharacterspacing[reset]\tt}] \setuptyping[style={\setcharacterspacing[reset]\tt}] \setupinteraction[style={\setcharacterspacing[reset]\tt}] Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] \setcharacterspacing[frenchpunctuation] in mkiv
Hi Peter, Many thanks for your hint: indeed you had the solution! Best regards: OK On 22 juin 2010, at 19:18, Peter Münster wrote: > > Hello, > > I don't know, but I have these line in most of my environments: > > \setuptype[style={\setcharacterspacing[reset]\tt}] > \setuptyping[style={\setcharacterspacing[reset]\tt}] > \setupinteraction[style={\setcharacterspacing[reset]\tt}] > > Cheers, Peter ___ 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] [OT][Fwd: Re: Proposal of a new Q&A site centered on Latex]
Well, nearly off-topic, at least. But it is an interesting idea. Best wishes, Taco Original Message Subject: Re: Proposal of a new Q&A site centered on Latex Date: Tue, 22 Jun 2010 03:53:00 -0700 (PDT) From: Julián Lamas Organization: http://groups.google.com Newsgroups: comp.text.tex References: Hi! Nearly 20 days ago I proposed the creation of a Q&A site using the StackExchange engine related to TeX and LaTeX. Now, thanks to the community that supported it, the proposal is in its commitment phase. This means that we have more or less defined which questions are suitable for the site, and which ones are not. At this stage, we are looking for experts willing to help with the site when it begins its beta stage (provided we find support enough). Collaborators willing to commit to this project will have an important responsibility towards the foundation of the site. In addition, committing will require some work from your part: participating actively in the site, visiting at least three times per week, asking at least three questions during the beta phase, and answering as many questions as you can for at least three months. I know it can be a burden, but the point is that it is crucial to gather a critical mass of committed people that can keep the site up and running. If you want to join this project now, here is the link: http://area51.stackexchange.com/proposals/2148/tex-latex-and-friends?referrer=ius4C60BW0UN5QfMOt5KEg2 Thank you very much for your interest! ___ 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] [OT][Fwd: Re: Proposal of a new Q&A site centered on Latex]
On Tue, Jun 22, 2010 at 20:57, Taco Hoekwater wrote: > > Well, nearly off-topic, at least. But it is an interesting idea. First off-topic question: Do you know a good place to buy latex clothing [products]? First on-topic question: Why do we need [to] \protect? This will rate as x-page on search engines :) :) :) Mojca > Original Message > > http://area51.stackexchange.com/proposals/2148/tex-latex-and-friends?referrer=ius4C60BW0UN5QfMOt5KEg2 ___ 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] [OT][Fwd: Re: Proposal of a new Q&A site centered on Latex]
2010/6/22 Mojca Miklavec : > First off-topic question: Do you know a good place to buy latex > clothing [products]? http://www.getdigital.de/products/Latex :-) Best Martin ___ 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] Wrong typesetting of "pages" in AMS-style, publication list
Taco Hoekwater wrote: Stefan M?ller wrote: > Hi, > > I've encountered an issue with the AMS-style publication list (Mark > IV). When the bibliography items in my document are typeset in the > publication list, the attribute "pages" (from the .bib file; a range > of pages is specified, e.g. "pages = {12--34}") is sometimes preceded > by "p." (e.g. for "@incollection"), sometimes by "pp." (which I would > think of being correct) and sometimes there is nothing (e.g. for > "@article"): no "pp."/"p." and not even a point afterwards ending the > bib item. Is this behaviour intended? Well, when bibl-ams.tex was written, there was no good specification so I just implemented something based on some fuzzy examples. If you (or anyone else for that matter) know how it should look, just send a patch and it will be fixed. Best wishes, Taco Okay, I had this problem, too. If I find a reliable and comprehensive source for how the AMS-style should look like, I'll try to implement it. But currently I am not able to make too much sense out of what I find in bibl-ams.tex. Maybe the reason for this is that I'm not much into (plain) tex. But anyhow, when I stumble over a specification I'll send it to the list. Thank you, Stefan. ___ 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] blurred shadow on images?
Am 2010-06-21 um 08:42 schrieb Taco Hoekwater: Henning Hraban Ramm wrote: I'd like to place some plain photos rotated (say 12°) and with a blurred shadow above some colored elements, i.e. the shadow must use transparency. I guess I could get such using ImageMagick, but is there a possibility using ConTeXt or one of its favourite friends? I'd prefer a solution that works with CMYK data. Creating a semi-transparent backdrop with metapost is quite simple, but I am not sure whether that works with cmyk, you'll have to try yourself. Code goes something like this: Thank you, I'll try. Seems like I should learn MetaPost finally... If there isn't - is the transparency of PNG usable? Sure, and may use less resources than mp drawings, but that is definitely RGB Yes, of course. Since I only need to output on a color laser printer, it will probably work. Processing time matters. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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] textbackground and protrusion
Hi! Currently (Context beta 2010-06-20 / Luatex 0.60.1), textbackground and protrusion don't work together. Here's a little test file: --- \showframe \definefontfeature[test][mode=node,script=latn,kern=yes,trep=yes,tlig=yes,protrusion=quality] \definetextbackground[MyTextbackground][frame=off] \enableprotruding \starttext \definedfont[lmroman12-regular*test] "An arbitrary and \startMyTextbackground incomplete \stopMyTextbackground\ sentence." \stoptext --- Is there a workaround for this? Thanks in advance. ___ 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] textbackground and protrusion (update)
It seems that the typographical quotation marks got lost in my test file. It has thus become pretty much useless. Just enter some other character instead to make protrusion visible. ___ 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 ___