Re: [NTG-context] How to cite online websites (reloaded)
This is my file .tex file now: \usemodule[bib] \usemodule[bibltx] \setupbibtex[database=sample] \setuppublications[numbering=yes] \starttext As \cite[hh2010] already indicated... \completepublications \stoptext In the same folder is my sample.bib, which I copied from the CTX distribution. Example: @ELECTRONIC{hh2010, author = hh, year = {2010}, title = {Metafun. \CONTEXT\ mkiv}, url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf}, } This is the output from the PDF-file: *As [[error 2]] already indicated...* The output in the placelist section (no entries): *1 References* I don't see what I am doing wrong. This is how I updated CTX: first-setup -engine=luatex -modules=all -fonts=all to version *2018.09.01 23:10* Thanks for help in advance, Lars. Am Mo., 3. Sep. 2018 um 07:47 Uhr schrieb Alan Braslau < braslau.l...@comcast.net>: > \usemodule[bib] > \usemodule[bibltx] > \setupbibtex[database=sample] > > > On 3 Sep 2018, at 01:43, Lars wrote: > > > > Hi Alan, > > I don't understand. What is it that makes my code mkii? > > > > \usebtxdataset[default][My_file.bib] > > \usebtxdefinitions[aps] > > \setupbtxlist[aps][ > > %alternative=, > > width=fit, > > distance=.5em, > > %distance=0pt, > > margin=0em, > > ] > > > > \starttext > > Hallo Welt! \cite[lnkHWelt] > > > > \startappendices > > \startsection[title={Pubs},marking={}] > > \placelistofpublications[method=dataset] > > \stopsection > > \stopappendices > > \stoptext > > And that's in My_file.bib: > > > > @Misc{lnkHWelt, > > Note = "zuletzt abgerufen am 5. Aug. 2018", > > Url = "http://wiki.contextgarden.net"; > > } > > > > What would be the mkiv way? > > > > Thanks in advance, Lars. > > > > > > Am 02/09/2018 um 23:56 schrieb Alan Braslau: > >> You are using the old mkii BibTeX module, not the bibliography database > system that is part of the mkiv core. > >> > >> 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://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] repeat layer recto pages
Muchas gracias Pablo, that was most helpful, and of course it works. The particular part that I was missing (there was already alternative=doublesided in the preamble) of course was the \startsectionblockenvironment[bodypart], so thanks for highlighting that. I was also a bit confused about the difference between state=repeat and repeat=yes, and I can see that both do work in the snippet you gave me, so perhaps there is no difference between these? Julian On 10/11/21 2:05 am, Pablo Rodriguez via ntg-context wrote: On 11/9/21 4:18 AM, jbf via ntg-context wrote: I want a particular layer to repeat on recto pages only, but I don't want this to happen in frontmatter, only in bodymatter. This is what I have done, just before the first chapter after \startbodymatter (but unsuccessfully; the layer repeats for every page at the moment. I must have omitted something). Hi Julian, this is what you want: \startsectionblockenvironment[bodypart] \setupbackgrounds [rightpage] [background=butterfly] \stopsectionblockenvironment \startbodymatter \setupbackgrounds [rightpage] [background=butterfly] \startchapter[title={Chapter title}] \definelayer[butterfly] [x=0mm, y=0mm,repeat=yes,width=\paperwidth, height=\paperheight] \setlayer[butterfly] [hoffset=.99\textwidth, voffset=1cm] {\externalfigure[bfly.jpg][width=1.5cm]} \setupbackgrounds[page][background=butterfly] The last line adds backgrounds to every page. And without doublesided, there are not right and left pages. And you don’t need the \define and \setlayer after \startchapter. A complete sample would read: \setuppagenumbering[alternative=doublesided] \definelayer[butterfly][state=repeat] \setlayer[butterfly] [hoffset=.99\textwidth, voffset=1cm] {butterfly} \startsectionblockenvironment[bodypart] \setupbackgrounds [rightpage] [background=butterfly] \stopsectionblockenvironment \def\rubbish% {\dorecurse{2} {\chapter{Chapter} \dorecurse{25}{\input knuth}}} \starttext \startfrontmatter \rubbish \stopfrontmatter \startbodymatter \rubbish \stopbodymatter \startappendices \rubbish \stopappendices \startbackmatter \rubbish \stopbackmatter \stoptext I hope it helps, Pablo ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Pagenumbering of appendices
On Fri, Sep 11, 2009 at 2:34 PM, Olaf Mersmann < olafm+cont...@kimberly.tako.de > wrote: > * Derek CORDEIRO [090911 07:51]: > > On Thu, Sep 10, 2009 at 9:10 PM, > > > > > wrote: > > > I've been trying to turn off the conversion of page numbers to roman > > > numerals in my appendix without any luck. Here is a minimal example: > > > > > > \setuppagenumbering[way=bytext,location={bottom, right}] > > > \startsectionblockenvironment[bodypart] > > >\setuppagenumber[number=1, state=start] > > > \stopsectionblockenvironment > > > \startsectionblockenvironment[appendix] > > > > > > > \setupuserpagenumber[numberconversion=numbers] > > > > \setuppagenumbering is still used for the other parameters below. > > Thanks for the hint. Never saw \setupuserpagenumber[] before. > > > Please refer to this thread: > > http://www.ntg.nl/pipermail/ntg-context/2009/043284.html for a related > > discussion. > > I tried to run an expanded version of the minimal example Wolfgang > provided with the current minimals and it gave the following error: > > ... > systems : begin file simple at line 24 > structure : begin of sectionblock frontpart > structure : title @ level 2 : 0.0 -> \headtext {content} > ! LuaTeX error > ...0910/tex/texmf-context/tex/context/base/strc-pag.lua:104: bad argument #3 > to 'format' (string expected, got table) > stack traceback: > [C]: in function 'format' > ...0910/tex/texmf-context/tex/context/base/strc-pag.lua:104: in > function 'number' > ...0910/tex/texmf-context/tex/context/base/strc-pag.lua:172: in > function 'prefixpage' > ...0910/tex/texmf-context/tex/context/base/strc-lst.lua:399: in > function 'prefixedpage' > :1: in main chunk. > > The example is: > > \definestructureconversionset[frontpart:pagenumber] [] [romannumerals] > \definestructureconversionset[bodypart:pagenumber] [] [numbers] > \definestructureconversionset[appendix:pagenumber] [] [numbers] > \definestructureconversionset[backpart:pagenumber] [] [numbers] > > \startstructureblockenvironment[frontpart] > \setupuserpagenumber[numberconversion=romannumerals] > \setuppagenumber[number=1] > \stopstructureblockenvironment > > \startstructureblockenvironment[bodypart] >\setupuserpagenumber[numberconversion=numbers] >\setuppagenumber[number=1] > \stopstructureblockenvironment > > \startstructureblockenvironment[appendix] > \setupuserpagenumber[numberconversion=numbers] > \stopstructureblockenvironment > > \startstructureblockenvironment[backpart] > \setupuserpagenumber[numberconversion=numbers] > \stopstructureblockenvironment > > \starttext > \startfrontmatter >\completecontent[criterium=all] >\chapter{Front} >\input tufte > \stopfrontmatter > \startbodymatter > \chapter{Body} > \input knuth > \stopbodymatter > \startappendices > \chapter{Appendix} > \input knuth > \stopappendices > \startbackmatter >\chapter{Back} >\input knuth > \stopbackmatter > \stoptext > > The original gave the same error for me. Any help in debugging this > would be appreciated. > > Hans has squashed those bugs. If you update ConTeXt it should be working fine. -- A few minutes of yours can give many minutes of education to someone less priviledged. Go to my blog(http://teachmetowrite.blogspot.com/) and click on the social vibe badge to make a difference. ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting ToC to match page numbering
I have three issues where page number formatting in the table of contents is wrong compared to the pages themselves: 1. The separator character in the actual pagenumbers is "/". In the ToC it displays as a "-". 2. I used "left=A" on the pagenumbering command in the appendices because appendices are numbered A1, A2 etc. This gives the required output for the actual pagenumbers, but there is no 'A' prefix in the ToC. 3. Similarly in the backmatter I have added a 'I/' prefix to the pagenumber ("left={I/}"), which works on the pages but is not reflected in the ToC. The overall question is how to get each of these page numbering features repeated in the table of contents? Thanks. Minimal file follows. Duncan %% Tested on live.contextgarden \setupoutput[pdftex] %% change appendix numbering from Character to numbers \setupsection[section-2][appendixconversion=numbers] %% define new chapter-like heads for different sections \definehead[Frontchapter][chapter] \definehead[Appchapter][chapter] \definehead[Backchapter][chapter] %% set up individual content lists and labels \setuplist[Frontchapter][pagenumber=yes] \setuplabeltext[en][chapter={Module }] \setuplist[chapter][pagenumber=yes,chapternumber=yes,label=yes] \setuplabeltext[en][Appchapter={Appendix }] \setuplist[Appchapter][pagenumber=yes,chapternumber=yes,label=yes] \setuplist[Backchapter][pagenumber=yes] %% set up the combined list \definecombinedlist[Xontents] [part,Frontchapter,chapter,Appchapter,Backchapter,section] [level=section,criterium=local] \setupcombinedlist[Xontents][alternative=b,aligntitle=yes,distance=4em] %% page numbering is output using the explicit \completepagenumber %% command in the footer because the final output has rather %% complicated footers which incorporate the page number. \setupfootertexts[text] [][{\inframed{\kern.3em\completepagenumber\kern.3em}}] [][{\inframed{\kern.3em\completepagenumber\kern.3em}\hfill}] \starttext \startfrontmatter %% page numbering is set up for each section \setuppagenumbering[state=start,alternative={singlesided,doublesided}, location=,chapternumber=no,partnumber=no,conversion=romannumerals] \title{Contents} \placecombinedlist[Xontents] \Frontchapter{Test Intro} \dorecurse{3}{\input tufte\par} \stopfrontmatter \startbodymatter %% for the body and appendices we prefix the chapternumber and a '/' \setuppagenumbering[state=start,alternative={singlesided,doublesided},location=, way=bychapter,partnumber=no,chapternumber=yes,numberseparator={/}] \chapter{Test Chapter} \dorecurse{3}{\input tufte\par} \chapter{Another Test Chapter} \dorecurse{3}{\input tufte\par} \stopbodymatter \startappendices \setuppagenumbering[state=start,alternative={singlesided,doublesided},location=, way=bychapter,partnumber=no,left=A,chapternumber=yes,numberseparator={/}] \Appchapter{Test Appendix} \dorecurse{3}{\input tufte\par} \stopappendices \startbackmatter %% for the backmatter we just prefix I/ (it's going to be the index) \setuppagenumbering[state=start,alternative={singlesided,doublesided}, location=,way=bychapter,left={I/}] \setuppagenumber[number=1] \Backchapter{Index} \dorecurse{3}{\input tufte\par} \stopbackmatter \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] A couple of questions on heads.
> Message: 2 > Date: Wed, 3 Jan 2007 12:32:30 -0500 (EST) > From: Aditya Mahajan <[EMAIL PROTECTED]> > Subject: Re: [NTG-context] A couple of questions on heads. > To: mailing list for ConTeXt users > Message-ID: <[EMAIL PROTECTED]> > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > On Wed, 3 Jan 2007, Elliot Clifton wrote: > > > > > > > Message: 8 > > > Date: Tue, 2 Jan 2007 20:20:31 -0500 (EST) > > > From: Aditya Mahajan <[EMAIL PROTECTED]> > > > Subject: Re: [NTG-context] A couple of questions on heads. > > > To: mailing list for ConTeXt users > > > Message-ID: <[EMAIL PROTECTED]> > > > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > > > > > > On Tue, 2 Jan 2007, Elliot Clifton wrote: > > > > > > > I'm typesetting a journal. I use \chapter to divide it into articles. > > > > I've defined my own heads, and I need to redefine \appendix, however > > > > despite reading the manual I cant get them behave as I want. > > > > > > > > Problems: > > > > > > > > 1. Each article may have appendices. I've tried defining my own > > > > 'appendix' head to replace the default one, but I can't decide which > > > > to use, should I derive from chapter or section? The problem with > > > > using section as the base, is that the count from my previous sections > > > > is inherited. I don't want numbers of the form 1.1, 1.2, etc, either. > > > > I want to number my appendices independently, starting from 1 without > > > > the chapter number. Also, I would like to use roman numerals. > > > > > > You can separate the appendices by a section block. For example > > > > > > % appendix is already a section block. By default, a section > > > % block starts a new page, you may not want that in a journal > > > \setupsectionblock[appendix][page=] > > > > > > > > > % Change the conversion for sections in appendices. > > > \setupsection > > >[section-3] > > >[appendixconversion=Romannumerals] > > > > > > > > > \starttext > > > > > > \section{Test} > > > > > > \startappendices > > > \section{An Appendix} > > > \stopappendices > > > > > > \stoptext > > > > > > > > > > > > HTH, > > > > > > > Yep. Thanks. > > > > I am now using section blocks to create meta-sections, so that inside > > the body-matter sections have no numbers whilst the appendices do. It > > works great. > > > > One minor problem though. I need the appendices to have labels, like: > > Appendix I, etc.. > > > > \setuplabeltext[appendix=Appendix] does not work in this situation > > what is the correct way of doing it? > > You also need to tell context to use the labeltext, by saying > > \setuphead >[section] >[appendixlabel=appendix, > placehead=yes] > > % Make sure that \setuplabeltext[section=] is empty. > % By default it is empty. > Thanks. That does the trick. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Interactive table of content -- jumps always 1 page too far
> Hi Rob, > > there is a minimal sample: > > \setupcolors[state=start] > \setupinteraction[state=start, focus=standard] > \setupinteractionscreen[width=fit] > \definecombinedlist[content][all] > \setuphead[part][placehead=yes] > \starttext > \completecontent > \dorecurse{5} > {\part{Part} > \input zapf > \chapter{Chapter} > \input zapf > \section{Section} > \input zapf > \subsection{Subsection} > \input zapf} > \stoptext > > It doesnât show what you meant, the link destination is not on the > heading itself, but on the next paragraph. > > I think this should be improved. And I guess it goes unnoticed, because > after clicking on a link, the browser fits view to page. > >> Can anyone guid me on where to look or what to try to solve this nasty >> problem? > > All you can do is to copy your file to a temporary version and start > commenting commands from the preamble in that temporary version. > > This is trial and error. Remove individual commands from preamble, > compile the document and check the error. > > When the error dissapeared, you have probably found its cause. If you > report it to the mailing list, people will tell whether it is a bug or > your code needs improvements. > > Donât do any other changes to that temporary file. After the bug > hunting, you should delete that file. > > Sorry, but (Iâm afraid) this is the best way I know to hunt undefined > bugs. > > I hope it helps, > > > Pablo > -- > http://www.ousia.tk > The code looks likes this, but this examples does not exhibit the same faulty off-by-1-page interactive page jump behaviour. In the chapters in the body matter, always directly after a new chapter a section begins (in this example omitted). \setupinteraction[state=start] \setuppagenumbering[location=,alternative=doublesided] \definemakeup [titlepage] [align=middle,style=\bf] \starttext \startfrontmatter Small title \page \phantom{x}\vfill Colofon \page \starttitlepagemakeup BIG TITLE \stoptitlepagemakeup % <- empty page inserted after here, so page number becomes 5 \setcounter[userpage][5] % <- without this, the page number = 3 \setuppagenumbering[location={footer,middle}] \completecontent \chapter{Introduction} \dorecurse{4}{\input zapf} \stopfrontmatter \startbodymatter \setuppagenumbering[location={header,middle}] \dorecurse{21}{\chapter{Knuth} \dorecurse{10}{\input knuth}} \stopbodymatter \startappendices \chapter{Appendix} \dorecurse{4}{\input zapf} \stopappendices \startbackmatter \chapter{Notes} \dorecurse{4}{\input zapf} \stopbackmatter \stoptext I'ĺl start trying \enabletrackers... ___ 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] How to use \setuplist for formatting a chapter entry?
> You have to write a working minimal example for further help. > > Wolfgang > So this is the example: \setupinteraction[state=start] \definehead[intro][chapter] \definehead[back][chapter] \definehead[appendix][chapter] \definecombinedlist[content][chapter,intro,appendix,back] \setupcombinedlist[content][alternative=c] \setupheadtext[content=Inhoud] \setupheadtext[chapter=Hoofdstuk] \setupheadtext[appendix=Bijlage] \setupheadtext[back=Noten] \definefiller[ChapterFiller] \define[1]\MyContentCommand% {\framed[frame=off,offset=none,frameoffset=0pt] {\vbox{\blank[4cm]\Word{#1 \define[1]\MyIntroCommand% {\framed[frame=off,offset=none,frameoffset=0pt] {\vbox{\blank[4cm]\Word{#1 \define[2]\MyChapterCommand% {\framed[frame=off,offset=none,frameoffset=0pt] {\vbox{\blank[4cm]{\small \headtext{chapter} #1}\blank\unhyphenated{#2 \define[1]\MyAppendixCommand% {\framed[frame=off,offset=none,frameoffset=0pt] {\vbox{\blank[4cm]{\small \headtext{appendix}}\blank\unhyphenated{#1 \define[1]\MyBackCommand% {\framed[frame=off,offset=none,frameoffset=0pt] {\vbox{\blank[4cm]{\small \headtext{back}}\blank\unhyphenated{#1 \definefiller[ChapterFiller] \define[1]\ChapterNumberToc% {Hoofdstuk #1 -- } \define[3]\ChapterToc% {\vbox{\bf Hoofdstuk #1 -- #2 \filler[ChapterFiller] #3}} \define[1]\AppendixToc% {Bijlage -- #1} \define[1]\BackToc% {Noten -- #1} \setuphead[intro][number=no,header=nomarking,command=\MyIntroCommand] \setuphead[chapter][header=nomarking,command=\MyChapterCommand,aligntitle=yes,align={flushleft,nothyphenated,verytolerant}] \setuphead[title][command=,textcommand=\MyContentCommand] \setuphead[appendix][number=no,header=nomarking,command=,textcommand=\MyAppendixCommand,align={flushleft,nothyphenated,verytolerant}] \setuphead[back][number=no,header=nomarking,command=,textcommand=\MyBackCommand,align={flushleft,nothyphenated,verytolerant}] \setuplist[chapter][headnumber=yes,style=bold,width=17ex,numbercommand=\ChapterNumberToc] %\setuplist[chapter][headnumber=yes,style=bold,alternative=command,command=\ChapterToc] \setuplist[appendix][headnumber=no,style=bold,textcommand=\AppendixToc] \setuplist[back][headnumber=no,style=bold,textcommand=\BackToc] \starttext \completecontent \startfrontmatter \intro{Intro} \stopfrontmatter \startbodymatter \dorecurse{5}{ \chapter {Knuth} \input knuth \chapter {Zapf} \input zapf} \stopbodymatter \startappendices \appendix{Appendix} \stopappendices \startbackmatter \back{Back} \stopbackmatter \stoptext As you can see, starting from chapter 10 (there are 21 chapters in the real document) there is now no space between the endash and the title, like it is for the first 9 chapters. So, instead of using the numbercommand for the \setuplist[chapter] I tried using: \setuplist[chapter][headnumber=yes,style=bold,alternative=command,command=\ChapterToc] (by uncommenting that line and commenting out the old \setuplist[chapter] with the command \ChapterToc already defined in the MWE. However, that does not produce the desired result. Can you give a clue? Thanks, Rob ___ 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] bookmarks: frontpart, bodypart, etc. ???
Le jeudi 7 novembre 2013, 10:00:00 Alan BRASLAU a écrit : > Hello, > > The bookmark mechanism has changed in a very recent beta and now > \startfrontmatter \stopfrontmatter > \startbodymatter \stopbodymatter > \startappendices \stopappendices > \startbackmatter \stopbackmatter > ALL now add bookmarks to the PDF document??? > This is VERY strange! > > I am using: > \setupinteraction [state=start,option=bookmark] > \setupinteractionscreen [option=bookmark] > \placebookmarks [part,chapter,title,section,subsection] > [part,chapter,title] > > > Alan This is because I asked for… See the joined discussion. You do not like it? Le lundi 4 novembre 2013, 20:11:25 Hans Hagen a �crit : > On 10/21/2013 6:45 PM, pol stra wrote: > > Hello, > > > > In my document, when I use a meta-structure, I only get "introduction" > > and "content" bookmarks, while not using a meta-structure, I have my > > part and chapter (which is the desired behaviour). How can I get the > > same behaviour in both structures? > > (by the way, how can I change the bookmarks of the table of contents, I > > tried \completecontent[bookmark=mytitle] and \setupcombinedlist[mytitle] > > without success). > > > > Thank you all > > > > Here is my sample code: > > > > \setupinteraction [state=start] > > > > \placebookmarks[part, chapter, section, title, subject][force=yes] > > > > \setupcombinedlist[content][ > > > > list={title, part, chapter, subject, subsubject, section, > > subsection}, > > alternative=c] > > > > \setuphead[part][placehead=yes, bodypartlabel=part] > > > > \startmode[meta] > > > > \startfrontmatter > > > > \startchapter[title={Introduction}] > > > > % \component c_introduction > > \stopchapter > > > > \completecontent[criterium=all] > > > > \stopfrontmatter > > > > \startbodymatter > > > > \startpart[title={part}] > > > > \startchapter[title={chapter1}] > > \stopchapter > > > > \stoppart > > > > \stopbodymatter > > > > \stopmode > > > > \startmode[nonmeta] > > > > \startchapter[title={Introduction}] > > > > % \component c_introduction > > \stopchapter > > > > \completecontent[criterium=all] > > > > \startpart[title={part}] > > > > \startchapter[title={chapter1}] > > \stopchapter > > > > \stoppart > > > > \stopmode > > If you want to influence the bookmark title you should explicitly set if > (and then not use \complete ... but \place...). Anyhow, I've added an > extra level to the bookmarks where you can also set the block titles. > > \setupinteraction >[state=start] > > \placebookmarks >[part,chapter,section,title,subject] >[force=yes] > > \setupcombinedlist >[content] >[list={part,chapter,section,subsection}, > alternative=c] > > \setuphead >[part] >[placehead=yes, > bodypartlabel=part] > > \starttext > > \startfrontmatter[bookmark=A fancy title] > \startchapter[title={The introduction}] > \stopchapter > \startchapter[title=Contents] > \placecontent[criterium=all] > \stopchapter > \stopfrontmatter > > \startbodymatter > \startpart[title={part}] > \startchapter[title={Some chapter}] > \stopchapter > \stoppart > \stopbodymatter > > \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 > > - Thank you for the job Hans! ___ 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] \starbuffer in own macros
Am 18.10.2009 um 12:02 schrieb Andreas Harder: Before I help you provide us with more information, e.g. should the text in the buffer appear also in the complete text or do you it only in the snippet? Sorry, that I did not make myself clear. The real setup is: I've a lot of line numbered text in the appendix of the document. In the body I'd like to cite out of it (with the same line numbers as in the source/appendix). The appendix should stay unchanged. For the beginning you can play with this code, it has to be changed in a few parts (e.g. make \setuplines local) but it's what I can read from your description above and the code you showed in the previous message. \def\doifelsesamelinereference#1#2#3% {\doifreferencefoundelse{lr:b:#1} {\edef\fline{\currentreferencedefault}% was \currentreferencetext \doifreferencefoundelse{lr:e:#1} {\edef\tline{\currentreferencedefault}% was \currentreferencetext \ifx\fline\tline#2\else#3\fi} {\unknownreference{#1}#2}} {\unknownreference{#1}#2}} \def\startMyCite[#1]% {\def\stopMyCite {\setuplines[before=,after=]% \startlines\startline[#1]\getbuffer[#1]\stopline[#1]\stoplines \savebuffer[#1]}% \dostartbuffer[#1][startMyCite][stopMyCite]} \def\getMyCite[#1]% {\doifreferencefoundelse{lr:b:#1} {\startlinenumbering[\currentreferencedefault]} \startlinenumbering \startlines\readfile{\jobname-#1.tmp}{}{}\stoplines \stoplinenumbering} \starttext \startbodymatter test text test text test text test text test text test text test text test text test text test text test text test text test text she told: \getMyCite[test] % perhaps better \getMyCite[test] test text test text test text test text test text test text test text test text test text test text test text test text test text \stopbodymatter \startappendices \startlinenumbering We thrive in information--thick worlds because of our marvelous and everyday ca- pacity to select, edit, single out, structure, highlight, group, pair, merge, harmo- nize, synthesize, focus, \startMyCite[test] organize, condense, reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, dis- tinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, \stopMyCite skim, re- fine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate the sheep from the goats. \stoplinenumbering \stopappendices \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] Problems with pagenumbering using frontpart/bodyart/...
Hi, I think that I either found a bug, or am using some commands in an invalid way. What do you think about the following code: \setuplayout[location=duplex] \setuppagenumbering[alternative=doublesided] \setuppagenumbering[way=bytext,partnumber=no] \startsectionblockenvironment[frontpart] \setuppagenumbering[conversion=romannumerals,left={--~},right={~--}] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] % \setuppagenumber[number=1] % *1 \setuppagenumber[number=0]% *2 \stopsectionblockenvironment \setupsectionblock[frontpart][page=no] % *2 \setupsectionblock[bodypart][page=no] % *2 \setupsectionblock[appendixpart][page=no] % *2 \setuphead[part][placehead=yes,alternative=middle,number=no,ownnumber=no,resetnumber=no] \definepagebreak [chapter] [yes,header,footer,right] \setuphead [part,chapter,title] [page=chapter] \starttext \startfrontmatter \title{abstract} \completecontent \page[yes,header,footer,left] % *2 \stopfrontmatter \startbodymatter \chapter{Introduction} \chapter{Algorithms} \chapter{Discussion} \stopbodymatter \startappendices \chapter{Appendices} \stopappendices \stoptext I want to exclude only unmarked lines and those have a "*1" in their comment, but not the lines marked with "*2" at the end. Unfortunately then the empty page between the contents and the chapter introduction is not (as intended) completely emtpy, but has a page number: "-iv-". To avoid this I am using (following a tip posted here some months ago, I think) the lines \setupsectionblock[frontpart][page=no] \setupsectionblock[bodypart][page=no] \setupsectionblock[appendixpart][page=no] Unfortunately, now (and this, I think, is the bug) the last chapter or title before the end of the frontmatter (in this case the table of contents) does no longer receive roman page numbers, but already the normal ones (and page numbering also starts at this chapter, not with the "Introduction"). To compensate for this I am currently using a workaround (all the lines marked with "*2" instead the one marked with "*1"), basically avoiding the described effect by forcing a page break (found using trial and error such that it works regardless of the length of the table of contents). Can I somehow get rid of these workarounds, without the otherwise empty pages being numbered? Unfortunately, pages 6, 8, 9 still are numbered, although otherwise empty (and the last two are unnecessary anyway), but I guess the problem is the same as for the pages between frontmatter and bodypart. (Probably fiddling with the backmatter and using some forced page breaks could solve those as well.) I am using: ConTeXt ver: 2003.10.5 fmt: 2003.10.19 int: english mes: english -- Holger F. Schoener TU Berlin; Dept. IV: EE and Computer Science [EMAIL PROTECTED] http://www.cs.tu-berlin.de/~hfsch/ Rooms FR2525Tel: +49-30-314-73115, Fax: -73121 Office FR 2-1 Franklinstr. 28/29, D-10587 Berlin, Germany ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Fwd: How to cite online websites (reloaded)
I am playing with this right now, but it's contra-automative :-P: \define[1]\LINK{\[\in[#1]\]} \setupinteraction[state=start] \starttext \startbodymatter \startchapter[title={Chapter Ej},marking={}] \startsubject[title={Warnunk},marking={}] Zitat hier: \LINK{libA} \\ Weiteres Zitat (\LINK{libA} S. 201 ff.). \stopsubject \startsection[title={Esgalation},marking={}] Verweis hier: \LINK{libB} \stopsection \stopchapter \stopbodymatter % - \startappendices \startchapter[title={Quellenverzeichnis},marking={}] \startitemize[n][stopper={},left={\[},right={\]},distance=1em] \startitem[libA] A. Bloch, {\it Pleasuredome}, AH-A Ltd., 2018 \stopitem \startitem[libB] {\blue\em http://wiki.contextgarden.net/verylonglink/will-it-ever-break/try_it}, (zuletzt abgerufen am 31.12.2009) \stopitem \stopitemize \stopchapter \stopappendices \stoptext But I'd really like the BibTeX way... Or at least a hint how I can create my own style in CTX from @MISC or even a new entry format. How can I at least turn off the (unpublished) tag?!? Please... Lars Weitergeleitete Nachricht Betreff:[NTG-context] How to cite online websites (reloaded) Datum: Sun, 2 Sep 2018 19:02:42 +0200 Von:Lars An: ntg-context@ntg.nl Hello guys, I've checked some articles on the wiki as well as the publications manual, but the results I get aren't what I expect. I hope that you can help me. I'd love to do short BibTeX entries like @Misc{lnkGGL, note = "zuletzt abgerufen am \date[d=05, m=06, y=2018]", url = "http://www.google.com"; } because sometimes this is all info I can get. Now I want an entry in the \placelistofpublications area with only the link and the note when I opened the website the last time. That's what I get from ConTeXt so far when I use \cite[lnkGGL]: [1], _http://www.google.com_ (unveröffentlicht). (zuletzt abgerufen am 5. Juni 2018) How would one get this output instead: [1] _http://www.google.com_ (zuletzt abgerufen am 5. Juni 2018) In the mail archive I found these commands: \usemodule[bib] \usemodule[bibltx] \setupbibtex[database=sample] \setuppublications[numbering=yesalternative=myapa-de] \starttext \startpublication[k=pragma, t=article, % I sometimes use "webpage" a=Hans] \url{http://www.pragma-ade.com} % or u= inside the square brackets \lastchecked{some date} \stoppublication Hallo\cite[url][pragma] \placelistofpublications \stoptext This of course doesn't work for me (error: "attempt to concatenate a table value" or a blank page). Also i-context.pdf gives another syntax for \cite. I really just want the link and the date in parentheses. How would a pro user do this? Thanks in advance, Lars- ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Page numbering in latest beta
Hi, thanks for these suggestions. I now use the following settings: \definefont[HeaderFont][Sans at 10pt] \setupheader[style=HeaderFont] \setupheadertexts [section][pagenumber][pagenumber][chapter] \setuppagenumbering [alternative=doublesided, location=, style=sansbold] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals, way=byblock] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupuserpagenumber[numberconversion=numbers] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[backpart] \setupuserpagenumber[numberconversion=numbers] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setupuserpagenumber[numberconversion=numbers] \stopsectionblockenvironment which give me a frontpart with roman numerals starting with i, and a bodypart starting with 1. The pagenumber for the backpart and appendix is continued. This is not the case if I make "way=byblock" a default setting. Thanks again! Steffen Am 30.03.2012 um 20:06 schrieb Hans Hagen: > On 30-3-2012 18:41, Steffen Fritzsche wrote: >> Hi Hans, >> >> I just ran my update script again, the issue still exists. Last update >> before was this morning around 10 a.m. CEST. > >>>> Any ideas or suggestions? > > The old numbering code had a side effect. Every time one changes settings the > state of the counters needs to be synchronized and in fact a reset happened. > Now, normally this is no big deal, as one sets up things at the beginning of > a document. However, when mid document one wants to change the style, this > reset becomes annoying. (The linenote bug reported a few days ago was a side > effect of this.) > > So, now we don't reset any longer unless the 'start' key's value differs. As > a consequence one needs to be explicit in some cases, like yours. By default, > we number per text (we could change that if needed) but in the past the > \setupuserpagenumber triggers a synchronization of the counter and therefore > reset the number, so that obscured the fact. Now, you just need to set the > 'way': > > \starttext > > \setupuserpagenumber[way=byblock] % can be default yes/no? > > \setuppagenumbering [alternative=doublesided, partnumber=no, location=, > style={\ss\bold}] > \setupheadertexts [section][pagenumber][pagenumber][chapter] > \setupheader [before={\ss\switchtobodyfont[10pt]}] > > \startsectionblockenvironment[frontpart] >\setupuserpagenumber[numberconversion=romannumerals] > \stopsectionblockenvironment > > \startsectionblockenvironment[bodypart] >\setuppagenumber[number=1] > \stopsectionblockenvironment > > \startsectionblockenvironment[backpart] >\setupuserpagenumber[numberconversion=numbers] > \stopsectionblockenvironment > > \startsectionblockenvironment[appendix] >\setupuserpagenumber[numberconversion=numbers] > \stopsectionblockenvironment > > \startfrontmatter test \stopfrontmatter > \startbodymatter test \stopbodymatter > \startappendices test \stopappendices > \startbackmatter test \stopbackmatter > > \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 > - > smime.p7s Description: S/MIME cryptographic signature ___ 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] Couple of questions
Am Freitag, 28. Juli 2017, 17:05:59 CEST schrieb Pablo Rodriguez: > On 07/28/2017 02:22 AM, Gerion Entrup wrote: > > 2. Own title format > > I've set an own title format for chapters, like described in the wiki. > > Unfortunately this applies to the table of contents and bibliography as > > well. > > Below a minimal example, that reproduces it: > > ``` > > \setupinteraction[state=start] > > > > \define[2]\MyChapter{\framed[frame=off,bottomframe=on,topframe=on] > > {\vbox{\headtext{chapter} #1\blank#2}}} > > > > \setuphead[chapter][command=\MyChapter, style={\switchtobodyfont[24pt,ss]}, > > header=empty, page=mychapterpagebreak] > > \setupheadtext[chapter=Chapter, content=Table of Contents] > > > > \starttext > > \completecontent > > \page[yes] > > > > \startchapter[title=foo] > > > > \stoptext > > ``` > > How can I prevent the printing of "Chapter" in the table of contents and > > bibliography? > > Hi Gerion, > > play with the sample, in order to see what fits you best: > > \setupinteraction[state=start] > > \define[2]\MyChapter{\framed[frame=off,bottomframe=on,topframe=on] > {\vbox{\headtext{chapter} #1\blank[small]#2}}} > > \setuphead[chapter][command=\MyChapter, > style={\switchtobodyfont[24pt,ss]}, header=empty, page=mychapterpagebreak] > > \startsectionblockenvironment[bodypart] > \setupheadtext[chapter=Chapter] > \stopsectionblockenvironment > > \startsectionblockenvironment[appendix] > \setupheadtext[chapter=Appendix] > \stopsectionblockenvironment > > \starttext > \startfrontmatter > \chapter{Table of Contents}\placecontent > \stopfrontmatter > > \startbodymatter > \startchapter[title=foo] > \stopbodymatter > > \startappendices > \chapter{Bibliography} > \stopappendices > > \startbackmatter > \chapter{Bibliography} > \stopbackmatter > > \stoptext Thank you, that works for me. > > 5. Numbering of floats > > I want a numbering for my figures in this format: > > way=bychapter, prefixsegments=chapter > > > > I guess, this is the default, but I've explicitly set it. > > In some captions the prefix is ignored. For example there are 5 figures in > > chapter 2, then the captions of the figures (the text is in German) are: > > Abbildung 2.1 foo > > Abbildung 2.2 bar > > Abbildung 3foobar > > Abbildung 4otherfoo > > Abbildung 5lastfoo > > > > Is there anything, I can do, to prevent this? > > I cannot reproduce the problem you mention: > > \mainlanguage[de] > \starttext > \dorecurse{5}{\chapter{Kapitel} > \placefigure{Eine Kuh}{\externalfigure[cow.pdf]}} > \chapter{Kapitel} > \dorecurse{5}{\placefigure{Eine andere Kuh} > {\externalfigure[cow.pdf]}} > \dorecurse{5}{\chapter{Kapitel} > \placefigure{Noch eine andere Kuh}{\externalfigure[cow.pdf]}} > \stoptext > > In general, please provide minimal samples of code that show your problem. Was not that simple, but I found the problem, that causes it: subsubsections without numbers. Here is a minimal example: ``` \mainlanguage[de] \setuphead[subsubsection][number=off] \setupcaptions[way=bychapter, prefixsegments=chapter] \starttext \startchapter[title=Kapitel] \placefigure{Eine Kuh}{\externalfigure[cow.pdf]} \startsection[title=Abschnitt] \startsubsection[title=Unterabschnitt] \placefigure{Eine Kuh}{\externalfigure[cow.pdf]} \startsubsubsection[title=Und hier gibts ein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf]} \stopsubsubsection \startsubsubsection[title=Und hier gibts ein Problem] \stopsubsubsection \stopsubsection \stopsection \stopchapter \stoptext ``` Is there a way to fix this? Gerion ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting ToC to match page numbering
Duncan Hothersall wrote: I have three issues where page number formatting in the table of contents is wrong compared to the pages themselves: i admit that this is a bit tricky; has to do with how numbers are used for selective purposed; maybe i'll rewrite that part some day (no need to be efficient nowadays) 1. The separator character in the actual pagenumbers is "/". In the ToC it displays as a "-". \start \setuppagenumbering[numberseparator=/] \placecombinedlist[Xontents] \stop 2. I used "left=A" on the pagenumbering command in the appendices because appendices are numbered A1, A2 etc. This gives the required output for the actual pagenumbers, but there is no 'A' prefix in the ToC. indeed, since left/right is cosmetics an dit's easier to add that than to remov eit when you dont wan it, so: \setuplist[Appchapter][pagecommand=A] % or cleaner: pagecommand=\AppPrefix and \def\AppPrefix#1{A\enspace#1} 3. Similarly in the backmatter I have added a 'I/' prefix to the pagenumber ("left={I/}"), which works on the pages but is not reflected in the ToC. now you know how to do that wikiable: %% Tested on live.contextgarden \setupoutput[pdftex] %% change appendix numbering from Character to numbers \setupsection[section-2][appendixconversion=numbers] %% define new chapter-like heads for different sections \definehead[Frontchapter][chapter] \definehead[Appchapter][chapter] \definehead[Backchapter][chapter] %% set up individual content lists and labels \setuplist[Frontchapter][pagenumber=yes] \setuplabeltext[en][chapter={Module }] \setuplist[chapter][pagenumber=yes,chapternumber=yes,label=yes] \setuplabeltext[en][Appchapter={Appendix }] \setuplist[Appchapter][pagenumber=yes,chapternumber=yes,label=yes] \setuplist[Backchapter][pagenumber=yes] %% set up the combined list \definecombinedlist[Xontents] [part,Frontchapter,chapter,Appchapter,Backchapter,section] [level=section,criterium=local] \setupcombinedlist[Xontents][alternative=b,aligntitle=yes,distance=4em] %% page numbering is output using the explicit \completepagenumber %% command in the footer because the final output has rather %% complicated footers which incorporate the page number. \setupfootertexts[text] [][{\inframed{\kern.3em\completepagenumber\kern.3em}}] [][{\inframed{\kern.3em\completepagenumber\kern.3em}\hfill}] \starttext \startfrontmatter %% page numbering is set up for each section \setuppagenumbering[state=start,alternative={singlesided,doublesided}, location=,chapternumber=no,partnumber=no,conversion=romannumerals] \title{Contents} \placecombinedlist[Xontents] \Frontchapter{Test Intro} \dorecurse{3}{\input tufte\par} \stopfrontmatter \startbodymatter %% for the body and appendices we prefix the chapternumber and a '/' \setuppagenumbering[state=start,alternative={singlesided,doublesided},location=, way=bychapter,partnumber=no,chapternumber=yes,numberseparator={/}] \chapter{Test Chapter} \dorecurse{3}{\input tufte\par} \chapter{Another Test Chapter} \dorecurse{3}{\input tufte\par} \stopbodymatter \startappendices \setuppagenumbering[state=start,alternative={singlesided,doublesided},location=, way=bychapter,partnumber=no,left=A,chapternumber=yes,numberseparator={/}] \Appchapter{Test Appendix} \dorecurse{3}{\input tufte\par} \stopappendices \startbackmatter %% for the backmatter we just prefix I/ (it's going to be the index) \setuppagenumbering[state=start,alternative={singlesided,doublesided}, location=,way=bychapter,left={I/}] \setuppagenumber[number=1] \Backchapter{Index} \dorecurse{3}{\input tufte\par} \stopbackmatter \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Getting ToC to match page numbering
> \start > \setuppagenumbering[numberseparator=/] > \placecombinedlist[Xontents] > \stop Ah, I see, \placecombinedlist uses the value of numberseparator active at the time it is called! Thanks. > indeed, since left/right is cosmetics an dit's easier to add that than > to remov eit when you dont wan it, so: > > \setuplist[Appchapter][pagecommand=A] > > % or cleaner: pagecommand=\AppPrefix and \def\AppPrefix#1{A\enspace#1} I had experimented with that, and it certainly works (I chose the second option, but dropped the \enspace), BUT... the page numbers column in the table of contents is now mis-aligned. I've pasted my revised minimal test file below, and if you run that you can see that things have gone squiggly. The frontmatter and appendices are aligned further to the right than the chapters and backmatter. Weird. I looked at the source and as far as I can tell the default pagecommand is just \strut#1, so I don't understand how alignment has been changed by redefining it, but it certainly seems to have. > wikiable: Will do; would be great to fix (or at least understand) the alignment before I do though, for completeness. :-) Thanks, Duncan Minimal test, now mostly working thanks to Hans: %% Tested on live.contextgarden \setupoutput[pdftex] %% change appendix numbering from Character to numbers \setupsection[section-2][appendixconversion=numbers] %% define new chapter-like heads for different sections \definehead[Frontchapter][chapter] \definehead[Appchapter][chapter] \definehead[Backchapter][chapter] %% set up individual content lists and labels \setuplist[Frontchapter][pagenumber=yes] \setuplabeltext[en][chapter={Module }] \setuplist[chapter][pagenumber=yes,chapternumber=yes,label=yes] \setuplabeltext[en][Appchapter={Appendix }] \def\AppPrefix#1{A#1} \setuplist[Appchapter][pagenumber=yes,chapternumber=yes,label=yes,pagecommand=\AppPrefix] \def\BackPrefix#1{I/#1} \setuplist[Backchapter][pagenumber=yes,pagecommand=\BackPrefix] %% set up the combined list \definecombinedlist[Xontents] [part,Frontchapter,chapter,Appchapter,Backchapter,section] [level=section,criterium=local] \setupcombinedlist[Xontents][alternative=b,aligntitle=yes,distance=4em] %% page numbering is output using the explicit \completepagenumber %% command in the footer because the final output has rather %% complicated footers which incorporate the page number. \setupfootertexts[text] [][{\inframed{\kern.3em\completepagenumber\kern.3em}}] [][{\inframed{\kern.3em\completepagenumber\kern.3em}\hfill}] \starttext \startfrontmatter %% page numbering is set up for each section \setuppagenumbering[state=start,alternative={singlesided,doublesided}, location=,chapternumber=no,partnumber=no,conversion=romannumerals] \title{Contents} \setuppagenumbering[numberseparator=/] \placecombinedlist[Xontents] \Frontchapter{Test Intro} \dorecurse{3}{\input tufte\par} \stopfrontmatter \startbodymatter %% for the body and appendices we prefix the chapternumber and a '/' \setuppagenumbering[state=start,alternative={singlesided,doublesided},location=, way=bychapter,partnumber=no,chapternumber=yes,numberseparator={/}] \chapter{Test Chapter} \dorecurse{3}{\input tufte\par} \chapter{Another Test Chapter} \dorecurse{3}{\input tufte\par} \stopbodymatter \startappendices \setuppagenumbering[state=start,alternative={singlesided,doublesided},location=, way=bychapter,partnumber=no,left=A,chapternumber=yes,numberseparator={/}] \Appchapter{Test Appendix} \dorecurse{3}{\input tufte\par} \stopappendices \startbackmatter %% for the backmatter we just prefix I/ (it's going to be the index) \setuppagenumbering[state=start,alternative={singlesided,doublesided}, location=,way=bychapter,left={I/}] \setuppagenumber[number=1] \Backchapter{Index} \dorecurse{3}{\input tufte\par} \stopbackmatter \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Setup for appendices: a bunch of questions
On Thu, Feb 5, 2015 at 12:42 PM, Wolfgang Schuster wrote: >> Am 04.02.2015 um 22:06 schrieb Mojca Miklavec: >> >> Hello, >> >> I need a tiny bit of help with properly setting up the appendices. >> >> 1.) I would like to include both chapters and titles. Is this the >> proper way to go? (It took me a while to figure out how to include the >> titles at all.) >> >>\setuphead >>[title] >>[incrementnumber=list] >>\placelist >>[title,chapter,section] >>[criterium=all,alternative=c] >> >> But why is there less space in front of a \title{...} in TOC than in >> front of a \chapter{…}? > > You can use the “margin” key to indent the title entries but unnumbered > chapter are still wrong aligned. I'm sorry, that was a misunderstanding. I was referring to the vertical alignment, not to the horizontal one. It's perfectly OK if the title is aligned "flushleft", but there's less vertical space in front of it. >> 2.) How can I define a different width for appendices in TOC (to >> reserve enough space for the word "Appendix")? >> >> I use >> >> \setuplist >>[section] >>[width=10mm,numberstyle=\os\bf,pagestyle=\os,label=yes] >> >> but I would like to use "width=27mm" for sections inside >> \startappendices ... \stopappendices than for regular sections. Is >> there any workaround? > > Use the “numbercommand” key to measure the width of the number > and apply different widths for narrow and wide entries. Perfect, thank you. (Well, my computer hoplessly crashed when I first tried it, but I hope it's not your code to be blamed ;) >> 3.) For appendices I want to set >> >> \setuphead >>[chapter] >>[number=no] >> \setuphead >>[section] >>[page=yes,sectionsegments=section,conversion=Character,sectionstopper=:] >> >> without affecting regular sections and chapters. >> >> Is it possible to do this on top of the document (or in the layout) as >> opposed to changing the settings just before appendices start? I would >> like to avoid messing up with such settings in the middle of the >> document. > > Use \startsectionblockenvironment to set the setups at the begin of the > document. Thank you. >> I tried to play with >>\defineconversionset >> and >>\setupsectionblock >>[appendix] >>[sectionconversionset=...] >> but I'm unable to understand how these commands work exactly. > > Take a look at the example below how this can be achieved. Thank you. Now a couple of follow-up questions. The tables are now numbered in a very weird way. It's now "Table 1.VI" instead of "Table E.1" for the first table in Appendix E. Which keys control numbering of tables? (Or better yet: what's the reference for MKIV to find that out, if any?) If I use "sectionstopper=:" and then try to reference it with \in[appendix:label-for-this-appendix], I get the colon there as well which is not desired, so I probably need to use another trick to get the colon. Should I change the numbercommand in \setuphead and \setuplist or is there a different trick? Thanks again, Mojca ___ 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] Update problems: TOC
Hello, all ConTeXters! I finally got around to trying TeXLive2003 and the ConTeXt there. The good news is that it installs into Windows2000 like a charm and all the old font woes are now past worries, the fonts worked the first try. After installing TeXLive I downloaded the newest ConTeXt from Pragma's pages and it seems to be a working installation, too. However, I have a problem to which I didn't find a solution in the mailing list archives: The Table of Contents doesn't work and that hangs the whole thing. If I get rid of the command \placecontent, everything works perfectly, but once I try to compile the file(s) with a TOC, this is what I get: myContents : - Table of contents (./pr-03.tuo ! Undefined control sequence. \exitloop ->\let \endofloop \nodoloop ...>\zeropoint \unskip \else \exitloop \fi \doloop ...@@arecurse \recursedepth \endcsname {#1 }\global [EMAIL PROTECTED] \let \csname... \removeunwantedspaces ...kip \else \exitloop \fi } \fi \endstrut ...trut \fi \else \removeunwantedspaces \normalpenalty [EMAIL PROTECTED] \normal... ...tentry {\v!hoofdstuk }{Introduction} } ... l.7 ...1}{1}{Introduction}{2::0:1:0:0:0:0:0::1}{5} ? --- Below you'll find a simplified version of my setups etc, maybe that will help to pinpoint the problem. I hope somebody has a solution as I won't be able to upgrade to any newer ConTeXt's until this is fixed. Thanks for any help, Mari % -- % File starts here % -- %output=pdftex \definepapersize[a4short][width=210mm,height=11in] \setuppapersize[a4short][a4] \enableregime[il1] \usetypescript[berry][ec] \setupbodyfont[pos,10pt] % This sets the look of the first level headings \setuphead [chapter] [style=\sstfc, prefix=+] % This sets the look of the second level headings \setuphead [section] [style=\sstfb] % Third level headings \setuphead [subsection] [style=\ssbf] % Fourth level headings \setuphead [subsubsection] [style=\ssit] % - % Settings concerning the Table of contents (TOC) % - % The combination below sets the look of the title of the TOC \definehead [myContents] [title] \setuphead [myContents] [alternative=left, style=\sstfb] % These settings are for the first level (chapter) entries % in the TOC \setuplist [chapter] [criterium=chapter, alternative=c, aligntitle=yes, textstyle={\tfa\cap}] \setuplist [section] [criterium=section, alternative=c, margin=0.7cm, textstyle=bold] \setuplist [subsection] [criterium=subsection, alternative=c, margin=0.9cm] % This sets the fourth level (subsubsection) entries in the TOC \setuplist [subsubsection] [criterium=subsubsection, alternative=c, margin=1.2cm, textstyle=italic] %- % TOC settings end here \starttext \startfrontmatter \myContents{Table of contents} \placecontent \stopfrontmatter % --- % Each chapter is a file of its own, the files are collected % into one document here \input pr-03_ch01/ch01.tex % first chapter (Introduction) \input pr-03_ch02/ch02.tex % second chapter (Sensor) \input pr-03_ch03/ch03.tex % third chapter (IT-R) \input pr-03_ch04/ch04.tex % fourth chapter (Accessory units) \input pr-03_ch05/ch05.tex % fifth chapter (Startup and configuration) \input pr-03_ch06/ch06.tex % sixth chapter (Regular maintenance) \input pr-03_ch07/ch07.tex % seventh chapter (Troubleshooting) \input pr-03_ch08/parts_tables.tex % tables for chapter 8 are loaded first \input pr-03_ch08/ch08.tex % eighth chapter (Sensor % specifications and parts lists) \input pr-03_ch09/ch09.tex % ninth chapter (IT-R specifications % and parts lists) %This part gets alphabets (A, B...) \startappendices \input glossary.tex \input dds.tex % Information on the Delivary Data Sheet \input calibration_data_report.tex % The Calibration data report sheet \input verification.tex % How to do ISO 9000 Verification \stopappendices \startbackmatter % -- % Index settings % -- \chapter[index]{Index} \placeindex % --- End of Index - \stopbackmatter % Here's where the document ends, nothing comes below this command \stoptext ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Solved, was Re: Register customization for backmatter page numbers
On 2015-08-01 13:54, Pablo Rodriguez wrote: Hi Rik, sorry for top-posting, but I’m not sure whether I understand your request. I wonder whether the following sample points in the right direction: \setuppapersize[A6] \setuppagenumber[way=bypart, prefix=yes, prefixset=chapter] \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setuppagenumber[number=1] \stopsectionblockenvironment \starttext \completecontent \startbodymatter \dorecurse{5}{\chapter{Chapter}\recurselevel\index{bar}} \stopbodymatter \startappendices \dorecurse{5}{\chapter{Appendix}\recurselevel\index{foo}} \title{Index} \placeindex \stopappendices \stoptext Just in case it helps, Pablo On 08/01/2015 04:20 AM, Rik wrote: List, I have a book with frontmatter, bodymatter, and backmatter. The frontmatter is pagenumbered with lc roman, and the bodymatter and backmatter are numbered, all by block. The backmatter contain a glossary, pagenotes, bibliography, and an index. In addition to the frontmatter and the bodymatter, both the glossary and the pagenotes contain items that are indexed. I need to distinguish pagenumbers that appear in the index so that the reader can identify where in the book the page is located. For the frontmatter, that is not a problem. For items that appear in the bodymatter or backmatter, however, page numbers are not unique. One method that has been suggested is to prefix the pagenumber displayed in the index with a mark to indicate that the page is in the backmatter, or to italicize it, or to use an alternate font. I have looked at the defineconversionset and defineprocessor documentation and find no way to mark index entries appropriately. Can anyone suggest a way to do this, or some other method? Perhaps a pagecommand that compares the register item real page number to the highest real page number of the body? I would prefer a solution that does not require changing the register commands (\index) in the text. Continuous numbering across the frontmatter, bodymatter, and backmatter is not wanted, although as a last resort I might be able to argue for continuous numbering in the bodymatter and backmatter. Thank you, Pablo. That does meet the requirements as stated, but having the chapter number as a prefix for the body entries is overly verbose and will not pass muster. (Failure of my specifications.) I have found a solution, however. By placing these in the environment: \defineprocessor[Back][style=slanted,right=n] \defineprocessor[Front][style=normal] \def\Where{Front} \def\Index{\index[\Where->]} And this at the start of the backmatter: \def\Where{Back} I can index items with \Index{item} and the value of \Where when the entry is processed will be used. This meets the requirement that no change to the indexing is required in the text (except to change \index to \Index), and I can further distinguish notes from glossary entries if needed. I could even eliminate that last change by defining my own register Index and using \def\index{\Index[\Where->] (and an appropriate \placeregister). I still haven't played with this a lot, so I don't know yet if it will handle all the optional bits of register entries, but it should suffice for my current needs. -- Rik ___ 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] \setupuserpagenumber not working as expected
Jan Willem Flamma schrieb am 03.09.2020 um 10:29: Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. There are lot of things which can be improved in your example. 1. Pass the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct 2. Use \setvariables or \setupdocument to set the document title, revision etc. 3. Use \startsectionblockenvironment to move setups from the document content into the environment file. 4. Use pagestate=start to increase the page counter with \startstandardmakeup. 5. Set search path for figures (\copypages use the figure mechanism) with \setupexternalfigure[location=...]. Below is a modified (but untested) version of your sample document. Wolfgang begin product \startproduct product \environment env-WA % \setvariables % [document] % [ manual={Course Manual}, % title={Title}, %subtitleone={Subtitle 1}, %subtitletwo={Subtitle 2}, % revnumber={Revision number}] \setupdocument [ manual={Course Manual}, title={Title}, subtitleone={Subtitle 1}, subtitletwo={Subtitle 2}, revnumber={Revision number}] \startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents \stopfrontmatter \startbodymatter \component co-01 \component co-02 \stopbodymatter \startappendices \component co-ap-01 \component co-ap-02 \stopappendices \startbackmatter \copypages[app1.pdf][n=4] \stopbackmatter \stopproduct end product begin environment \startenvironment env-WA \setuppagenumbering [alternative=doublesided, location=right] \defineconversionset [frontpart:pagenumber] [] [romannumerals] \setupexternalfigures [directory={External PDF}] \startsectionblockenvironment [frontpart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [bodypart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \setuppagenumber [number=1] \stopsectionblockenvironment \startsectionblockenvironment [appendix] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [backpart] \setuppagenumber[state=stop] \stopsectionblockenvironment \stopenvironment end environment begin component \startcomponent fm-frontpage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] % \dontleavehmode\externalfigure[frontpage-logo.png][width=12cm] \framed [height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} \blank[6*big] {\bfc \documentvariable{manual}} \blank[4*big] {\tfc \documentvariable{title}} \blank[2*big] {\tfc \documentvariable{subtitleone}} \blank[2*big] {\tfc \documentvariable{subtitletwo}} \stopstandardmakeup \stopcomponent end component begin component \startcomponent fm-titlepage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] {\tfb \documentvariable{manual}} \blank[2*big] {\tfb \documentvariable{title}} \blank[2*big] {\tfb \documentvariable{subtitleone}} \blank[2*big] {\tfb \documentvariable{subtitletwo}} \blank[10*big] {\tfb \documentvariable{revnumber}} \blank {\tfb \currentdate[month,year]} \blank[10*big] {\tfb Written by:} \blank {\tfb Company name} \blank {\tfb City, Country} \stopstandardmakeup \stopcomponent end component begin component \startcomponent fm-tableofcontents \product product \starttitle [title=Table of Contents] \placecontent \stoptitle \stopcomponent end component ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \setupuserpagenumber not working as expected
Dear Wolfgang, Thank you for taking the time to go through the example and indicating these improvements. I will definitely evaluate and start applying this to my own code. Kind regards,Jan WillemFrom: Wolfgang SchusterSent: Friday, 4 September 2020 10:47To: mailing list for ConTeXt users; Jan Willem FlammaSubject: Re: [NTG-context] \setupuserpagenumber not working as expected Jan Willem Flamma schrieb am 03.09.2020 um 10:29:> Dear Julian,> > I use something similar using a main product file, an environment file > that contain the styling and several components that build up the > frontmatter, the manual and the appendices.> > Below my setup where I start the roman numbering on the table of > contents page (page 5 or v in roman)> > Once the bodymatter starts the pagenumber is set to the arabic 1 (see > below in the main product file)> > You should be able to copy and adapt to your needs. There are lot of things which can be improved in your example. 1. Pass the filename of the component/product to \startcomponent and not some dummy name (or just use *), this allows you to print the filename with \currentcomponent or \currentproduct 2. Use \setvariables or \setupdocument to set the document title, revision etc. 3. Use \startsectionblockenvironment to move setups from the document content into the environment file. 4. Use pagestate=start to increase the page counter with \startstandardmakeup. 5. Set search path for figures (\copypages use the figure mechanism) with \setupexternalfigure[location=...]. Below is a modified (but untested) version of your sample document. Wolfgang begin product\startproduct product \environment env-WA % \setvariables% [document]% [ manual={Course Manual},% title={Title},% subtitleone={Subtitle 1},% subtitletwo={Subtitle 2},% revnumber={Revision number}] \setupdocument [ manual={Course Manual}, title={Title}, subtitleone={Subtitle 1}, subtitletwo={Subtitle 2}, revnumber={Revision number}] \startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents \stopfrontmatter \startbodymatter \component co-01 \component co-02 \stopbodymatter \startappendices \component co-ap-01 \component co-ap-02 \stopappendices \startbackmatter \copypages[app1.pdf][n=4] \stopbackmatter \stopproduct end product begin environment\startenvironment env-WA \setuppagenumbering [alternative=doublesided, location=right] \defineconversionset [frontpart:pagenumber] [] [romannumerals] \setupexternalfigures [directory={External PDF}] \startsectionblockenvironment [frontpart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [bodypart] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \setuppagenumber [number=1] \stopsectionblockenvironment \startsectionblockenvironment [appendix] \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \stopsectionblockenvironment \startsectionblockenvironment [backpart] \setuppagenumber[state=stop] \stopsectionblockenvironment \stopenvironment end environment begin component\startcomponent fm-frontpage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] % \dontleavehmode\externalfigure[frontpage-logo.png][width=12cm] \framed [height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} \blank[6*big] {\bfc \documentvariable{manual}} \blank[4*big] {\tfc \documentvariable{title}} \blank[2*big] {\tfc \documentvariable{subtitleone}} \blank[2*big] {\tfc \documentvariable{subtitletwo}} \stopstandardmakeup \stopcomponent end component begin component\startcomponent fm-titlepage \product product \startstandardmakeup [top=,pagestate=start,align=middle,color=Modu_Blue] {\tfb \documentvariable{manual}} \blank[2*big] {\tfb \documentvariable{title}} \blank[2*big] {\tfb \documentvariable{subtitleone}} \blank[2*big] {\tfb \documentvariable{subtitletwo}} \blank[10*big] {\tfb \documentvariable{revnumber}} \blank {\tfb \currentdate[month,year]} \blank[10*big] {\tfb Written by:} \blank {\tfb Company name} \blank {\tfb City, Country} \stopstandardmakeup \stopcomponent end component begin component\startcomponent fm-tableofcontents \product product \starttitle [title=Table of Contents] \placecontent \stoptitle \stopcomponent end component ___ 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 / htt
[NTG-context] Strange Behaviour for toc
Hallo list, I just started to work with conTeXt, now that I seted up an project environment as follows with the following content: file project_oc.tex: \startproject project_oc \environment env_oc \startfrontmatter \setuppagenumbering[conversion=romannumerals] \completecontent \stopfrontmatter \startbodymatter \setuppagenumbering[conversion=] \product prd_oc_0 \stopbodymatter \startappendices \stopappendices \stopproject file env_oc.tex: \startenvironment env_oc \enableregime [utf] \setuplanguage [de] [leftquote=\upperleftsinglesixquote,rightquote= \upperrightsinglesixquote,leftquotation=\leftguillemot,rightquotation= \rightguillemot] \mainlanguage [de] \setupbodyfontenvironment[default][em=italic] \usemodule[greek] \usemodule[units] \setupcolors[state=start] \setupcolor[rgb] \definecolor[lightred][r=1,g=0.85,b=0.85] \definefont[BigFontOne][Regular sa 3] \definefont[BigFontTwo][RegularBold sa 2] \definecolor[BigColorOne][r=.86,g=.850,b=.54] \definecolor[BigColorTwo][r=.43,g=.425,b=.27] \setuplayout[location=middle, topspace=1.3cm, width=middle, cutspace=4.5cm, rightmargindistance=0.4cm, leftmargindistance=0.2cm, backspace=1.2cm, height=fit, rightmargin=2.5cm, leftmargin=1cm, bottomspace=2cm, footer=0.8cm, setup=strict] % \showgrid \showframe % \showsetups % \showlayout \setuppagenumbering[alternative=doublesided,location=footer] \setupheader[state=none] \setuptolerance[tolerant, stretch] \setupwhitespace[medium] \setupfootnotes[way=bypage, conversion=set 2] \definepagebreak[chapter][yes,footer,right] \setuphead[chapter][textcommand=\MyChapterText,color=BigColorTwo,style= \BigFontTwo] \def\MyChapterText#1{\rlap{\BigFontOne\BigColorOne#1}\kern15pt#1} \setuphead[section][numbercolor=red] \setuphead[subsection][number=no,style=\ss] \setuphead[subsubsection][style=slanted,number=no,before={\blank [big]},before={\testpage[1]},after=\nowhitespace] \setupfloats[spaceafter=3*medium] \setuptables[bodyfont=small] \setupcaption[table][style={\ssx\setupinterlinespace [line=2.5ex]},align=left] \setupfloat[table][criterium=0.5\textwidth,default=inner] \setupcaption[figure][style={\ssx\setupinterlinespace [line=2.5ex]},align=left] \definefloat[Bigfigure][Bigfigures][figure] \setupfloat[Bigfigure][location=inner] \definefloat[Bigtable][Bigtables][table] \setupfloat[Bigtable][location=inner] \definefloat[vignette][figure] \setupfloat[vignette][leftmargindistance=- \outermargintotal,rightmargindistance=-\outermargintotal,default= {outer,none,low}] % \setup[vignette][number=no] \definestartstop[Story][before={\setupbackground[style= \tfx,background=color,backgroundcolor=white,frame=on,framecorner=rectangular,framecolor=black,rulethickness=0.5pt,topoffset=0.25cm,bottomoffset=0.25cm,leftoffset=0.25cm,rightoffset=0.25cm,before= {\blank[big]}]\startbackground\switchtobodyfont[10pt]},after= \stopbackground] \definestartstop[MySummary][before={\setupbackground [background=color,backgroundcolor=lightgray,backgroundcorner=rectangular,frame=off,topoffset=0.3cm,bottomoffset=0.3cm,leftoffset=0.5cm,rightoffset=0.5cm,before= {\blank[big]}]\startbackground\Zus},after=\stopbackground] \defineframedtext[Oddity][width=0.75 \textwidth,background=color,backgroundcolor=lightred,frame=off,framecorner=round,frameradius=0.5cm,backgroundcorner=round,style= \tfx] \setupinmargin[align=right,style=\ss\tfx\setupinterlinespace] \setupitemize[align=right] \startsectionblockenvironment[appendix] \setuptabulate[align=right,split=yes] \definepagebreak[chapter][yes,footer,right] \setuphead[chapter][bodypartconversion=Character,page=chapter] \setuphead[subsection][command=\SectionCommand,number=yes,numbercolor,red] \setuphead[subsubsection][number=yes] \definefloat[BigFramedFigure][BigFramedFigures][figure] \setupfloat[BigFramedFigure][location=inner,frame=on,offset=2pt] \definefloat[FramedFigure][FramedFigures][figure] \setupfloat[FramedFigure][frame=on,offset=2pt] \stopsectionblockenvironment \setupregister[index][imp][pagestyle=bold] \setupcombinedlist[content][level=2,alternative=c] \setuplist[chapter][style=bold] \stopenvironment file prd_oc_0.tex: -- \startproduct prd_oc_0 \project project_oc \component c_oc0_1 \stopproduct file c_oc0_1.tex: - \startcomponent c_oc0_1 \product prd_oc_0 \project project_oc \starttext \title{Titel} \chapter[chap:ques]{Question} \chapter[chap:answ]{Answer} \chapter[chap:rema]{Remarque} \stoptext \stopcomponent Now Im getting doubled entries in the \completecontent part, it lists everything as 1 Question 5 1 Question 5 2 Answer7 2 Answer7 so as this is not the wished behaviour, can someone help me to solve thsi problem. please be patient with me to get it done right, as I'm a newbe... Greetings M
[NTG-context] Re: An error which is not in .log file
I don't have line 276. This is what I have (169 lines): % Fitxer ConTeXt MIV % carregam les opcions d'entorn \environment ng-entorn-minimal.conTeXt \environment ng-entorn-taules.conTeXt \environment ng-entorn-teoria.conTeXt \environment ng-entorn-colors.conTeXt % bibliografia \usebtxdataset[default][ng-bibliografia.bib] \setupbtx[dataset=default] \usebtxdefinitions[aps] % el text \starttext \startfrontmatter \input ng-pre-portada.conTeXt \input ng-pre-llicencia.conTeXt \input ng-pre-informacio-document.conTeXt \completecontent \stopfrontmatter \startbodymatter \startpart[title=Aritmètica] \input ng-aritmetica-nombres-naturals-operacions.conTeXt \page[yes] \input ng-aritmetica-divisibilitat.conTeXt \page[yes] \input ng-aritmetica-sencers-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-operacions.conTeXt \page[yes] \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt \page[yes] \input ng-aritmetica-percentatges.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-sencers.conTeXt \page[yes] \input ng-aritmetica-problemes-nombres-fraccions.conTeXt \page[yes] \input ng-aritmetica-arrodoniment-i-truncament.conTeXt \page[yes] \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt \page[yes] \input ng-aritmetica-sequencies.conTeXt \page[yes] \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt \page[yes] \input ng-aritmetica-propietats-de-les-potencies.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-calcul.conTeXt \page[yes] \input ng-aritmetica-notacio-cientifica-problemes.conTeXt \stoppart \startpart[title=Relacions entre variables] \input ng-relacions-variables-proporcionalitat-directa.conTeXt \page[yes] \input ng-relacions-variables-percentatges-problemes.conTeXt \page[yes] \input ng-relacions-variables-repartiments-proporcionals.conTeXt \page[yes] \input ng-relacions-variables-proporcionalitat-inversa.conTeXt \page[yes] \input ng-relacions-variables-conversio-unitats.conTeXt \page[yes] \input ng-relacions-variables-funcio-lineal-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-afi-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt \page[yes] \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt \stoppart \startpart[title=Àlgebra] \input ng-algebra-equacions-primer-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau.conTeXt \page[yes] \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt \page[yes] \input ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt \stoppart \startpart[title=Geometria] \input ng-geometria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-homotecies.conTeXt \page[yes] \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt \stoppart \startpart[title=Estadística] \input ng-estadistica-tipus-de-variables.conTeXt \page[yes] \input ng-estadistica.conTeXt \page[yes] \input ng-estadistica-parametres-dispersio.conTeXt \page[yes] \input ng-estadistica-grafics-i-diagrames.conTeXt \stoppart \startpart[title=Probabilitat] \input ng-probabilitat-experiments-simples.conTeXt \page[yes] \input ng-probabilitat-experiments-compostos.conTeXt \page[yes] \input ng-probabilitat-probabilitat-condicionada.conTeXt \page[yes] \input ng-probabilitat-algebra-de-successos.conTeXt \stoppart \stopbodymatter \startappendices \startpart[title=Apunts teòrics] \input ng-teoria-proporcionalitat-numerica.conTeXt \page[yes] \input ng-teoria-equacions-de-segon-grau.conTeXt \page[yes] \input ng-teoria-funcio-quadratica.conTeXt \page[yes] \input ng-teoria-teorema-de-Pitagores.conTeXt \page[yes] \input ng-teoria-apendix-figures-usuals-arees-volums.conTeXt \page[yes] \input ng-teoria-proporcionalitat-geometrica.conTeXt \page[yes] \input ng-teoria-estadistica.conTeXt \page[yes] \input ng-teoria-probabilitat.conTeXt \stoppart \stopappendices \startbackmatter \input ng-pre-continguts-aliens.conTeXt \page[yes] % Bibliografia \startchapter[title=Referències] \placelistofpublications \stopchapter %% Índex alfabètic \completeindex \stopbackmatter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Solved, was Re: Register customization for backmatter page numbers
On 2015-08-01 14:42, Rik Kabel wrote: On 2015-08-01 13:54, Pablo Rodriguez wrote: Hi Rik, sorry for top-posting, but I’m not sure whether I understand your request. I wonder whether the following sample points in the right direction: \setuppapersize[A6] \setuppagenumber[way=bypart, prefix=yes, prefixset=chapter] \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setuppagenumber[number=1] \stopsectionblockenvironment \starttext \completecontent \startbodymatter \dorecurse{5}{\chapter{Chapter}\recurselevel\index{bar}} \stopbodymatter \startappendices \dorecurse{5}{\chapter{Appendix}\recurselevel\index{foo}} \title{Index} \placeindex \stopappendices \stoptext Just in case it helps, Pablo On 08/01/2015 04:20 AM, Rik wrote: List, I have a book with frontmatter, bodymatter, and backmatter. The frontmatter is pagenumbered with lc roman, and the bodymatter and backmatter are numbered, all by block. The backmatter contain a glossary, pagenotes, bibliography, and an index. In addition to the frontmatter and the bodymatter, both the glossary and the pagenotes contain items that are indexed. I need to distinguish pagenumbers that appear in the index so that the reader can identify where in the book the page is located. For the frontmatter, that is not a problem. For items that appear in the bodymatter or backmatter, however, page numbers are not unique. One method that has been suggested is to prefix the pagenumber displayed in the index with a mark to indicate that the page is in the backmatter, or to italicize it, or to use an alternate font. I have looked at the defineconversionset and defineprocessor documentation and find no way to mark index entries appropriately. Can anyone suggest a way to do this, or some other method? Perhaps a pagecommand that compares the register item real page number to the highest real page number of the body? I would prefer a solution that does not require changing the register commands (\index) in the text. Continuous numbering across the frontmatter, bodymatter, and backmatter is not wanted, although as a last resort I might be able to argue for continuous numbering in the bodymatter and backmatter. Thank you, Pablo. That does meet the requirements as stated, but having the chapter number as a prefix for the body entries is overly verbose and will not pass muster. (Failure of my specifications.) I have found a solution, however. By placing these in the environment: \defineprocessor[Back][style=slanted,right=n] \defineprocessor[Front][style=normal] \def\Where{Front} \def\Index{\index[\Where->]} And this at the start of the backmatter: \def\Where{Back} I can index items with \Index{item} and the value of \Where when the entry is processed will be used. This meets the requirement that no change to the indexing is required in the text (except to change \index to \Index), and I can further distinguish notes from glossary entries if needed. I could even eliminate that last change by defining my own register Index and using \def\index{\Index[\Where->] (and an appropriate \placeregister). I still haven't played with this a lot, so I don't know yet if it will handle all the optional bits of register entries, but it should suffice for my current needs. And a more robust solution that takes into account index sort keys: % macros=mkvi \starttexdefinition unexpanded index \dosingleempty\doStartindex \stoptexdefinition \starttexdefinition doStartindex [#sortkey] \doifmodeelse{*backpart} {\Index[Back->#sortkey]} {\Index[notBack->#sortkey]} \stoptexdefinition \defineprocessor[Back][style=slanted,right=n] \defineprocessor[notBack] [style=normal] \defineregister [Index] \setupregister [Index] [n=2,command=\Word,balance=no,compress=yes] -- rik ___ 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] Page headers & drop capitals not working but pagenumbering is
The following code numbers the pages as I desired and the TOC lists those page numbers. However, it is not doing two things as I desire and would appreciate it if someone could indicate precisely which lines of code need to be corrected. In the front matter, page headers should be on the recto of the TOC (page vi) and pages 2 and 3 of the introduction. Page headers seem to be operating correctly in the body of the book. \placeinitial is not creating drop capitals on the first page of each chapter in the body of the text. Example code follows: %figure on left - chapter number and title on right \def\MyChapterCommandM#1#2% #1 is number, #2 is text {\startfiguretext[left]{none} {\externalfigure[flowers][width=.2\textwidth]} {\framed[frame=off,align=middle,width=broad] {\switchtobodyfont[15pt] #1\\\blank[small] #2}} \stopfiguretext} %no figure on left - chapter number and title on right \def\MyFrontMatterCommand#1#2% #1 is number, #2 is text {\framed[frame=off,align=middle,width=broad] {\switchtobodyfont[15pt] #1\\\blank[small] #2}} %eliminate headers on blank page at end of chapter \definepagebreak[mychapterpagebreak][yes,header,right] %put pagenumber on bottom of first page of chapter \definetext[chapter][footer][pagenumber] \setuphead[chapter][header=high,footer=chapter,page=mychapterpagebreak] \setuphead[title][header=high,footer=chapter,page=mychapterpagebreak] %turn off putting naked page numbers on pages \setuppagenumbering[location=] \setupsectionblock[bodypart][page=chapter] \setupsectionblock[frontpart][page=chapter] \startsectionblockenvironment[frontpart] \setuphead[title] [command=\MyFrontMatterCommand,textstyle=\ss\bf,number=no, header=empty,footer=chapter,page=mychapterpagebreak, after=\vskip 0.5in] \setuphead[chapter] [command=\MyFrontMatterCommand,textstyle=\ss\bf,number=no, header=empty,footer=chapter,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in \placeinitial %comment out this line to eliminate drop capitals ] \setupheadertexts[chapter] [chapter][pagenumber][pagenumber][chapter Example] \setupheadertexts[title] [title][pagenumber][pagenumber][title] \setuppagenumbering[alternative=doublesided] %\setupheader[state=stop] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumbering[alternative=doublesided] \setupheadertexts [chapter][pagenumber][pagenumber][Content Example] \setuphead[chapter] [command=\MyChapterCommandM,textstyle=\ss\bf, header=empty,footer=chapter,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in\placeinitial] %comment out this line to eliminate drop capitals \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setupsectionblock[appendix][page=appendicespagebreak] \stopsectionblockenvironment \starttext \startfrontmatter Some random text to occupy front matter pages. \blank[medium] \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \page[right] \setuppagenumbering[state=start,alternative=doublesided,conversion=romannume rals,location=] \setupheader[state=start] \title{Contents} \placecontent[alternative=c,criterium=all] \blank[medium] Random text added to push TOC onto a second page to test page headers. \blank[medium] \input knuth \input knuth \input knuth \input knuth \chapter{Preface} \input knuth \page[right] %switch from lower case Roman numerals to Arabic numbers \setuppagenumbering[state=start,alternative=doublesided,conversion=numbers] \setuppagenumber[state=start,number=1] \setuphead[chapter] [command=\MyChapterCommandM,textstyle=\ss\bf,number=no, header=empty,footer=chapter,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in \placeinitial %comment out this line to eliminate drop capitals ] \chapter{Introduction} \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \stopfrontmatter \startbodymatter \chapter{Chapter One} \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \chapter{Chapter Two} \input knuth \chapter{Chapter Three} \input knuth \page \stopbodymatter \startappendices \stopappendices \page[stop] \stoptext Tom Benjey 717-258-9733 voice 717-243-0074 fax Twitter: @TomBenjey ___ 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] Re: An error which is not in .log file
Hi, I suggest to comment out/add \stoptext until the error go,and that way narrow it down. The usual way... /Mikael Den tis 15 aug. 2023 19:50Xavier B. skrev: > I don't have line 276. This is what I have (169 lines): > > % Fitxer ConTeXt MIV > > % carregam les opcions d'entorn > \environment ng-entorn-minimal.conTeXt > \environment ng-entorn-taules.conTeXt > \environment ng-entorn-teoria.conTeXt > \environment ng-entorn-colors.conTeXt > > % bibliografia > \usebtxdataset[default][ng-bibliografia.bib] > \setupbtx[dataset=default] > \usebtxdefinitions[aps] > > % el text > > \starttext > > \startfrontmatter > \input ng-pre-portada.conTeXt > \input ng-pre-llicencia.conTeXt > \input ng-pre-informacio-document.conTeXt > \completecontent > \stopfrontmatter > > > \startbodymatter > > \startpart[title=Aritmètica] > > \input ng-aritmetica-nombres-naturals-operacions.conTeXt > \page[yes] > \input ng-aritmetica-divisibilitat.conTeXt > \page[yes] > \input ng-aritmetica-sencers-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-operacions.conTeXt > \page[yes] > \input ng-aritmetica-fraccions-simplificacio-i-etc.conTeXt > \page[yes] > \input ng-aritmetica-percentatges.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-sencers.conTeXt > \page[yes] > \input ng-aritmetica-problemes-nombres-fraccions.conTeXt > \page[yes] > \input ng-aritmetica-arrodoniment-i-truncament.conTeXt > \page[yes] > \input ng-aritmetica-representacio-sobre-la-recta-numerica.conTeXt > \page[yes] > \input ng-aritmetica-sequencies.conTeXt > \page[yes] > \input ng-aritmetica-potencies-exponent-sencer-calcul.conTeXt > \page[yes] > \input ng-aritmetica-propietats-de-les-potencies.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-calcul.conTeXt > \page[yes] > \input ng-aritmetica-notacio-cientifica-problemes.conTeXt > \stoppart > > \startpart[title=Relacions entre variables] > > \input ng-relacions-variables-proporcionalitat-directa.conTeXt > \page[yes] > \input ng-relacions-variables-percentatges-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-repartiments-proporcionals.conTeXt > \page[yes] > \input ng-relacions-variables-proporcionalitat-inversa.conTeXt > \page[yes] > \input ng-relacions-variables-conversio-unitats.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-lineal-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-afi-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-quadratica-problemes.conTeXt > \page[yes] > \input ng-relacions-variables-funcio-exponencial-problemes.conTeXt > \stoppart > > \startpart[title=Àlgebra] > \input ng-algebra-equacions-primer-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau.conTeXt > \page[yes] > \input ng-algebra-equacions-segon-grau-problemes-geometrics.conTeXt > \page[yes] > \input ng-algebra-sistemes-de-equacions-lineals-2-per-2.conTeXt > \page[yes] > \input > ng-algebra-sistemes-de-equacions-lineals-2-per-2-problemes-comparativa.conTeXt > \stoppart > > \startpart[title=Geometria] > > \input ng-geometria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-geometria-teorema-de-Pitagores-problemes.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-grafica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-escala-numerica.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-figures-semblants.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-homotecies.conTeXt > \page[yes] > \input ng-proporcionalitat-geometrica-teorema-de-tales.conTeXt > \stoppart > > \startpart[title=Estadística] > \input ng-estadistica-tipus-de-variables.conTeXt > \page[yes] > \input ng-estadistica.conTeXt > \page[yes] > \input ng-estadistica-parametres-dispersio.conTeXt > \page[yes] > \input ng-estadistica-grafics-i-diagrames.conTeXt > \stoppart > > \startpart[title=Probabilitat] > \input ng-probabilitat-experiments-simples.conTeXt > \page[yes] > \input ng-probabilitat-experiments-compostos.conTeXt > \page[yes] > \input ng-probabilitat-probabilitat-condicionada.conTeXt > \page[yes] > \input ng-probabilitat-algebra-de-successos.conTeXt > \stoppart > > \stopbodymatter > > > \startappendices > > \startpart[title=Apunts teòrics] > \input ng-teoria-proporcionalitat-numerica.conTeXt > \page[yes] > \input ng-teoria-equacions-de-segon-grau.conTeXt > \page[yes] > \input ng-teoria-funcio-quadratica.conTeXt > \page[yes] > \input ng-teoria-teorema-de-Pitagores.conTeXt > \page[yes] > \input ng-teoria-apendix-figures-usuals-arees-volums.co
Re: [NTG-context] \setupuserpagenumber not working as expected
Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards,Jan Willem Flamma The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define\MyManual{Course Manual}\define\MyTitle{Title}\define\MySubtitleOne{Subtitle 1}\define\MySubtitleTwo{Subtitle 2}\define\MyRevnumber{Revision number} % Load frontmatter files\startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents\stopfrontmatter % Load bodymatter file\startbodymatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\setuppagenumber[number=1] \component co-01 \component co-02\stopbodymatter % Load backmatter files\startbackmatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\startappendices \component co-ap-01 \component co-ap-02\stopappendices\stopbackmatter % Load external PDF documents\setuppagenumber[state=stop]\copypages[External PDF/app1.pdf][n=4] \stopproduct= The env-WA.tex file (below is about pagenumbering only)=% Start chapter on right (odd) page, pagenumber = bottom right\setuppagenumbering [alternative=doublesided, location=right] % Pagenumbering style\definestructureconversionset [frontpart:pagenumber][][romannumerals]\definestructureconversionset [bodypart:pagenumber] [][numbers]\definestructureconversionset [appendix:pagenumber] [][numbers]= The fm-frontpage.tex file\startcomponent currentcomponent \product product % Front page layout\startstandardmakeup % Place logo centered on page \framed[height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles\blank[6*big]\color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big]\color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent The fm-titlepage.tex file\startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}} \blank \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}} \blank \midaligned{\color[Modu_Blue]{\tfb Company name}} \blank \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent The fm-tableofcontents.tex file\startcomponent currentcomponent \product product \setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right] % This is where I want the roman numbering to start\setuppagenumber[number=5] \starttitle[title=Table of Contents]\placecontent\stoptitle \stopcomponent From: jbfSent: Thursday, 3 September 2020 06:05To: mailing list for ConTeXt usersSubject: [NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!):\definestructureconversionset[frontpart:pagenumber][][romannumerals]\definestructureconversionset[bodypart:pagenumber] [][numbers]\startsectionblockenvironment[frontpart]\setupuserpagenumber[numberconversion=romannumerals]\setuplist[chapter][pageconversionset=pagenumber]\setuppagenumber[number=1]\stopsectionblockenvironment\startsectionblockenvironment[bodypart]\setuppagenumber[number=1]\stopsectionblockenvironmentThe frontmatter is some 16 pages worth (ends on a verso page but that verso carries the arabic number 1 instead of page xvi which it should be, since the final paragraph on that page ends
[NTG-context] (no subject)
The following example computes page numbers correctly, places the correct entries into the TOC, and produces the desired page headers on the first pages of chapters. However, there are some things it doesn't do properly: 1. It puts headers on blank pages at the ends of chapters even after I inserted the code that takes care of that problem. 2. It seems to ignore some commands or wait until the next chapter to implement them. An example is the header on page vi. It's supposed to read viContents 3. It seems that commands in the \startsectionenvironment frontmatter block are ignored or overridden by commands that are for the body part. That is why I have so many setup commands ib the \starttext section. %figure on left - chapter number and title on right \def\MyChapterCommandM#1#2% #1 is number, #2 is text {\startfiguretext[left]{none} {\externalfigure[cow][width=.2\textwidth]} {\framed[frame=off,align=middle,width=broad] {\switchtobodyfont[15pt] #1\\\blank[small] #2}} \stopfiguretext} %no figure on left - chapter number and title on right \def\MyFrontMatterCommandM#1#2% #1 is number, #2 is text {\framed[frame=off,align=middle,width=broad] {\switchtobodyfont[15pt] #1\\\blank[small] #2}} %eliminate headers on blank page at end of chapter \definepagebreak[mychapterpagebreak][yes,header,next] %put pagenumber on bottom of first page of chapter \definetext[chapter][footer][pagenumber] \setuphead[chapter][header=high,footer=chapter,page=right] \setuppagenumbering[location=] \startsectionblockenvironment[frontpart] \definehead[mycontenttitle][chapter] \setuphead[mycontenttitle] [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf, header=empty,footer=empty,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in \placeinitial %comment out this line to eliminate drop capitals ] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupheadertexts [chapter][pagenumber][pagenumber][Content Example] \setuphead[chapter][page=mychapterpagebreak] \setuphead[chapter] [command=\MyChapterCommandM,textstyle=\ss\bf, header=empty,footer=empty,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in \placeinitial %comment out this line to eliminate drop capitals ] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setupsectionblock[appendix][page=appendicespagebreak] \stopsectionblockenvironment \starttext \startfrontmatter \setuppagenumbering[state=start,alternative=doublesided,conversion=romannume rals] Some random text to occupy front matter pages. \blank[medium] \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \page[right] %\starthiding \setuphead[title] [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf, header=empty,footer=pagenumber,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in \placeinitial %comment out this line to eliminate drop capitals ] \setupheadertexts [Contents][pagenumber][pagenumber][Contents] \title{Content} %\stophiding %\mycontenttitle{Content} %displays Contents but drops the TOC \placecontent[alternative=c] \blank[medium] Random text added to push TOC onto a second page to test page headers. \blank[medium] \input knuth \input knuth \input knuth \input knuth \setupheadertexts [chapter][pagenumber][pagenumber][Content Example] \setuphead[chapter] [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf, header=empty,footer=pagenumber,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in \placeinitial %comment out this line to eliminate drop capitals ] \chapter{Preface} \input knuth \page[right] %switch from lower case Roman numberals to Arabic numbers \setuppagenumbering[state=start,alternative=doublesided,conversion=numbers] \setuppagenumber[state=start,number=1] \setuphead[chapter] [command=\MyChapterCommandM,textstyle=\ss\bf, header=empty,footer=pagenumber,page=mychapterpagebreak, numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in \placeinitial %comment out this line to eliminate drop capitals ] \chapter{Introduction} \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \stopfrontmatter \startbodymatter \chapter{Chapter One} \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \input knuth \chapter{Chapter Two} \input knuth \stopbodymatter \startappendices \page[stop] \stopappendices \stoptext Tom Benjey 717-258-9733 voice 717-243-0074 fax Twitter: @TomBenjey ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : n
[NTG-context] tex error Argument of \titlecmd has an extra }
ywidth ; v := \overlayheight ; hdelta := .15u ; vdelta := .03v ; drawoptions (withpen pensquare scaled 2pt) ; randomseed := day + time*epsilon ; show time * epsilon ; for i :=1 upto 128 : ccc := (uniformdeviate (1), uniformdeviate (1), uniformdeviate (1)) ; p := (uniformdeviate (u), uniformdeviate (v)) ; h0 := (xpart (p) - uniformdeviate (hdelta) , ypart (p)) ; h1 := (xpart (p) + uniformdeviate (hdelta) , ypart (p)) ; v0 := (xpart (p), ypart (p) - uniformdeviate (vdelta)) ; v1 := (xpart (p), ypart (p) + uniformdeviate (vdelta)) ; draw h0 -- h1 withcolor transparent(1,.4,ccc) ; draw v0 -- v1 withcolor transparent(1,.4,ccc) ; endfor ; \stopuseMPgraphic \startsetups BG \defineoverlay[bg][\useMPgraphic{crux}] \setupbackgrounds[page][background=bg] \stopsetups \definestartstop[BG][commands=\setups{BG}] % misc \setupheadtext[en][pubs=] \setupheadtext[en][content=] \setupheadtext[en][index=] \setuplabeltext[en][figure=??\;] \setuplabeltext[en][table=??\;] \setupcaptions[style=\tfx,headstyle=\normal] % \setupmathematics[autopunctuation=no] % ascii \asciimode \stopenvironment the project-openstack-source-analysis.tex file content is below: \environment env-plain \starttext \startBG \setuplayout[normal] \startstandardmakeup \midaligned{\CruxFramed{\ssd OpenStack}} \vfil \stopstandardmakeup \stopBG \startfrontmatter \setuplayout[reset] \setuppagenumbering[conversion=romannumerals] \setuppagenumber[number=1] \completecontent %\completelistoffigures %\completelistoftables \stopfrontmatter \startbodymatter \setuppagenumbering[conversion=numbers] \setuppagenumber[number=1] \setups{Text} \component component-01-openstack-outline \component component-02-openstack-nova \page \setups{Empty} \stopbodymatter \startappendices \setups{Appendices} \title{} \placepublications \title{} \placeindex \page \setups{Empty} \stopappendices \startbackmatter \stopbackmatter \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \setupuserpagenumber not working as expected
Thanks Jan, that is an extensive bit of work below! Might take me a while to digest, but I'll explore it carefully. Julian On 3/9/20 6:29 pm, Jan Willem Flamma wrote: Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards, Jan Willem Flamma *The main product file* == \environment env-WA \startproduct currentproduct % Document definitions \define\MyManual{Course Manual} \define\MyTitle{Title} \define\MySubtitleOne{Subtitle 1} \define\MySubtitleTwo{Subtitle 2} \define\MyRevnumber{Revision number} % Load frontmatter files \startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents \stopfrontmatter % Load bodymatter file \startbodymatter \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \setuppagenumber[number=1] \component co-01 \component co-02 \stopbodymatter % Load backmatter files \startbackmatter \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] \startappendices \component co-ap-01 \component co-ap-02 \stopappendices \stopbackmatter % Load external PDF documents \setuppagenumber[state=stop] \copypages[External PDF/app1.pdf][n=4] \stopproduct = *The env-WA.tex file (below is about pagenumbering only)* = % Start chapter on right (odd) page, pagenumber = bottom right \setuppagenumbering [alternative=doublesided, location=right] % Pagenumbering style \definestructureconversionset [frontpart:pagenumber][][romannumerals] \definestructureconversionset [bodypart:pagenumber] [][numbers] \definestructureconversionset [appendix:pagenumber] [][numbers] = *The fm-frontpage.tex file* \startcomponent currentcomponent \product product % Front page layout \startstandardmakeup % Place logo centered on page \framed[height=5cm,width=broad,frame=off] {\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles \blank[6*big] \color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big] \color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent *The fm-titlepage.tex file* \startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}} \blank \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}} \blank \midaligned{\color[Modu_Blue]{\tfb Company name}} \blank \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent *The fm-tableofcontents.tex file* \startcomponent currentcomponent \product product \setupbackgrounds [leftpage] [setups=pagenumber:left] \setupbackgrounds [rightpage] [setups=pagenumber:right] % This is where I want the roman numbering to start \setuppagenumber[number=5] \starttitle[title=Table of Contents] \placecontent \stoptitle \stopcomponent *From: *jbf <mailto:roma83...@gmail.com> *Sent: *Thursday, 3 September 2020 06:05 *To: *mailing list for ConTeXt users <mailto:ntg-context@ntg.nl> *Subject: *[NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!): \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuplist[chapter][pageconversionset=pagenumber] \setuppagenumber[number=1] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumber[number=1] \stopsectionblockenvironment T
Re: [NTG-context] \setupuserpagenumber not working as expected
Credits to Pragma who helped me to set this up a few years ago. From: jbfSent: Friday, 4 September 2020 00:20To: Jan Willem FlammaCc: ntg >> mailing list for ConTeXt usersSubject: Re: [NTG-context] \setupuserpagenumber not working as expected Thanks Jan, that is an extensive bit of work below! Might take me a while to digest, but I'll explore it carefully.JulianOn 3/9/20 6:29 pm, Jan Willem Flamma wrote:Dear Julian, I use something similar using a main product file, an environment file that contain the styling and several components that build up the frontmatter, the manual and the appendices. Below my setup where I start the roman numbering on the table of contents page (page 5 or v in roman) Once the bodymatter starts the pagenumber is set to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards,Jan Willem Flamma The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define\MyManual{Course Manual}\define\MyTitle{Title}\define\MySubtitleOne{Subtitle 1}\define\MySubtitleTwo{Subtitle 2}\define\MyRevnumber{Revision number} % Load frontmatter files\startfrontmatter \component fm-frontpage \component fm-titlepage \component fm-tableofcontents\stopfrontmatter % Load bodymatter file\startbodymatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\setuppagenumber[number=1] \component co-01 \component co-02\stopbodymatter % Load backmatter files\startbackmatter\setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right]\startappendices \component co-ap-01 \component co-ap-02\stopappendices\stopbackmatter % Load external PDF documents\setuppagenumber[state=stop]\copypages[External PDF/app1.pdf][n=4] \stopproduct= The env-WA.tex file (below is about pagenumbering only)=% Start chapter on right (odd) page, pagenumber = bottom right\setuppagenumbering [alternative=doublesided, location=right] % Pagenumbering style\definestructureconversionset [frontpart:pagenumber][][romannumerals]\definestructureconversionset [bodypart:pagenumber] [][numbers]\definestructureconversionset [appendix:pagenumber] [][numbers]= The fm-frontpage.tex file\startcomponent currentcomponent \product product % Front page layout\startstandardmakeup % Place logo centered on page\framed[height=5cm,width=broad,frame=off]{\externalfigure[frontpage-logo.png][width=12cm]} % Place course titles\blank[6*big]\color[Modu_Blue]{\midaligned{\bfc \MyManual}} \blank[4*big]\color[Modu_Blue]{\midaligned{\tfc \MyTitle}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleOne}} \blank[2*big]\color[Modu_Blue]{\midaligned{\tfc \MySubtitleTwo}} \vfill \stopstandardmakeup \stopcomponent The fm-titlepage.tex file\startcomponent currentcomponent \product product \startstandardmakeup \color[Modu_Blue]{\midaligned{\tfb \MyManual}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MyTitle}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleOne}} \blank[2*big] \color[Modu_Blue]{\midaligned{\tfb \MySubtitleTwo}} \blank[10*big] \color[Modu_Blue]{\midaligned{\tfb \MyRevnumber}} \blank \midaligned{\color[Modu_Blue]{\tfb \currentdate[month,year]}} \blank[10*big] \midaligned{\color[Modu_Blue]{\tfb Written by:}} \blank \midaligned{\color[Modu_Blue]{\tfb Company name}} \blank \midaligned{\color[Modu_Blue]{\tfb City, Country}} \vfill \stopstandardmakeup \stopcomponent The fm-tableofcontents.tex file\startcomponent currentcomponent \product product \setupbackgrounds [leftpage] [setups=pagenumber:left]\setupbackgrounds [rightpage] [setups=pagenumber:right] % This is where I want the roman numbering to start\setuppagenumber[number=5] \starttitle[title=Table of Contents]\placecontent\stoptitle \stopcomponent From: jbfSent: Thursday, 3 September 2020 06:05To: mailing list for ConTeXt usersSubject: [NTG-context] \setupuserpagenumber not working as expected Am seeking to have frontmatter pages in roman numerals and from Chapter 1 onwards in arabic numerals. I have achieved something of the kind, but page 1 (arabic) is appearing on the last page of the frontmatter and not the first page of Chapter 1. I do not know why this is happening. My setup for page numbering is as follows (something I found somewhere - wiki? elsewhere? Not sure. I didn't make it up!):\definestructureconversionset[frontpart:pagenumber][][romannumerals]\definestructureconversionset[bodypart:pagenumber] [][numbers]\startsectionblockenvironment[frontpart]\setupuserpagenumber[
[NTG-context] Solved: Book setup with LHS-side quotes before chapters/parts, header/footer issues, TOC, etc.
Thanks to Wolfgang Schuster and Bruce Horrocks I have now a working solution. I ended up following Bruce’s suggestion of doing a left hand side (LHS) page opposite the first (RHS) chapter or part page differently than using after/before modifications of the \chapter and \part setups as I had been doing years ago (but that book did not have parts and was done in mkii) The modification of \chapter and \part setups with before= and after= never worked in the \component setup in LMTX. Creating a separate command to run immediately before a \chapter or \part, as suggested by Bruce, was simpler and and turned out to be more robust. So, this single file example also works when \components are used. The only issues I have now left are very minimal. In the table of contents, the abstract for a part has some extra whitespace above, which the chapter abstracts don’t have. But that is not really a problem. And getting the part title somewhere more centred on its page is also left as an issue for later. Example file. In a project/component setup: everything before the \starttext goes into the environment file, the rest in the product file. %%% %%% Sections that have a LHS preface with a quote %%% \startsetups SectionLHSPageSetup \page[left] \setupheader[state=empty] \start \startalignment[left,nothyphenated] \startnarrower[4*left] \tf\it \stopsetups \definestartstop [SectionLHSPage] [ before={\setups{SectionLHSPageSetup}}, after={\stopnarrower \stopalignment\stop}] \define[1]\SectionPrequote{\startSectionLHSPage #1\stopSectionLHSPage} %%% %%% part is managed here %%% \defineconversionset [part] [Romannumerals] [numbers] \setuplabeltext[en][partlabel=Part~] \setuphead [part] [sectionsegments=part, bodypartlabel=partlabel, appendixlabel=, sectionconversionset=part, page=yes, header=empty, footer=empty, placehead=yes] \definelist[parttext] \setuplist[parttext][margin=1.3em,pagecommand=\gobbleoneargument] \define[1]\PartAbstract{\writetolist[parttext]{}{\start\itx#1\stop}} %%% %%% chapter is managed here %%% \definetext [chapterfooter] % name [footer]% vertical location [pagenumber]% content \setuplabeltext[en][appendixchapterlabel=Appendix~] \setuphead [chapter] [page=yes, header=empty, bodypartlabel=, appendixlabel=appendixchapterlabel, footer=chapterfooter, sectionsegments=chapter, before={\blank[force,2*big]}, after={\blank[3*big]}] \definelist[chaptertext] \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument] \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}} \defineresetset [default] [0,0] [1] \setupcombinedlist [content] [list={part,parttext,chapter,chaptertext}] \starttext \startfrontmatter \completecontent \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \startchapter[title={One}] \dorecurse{7}{\input tufte \par \input knuth} \stopchapter \stopfrontmatter \startbodymatter \dorecurse{3}{ \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben Wierda}} \part{Title title title} \PartAbstract{This is a part abstract.} \dorecurse{2}{ \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \startchapter[title={Two}] \ChapterAbstract{This is a chapter abstract.} \dorecurse{5}{\input tufte \par \input knuth} \stopchapter } } \stopbodymatter \startappendices \defineresetset[default][0,1][1] %% reset , chapter, but not part \setuphead[part][number=no] \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben Wierda}} \part{Title title title} \PartAbstract{This is a part abstract.} \dorecurse{2}{ \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \startchapter[title={Two}] \ChapterAbstract{This is a chapter abstract.} \dorecurse{5}{\input tufte \par \input knuth} \stopchapter } \stopappendices \stoptext In a component setup, a part component may look like this: \startcomponent p_partone \product prd_book \project project_book \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben Wierda}} \part{Title title title} \PartAbstract{This is a part abstract for a normal part.} \component c_chapter \component c_chapter \stopcomponent and a chapter component like this: \startcomponent c_chapter \product prd_book \project project_book \starttext \SectionPrequote{If you think good architecture is expensive, try bad architecture\crlf {\tf Brian Foote and Joseph Yoder}} \chapter{An Inconvenient Truth} \ChapterAbstract{This is a chapter abstract.} \setupindenting[next] \placeinitial I{\kap{\bf n the half}} century or so that human kind has had IT, the IT sector has increasingly wrestled with the fact that IT projects often fail in one
[NTG-context] Wrong prefix in cross references to formulas in external document
Dear Hans and all contributors, I really appreciate ConTeXt for the right way to obtain high quality documents. I'm a theoretical physicist and I'm going to write a book. I think ConTeXt is the right choice to work with a number of formulas, figures and cross-references. The visual quality of formulas is better than in regular LaTeX. The new feature with formula autosplitting looks also very promising. For me it is important to obtain the high quality without a lot of manual tweaks of each formula for each given document format and figure placement. However, I have found a problem with references if I compile one component only. The references to formulas in other components have wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the right formula references are very important. I started looking into this issue. The references to other components are taken from the whole product as from an external document. It turned out that this is a general problem with references with prefixes to external documents. The prefix is stored in a tuc file as a reference to a section as a sequential number of the header in the document. As a result, the prefix from the external document is calculated using the structure of the current document. Here is the MWE, which consists of two files: foo.tex: \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] \starttext Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] Remarks: \in[remark1], \in[remark2] \startbodymatter \chapter[chap1]{Chapter} \placeformula[eq1]\startformula x = y\stopformula \chapter[chap2]{Chapter} \section[sec1]{Section} \section[sec2]{Section} \placeformula[eq1]\startformula x = y\stopformula \placeformula[eq2]\startformula x = y\stopformula \stopbodymatter \startappendices \chapter[chap3]{Chapter} \section[sec3]{Section} \placeformula[eq3]\startformula x = y\stopformula \section[sec4]{Section} \startremark[remark1]\stopremark \placeformula[eq4]\startformula x = y\stopformula \startremark[remark2]\stopremark \chapter[chap4]{Chapter} \stopappendices \stoptext bar.tex: \starttext Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], \in[foo::sec4] Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], \in[foo::chap4] Remarks: \in[foo::remark1], \in[foo::remark2] % any chapters and sections here \stoptext It is expected to have the same first page on these documents: Equations: 1.1, 2.2, A.1, A.2 Sections: 2.1, 2.2, A.1, A.2 Chapters: 1, 2, A, B Remarks: A.2.1, A.2.2 However, the bar.tex produces wrong prefixes to formulas and remarks. The output depends on the document structure of bar.tex, not foo.tex. I started looking into the source code. Thanks to lua, it is not a big deal to track the problem. The prefixdata is complemented by the sectiondata after the loading the tuc file. So, the question is: is it possible to store the full prefixdata with all necessary prefix numbers in the tuc file? Here is my proposal to change the source code: --- strc-lst-old.lmt2023-01-29 11:30:15.610309948 +0300 +++ strc-lst.lmt2023-01-29 12:10:08.864228923 +0300 @@ -266,6 +266,16 @@ if r and not r.section then r.section = structures.sections.currentid() end +-- store sectiondata in prefixdata (necessary for external files) +if t.prefixdata and r.section then +local sectiondata = structures.sections.collected[r.section] +if sectiondata then +for k, v in next, sectiondata do +t.prefixdata[k] = v +end +end +end +-- local b = r and t.block if r and not b then local s = r.section --- strc-ref-old.lmt2023-01-29 11:30:15.823643904 +0300 +++ strc-ref.lmt2023-01-29 12:07:45.697109862 +0300 @@ -2318,7 +2318,17 @@ if data then numberdata = lists.reordered(data) -- data.numberdata if numberdata then -helpers.prefix(data,prefixspec) +-- helpers.prefix(data,prefixspec) +-- use the actual numbers from prefixdata +local prefixdata = data.prefixdata +if prefixdata then +-- adapted from helpers.prefix (not sure) +if (prefixspec and prefixspec == no) or prefixdata.prefix == no then +prefixdata = false +end +sections.typesetnumber(prefixdata,"prefix", prefixspec or false, prefixdata) +end +-- sections.typesetnumber(numberdata,"number",numberspec,numberdata) else local useddata = data.useddata After this small change, all the references are correct. However, I'm quite new to ConTeXt, so maybe here are some caveats. It would be great to fix the references to formu
[NTG-context] bad argument #1 to 'gsub'
{\hfill\getmarking[\v!section]\hfill}] \setupbodyfontenvironment [default] [em=italic] \setupsectionblock[\v!frontpart] [\c!page=\v!yes] \setupsectionblock[\v!bodypart] [\c!page=\v!yes] \setupsectionblock[\v!appendix] [\c!page=\v!yes] \setupsectionblock[\v!frontpart] [\c!before=,\c!after=] \setuphead [\v!chapter] [\c!command=\PlaceSection, \c!page=\v!yes, \c!before=, \c!header=\v!nomarking, \c!style=\bfd] \setuphead [\v!title] [\c!command=\PlaceSection, \c!page=\v!right, \c!before=, \c!header=\v!nomarking, \c!style=\bfd] \setuphead [\v!section] [\c!command=\PlaceSection, \c!inbetween=, \c!style=\bfb] \setuphead [\v!subsection] [\c!command=\PlaceSection, \c!before=\blank, \c!style=\bfa] \setuphead [\v!subsubsection] [\c!command=\PlaceSection, \c!before=\blank, \c!style=\bsa] \def\PlaceSection#1#2% {\goodbreak \vbox {\localheadsetup \begstrut \inleftmargin{\hbox to \leftmarginwidth{\hss#1\hss}}% #2}} \setupcaptions[width=14cm,align=right] \setMPtext{text}{some test text} \startusableMPgraphic{text} picture r ; r := image ( graphictext \MPstring{text} randomized .4pt scaled 6pt withfillcolor .8\MPcolor{maincolor} withpen pencircle scaled 1pt ; ) ; draw r ; \stopusableMPgraphic \setuptype [\c!option=\v!slanted] \setuptyping [\c!option=\v!slanted] \setuplist [\v!section] [\c!width=3em] \defineregister [texmacro] [texmacros] \setupregister [texmacro] [\c!indicator=\v!off, \c!distance=1em minus .25em] \setupfootnotes [\c!rule=\v!on] \setuphead [\v!chapter] [\c!header=\v!empty] \setupitemgroup[\v!itemize] [\v!each] [\c!headstyle=\v!bold] \setupitemgroup[\v!itemize] [\v!each] [\v!stopper] \setupsubpagenumber [\c!way=\v!by\v!chapter, \c!state=\v!start] \stopenvironment - /Source/Handbook.tex - \startproduct Handbook \environment Source/Environment \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \component Source/Preface/Preface \stopbodymatter \startappendices \completeindex \stopappendices \startbackmatter \stopbackmatter \stopproduct - /Source/Preface/Preface.tex - \startchapter{Preface} Foo - Any help would be much appreciated. I am using ConTeXt version 2011.06.23 23:59. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com ___ 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 prefix in cross references to formulas in external document
I, too, am struggling with external (and internal) references. I have created (and sent to Hans) a MWE that seems to identify two bugs: 1) External references: in a single product, some of these work, and *some* do not render the numbers (using \in{} [ref], for example). They are, however, identified as known or "verified". 2) Internal references: all render but *some* get "missing link target" errors (in the PDF viewer). I have not been able to get anywhere with the (lua) code, myself. Alan On Sun, 29 Jan 2023 19:03:32 +0300 Yaroslav Beltukov via ntg-context wrote: > Dear Hans and all contributors, > > I really appreciate ConTeXt for the right way to obtain high quality > documents. I'm a theoretical physicist and I'm going to write a book. > I think ConTeXt is the right choice to work with a number of formulas, > figures and cross-references. The visual quality of formulas is > better than in regular LaTeX. The new feature with formula > autosplitting looks also very promising. For me it is important to > obtain the high quality without a lot of manual tweaks of each > formula for each given document format and figure placement. > > However, I have found a problem with references if I compile one > component only. The references to formulas in other components have > wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the > right formula references are very important. > > I started looking into this issue. The references to other components > are taken from the whole product as from an external document. It > turned out that this is a general problem with references with > prefixes to external documents. The prefix is stored in a tuc file as > a reference to a section as a sequential number of the header in the > document. As a result, the prefix from the external document is > calculated using the structure of the current document. > > Here is the MWE, which consists of two files: > foo.tex: > > \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] > > \starttext > > Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] > > Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] > > Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] > > Remarks: \in[remark1], \in[remark2] > > \startbodymatter > > \chapter[chap1]{Chapter} > \placeformula[eq1]\startformula x = y\stopformula > \chapter[chap2]{Chapter} > \section[sec1]{Section} > \section[sec2]{Section} > \placeformula[eq1]\startformula x = y\stopformula > \placeformula[eq2]\startformula x = y\stopformula > > \stopbodymatter > > \startappendices > > \chapter[chap3]{Chapter} > \section[sec3]{Section} > \placeformula[eq3]\startformula x = y\stopformula > \section[sec4]{Section} > \startremark[remark1]\stopremark > \placeformula[eq4]\startformula x = y\stopformula > \startremark[remark2]\stopremark > \chapter[chap4]{Chapter} > > \stopappendices > > \stoptext > > > bar.tex: > > \starttext > > Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] > > Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], > \in[foo::sec4] > > Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], > \in[foo::chap4] > > Remarks: \in[foo::remark1], \in[foo::remark2] > > % any chapters and sections here > > \stoptext > > It is expected to have the same first page on these documents: > > Equations: 1.1, 2.2, A.1, A.2 > Sections: 2.1, 2.2, A.1, A.2 > Chapters: 1, 2, A, B > Remarks: A.2.1, A.2.2 > > However, the bar.tex produces wrong prefixes to formulas and remarks. > The output depends on the document structure of bar.tex, not foo.tex. > > I started looking into the source code. Thanks to lua, it is not a > big deal to track the problem. The prefixdata is complemented by the > sectiondata after the loading the tuc file. So, the question is: is > it possible to store the full prefixdata with all necessary prefix > numbers in the tuc file? Here is my proposal to change the source > code: > > --- strc-lst-old.lmt2023-01-29 11:30:15.610309948 +0300 > +++ strc-lst.lmt2023-01-29 12:10:08.864228923 +0300 > @@ -266,6 +266,16 @@ > if r and not r.section then > r.section = structures.sections.currentid() > end > +-- store sectiondata in prefixdata (necessary for external files) > +if t.prefixdata and r.section then > +local sectiondata = structures.sections.collected[r.section] > +if sectiondata then > +for k, v in next, sectiondata do > +t.prefixdata[k] = v > +end > +end > +end > +-- > local b
Re: [NTG-context] Wrong prefix in cross references to formulas in external document
On 1/29/2023 5:03 PM, Yaroslav Beltukov via ntg-context wrote: Dear Hans and all contributors, I really appreciate ConTeXt for the right way to obtain high quality documents. I'm a theoretical physicist and I'm going to write a book. I think ConTeXt is the right choice to work with a number of formulas, figures and cross-references. The visual quality of formulas is better than in regular LaTeX. The new feature with formula autosplitting looks also very promising. For me it is important to obtain the high quality without a lot of manual tweaks of each formula for each given document format and figure placement. However, I have found a problem with references if I compile one component only. The references to formulas in other components have wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the right formula references are very important. I started looking into this issue. The references to other components are taken from the whole product as from an external document. It turned out that this is a general problem with references with prefixes to external documents. The prefix is stored in a tuc file as a reference to a section as a sequential number of the header in the document. As a result, the prefix from the external document is calculated using the structure of the current document. Here is the MWE, which consists of two files: foo.tex: \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] \starttext Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] Remarks: \in[remark1], \in[remark2] \startbodymatter \chapter[chap1]{Chapter} \placeformula[eq1]\startformula x = y\stopformula \chapter[chap2]{Chapter} \section[sec1]{Section} \section[sec2]{Section} \placeformula[eq1]\startformula x = y\stopformula \placeformula[eq2]\startformula x = y\stopformula \stopbodymatter \startappendices \chapter[chap3]{Chapter} \section[sec3]{Section} \placeformula[eq3]\startformula x = y\stopformula \section[sec4]{Section} \startremark[remark1]\stopremark \placeformula[eq4]\startformula x = y\stopformula \startremark[remark2]\stopremark \chapter[chap4]{Chapter} \stopappendices \stoptext bar.tex: \starttext Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], \in[foo::sec4] Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], \in[foo::chap4] Remarks: \in[foo::remark1], \in[foo::remark2] % any chapters and sections here \stoptext It is expected to have the same first page on these documents: Equations: 1.1, 2.2, A.1, A.2 Sections: 2.1, 2.2, A.1, A.2 Chapters: 1, 2, A, B Remarks: A.2.1, A.2.2 However, the bar.tex produces wrong prefixes to formulas and remarks. The output depends on the document structure of bar.tex, not foo.tex. I started looking into the source code. Thanks to lua, it is not a big deal to track the problem. The prefixdata is complemented by the sectiondata after the loading the tuc file. So, the question is: is it possible to store the full prefixdata with all necessary prefix numbers in the tuc file? Here is my proposal to change the source code: --- strc-lst-old.lmt 2023-01-29 11:30:15.610309948 +0300 +++ strc-lst.lmt 2023-01-29 12:10:08.864228923 +0300 @@ -266,6 +266,16 @@ if r and not r.section then r.section = structures.sections.currentid() end + -- store sectiondata in prefixdata (necessary for external files) + if t.prefixdata and r.section then + local sectiondata = structures.sections.collected[r.section] + if sectiondata then + for k, v in next, sectiondata do + t.prefixdata[k] = v + end + end + end + -- local b = r and t.block if r and not b then local s = r.section --- strc-ref-old.lmt 2023-01-29 11:30:15.823643904 +0300 +++ strc-ref.lmt 2023-01-29 12:07:45.697109862 +0300 @@ -2318,7 +2318,17 @@ if data then numberdata = lists.reordered(data) -- data.numberdata if numberdata then - helpers.prefix(data,prefixspec) + -- helpers.prefix(data,prefixspec) + -- use the actual numbers from prefixdata + local prefixdata = data.prefixdata + if prefixdata then + -- adapted from helpers.prefix (not sure) + if (prefixspec and prefixspec == no) or prefixdata.prefix == no then + prefixdata = false + end + sections.typesetnumber(prefixdata,"prefix", prefixspec or false, prefixdata) + end + -- sections.typesetnumber(numberdata,"number",numberspec,numberdata) else local useddata = data.useddata After this small change, all the references are corre
[NTG-context] First document — problems with bi b module and layout
Hullo, I'm just making my first real document in ConTeXt and although I'm thinking more and more how this was a great idea. I also decided to simultaneously write an external document/module containing all definitions to fit the But as a newbie, of course, I stumbled upon some beginner's problems: 1. Chapter heading is not like I would expect — I would like to have the line above the chapter as long as the one below it 2. The empty page at the end of the document annoys me and doesn't want to go away. 3. The citations won't show any content, neither does the list of publications — I'm clearly doing something very wrong here. What I want is numbered citation with short references at the bottom and full references in the list of publications in the appendices. 4. If I want to include 'pf_ul.tex' and 'moja_bibliografija.bbl' into my user's local modules in Linux, where should I place the link to them? It's a bit annoying to have to place links to them in each directory where I make a new new file that uses them. And clearly, there will be many yet to come! If anything I just wrote doesn't make much sense, I excuse myself ...I'm tired, tried to learn and hack together this definitions the whole day today and didn't sleep much yesterday either. Cheers, Matija -- gsm: +386 41 849 552 e-mail: [EMAIL PROTECTED] www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: [EMAIL PROTECTED] msn: [EMAIL PROTECTED] yahoo: matija_suklje % za pravila PF UL \input pf_ul \def\avtor{Matija Šuklje} \def\mentor{as. mag. Luka Tičar} \def\tip{seminarska naloga} \def\naslov{Konkurenčna klavzula v delovni pogodbi} \def\kljucnebesede{delovno pravo} % moji lastni linki \useURL[author-email][mailto:[EMAIL PROTECTED]@rutka.net] \useURL[homepage][http://matija.suklje.name][][matija.suklje.name] \starttext \startstandardmakeup \title{\naslov} \stopstandardmakeup \startfrontmatter \setuppagenumbering[left={stran },conversion=Romannumerals,location=right] \placecontent \section[uvod]{Uvod} \subsection[povzetek]{Povzetek} \input knuth {\en % začasno spremeni jezik v angleščino \subsection[summary]{Summary} \input knuth } \stopfrontmatter \startbodymatter \setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right] \chapter{Kr en poglavje} \section[1]{Prvo poglavje} \input tufte \subsection[1.1]{podpoglavje} \input knuth tuki citiram, veš? \cite[ZOFVI] \cite[neki] \stopbodymatter \startappendices \placepublications \stopappendices \stoptext\startpublication[ k=ZOFVI,% key, po katerem citiraš t=zakon,% tip publikacije je zakon y=1996, s=ZOFVI,% short citation u=http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248, ] \title{Zakon o organizaciji in financiranju vzgoje in izobraževanja} \journal{Uradni list Republike Slovenije} \volume{35} \issue{12} \pubyear{1996}\month{2}\day{29} \biburl{http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248} \pages{841-862} \stoppublication \startpublication[ a={Matija Šuklje} k=neki, t=test, y=2007, s=Neki ] \title{Neki nekastga} \author{Matija Šuklje} \stoppublication%d Tu so ConTeXt definicije oblike ipd., kot so predpisane za seminarske %d in diplomske naloge na Pravni fakulteti Univerze v Ljubljani %c Avtor: Matija Šuklje, [EMAIL PROTECTED], http://matija.suklje.name %c Avtor dovoljuje (in spodbuja) uporabo vsebino tega „dela“ pod pogoji v licenci GPL. %d This are the ConTeXt definitions of layout etc. as perscribed for writing a thesis %d on the Law faculty, University of Ljubljana %c Author: Matija Šuklje, [EMAIL PROTECTED], http://matija.suklje.name %c The author permits (and encourages) the usage of this "work" under the terms of the GPL licence. %%% %%% splošne definicije dokumenta %%% % jezik, UTF-8 in velikost papirja \mainlanguage[sl] \enableregime[utf8] \setuppapersize[a4][a4] %%% %%% za informacije v PDF, pobere podatke iz definicij glavnega dokumenta %%% % da dela UTF-8 tudi v PDF kazalu in informacijah o dokumentu \input spec-tst % pobere iz glavnega dokumenta definicije in jih zapiše v informacije v PDF \setupinteraction [state=start, title={\naslov}, subtitle={\tip}, author={\avtor}, keyword={\tip, \kljucnebesede} ] % ustvari kazalo v PDF \placebookmarks[chapter,section,subsection] %%% %%% kazalo %%% \setupcombinedlist[content][alternative=c] \setuplist[chapter][style=bold,alternative=b,width=1.5em] \setuplist[section][margin=1.5em,width=2em] \setuplist[subsection][margin=3.5em,width=3em] \setuplist[subsubsection][margin=6.5em,width=4em] %%% %%% oblika poglavij ipd. %%% % zgenerira okoli naslova prvo stran na podlagi definicij iz glavnega dokumenta in datuma ob generiranju \setuphead [title] [align=middle, t
Re: [NTG-context] Wrong prefix in cross references to formulas in external document
Dear Hans, Thank you for the nice and straightforward solution. I have tested it locally and it works. I hope it will be in the next release (should I do anything?). By the way, I have a couple of other small issues. I will describe them in detail in other threads of this mailing list if it is the right place to do so. Best regards, Yaroslav пн, 30 янв. 2023 г. в 12:52, Hans Hagen via ntg-context : > On 1/29/2023 5:03 PM, Yaroslav Beltukov via ntg-context wrote: > > Dear Hans and all contributors, > > > > I really appreciate ConTeXt for the right way to obtain high quality > > documents. I'm a theoretical physicist and I'm going to write a book. I > > think ConTeXt is the right choice to work with a number of formulas, > > figures and cross-references. The visual quality of formulas is better > > than in regular LaTeX. The new feature with formula autosplitting looks > > also very promising. For me it is important to obtain the high quality > > without a lot of manual tweaks of each formula for each given document > > format and figure placement. > > > > However, I have found a problem with references if I compile one > > component only. The references to formulas in other components have > > wrong prefixes, e.g. (2.1) instead of (3.1). Needless to say, the right > > formula references are very important. > > > > I started looking into this issue. The references to other components > > are taken from the whole product as from an external document. It turned > > out that this is a general problem with references with prefixes to > > external documents. The prefix is stored in a tuc file as a reference to > > a section as a sequential number of the header in the document. As a > > result, the prefix from the external document is calculated using the > > structure of the current document. > > > > Here is the MWE, which consists of two files: > > foo.tex: > > > > \defineenumeration[remark][prefix=yes, prefixsegments=chapter:section] > > > > \starttext > > > > Equations: \in[eq1], \in[eq2], \in[eq3], \in[eq4] > > > > Sections: \in[sec1], \in[sec2], \in[sec3], \in[sec4] > > > > Chapters: \in[chap1], \in[chap2], \in[chap3], \in[chap4] > > > > Remarks: \in[remark1], \in[remark2] > > > > \startbodymatter > > > > \chapter[chap1]{Chapter} > > \placeformula[eq1]\startformula x = y\stopformula > > \chapter[chap2]{Chapter} > > \section[sec1]{Section} > > \section[sec2]{Section} > > \placeformula[eq1]\startformula x = y\stopformula > > \placeformula[eq2]\startformula x = y\stopformula > > > > \stopbodymatter > > > > \startappendices > > > > \chapter[chap3]{Chapter} > > \section[sec3]{Section} > > \placeformula[eq3]\startformula x = y\stopformula > > \section[sec4]{Section} > > \startremark[remark1]\stopremark > > \placeformula[eq4]\startformula x = y\stopformula > > \startremark[remark2]\stopremark > > \chapter[chap4]{Chapter} > > > > \stopappendices > > > > \stoptext > > > > > > bar.tex: > > > > \starttext > > > > Equations: \in[foo::eq1], \in[foo::eq2], \in[foo::eq3], \in[foo::eq4] > > > > Sections: \in[foo::sec1], \in[foo::sec2], \in[foo::sec3], \in[foo::sec4] > > > > Chapters: \in[foo::chap1], \in[foo::chap2], \in[foo::chap3], > \in[foo::chap4] > > > > Remarks: \in[foo::remark1], \in[foo::remark2] > > > > % any chapters and sections here > > > > \stoptext > > > > It is expected to have the same first page on these documents: > > > > Equations: 1.1, 2.2, A.1, A.2 > > Sections: 2.1, 2.2, A.1, A.2 > > Chapters: 1, 2, A, B > > Remarks: A.2.1, A.2.2 > > > > However, the bar.tex produces wrong prefixes to formulas and remarks. > > The output depends on the document structure of bar.tex, not foo.tex. > > > > I started looking into the source code. Thanks to lua, it is not a big > > deal to track the problem. The prefixdata is complemented by the > > sectiondata after the loading the tuc file. So, the question is: is it > > possible to store the full prefixdata with all necessary prefix numbers > > in the tuc file? Here is my proposal to change the source code: > > > > --- strc-lst-old.lmt2023-01-29 11:30:15.610309948 +0300 > > +++ strc-lst.lmt2023-01-29 12:10:08.864228923 +0300 > > @@ -266,6 +266,16 @@ > > if r and not r.section then > > r.section = structures.sections.currentid() > > end > > +-- store sectiondata in prefixdata (necessary
Re: [NTG-context] First document — problems with bi b module and layout
Dne četrtek 27. decembra 2007 je Matija Šuklje napisal(a): > From what I can tell the main problem is that in legal circles it's > considered bad form to cite (the short one) right next to the cited text. > The much preferred way is "below the line" in the footer. I think I solved the problem with footnotes now by using \footnote{\cite[extras={, p. 12}][ref]} ...but I'm still not happy with too little information produced by \cite and not having a working \placepublications Any help appreciated. Cheers, Matija -- gsm: +386 41 849 552 e-mail: [EMAIL PROTECTED] www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: [EMAIL PROTECTED] msn: [EMAIL PROTECTED] yahoo: matija_suklje % definicije dodatnega polja za skrajšane naslove \newbibfield[kratko] % definicije dodatnih polj potrebnih za pravne vire \newbibfield[title_eng] \newbibfield[spremembe] %%% %%% knjige %%% \startpublication[ k=pavcnik_teorija, a=Pavcnik, t=knjiga, y=2001, ] \title{Teorija prava} \kratko{Teorija prava} \author{Marijan}[M.]{}{Pavčnik} \revision{2. izdaja} \pubyear{2001} \pubname{Cankarjeva založba} \city{Ljubljana} \stoppublication %%% %%% zborniki %%% \startpublication[ k=raz_purity, a=Raz, t=zbornik, y=1998, ] \title{The Purity of the Pure Theory of Law} \kratko{The Purity} \author{Joseph}[J.]{}{Raz} \journal{Norms and Normativity — Critcal Perspectives on Kelsenian Themes} \editor{}[S. L.]{}{Paulson} \editor{}[B.]{}{Litschewski Paulson} \pubname{Clarendon Press} \city{Oxford} \pubyear{1998} \stoppublication %%% %%% članki v revijah %%% \startpublication[ k=bavcon_zkp, a=Bavcon, t=clanek, y=2003 ] \title{Na rob peti noveli zakona o kazenskem postopku} \kratko{Na rob} \author{Ljubo}[L.]{}{Bavcon} \journal{Pravna praksa} \volume{22} \issue{6/7} \pubyear{2003} \stoppublication %%% %%% članki v revijah, ki izhajajo letno %%% \startpublication[ k=galic_vloga, a=Galic, t=annuali, y=2002 ] \title{Vloga sodnika pri spodbujevanju sodnih poravnav} \kratko{Vloga sodnika} \author{Aleš}[A.]{}{Galič} \journal{Zbornik znanstvenih razprav} \issue{63} \pubyear{2002} \stoppublication %%% %%% pravni viri %%% %TODO — zlo grdi hack-i na mestih — nekak morš rešt to :/ \startpublication[ k=SPZ, t=zakon, y=2002, s=SPZ ] \title{Stvarnopravni zakonik} \kratko{SPZ} \title_eng{Law of Property Code} \organization{Državni zbor RS} \journal{Ur. l. RS} \volume{2002} \issue{87} \spremembe{18/2007 Skl.US: U-I-70/04-18} \pubyear{2002}\month{10}\day{17}% datum objave \yearfiled{2003}\monthfiled{1}\dayfiled{1} % datum začetka veljave %%% TODO — boljšo definicijo \biburl{http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248} \stoppublication% za pravila PF UL \input pf_ul \def\avtor{Matija Šuklje} \def\mentor{as. mag. Luka Tičar} \def\tip{seminarska naloga} \def\naslov{Konkurenčna klavzula v delovni pogodbi} \def\kljucnebesede{delovno pravo} % moji lastni linki \useURL[author-email][mailto:[EMAIL PROTECTED]@rutka.net] \useURL[homepage][http://matija.suklje.name][][matija.suklje.name] \starttext \startstandardmakeup \title{\naslov} \stopstandardmakeup % \startfrontmatter \setuppagenumbering[left={stran },conversion=Romannumerals,location=right] \placecontent \section[uvod]{Uvod} \subsection[povzetek]{Povzetek} \input knuth {\en % začasno spremeni jezik v angleščino \subsection[summary]{Summary} \input knuth } % \stopfrontmatter % % \startbodymatter \setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right] \chapter{Kr en poglavje} \section[1]{Prvo poglavje} \input tufte \subsection[1.1]{podpoglavje} \input knuth tuki citiram, veš? \footnote{\cite[extras={ str. IV-VI in XI}][bavcon_zkp]} % \placepublications % \stopbodymatter % % \page % \startappendices Bibliografija % \stopappendices \stoptext%d Tu so ConTeXt definicije oblike ipd., kot so predpisane za seminarske %d in diplomske naloge na Pravni fakulteti Univerze v Ljubljani %c Avtor: Matija Šuklje, [EMAIL PROTECTED], http://matija.suklje.name %c Avtor dovoljuje (in spodbuja) uporabo vsebino tega „dela“ pod pogoji v licenci GPL. %d This are the ConTeXt definitions of layout etc. as perscribed for writing a thesis %d on the Law faculty, University of Ljubljana %c Author: Matija Šuklje, [EMAIL PROTECTED], http://matija.suklje.name %c The author permits (and encourages) the usage of this "work" under the terms of the GPL licence. %%% %%% splošne definicije dokumenta %%% % jezik, UTF-8 in velikost p
Re: [NTG-context] First document — problems with bi b module and layout
ent][alternative=c] \setuplist[chapter][style=bold,alternative=b,width=1.5em] \setuplist[section][margin=1.5em,width=2em] \setuplist[subsection][margin=3.5em,width=3em] \setuplist[subsubsection][margin=6.5em,width=4em] %%% %%% oblika poglavij ipd. %%% % zgenerira okoli naslova prvo stran na podlagi definicij iz glavnega dokumenta in datuma ob generiranju \setuphead [title] [align=middle, textstyle=\sc, style=\bfd, before={\startalignment[middle] Univerza v Ljubljani \crlf Pravna fakulteta \vfill}, after= { (\tip) % definiraj v dokumentu â npr. \def\tip{diplomska naloga} \vfill Avtor: \avtor % definiraj v dokumentu â npr. \def\autor{Matija Å uklje} \crlf Mentor: \mentor % definiraj v dokumentu â npr. \def\mentor{preljubi profesor} \vfill Ljubljana, \currentdate{} \stopalignment \page } ] % poglavja \setuphead [chapter] [header=empty, textstyle=\sc, style=\bfb, before={\page\noindentation\hairline\blank[line]}, after={\nowhitespace\hairline\blank[4*line]} ] % oddelki \setuphead [section] [page=yes, textstyle=\sc, style=\tfa, align=right, before={\blank[2*line]}, after={\blank[line]} ] % pododdelki \setuphead [subsection] [style=\it, align=right, before={\blank[2*line]}, after={\blank[line]} ] %%% %%% sploÅ¡na oblika teksta %%% \setupindenting[1.5em] \setupindenting[yes] \setupwhitespace[medium] %%% %%% definicije za citiranje in bibliografijo %%% % da sploh dela citiranje in bibliografija in ga poiÅ¡Äe v zunanji datoteki \usemodule[bib] \input moja_bibliografija.bbl % sploÅ¡ne nastavitve za citiranje %TODO â predeli ...je sam zaÄasna oblika \setuppublications [sorttype=cite, refcommand=short, numbering=short, autohang=yes, monthconversion=Romannumerals% ne dela? ] % sploÅ¡ne nastavitve za bibliografijo %TODO â sploh ustvari!! % zakonodaja %TODO â predeli ...je sam zaÄasna oblika \setuppublicationlayout[zakon]{ \inserttitle{\bgroup}{\egroup. }{} \insertjournal{\bgroup\it}{\egroup, }{} \insertvolume{}{ }{} \insertpubyear{(}{) }{} \insertissue{}{, }{} \insertday{}{. }{} \insertmonth{}{. }{} \insertpages{Str. }{.}{} } % \setupcite[key,author][] \setuppublicationlayout[test]{ \inserttitle{}{}{} } %TODO â prenesi vse kar se le da iz glavnega dokumenta sem %TODO â citiranje (to bo Å¡e komplicirano!) \setupsectionblock[appendix][page=no] \setuppublicationlist[samplesize=ZOFVI] \startpublication[ k=ZOFVI,% key, po katerem citiraÅ¡ t=zakon,% tip publikacije je zakon y=1996, s=ZOFVI,% short citation u={http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248}] \title{Zakon o organizaciji in financiranju vzgoje in izobraževanja} \journal{Uradni list Republike Slovenije} \volume{35} \issue{12} \pubyear{1996}\month{2}\day{29} \biburl{http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248} \pages{841-862} \stoppublication \startpublication[a={Matija Å uklje}, k=neki, t=test, y=2007, s=Neki] \title{Neki nekastga} \author{Matija}{}{Å uklje} \stoppublication% za pravila PF UL \input pf_ul \def\avtor{Matija Å uklje} \def\mentor{as. mag. Luka TiÄar} \def\tip{seminarska naloga} \def\naslov{KonkurenÄna klavzula v delovni pogodbi} \def\kljucnebesede{delovno pravo} % moji lastni linki \useURL[author-email][mailto:[EMAIL PROTECTED]@rutka.net] \useURL[homepage][http://matija.suklje.name][][matija.suklje.name] \starttext \startstandardmakeup \title{\naslov} \stopstandardmakeup \startfrontmatter \setuppagenumbering[left={stran },conversion=Romannumerals,location=right] \placecontent \section[uvod]{Uvod} \subsection[povzetek]{Povzetek} \input knuth {\en % zaÄasno spremeni jezik v angleÅ¡Äino \subsection[summary]{Summary} \input knuth } \stopfrontmatter \startbodymatter \setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right] \chapter{Kr en poglavje} \section[1]{Prvo poglavje} \input tufte \subsection[1.1]{podpoglavje} \input knuth tuki citiram, veÅ¡? \cite[ZOFVI] \cite[neki] %\stopbodymatter %\startappendices \subject{Bibliografija} \placepublications \stopbodymatter \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] First document — problems with bi b module and layout
Dne sreda 26. decembra 2007 je Taco Hoekwater napisal(a): ad 1. & 2.: Thanks, works like a charm :] >Solution: none. it is not possible to combine 'short' citation >and mainmatter/backmatter/appendices. (this problem is nasty, but >quite hard to fix). Damn. What I need to do is: * for each cititation to have a reference number in superscript and Romannummerals next to the citation * a footnote on the "same" page in the form like "T. Hoekwater, BIB (2006), pp. 2-4" * and in the appendix a list with longer forms like "Hoekwater, Taco: BIBLIOGRAPHIES (2. edition), Oxford press, London 2006" I don't know if I made this clear. But RTFM-ing and reading some examples on the Wiki brought me just this far and now I'm dead again. >Workaround: only use visible ASCII in your file names (for now, >I intend to fix this). done ...didn't imagine UTF-8 filenames to cause problems in ConTeXt though. Anyway, it's not that annoying and thanks for explaining this to me. > * You have to be a bit more careful about the \startpublication >arguments: >- watch out for extra space characters. The only ones that are > ignored are the ones just before a key. so that's why people add % at the end of them? nice failsafe mechanism :] > * The \author command inside bbl files takes three arguments: Whoops. > Finally, if you want to have 'short' keys in the publication list, > it makes sense to add a set up like this: > >\setuppublications[numbering=short,autohang=yes] >\setuppublicationlist[samplesize=ZOFVI] I still don't understand this one, but I'm not even > After all those changes, fixes, and workarounds, I ended up with the > attached files. Thanks. I tried to apply what I thought relevant to my document and it somewhat worked, but then I suppose I broke it again. And I'm too lame to figure out what and how to fix it. Sorry that I'm such a pain in the arse :/ I'm attaching the newly-fixed-and-broken-again files > /tex/context/user would ~/.texmf/ be a suitable place? Again, thanks *A LOT* for your help. I had a hunch that the good dozen of different types of citation that our faculty demands would make my life miserable for a while. I just hope ConTeXt will make it all worth after the macros and definitions are done. Cheers, Matija -- gsm: +386 41 849 552 e-mail: [EMAIL PROTECTED] www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: [EMAIL PROTECTED] msn: [EMAIL PROTECTED] yahoo: matija_suklje % za pravila PF UL \input pf_ul \def\avtor{Matija Šuklje} \def\mentor{as. mag. Luka Tičar} \def\tip{seminarska naloga} \def\naslov{Konkurenčna klavzula v delovni pogodbi} \def\kljucnebesede{delovno pravo} % moji lastni linki \useURL[author-email][mailto:[EMAIL PROTECTED]@rutka.net] \useURL[homepage][http://matija.suklje.name][][matija.suklje.name] \starttext \startstandardmakeup \title{\naslov} \stopstandardmakeup \startfrontmatter \setuppagenumbering[left={stran },conversion=Romannumerals,location=right] \placecontent \section[uvod]{Uvod} \subsection[povzetek]{Povzetek} \input knuth {\en % začasno spremeni jezik v angleščino \subsection[summary]{Summary} \input knuth } \stopfrontmatter \startbodymatter \setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right] \chapter{Kr en poglavje} \section[1]{Prvo poglavje} \input tufte \subsection[1.1]{podpoglavje} \input knuth tuki citiram, veš? \cite[][bavcon_zkp] \stopbodymatter \startappendices \placepublications \stopappendices \stoptext% definicije dodatnega polja za skrajšane naslove \newbibfield[kratko] % definicije dodatnih polj potrebnih za pravne vire \newbibfield[title_eng] \newbibfield[spremembe] %%% %%% knjige %%% \startpublication[ k=pavcnik_teorija, a=Pavcnik, t=knjiga, y=2001, ] \title{Teorija prava} \kratko{Teorija prava} \author{Marijan}[M.]{}{Pavčnik} \revision{2. izdaja} \pubyear{2001} \pubname{Cankarjeva založba} \city{Ljubljana} \stoppublication %%% %%% zborniki %%% \startpublication[ k=raz_purity, a=Raz, t=zbornik, y=1998, ] \title{The Purity of the Pure Theory of Law} \kratko{The Purity} \author{Joseph}[J.]{}{Raz} \journal{Norms and Normativity — Critcal Perspectives on Kelsenian Themes} \editor{}[S. L.]{}{Paulson} \editor{}[B.]{}{Litschewski Paulson} \pubname{Clarendon Press} \city{Oxford} \pubyear{1998} \stoppublication %%% %%% članki v revijah %%% \startpublication[ k=bavcon_zkp, a=Bacon, t=clanek, y=2003 ] \title{Na rob peti noveli zakona o kazenskem postopku} \kratko{Na rob} \author{Ljubo}[L.]{}{Bavcon} \journal{Prav
Re: [NTG-context] First document — problems with bi b module and layout
Dne petek 28. decembra 2007 je Taco Hoekwater napisal(a): > Your pf_ul.tex had a spurious (or incomplete) \insert command at > the end, that is what was causing an error problems "Missing number". Yes, I figured that out not too long after I posted my files. Sorry about that. > For the footnoted references, this seems to work: Thanks, I've reused this macro of yours to make it fit my needs better. > You are operating on the border of what is doable for the current > bibliographic module, and I have no time to spend a month on a rewrite > just now, so if this is still not good enough, you are out of luck. With your help I managed to get together something useable. It's not perfect yet, but since the text I'm working on now is not that important and the next text where I would need a lot of different types of bibliography is still more then half a year away — there is no rush. Not that I would be bold enough to call this a bug ...it's more of a "feature request" if you will. During the process of learning how the bib module in ConTeXt works I came to these suggestions: * an autodetection/setting for \cite (e.g. \setupcitelayout) that works like \setuppublicationlayout, but outputs to the "cite field" * an autodetection/setting for \cite (e.g. in \setupcite) that works similar then \*author, \*sep, \*etal and \*etallimit in \setuppublicationlist when it comes to many authors in the citation field. * an autodetection/setting for \cite similar to the above with a script that would automatically shorten titles to the first X words, if the title exceeded Y characters or words; where X and Y could be set up * this might be a tough one — (at least in Slovenia's legal circles) legal documents get cited for the first time (e.g. with \cite) the same way as in the bibliography (full name, abbrev, journal, all changes etc.), but for each next time the same legal act gets cited only it's abbrevation should be used. Also in connection with that — is it possible (already) to utilise \useskip so that not only the empty space of the missing field, but also it's separators (e.g. \inserteditor{ed: }{, }{}) are being skipped? Thanks a million! Cheers, Matija p.s. all I have to do now is get some headers etc. ...but I think that should be doable even with my limited skills. p.p.s. I'm attaching the files a) if anyone finds any obvious faults in it and b) for anyone who could make use of the pf_ul.tex definitions. -- gsm: +386 41 849 552 e-mail: [EMAIL PROTECTED] www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: [EMAIL PROTECTED] msn: [EMAIL PROTECTED] yahoo: matija_suklje %%% %%% Splošne definicije %%% % za pravila PF UL \input pf_ul \def\avtor{Matija Šuklje} \def\mentor{as. mag. Luka Tičar} \def\tip{seminarska naloga} \def\naslov{Konkurenčna klavzula v delovni pogodbi} \def\kljucnebesede{delovno pravo} % moji lastni linki \useURL[author-email][mailto:[EMAIL PROTECTED]@rutka.net] \useURL[homepage][http://matija.suklje.name][][matija.suklje.name] %%% %%% Začetek teksta %%% \starttext \startstandardmakeup \title{\naslov} \stopstandardmakeup %%% %%% Kazalo in uvod s povzetki %%% \startfrontmatter \placecontent \section[uvod]{Uvod} \subsection[povzetek]{Povzetek} \input knuth {\en % začasno spremeni jezik v angleščino \subsection[summary]{Summary} \input knuth } \stopfrontmatter %%% %%% Vsebina naloge %%% \startbodymatter \section[1]{Prvo poglavje} \input tufte \subsection[1.1]{podpoglavje} \input knuth tuki citiram, veš? knjiga\citat[, str. 12][pavcnik_teorija] \crlf več avtorjev ... \citat[, str. 102-232][kusej_uvod] \crlf članek v zborniku \zbornik[, str. 5][raz_purity] \crlf pa še en Bavconov članek \clanek[][bavcon_zkp] \crlf ena Galičeva objava v ZZR \clanek[][galic_vloga] \crlf pa še zakon\zakon[33. člen][SPZ] \stopbodymatter %%% %%% Appendix %%% \startappendices \page \completepublications \stopappendices \stoptext% definicije dodatnega polja za skrajšane naslove in avtorje \newbibfield[kratko] \newbibfield[kjournal] \newbibfield[kauthor] % definicije dodatnih polj potrebnih za pravne vire \newbibfield[engtitle] \newbibfield[spremembe] %%% %%% knjige %%% \startpublication[k=pavcnik_teorija, a=Pavcnik, t=knjiga, y=2001, ] \title{Teorija prava} \kratko{Teorija prava} \author{Marijan}[M.]{}{Pavčnik} \kauthor{M. Pavčnik} \revision{2. izdaja} \pubyear{2001} \pubname{Cankarjeva založba} \city{Ljubljana} \stoppublication \startpublication[k=kusej_uvod, a=Kusej, t=knjiga, y=1996 ] \title{Uvod v pravoznanstvo} \kratko{Uvod} \author{Gorazd}[G.]{}{Kušej} \author{Marijan}[M.]{}{Pavčnik} \author{Anton}[A.]{}{Perenič} \kauthor{G. Kušej, M. Pavčnik, A. Perenič} \revision{ponatis 3. sprem
Re: [NTG-context] ConTeXt-ifying Kile
\setupTABLE \setuptables[options] \setuptabulate[name][options] \setuptext[text|margin|edge][options] # \setuptextbackground \setuptextposition[name][settings] \setuptextrules[options] \setuptexttexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setuptextvariable[name][options] \setupthinrules[options] \setuptolerance[options] \setuptop[text|margin|edge][options] \setuptoptexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setuptype[options] \setuptyping[file|typing|name][options] \setupunderbar[options] \setupurl[options] \setupversions[options] \setupwhitespace[none|small|medium|big|line|fixed|fix|dimension] # \setvalue # \setvariables # \setxvalue # \setxvariables # \showaccents \showbodyfont[settings] \showbodyfontenvironment[settings] # \showcharacters \showcolor[name] \showcolorgroup[name][horizontal|vertical|name|value|number] \showexternalfigures[alternative=a|b|c] \showfields[names] # \showfont \showframe[text|margin|edge] \showgrid # \showgridboxes # \showgridsnapping \showlayout # \showlayoutcomponents \showmakeup \showpalet[name][horizontal|vertical|name|value] \showprint[typesetting papersize][printing papersize][settings] \showsetups \showstruts # \showstruts \showsymbolset[name] # \snaptogrid \someline[reference] \somewhere{text}{text}[reference] \sort[text]{text} \space \splitfloat[settings]{text}{text} # \splitstring # \SR # \start \stop # \start \stop \startalignment[width|left|right|middle|inner|outer|wide|broad|height|bottom|line|reset|hanging|nothanging|hyphenated|nothyphenated] \stopalignment # \startarabicpar \stoparabicpar # \startarabictext \stoparabictext # \startappendices \stopappendices \startbackground \stopbackground # \startbackmatter \stopbackmatter # \startbaselinecorrection \stopbaselinecorrection # \startblockquote \stopblockquote # \startbodymatter \stopbodymatter \startbuffer[name] \stopbuffer \startcolor[name] \stopcolor \startcolumns[settings] \stopcolumns \startcombination[matrix] \stopcombination \startcomment[name][settings] \stopcomment \startcomponent file \stopcomponent \startdescription{text} \stopdescription \startdocument[name] \stopdocument \startenumeration \stopenumeration \startenvironment file \stopenvironment \startfact\fact text \\ text \\ text \\\fact text \stopfact \startfigure[name][file][factor=number][frame=on|off] \stopfigure \startfloattext[left|right|high|middle|low|offset|tall][reference]{text}{text} \stopfloattext # \startFLOWcell \stopFLOWcell # \startFLOWchart \stopFLOWchart \startformula \stopformula # \startframedcontent \stopframedcontent \startframedtext[left|right|middle|none][settings] \stopframedtext # \startfrontmatter \stopfrontmatter # \starthanging \stophanging \starthiding \stophiding \startinteractionmenu[name] \stopinteractionmenu \startitemgroup[name][options][settings] \stopitemigroup # \startitemize \stopitemize # \startitemize \stopitemize # \startJScode \stopJScode # \startJSpreamble \stopJSpreamble # \startJSscripts \stopJSscripts \startlegend[two]\leg text \\ text \\ text \\\leg \stoplegend \startline[reference] \stopline \startlinecorrection \stoplinecorrection \startlinenumbering[continue] \stoplinenumbering \startlines \stoplines \startlocal \stoplocal \startlocalenvironment \stoplocalenvironment \startlocalfootnotes \stoplocalfootnotes # \startlocalsetups \stoplocalsetups \startmakeup[name][settings] \stopmakeup \startmarginblock \stopmarginblock \startmarginrule[number] \stopmarginrule # \startmode \stopmode # \startMPpage \stopMPpage \startnamemakeup \stopnamemakeup \startnarrower[left|middle|right] \stopnarrower # \startnointerference \stopnointerference # \startnotmode \stopnotmode \startopposite \stopopposite \startoverlay{text}{text} \stopoverlay \startoverview[names] \stopoverview \startpacked[blank] \stoppacked \startparagraph \stopparagraph \startpositioning \stoppositioning \startpostponing \stoppostponing \startproduct file \stopproduct \startprofile[names] \stopprofile \startproject file \stopproject \startquotation[left|middle|right] \stopquotation \startregister[text]{text+text+text} \stopregister # \startsetups \stopsetups # \startstandardmakeup \stopstandardmakeup \startsymbolset[name] \stopsymbolset \startsynchronization \stopsynchronization \starttable[text|name] \stoptable \starttables[text|name] \stoptables \starttabulate[text][settings] \stoptabulate # \startTEXpage \stopTEXpage # \starttext \stoptext # \starttextbackground \stoptextbackground # \starttextdata \stoptextdata \starttextrule[top|bottom]{text} \stoptextrule \starttyping \stoptyping \startunpacked \stopunpacked \startversion[numbers] \stopversion # \startXMLdata \stopXMLdata # \startXMLignore \stopXMLignore # \startXMLmapping \stopXMLmapping \stretched{text} # \strut # \strutdepth # \strutheight # \struttedbox \sub[references] \subject[references]{text} \subsection[references]{text} \subsubject[references]{text} \subsubsection[references]{text} \subsubsubject[re
Re: [NTG-context] mkiv versus mkii: whitespace issues
I’m struggling to make a minimal example.It happens in my project, so it is a result of my …/products/prd_book.tex and ../environment/env_cataoia.tex and the test file. I need to give three files, two of which differ between mkii and mkiv because of different font commands and lettrine vs initial prd_book.tex === \startproduct prd_book \project project_cataoia \starttext \start \startstandardmakeup[doublesided=no] \ss \hairline \start \blank[line] \switchtobodyfont[16pt]\bf \leftaligned{Chess}% \blank[line] \leftaligned{and the Art of}% \blank[line] \leftaligned{Enterprise Architecture}% \stop \hairline \blank[line] \leftaligned{Making the right moves to manage Business--IT complexity}% \hairline \blank[line]\rightaligned{Gerben Wierda}% \blank[6cm]\start\leftskip=10cm\hairline\stop \rightaligned{2015}% \stopstandardmakeup \startstandardmakeup[doublesided=no,page=no] ~\blank[2in] \start \switchtobodyfont[9pt] Copyright \copyright\ 2015 by Gerben Wierda, The Netherlands\crlf Image used on cover (and on the inside) \copyright\ iStock.com/Antonio \blank[4mm] Published by R\&A, The Netherlands \blank[4mm] Typeset with \TeX, using the mkii version of the \SSCONTEXT\ macro package. \blank[4mm] Neither the author, nor the publisher, nor the printer, nor the distributor, nor the seller accept any responsibility or liability for loss or damage occasioned to any person or property through using the material, instructions, methods or ideas contained in or distributed with this book, or acting or refraining from acting as a result of such use. The author, publisher, printer, distributor, and seller expressly disclaim all implied warranties, including merchantability of fitness for any particular purpose. \blank[4mm] ISBN 978-90-819840-5-8 \blank[4mm] Contact info: {\sl i...@enterprisechess.com}\crlf Web site: {\sl http://enterprisechess.com}\crlf Suggested hashtag: {\sl \#eachess} \stop \stopstandardmakeup \startstandardmakeup[doublesided=no] \start \switchtobodyfont[16pt] \midaligned{The world is not {\blackboard Q}, it is {\blackboard R}} \blank[6cm] \stop \stopstandardmakeup \stop \startfrontmatter \startbuffer [chapter:quote] %When teaching a rapidly changing technology, perspective is more important %than content\crlf %{\tf Richard~Pattis} The most erroneous stories are those we think we know best --- and therefore never scrutinize or question.\crlf {\tf Stephen Jay Gould} \stopbuffer \noheaderandfooterlines \start \title[h:toc]{Contents} \setuppagenumber[number=3] \placelist[chapter,chaptertext] \stop \component c_loosely \stopfrontmatter \startbodymatter \component c_inconvenient \component c_goals \component c_orthodoxy \component c_intermezzo \component c_chess \component c_model \component c_future \component c_hurdles \stopbodymatter \startappendices % \component c_logic \component c_cloud \component c_current \component c_fsatemplate \component c_psatemplate \component c_bibliography \component c_endnotes \component c_index \stopappendices \stoptext \stopcomponent = env_cataoia.tex mkii = \startenvironment env_cataoia \project project_cataoia % \definedescription [description] [location=serried, width=broad, hang=fit, margin=standard, headstyle=bold] \definestartstop [descriptions] [before=\startpacked, after=\stoppacked] % \def\SSCONTEXT {Con\kern-.15em\TeX t} % % \definepapersize[smallpaperback][width=5in,height=8in] \setuppapersize[smallpaperback][smallpaperback] \setuplayout[location=doublesided] \setuppagenumbering[alternative=doublesided] \setupsectionblock[frontpart][page=no] \setupsectionblock[bodypart][page=no] \setupsectionblock[appendix][page=no] \setupsectionblock[backpart][page=no] % Every chapter body text starts with lettrine: \usemodule[lettrine] \setuplettrine[Lines=3, Hang=.5, Oversize=0, Raise=0, Findent=0pt, Nindent=0em, Slope=0em, Ante=, FontHook=, TextFont=\sc, Image=no] % Every chapter starts with a quote on the LHS page: \setuphead [chapter] [page=, before={\setups[chapter:before]}, after={\setups[chapter:after]}] \startsetups chapter:before \page[left] \noheaderandfooterlines \startalignment[left,nothyphenated] \startnarrower[4*left] \em \getbuffer[chapter:quote] \stopnarrower \stopalignment \resetsetups[quote:text] \page[right] \noheaderandfooterlines \blank[force,2*big] \stopsetups \startsetups chapter:after \blank[3*big] \stopsetups % Mark TODO items in the text \def\todo#1{{\red --- --- --- TODO: