Re: [NTG-context] Bug with linenumbering
On Wed, 2 May 2012, Hans Hagen wrote: On 1-5-2012 21:43, Aditya Mahajan wrote: Hi, Line numbering does not respect the parameters given with \startlinenumbering. For example: Line numbering is a delayed operation. As they are handled when the page is constructed the settings of that moment apply. In practice only the start key is handled when you pass settings to \start (the only reason for having the second argument is number start/restart etc). If you want different renderings, the best is to define a specific instance of line numbering. A little background: In the initial version of the vim module, I used to do line numbering manually (each line started with \NL macro, which expanded to a number in an appropriate style depending on whether line numbering was enabled or not. When I rewrote the module to use the filter module, I also rewrote the line numbering mechanism to use ConTeXt's inbuilt line numbering macros, but I cannot get them to work. Consider the following example. I want to define an environment, which, amongst other things does line numbering. I want the user to control the style and color of line numbering, so I define keys numberstyle and numbercolor, which are then passed on to the line numbering macros. The most obvious implementation of this does not work. \definenamespace [whatever] [ type=module, name=whatever, command=yes, setup=yes, parent=whatever, ] \appendtoks \definelinenumbering [\currentwhatever] [ color=\whateverparameter{numbercolor}, style=\whateverparameter{numberstyle}, ]% \setvalue{start\currentwhatever}{\dostartwhatever[\currentwhatever]}% \setvalue{stop\currentwhatever}{\dostopwhatever}% \to\everydefinewhatever % For illustration. The actual macro is more complicated. \def\dostartwhatever[#1]% {\startlinenumbering[#1]} \def\dostopwhatever {\stoplinenumbering} \definewhatever[testing][numbercolor=red,numberstyle=bold] \starttext \starttesting \input knuth \stoptesting \stoptext When I run it, the line number is not styled. Any idea on what I can do differently? 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] Font for MetaPost graphics
On 2012-05-02 Aditya Mahajan wrote: > Metapost now runs as a library. All the text is first typeset by ConTeXt > and metapost only knows the bounding box of the labels. > > You can try (untested): > > \starttext > > This is serif > > \switchtobodyfont[sans] > \startMPcode > draw textext("This should be sans"); > \stopMPcode > > \stoptext This works, of course. However it continues with sans font even after \stopMPcode. This is better (but clumsy): \start \switchtobodyfont[sans] \startMPcode draw textext("This should be sans"); \stopMPcode \stop Here serif again. The text in Metapost adapts to the text set in ConTeXt. But the font setup should *only* be set for MetaPost, not regular text. Does that mean, that MPenvironment is deprecated and does not work at all? 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] MetaPost circular_shade Command
It seems that I should do something like fill fullcircle scaled 4in withshade define_circular_shade(origin,origin,0 ,2in,white,red); Sorry for the premature question. Troy ___ 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] Font for MetaPost graphics
On Thu, 3 May 2012, Marco wrote: The wiki claims setting up an MPenvironment is enough to change the font in MetaPost graphics: \startMPenvironment%[global] \switchtobodyfont [sans] \stopMPenvironment \starttext This should be serif. \startMPcode draw textext("This should be in sans."); \stopMPcode \stoptext However, this has no effect. All text is in default serif font. If [global] is provided, all text is in sans font. I am aware of a similar issue in a thread last year¹, but the solution didn't really address the problem. textext("\sans This should be sans.") works here, but the point is that the MPenvironment fails. Why is that? Metapost now runs as a library. All the text is first typeset by ConTeXt and metapost only knows the bounding box of the labels. You can try (untested): \starttext This is serif \switchtobodyfont[sans] \startMPcode draw textext("This should be sans"); \stopMPcode \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 ___
[NTG-context] Font for MetaPost graphics
The wiki claims setting up an MPenvironment is enough to change the font in MetaPost graphics: \startMPenvironment%[global] \switchtobodyfont [sans] \stopMPenvironment \starttext This should be serif. \startMPcode draw textext("This should be in sans."); \stopMPcode \stoptext However, this has no effect. All text is in default serif font. If [global] is provided, all text is in sans font. I am aware of a similar issue in a thread last year¹, but the solution didn't really address the problem. textext("\sans This should be sans.") works here, but the point is that the MPenvironment fails. Why is that? Marco [1] http://thread.gmane.org/gmane.comp.tex.context/69044 ___ 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] MetaPost circular_shade Command
The command circular_shade(fullcircle scaled 4in,0,white,red); in MetaPost does not act as I think it should. It performs a gradient fill starting at the center of the circle by filling this center in white (which is expected), and changing the color as the radius/diameter changes (which is also expected), but the final radius appears to have a RGB color of about (1,0.29,0.29) which is not red (thus is unexpected) since red = (1,0,0). However, the command circular_shade(unitsquare shifted (-0.5,-0.5) scaled 4in,0,white,red); creates a gradient filled square whose center is white and whose northeast, northwest, southwest, and southeast corner are red (as somewhat expected) and thus whose east, north, west, and south tip are about (1,0.29,0.29) like the circle. I would appreciate an explanation of why this acts like it does, and (more importantly), let me know how I can get a gradient filled circle whose center gets filled with a RGB color c and outer radius color d. Clearly, circular_shade(fullcircle scaled 4in,0,c,d); does not do this. Thanks in advance, Troy Henderson ___ 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] drawarrow and transparency
On 2012-05-02 Alan BRASLAU wrote: > For example, in the minimal example below, how can one obtain > a transparent arrow without getting an X-ray vision of the > arrowhead? Maybe I'm reinventing the wheel here, but you can write a small macro that only draws the lines you want. Here is an idea: \starttext \startMPpage linecap := squared; penscale := .5bp; pickup pencircle scaled penscale; def drawmyarrow expr p = _apth:=p; _myfinarr enddef; def _myfinarr text t = draw _apth cutafter point (-ahlength+.1penscale) on _apth t; fill arrowhead _apth t enddef; drawarrow origin-- (1cm,0) withtransparency(1,.5) ; drawarrow origin-- (0,1cm) withtransparency(1,.5) ; drawmyarrow (1.5cm,0) -- (2.5cm,0) withtransparency(1,.5) ; drawmyarrow (1.5cm,0) -- (1.5cm,1cm) withtransparency(1,.5) ; \stopMPpage \stoptext The (-ahlength+.1penscale) are of course empiric. You should find the correct formula to always have a nice match of line and arrow whatever ahlength and ahangle values are in use. 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] [***SPAM***] Indentation for beginner
On 2012-05-02 hwit...@gmail.com wrote: > %Whereas I want it to be like this: > > > EDUCATION* bozo the clown >* is here today > > WORK * UCLA BoA > EXPERIENCE * LMU BSCS > > In other words I want the first item of an itemization to line up with the > resume section description header's first or last line. \defineparagraphs [rpara] [n=2] \setupparagraphs [rpara] [1] [width=3cm, style=\sc] \setupitemize [5, packed] \starttext \startrpara Education \nextrpara \startitemize \startitem bozo the clown \stopitem \startitem is here today \stopitem \stopitemize \stoprpara \startrpara Work\crlf Experience % or use \startlines … \stoplines \nextrpara \startitemize \startitem UCLA BoA \stopitem \startitem LMU BSCS \stopitem \stopitemize \stoprpara \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] drawarrow and transparency
I have a MetaPost question concerning drawarrow withtransparency (or any other compound object). Is there some clever way to achieve uniform transparency for a compound object? For example, in the minimal example below, how can one obtain a transparent arrow without getting an X-ray vision of the arrowhead? \starttext \startMPpage drawarrow origin--(1cm,0) withtransparency(1,.5) ; drawarrow origin--(0,1cm) withtransparency(1,.5) ; \stopMPpage \stoptext Alan ___ 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] Background on the 1st page only, page numbering from the 2nd page
Am 02.05.2012 um 16:22 schrieb Procházka Lukáš Ing. - Pontex s. r. o.: > ... OK, thanks for the explanation. You can look if this is useful for you (there is a example at the end of t-title.mkvi): https://bitbucket.org/wolfs/title 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] Background on the 1st page only, page numbering from the 2nd page
... OK, thanks for the explanation. Best regards, Lukas 1) What exactly does \noheaderandfooterlines do? It disables the header/footer on the page where \noheaderandfooterlines was inserted. 2) Why testing the #1 argument in the case 2 doesn't work? When you use “\pagenumber” you check the numeric value of the counter but when you check against “#1” you check again a formatted version of the pagenumber which can be colored or or even be a roman numeral which you have set with the conversion key. Wolfgang -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ 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] Background on the 1st page only, page numbering from the 2nd page
Am 02.05.2012 um 15:49 schrieb Procházka Lukáš Ing. - Pontex s. r. o.: > ... One more question. Let's have three cases - some of them hide the page > number on the first page, some of them don't. > > The question is - why: > > 1 - OK, no page number on page 1 > \def\MyPageNumber#1{\doifelse{\pagenumber}{1}{}{\pagenumber}} % Testing > \pagenumber > > \setuppagenumbering[location={footer,middle},command=\MyPageNumber] > > \starttext %\noheaderandfooterlines % COMMAND NOT USED > \dorecurse{5}{\input knuth\par} > \stoptext > > > 2 - BAD, page number IS on page 1 > \def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of > \pagenumber > > \setuppagenumbering[location={footer,middle},command=\MyPageNumber] > > \starttext %\noheaderandfooterlines % COMMAND NOT USED > \dorecurse{5}{\input knuth\par} > \stoptext > > > 3 - OK, no page number on page 1 > \def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of > \pagenumber > > \setuppagenumbering[location={footer,middle},command=\MyPageNumber] > > \starttext \noheaderandfooterlines % COMMAND IN USE > \dorecurse{5}{\input knuth\par} > \stoptext > > > So - > > 1) What exactly does \noheaderandfooterlines do? It disables the header/footer on the page where \noheaderandfooterlines was inserted. > 2) Why testing the #1 argument in the case 2 doesn't work? When you use “\pagenumber” you check the numeric value of the counter but when you check against “#1” you check again a formatted version of the pagenumber which can be colored or or even be a roman numeral which you have set with the conversion key. 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] Background on the 1st page only, page numbering from the 2nd page
On Wed, 2 May 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, how to specify the page background for the first page only Also see my replies in http://archive.contextgarden.net/thread/20120419.180814.c604f461.en.html#20120419.180814.c604f461 on how to achieve this using layers. 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] Background on the 1st page only, page numbering from the 2nd page
Thanks for the code - - actually, I'm not trying to create a "typical book" title page but just a kind of "cover" page. But I'll keep your suggestion in mind, I may use it in the future. Thanks anyway. Best regards, Lukas On Wed, 02 May 2012 15:22:01 +0200, Alan BRASLAU wrote: On Wed, 2 May 2012 14:24:24 +0200 Wolfgang Schuster wrote: Am 02.05.2012 um 09:45 schrieb Procházka Lukáš Ing. - Pontex s. r. o.: > how to specify the page background for the first page only and how > to start page numbering from the second page? \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}] \setupbackgrounds[paper][background=Bkg] \starttext \noheaderandfooterlines \dorecurse{5}{\input knuth\par} \stoptext If you want to create a title page (which may not be your intention), why not simply \definemakeup[titlepage][align=middle] \defineoverlay[COW][\externalfigure[cow]] \starttext \setupbackgrounds[page][background=COW] \starttitlepagemakeup A title \stoptitlepagemakeup \setupbackgrounds[page][background=] \setuppagenumbering[alternative=doublesided,way=bytext] \dorecurse{5}{\input knuth\par} \stoptext -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ 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] Background on the 1st page only, page numbering from the 2nd page
... One more question. Let's have three cases - some of them hide the page number on the first page, some of them don't. The question is - why: 1 - OK, no page number on page 1 \def\MyPageNumber#1{\doifelse{\pagenumber}{1}{}{\pagenumber}} % Testing \pagenumber \setuppagenumbering[location={footer,middle},command=\MyPageNumber] \starttext %\noheaderandfooterlines % COMMAND NOT USED \dorecurse{5}{\input knuth\par} \stoptext 2 - BAD, page number IS on page 1 \def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of \pagenumber \setuppagenumbering[location={footer,middle},command=\MyPageNumber] \starttext %\noheaderandfooterlines % COMMAND NOT USED \dorecurse{5}{\input knuth\par} \stoptext 3 - OK, no page number on page 1 \def\MyPageNumber#1{\doifelse{#1}{1}{}{\pagenumber}} % Testing #1 instead of \pagenumber \setuppagenumbering[location={footer,middle},command=\MyPageNumber] \starttext \noheaderandfooterlines % COMMAND IN USE \dorecurse{5}{\input knuth\par} \stoptext So - 1) What exactly does \noheaderandfooterlines do? 2) Why testing the #1 argument in the case 2 doesn't work? TIA. Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 ___ 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] Background on the 1st page only, page numbering from the 2nd page
On Wed, 2 May 2012 14:24:24 +0200 Wolfgang Schuster wrote: > > Am 02.05.2012 um 09:45 schrieb Procházka Lukáš Ing. - Pontex s. r. o.: > > > how to specify the page background for the first page only and how > > to start page numbering from the second page? > > \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}] > > \setupbackgrounds[paper][background=Bkg] > > \starttext \noheaderandfooterlines > \dorecurse{5}{\input knuth\par} > \stoptext If you want to create a title page (which may not be your intention), why not simply \definemakeup[titlepage][align=middle] \defineoverlay[COW][\externalfigure[cow]] \starttext \setupbackgrounds[page][background=COW] \starttitlepagemakeup A title \stoptitlepagemakeup \setupbackgrounds[page][background=] \setuppagenumbering[alternative=doublesided,way=bytext] \dorecurse{5}{\input knuth\par} \stoptext Question (for Wolfgang): Why did you use "paper" rather than "page" (what is the difference)? Alan ___ 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] Background on the 1st page only, page numbering from the 2nd page
Am 02.05.2012 um 09:45 schrieb Procházka Lukáš Ing. - Pontex s. r. o.: > Hello, > > how to specify the page background for the first page only and how to start > page numbering from the second page? > > Here's my trial: > > > \defineoverlay[Bkg][{\externalfigure[cow]}] > \setupbackgrounds[paper][background=Bkg] > > %\setuppagenumbering[state=2] > > \starttext > \dorecurse{5}{\input knuth} > \stoptext > > > - The background is on all pages, so is the page numbering. > > Any ideas? \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}] \setupbackgrounds[paper][background=Bkg] \starttext \noheaderandfooterlines \dorecurse{5}{\input knuth\par} \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] [***SPAM***] Indentation for beginner
I am putting together a needed resume and learning context at the same time. What I want is or should be simple, but I am not familiar with which options to set. I am using the following, because I don't want to use any margin for some forgotten reason, just text area. I am currently using this: (abbreviated) % % relevant snippet % \definedescription[rsection][location=left,width=3.0cm,headstyle=\sc] \rsection{Education} \startitemize[5,packed] \item bozo the clown \item is here today. \stopitemize \rsection{Work\\Experience} \startitemize[5,packed] \item UCLA BoA \item LMU BSCS \stopitemize ... % % end snippet % The above is fine, except that I want the items to be level with the "resume section header". As it is now the items come out below the resume section description, like this: EDUCATION * bozo the clown * is here today WORK EXPERIENCE * UCLA BoA * LMU BSCS - %Whereas I want it to be like this: EDUCATION* bozo the clown * is here today WORK * UCLA BoA EXPERIENCE * LMU BSCS % above or below WORK EXPERIENCE * UCLA BoA * LMU BSCS % In other words I want the first item of an itemization to line up with the resume section description header's first or last line. I am thinking it might be to set someing in the "before", "after", or "command" or to set maybe one to /nop out whatever is there currently. I don't know how to find out what commands these default to, if any, but even if I knew at this point, I would still be stuck. Though I'd like to know about that to. Any advice on this would be appreciated of how to get this desired format would be much appreciated. Regards, hwitloc ___ 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 \inmargin on \item lines
Hi, It is not a bug. It is standard TeX: a space counts after "}" and is ignored immediately after a control sequence such as "\item". To override either, you have to be explicit, "\ignorespaces" as Hans suggested in your case and "\ " (backslash-space) in the other to put a space in. My preferred, idiosyncratic, pedantic way to ignore spaces in this case is a comment symbol and newlines: \starttext \startitemize \item This is just a normal completely innocent paragraph against which one will be able to judge the amount of indentation of the next paragraph. \item\inmargin{Duck}% This paragraph has a duck inmargin comment \stopitemize \stoptext But I like newlines in my code, probably because I started editing text on 24x80 crt that would show only the first 80 characters of a line. Michael On May 2, 2012, at 12:33 AM, Malte Stien wrote: > Hi everyone, > > I am experiencing a problem with \inmargin{some text} in \itemized lists. I > am using them a lot in my documents, and it is kind of annoying. It appears > that if one uses the \inmargin macro just prior to the \item macro, the > in-margin text is typeset against the previous line, not the line with the > \item. Minimal example. > > \starttext > \startitemize > \item This is just a normal completely innocent paragraph against which > one will be able to judge the amount of indentation of the next paragraph. > \inmargin{Duck}\item This paragraph has a duck inmargin comment > \stopitemize > \stoptext > > That seems fair enough and even makes sense on some level. If however, one > reverses the two macros, like so: > > \item\inmargin{Duck} This paragraph has a duck inmargin comment > > the leading space just after the closing brace is actually printed. I take > this to be a bug, or is this by design? The only way I can around this is to > not use a space, like so: > > \item\inmargin{Duck}This paragraph has a duck inmargin comment > > But I don't find that to be a satisfying solution. After all I am using > ConTeXt because I am a bit pedantic about text, even the source code in this > case. > > Regards, > Malte. > This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). ___ 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] Background on the 1st page only, page numbering from the 2nd page
On 2012-05-02 Procházka Lukáš Ing. - Pontex s. r. o. wrote: > how to specify the page background for the first page only and how to start \definelayer [Bkg] \setlayer [Bkg] {\externalfigure [cow]} \setupbackgrounds [paper] [background=Bkg] \starttext \dorecurse{5}{\input knuth} \stoptext > page numbering from the second page? It's \setuppagenumbering [state=stop|start], the state command doesn't accept a number. 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] Bug with linenumbering
On 1-5-2012 21:43, Aditya Mahajan wrote: Hi, Line numbering does not respect the parameters given with \startlinenumbering. For example: Line numbering is a delayed operation. As they are handled when the page is constructed the settings of that moment apply. In practice only the start key is handled when you pass settings to \start (the only reason for having the second argument is number start/restart etc). If you want different renderings, the best is to define a specific instance of line numbering. Maybe a future version will be more clever. Hans - 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] Problem with \inmargin on \item lines
On 2-5-2012 06:33, Malte Stien wrote: Hi everyone, I am experiencing a problem with \inmargin{some text} in \itemized lists. I am using them a lot in my documents, and it is kind of annoying. It appears that if one uses the \inmargin macro just prior to the \item macro, the in-margin text is typeset against the previous line, not the line with the \item. Minimal example. \starttext \startitemize \item This is just a normal completely innocent paragraph against which one will be able to judge the amount of indentation of the next paragraph. \inmargin{Duck}\item This paragraph has a duck inmargin comment \stopitemize \stoptext That seems fair enough and even makes sense on some level. If however, one reverses the two macros, like so: \item\inmargin{Duck} This paragraph has a duck inmargin comment the leading space just after the closing brace is actually printed. I take this to be a bug, or is this by design? The only way I can around this is to not use a space, like so: \item\inmargin{Duck}This paragraph has a duck inmargin comment But I don't find that to be a satisfying solution. After all I am using ConTeXt because I am a bit pedantic about text, even the source code in this case. the magin note has to anchor somewhere so the second approach is the best as after all \item can start with doing spacing things concerning the space ... sometimes you want a space so gobbling the next one is debatable; you can of course wrap the command, as in: \def\myinmargin#1{\inmargin{#1}\ignorespaces} - 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] Background on the 1st page only, page numbering from the 2nd page
Hello, how to specify the page background for the first page only and how to start page numbering from the second page? Here's my trial: \defineoverlay[Bkg][{\externalfigure[cow]}] \setupbackgrounds[paper][background=Bkg] %\setuppagenumbering[state=2] \starttext \dorecurse{5}{\input knuth} \stoptext - The background is on all pages, so is the page numbering. Any ideas? Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 t.mkiv Description: Binary data t.pdf Description: Adobe PDF document ___ 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 ___