Re: [NTG-context] overlay
Am 22.11.2014 um 21:32 schrieb John Kitzmiller: Given rectangles with text: \starttext Before:\\ \startMPcode draw unitsquare xscaled 2cm yscaled 1cm; \stopMPcode \\ After:\\ \startMPcode for i=0 upto 1: draw unitsquare scaled 1cm xshifted i*cm; endfor; \stopMPcode \stoptext How can a line be drawn connecting the right edges of the rectangles? I have played with: \startuniqueMPgraphic{line} path a; a:=(0,0)--(0,3cm); draw a withpen pencircle scaled 3pt withcolor green; \stopuniqueMPgraphic \defineoverlay[line][{\uniqueMPgraphic{line}}] and using it in \framed, but placing the line correctly is elusive. Just a quick and dirty solution. The trick is to draw the extra line as part of the graphic and then fake the boundingbox. This is also limited to a few centimeter, objects are cut off after you reach that 'invisible' border around the boundingbox. I would use uniqueMPgraphic with proper parameters for the graphics. Using overlays is also possible (urcorner OverlayBox), but I see no real need or benefit to do so. HTH, Peter \startMPinclusions numeric lw; lw:= 1; numeric n; n:= 8; numeric u; u:= 1cm; \stopMPinclusions \starttext Before:\\ \startMPcode pickup pencircle scaled lw; draw unitsquare xyscaled (n*u,u); \stopMPcode \\ After:\\ \startMPcode path p,q; pickup pencircle scaled lw; p:= unitsquare scaled u; for i=0 upto n-1: draw p xshifted i*u; endfor; q:= boundingbox currentpicture; draw (urcorner(q) shifted(-.5lw,-.5lw)) -- (urcorner(q) shifted(-.5lw,-.5lw +1.5u)); setbounds currentpicture to q; \stopMPcode \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] Reference text differing from title
Hi, Is it possible to change the text shown in \about[...] to be something else than the text given to the titel key of \startsection? \starttext \startsection[ title={Very Long}, % referencetext={Short}, % - is there something like this? reference=mysec] We are now in \about[mysec]. % - should render as Short \stopsection \stoptext I have tried the following, but it introduces vertical white space: \starttext \startsection[title={Very Long}] \reference[mysec]{Short} %- introduces white space We are now in \about[mysec]. \stopsection \stoptext Thank you for any help, Christoph ___ 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 line break in linenotes
Dear list, sorry for writting again about this, but I have this sample: \showframe \definepapersize[HippPaper][width=6in, height=9in] \setuppapersize[HippPaper] \setupnote[linenote][rule=off, paragraph=yes, split=verystrict, scope=text, inbetween=\hskip1.5em, compress=yes] \setupnotation[linenote][numbercommand=, width=broad, alternative=serried, distance=1em] \starttext \startlinenumbering \showhyphens{testing paragraph} \dorecurse{50}{This\linenote{That} is\linenote{was} a\linenote{one} testing\linenote{nesting} sentence\linenote{table}. } \stoplinenumbering \stoptext It has wrong line breaks in linenotes with latest beta from 2014.11.17 14:32. It has also wrong linebreaks with stable version form 2014.01.03 00:40. But line breaks are right with version 2013.05.28 00:36 (which comes with TeX Live 2013). Line breaks are right, if I use footnotes instead of linenotes. Could anyone confirm this bug? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] Does EPUB output require mkiv?
It seems that \setupbackend does not work in mkii (I’ve put it into the environmentfile). Is indeed mkiv required? If so, is there an instruction somewhere how to move from mkii to mkiv? G ___ 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] small abstracts in table of contents?
I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible? G ___ 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] overlay
Am 22.11.2014 um 21:32 schrieb John Kitzmiller: Given rectangles with text: \starttext Before:\\ \startMPcode draw unitsquare xscaled 2cm yscaled 1cm; \stopMPcode \\ After:\\ \startMPcode for i=0 upto 1: draw unitsquare scaled 1cm xshifted i*cm; endfor; \stopMPcode \stoptext How can a line be drawn connecting the right edges of the rectangles? I have played with: \startuniqueMPgraphic{line} path a; a:=(0,0)--(0,3cm); draw a withpen pencircle scaled 3pt withcolor green; \stopuniqueMPgraphic \defineoverlay[line][{\uniqueMPgraphic{line}}] and using it in \framed, but placing the line correctly is elusive. Just a quick and dirty solution. The trick is to draw the extra line as part of the graphic and then fake the boundingbox. This is also limited to a few centimeter, objects are cut off after you reach that 'invisible' border around the boundingbox. I would use uniqueMPgraphic with proper parameters for the graphics. Using overlays is also possible (urcorner OverlayBox), but I see no real need or benefit to do so. HTH, Peter Yes it helped Peter, thank you. Interesting moves with the mpost bounding box. I thought I might need more flexibility—overlays—but it has turned out that single mp graphic with labels for the commentary will work for the task. Thanks again, John ___ 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] setupinmargin, setupmargindata ; page numbers ; fonts
Hi all, I am having trouble with the control of fonts in \inmargin{} and in page numbers. I'm also having trouble with the alignment in \inmargin{}, and with font sizes generally. I've used what I know about \setupmargindata and \setupinmargin(and \setuppagenumbering). Below is an example that (almost) does what I want. The two or three problems I've tried and failed to solve are 1. control over the font size of the marginal note (rather than just \small; I want to choose a point-size) 2. control over the font and size of the page number. At first I used \setuppagenumbering[location={header, right, inmargin}] (yes, one of 'right' and 'inmargin' seems to be redundant). Getting a sans-serif page number, I assumed that \setupmargindata was controlling that, so I just switched to 'right', but my page number is still sans-serif. I've tried such things as [location={header, right}, style={normal, small}], as well as variants {\small}, {normal}, {\normal}, serif, \serif, etc. with not luck 3. in \setupmargindata and \setupinmargin, none of the 'align=' options seems to have any effect. More generally, I have trouble understanding how to specify font sizes in ConTeXt, how to set up the font and font-size of page elements, how to include comma-separated lists following 'style=', where even within braces all but the first option seems to be ignored (at least in my margin setup commands). I also can't figure out why, though the default (location) for \setuppagenumbering is {header, center} (and (font style) normal?), my page numbers default to sans, and when 'location=right' is specified without 'header', the page number is on the right in the ... footer (?!) Thanks for any help. -Richard \setuplayout[width=5in, header=.5in, footer=.5in, backspace=2in, location=right] \setupwhitespace[big] \setupindenting[none] \setupmargindata[location=left, align=outer, style={\ss \small}] \setuppagenumbering[location={header, right}] \definefontfamily [myfamily] [serif] [baskervaldx] \definefontfamily [myfamily] [italic] [baskervaldxita] \definefontfamily [myfamily] [bold] [baskervaldxbol] \definefontfamily [myfamily] [sans] [gillsansstd] \definefontfamily [myfamily] [mono] [CourierNew] \setupbodyfont [myfamily] \starttext ConTeXt is software\inmargin{A brief description of \ConTeXt} for typesetting high-quality documents. Unlike familiar word processors where the \emph{formatting} of the final document is crafted while writing the content, ConTeXt documents are written \bold{without} formatting, in \mono{plain text}, using a macro language. This means that the document's content can change independently of its formatting and vice versa. ConTeXt is software for typesetting high-quality documents.\inmargin{This repeats the brief description above} Unlike familiar word processors where the formatting of the final document is crafted while writing the content, ConTeXt documents are written without formatting, in plain text, using a macro language. This means that the document's content can change independently of its formatting and vice versa. \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 ___
Re: [NTG-context] setupinmargin, setupmargindata ; page numbers ; fonts
Am 25.11.2014 um 03:47 schrieb Richard Sherman rss@gmail.com: Hi all, I am having trouble with the control of fonts in \inmargin{} and in page numbers. I'm also having trouble with the alignment in \inmargin{}, and with font sizes generally. I've used what I know about \setupmargindata and \setupinmargin(and \setuppagenumbering). Below is an example that (almost) does what I want. The two or three problems I've tried and failed to solve are 1. control over the font size of the marginal note (rather than just \small; I want to choose a point-size) 2. control over the font and size of the page number. At first I used \setuppagenumbering[location={header, right, inmargin}] (yes, one of 'right' and 'inmargin' seems to be redundant). Getting a sans-serif page number, I assumed that \setupmargindata was controlling that, so I just switched to 'right', but my page number is still sans-serif. I've tried such things as [location={header, right}, style={normal, small}], as well as variants {\small}, {normal}, {\normal}, serif, \serif, etc. with not luck 3. in \setupmargindata and \setupinmargin, none of the 'align=' options seems to have any effect. More generally, I have trouble understanding how to specify font sizes in ConTeXt, how to set up the font and font-size of page elements, how to include comma-separated lists following 'style=', where even within braces all but the first option seems to be ignored (at least in my margin setup commands). I also can't figure out why, though the default (location) for \setuppagenumbering is {header, center} (and (font style) normal?), my page numbers default to sans, and when 'location=right' is specified without 'header', the page number is on the right in the ... footer (?!) 1. The font for the pagenumber can be changed with \setuppagenumbering[style=…]. 2. To use a certain font size for the margin text you can either use the \switchtobodyfont command or define a font command with \definefont and use this name as argument for the style key in \setupmargindata. 3. The alignment in the margin text can be set with \setupmarginframed or the second optional argument of \inmargin. \setuppagenumbering[style=\ttc] \setuplayout[backspace=4cm] \showframe \setupmarginframed[inmargin][align=flushleft] \setupmargindata [inmargin][style={\switchtobodyfont[ss,18]}] % Faster method to switch the font for \inmargin %\definefont[InmarginStyle][Sans at 18pt] %\setupmargindata[inmargin][style=InmarginStyle] \starttext \dorecurse{10} {\inmargin{Ward} \input ward\par \inmargin[][align=flushleft]{Knuth} \input knuth\par \inmargin[][align=flushright]{Tufte} \input tufte\par \inmargin[][align=middle]{Zapf} \input zapf\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 ___
Re: [NTG-context] overlay
Am 22.11.2014 um 21:32 schrieb John Kitzmiller k...@inradius.net: Given rectangles with text: \starttext Before:\\ \startMPcode draw unitsquare xscaled 2cm yscaled 1cm; \stopMPcode \\ After:\\ \startMPcode for i=0 upto 1: draw unitsquare scaled 1cm xshifted i*cm; endfor; \stopMPcode \stoptext How can a line be drawn connecting the right edges of the rectangles? I have played with: \startuniqueMPgraphic{line} path a; a:=(0,0)--(0,3cm); draw a withpen pencircle scaled 3pt withcolor green; \stopuniqueMPgraphic \defineoverlay[line][{\uniqueMPgraphic{line}}] and using it in \framed, but placing the line correctly is elusive. Look at chapter 5 in the metafun manual. 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] small abstracts in table of contents?
Am 25.11.2014 um 00:41 schrieb Gerben Wierda gerben.wie...@rna.nl: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible? You can use the \writebetweenlist or \writetolist commands for this. 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] small abstracts in table of contents?
Hi Gerben, As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list): \definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext Best regards: OK On 25 Nov 2014, at 00:41, Gerben Wierda gerben.wie...@rna.nl wrote: I have a standard ToC, but what I’d like to have is that each chapter item (I don’t go lower than that in the hierarchy) comes with its own little abstract.Is that possible? G ___ 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 ___ ___ 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] small abstracts in table of contents?
On 11/25/2014 8:18 AM, Otared Kavian wrote: Hi Gerben, As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list): \definelist[chaptertext] \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument] \starttext \placelist[chapter,chaptertext] \chapter{This is a chapter} \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward } \input knuth.tex \stoptext The mkiv way: \starttext \unexpanded\def\ShowSummary#1#2#3% {\inleftmargin{#1}\structurelistuservariable{summary}\blank} \placelist[chapter][alternative=command,command=\ShowSummary] \startchapter [title={This is a chapter}] [summary={This is a small description of this chapter}] \input knuth.tex \stopchapter \startchapter [title={This is also a chapter}] [summary={This is a larger description of this chapter}] \input ward.tex \stopchapter \stoptext - 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 ___