[NTG-context] setting margins in makeup
I'm having trouble resetting my margins in makeup pages. I want the makeup pages to have equal topspace, bottomspace, backspace and cutspace, regardless of the standard layout of the rest of the document. Following Wolfgang's recommendation ( http://www.ntg.nl/pipermail/ntg-context/2014/079409.html), I tried the following: \setuppapersize [A4][A4] % Standard page layout \setuplayout[width=middle, backspace=1.5in, cutspace=1.5in, height=middle, topspace=0.75in, bottomspace=0.75in] % Title page layout % \definemakeup defines a layout with the same name, which we alter. \definemakeup[titlepage] \setuplayout [titlepage][width=middle, backspace=20mm, height=middle, topspace=20mm] \starttext \startmakeup[titlepage][top=,] bla \stopmakeup But, on my system, this puts the bla too far from the top of the page, and it looks as though the topspace has not been set properly. (Backspace seems ok), Am I doing something wrong or is there a better way to achieve this? Also, the manual says I can use the command \showframe to display frames to help in debugging, but that doesn't seem to do anything for me? Thanks in advance, Mark ___ 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] setting margins in makeup
Sorry for the noise, I've solved it, turns out makeup pages still have headers which you need to set to zero if you want uniform margins: % Title page layout % \definemakeup defines a layout with the same name, which we alter. \definemakeup[titlepage] \setuplayout [titlepage][width=middle, backspace=20mm, height=middle, topspace=20mm, header=0mm] did the trick for me. Incidentally, what threw me off was the phrasing in the manual: 4.19 Makeup A document may have a titlepage, a colofon and some pages that are not directly related to the main part of the document. Mostly these pages are not numbered and can do without headers and footers. Because their layout needs extra attention we prefer the word makeup for defining their specific layout. Since my makeup pages indeed don't have page numbers, I presumed they wouldn't have headers either. I may have read too much into that, but perhaps that passage can be improved? On Fri, Dec 19, 2014 at 3:33 PM, Mark Szepieniec mszep...@gmail.com wrote: I'm having trouble resetting my margins in makeup pages. I want the makeup pages to have equal topspace, bottomspace, backspace and cutspace, regardless of the standard layout of the rest of the document. Following Wolfgang's recommendation ( http://www.ntg.nl/pipermail/ntg-context/2014/079409.html), I tried the following: \setuppapersize [A4][A4] % Standard page layout \setuplayout[width=middle, backspace=1.5in, cutspace=1.5in, height=middle, topspace=0.75in, bottomspace=0.75in] % Title page layout % \definemakeup defines a layout with the same name, which we alter. \definemakeup[titlepage] \setuplayout [titlepage][width=middle, backspace=20mm, height=middle, topspace=20mm] \starttext \startmakeup[titlepage][top=,] bla \stopmakeup But, on my system, this puts the bla too far from the top of the page, and it looks as though the topspace has not been set properly. (Backspace seems ok), Am I doing something wrong or is there a better way to achieve this? Also, the manual says I can use the command \showframe to display frames to help in debugging, but that doesn't seem to do anything for me? Thanks in advance, Mark ___ 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] vertical alignment of table of contents in makeup
There is a trick mentioned on the wiki for top-aligning the contents of a makeup page, namely adding top=,, which cancels the default value of \vss, which is infinitely strechable space. However, that doesn't seem to work when the first element in the makeup page is \completecontent: \starttext % top= here doesn't seem to be working... \startmakeup[standard][top=,] \completecontent \section{testsection} \stopmakeup \stoptext Here, the table of contents and the section are both placed on the makeup page, but they are centered vertically. If the \completecontent line is commented out, the correct vertical alignment of the section header is obtained. Is there a way to get top-alignment when a makeup page starts with \completecontent? Is this a bug? Or should I even be using makeup pages in my table of contents? Mark ___ 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] Strange bug with overviewpage module.
Hi, Some time ago, Hans had helped me to write an 'overviewpage' module, that makes it easy to show a overview of the important slides at the end of a presentation. I have tweaked this module slightly to be able to save an arbitrary page by using \saveoverviewpage{reference} and reuse the page by \useoverviewpage{reference} An example is: \usemodule[overviewpage] \setuppapersize[S4] \setupframedtext[rulethickness=3pt] \starttext \startframedtext \input ward \stopframedtext \saveoverviewpage{ward} \page \input tufte \page \scale[width=0.5\textwidth]{\useoverviewpage{ward}} \stoptext However, when I save a page that contains a framed box (as in the above example), the box looses its right frame when it is displayed again (see page 3 of the attached pdf). It appears that the left edge is twice as thick. Any idea why this is happening and how I can avoid this? Thanks, Aditya test.pdf Description: Adobe PDF document %D \module %D [ file=t-overviewpage, %D version=2013.08.31, %Dtitle=\CONTEXT\ User Module, %D subtitle=Page Overviews, %D author=Aditya Mahajan and Hans Hagen, %D date=\currentdate, %Dcopyright=Aditya Mahajan, %Demail=adityam at ieee dot org, %D license=Simplified BSD License] \writestatus{loading}{Overview Page (ver: 2013.08.31)} \startmodule [overviewpage] \unprotect \setupmodule [\c!level=] \installnamespace{overviewpage} \initializeboxstack{\overviewpage} \newconditional\c_overviewpage_state \unexpanded\def\enablesaveoverviewpage {\global\settrue\c_overviewpage_state} \unexpanded\def\saveoverviewpage#1% {\enablesaveoverviewpage \setevalue{\overviewpage:page:#1}{\the\realpageno}} \unexpanded\def\useoverviewpage#1% {\writestatus{overviewpage}{using page #1 (\getvalue{\overviewpage:page:#1})}% \expanded{\foundbox{\overviewpage}{\getvalue{\overviewpage:page:#1 \unexpanded\def\overviewpage_save_page#1% {\ifconditional\c_overviewpage_state \setbox\nextbox\hbox{#1}% \setbox\scratchbox\copy\nextbox \cleanupbox\scratchbox % remove nodes that should not be seen in the backend twice \writestatus{overviewpage}{saving overviewpage \the\realpageno}% \savebox{\overviewpage}{\the\realpageno}{\box\scratchbox}% \global\setfalse\c_overviewpage_state \page_shipouts_normal{\box\nextbox}% \else \page_shipouts_normal{#1}% \fi} \appendtoks \doif {\headparameter{option:overviewpage}} \v!yes \enablesaveoverviewpage \to \everyheadsynchronization \installshipoutmethod{overviewpage}\overviewpage_save_page \unexpanded\def\overviewpage_setup_head#1% {\setuphead[#1][option:overviewpage=\v!yes]} \appendtoks \processcommacommand [\moduleparameter{overviewpage}\c!level] \overviewpage_setup_head \to \everysetupmodule \the\everysetupmodule \setuppaper [\c!method=overviewpage] \definelistalternative [overviewpage] [\c!renderingsetup=\??listrenderings:overview] \setuplistalternative [overviewpage] [\c!before=\dontleavehmode, \c!after=\hskip\zeropoint\relax, % \c!width=\ctxlua{moduledata.overviewpage.calculatedwidth(\listlength)}] \c!width=\ctxlua{moduledata.overviewpage.calculatedwidth(structures.lists.size())}] \startsetups[\??listrenderings:overview] \doifboxelse{\overviewpage}{\structurelistrealpagenumber} {\listalternativeparameter\c!before \startcurrentlistentrywrapper \scale [\c!width=\listalternativeparameter\c!width] {\foundbox{\overviewpage}{\structurelistrealpagenumber}}% \stopcurrentlistentrywrapper \listalternativeparameter\c!after} {}% \stopsetups \definemakeup [overviewpage] [\c!align=\v!middle] \definelayout [overviewpage] [\v!page] \startluacode moduledata = moduledata or { } moduledata.overviewpage = moduledata.overviewpage or { } function moduledata.overviewpage.calculatedwidth(pages) context(%f\\textwidth,1/math.ceil(math.sqrt(pages))) end \stopluacode % Ideally, we would like to simply use the definition below. % However, the `before` and `after` keys are not used with `\placecombinedlist`. % Therefore we use a more manual solution. % \definecombinedlist [overviewpage] [\moduleparameter{overviewpage}\c!level] [ %\c!before=\startoverviewpagemakeup, %\c!after=\stopoverviewpagemakeup, \c!criterium=\v!all, \c!alternative=overviewpage, ] \unexpanded\def\placeoverviewpage {\dosingleargument\doplaceoverviewpage} \def\doplaceoverviewpage[#1]% {\startoverviewpagemakeup \placecombinedlist[overviewpage][#1] \stopoverviewpagemakeup} \protect \stopmodule ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /
Re: [NTG-context] Strange bug with overviewpage module.
Hi Aditya, Thanks for sharing, but here your module works fine… Please see the attached file. Best regards: OK overviwepage-test.pdf Description: Adobe PDF document On 20 Dec 2014, at 06:51, Aditya Mahajan adit...@umich.edu wrote: Hi, Some time ago, Hans had helped me to write an 'overviewpage' module, that makes it easy to show a overview of the important slides at the end of a presentation. I have tweaked this module slightly to be able to save an arbitrary page by using \saveoverviewpage{reference} and reuse the page by \useoverviewpage{reference} An example is: \usemodule[overviewpage] \setuppapersize[S4] \setupframedtext[rulethickness=3pt] \starttext \startframedtext \input ward \stopframedtext \saveoverviewpage{ward} \page \input tufte \page \scale[width=0.5\textwidth]{\useoverviewpage{ward}} \stoptext However, when I save a page that contains a framed box (as in the above example), the box looses its right frame when it is displayed again (see page 3 of the attached pdf). It appears that the left edge is twice as thick. Any idea why this is happening and how I can avoid this? Thanks, Adityatest.pdft-overviewpage.mkiv___ 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] expand date from CSV file
;-) Thanx Peter. I'm too not thought about solutions :-). I was so focused to mined data from a CSV file, and I've not think much about the appropriate algorithm. I love attentive and thoughtful people (although often I'm not alone such) Maybe I corrected in a subsequent e-mail properly. One more thanx. Jaroslav Hajtmar Dne 18.12.2014 v 13:37 Peter Münster napsal(a): On Thu, Dec 18 2014, Jaroslav Hajtmar wrote: if (year2000) then year=year+2000 end; Hi, What about Test;11/11/1999 ... ;-) ___ 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] Strange bug with overviewpage module.
On Sat, 20 Dec 2014, Otared Kavian wrote: Hi Aditya, Thanks for sharing, but here your module works fine… Please see the attached file. Otared, thanks for testing! Updating ConTeXt does fix this issue. 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 ___