Re: [NTG-context] column-spanning floats
On Tue, 31 Jul 2018 14:06:43 +0200 Taco Hoekwater wrote: > > > > On 31 Jul 2018, at 13:57, Taco Hoekwater wrote: > > > > Hi all, > > > > It used to be that in an example like the one attached where you > > were using \startcolumns and used an \externalfigure that was wider > > than the column width, the figure would automatically be moved to > > the top of _both_ columns on the next page. > > > > That was a bit tricky sometimes, but worked fine. However, when I > > run with the current mkiv beta, the figure is simply overlapping > > the next column, and it does not auto-migrate. > > > > Also \startpostponing does not work here because it will indeed > > move to the next page, but still only occupies the left column, > > thus overlapping any text in the second column. > > > > Is that functionality gone, or do I need to do something special? > > > > Best wishes, > > Taco > > > > PS On top of that, the column balancing creates bad inter-paragraph > > spacing in the left column. No idea where that comes from! :( > > > Also, I just tried \definecolumnset, but a) the balance=yes key does > not work, and b) I still get awful inter-par spacing on the left > column, except with \setuplayout[grid=yes] (but that should not be > needed to just get a reasonable placing, I think). > > Taco I would also love to see a solution to this. I also tried to play with the \definecolumnset instead of the \startcolumns but when there are is a lot of inline math, \definecolumnset produces just horrible inter-par spacing. Thomas ___ 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 ___
[NTG-context] How to do an inline itemization?
How to do an in-line / in-text itemization? I would like to (i) enumerate something (ii) in the text (iii) but I don't know how. Thank you! Thomas ___ 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 ___
[NTG-context] Word and character count excluding TeX-directives
To meet some formal guidelines, I need to provide a word count of my abstract and a character count of the main text, and a character count of all the text appearing in figure captions. Is this possible (maybe using some lua-magic)? Thank you! Thomas Minimal example: \definestartstop [abstract] [style=bold, after={\blank[big]}] \starttext \title{My title: example of a word and character count} {\strut\tfx Formal guidelines: word count of abstract: $x$, character count of main text: $x$, character count of figure captions: $x$.} \blank \startabstract This is the abstract. Read this and that. \stopabstract % start of the main text Some random text with formulas \startformula y = α + βx + ε, \quad ε \sim N(0,σ^2) \stopformula And there are also figures with captions. \startplacefigure[ location=bottom, title={Residual plot with time $t$ on the x-axis and residuals $e_{jt}$ on the y-axis}, reference={fig:subject-residual}] \externalfigure[residuals][height=.242\textheight] \stopplacefigure And some more text with $x$ and $y$ and $z$, and \placeformula \startformula \startalign \NC a =\NC b \NR \NC c =\NC d \NR \stopalign \stopformula And stop. \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] Why is [left=(, right=)] ignored when using the aps btx rendering specification?
To answer my own question, it must be \usebtxdefinitions[aps] \setupbtxlist [aps] [alternative=b, after=, before=] \definebtx [aps:cite:num] [left={(}, right={)}] \definebtx [aps:list:numbering] [aps:list] [left={(}, right={)}] Am 03.01.2018 um 09:38 schrieb Dr. Thomas Möbius: Why is [left=(, right=)] ignored in \setupbtx when using the aps btx rendering specification? This works: \usebtxdataset [default] [../bibliography/bibliography] \setupbtx [default:cite:num] [left=(,right=)] \setupbtx [default:list] [left=(,right=),authorconversion=invertedshort] \starttext \cite[Carp:2012a, Carp:2012b] \cite[Weishaupt:2014] \cite[Knecht:2003] \cite[Jansen:2006b] \subject{References} \placelistofpublications \stoptext So, why does this not work? \usebtxdataset [default] [../bibliography/bibliography] \usebtxdefinitions[aps] \setupbtx [aps:cite:num] [left=(,right=)] \setupbtx [aps:list] [left=(,right=),authorconversion=invertedshort] \starttext \cite[Carp:2012a, Carp:2012b] \cite[Weishaupt:2014] \cite[Knecht:2003] \cite[Jansen:2006b] \subject{References} \placelistofpublications \stoptext Thank you for your help. ___ 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 ___
[NTG-context] Why is [left=(, right=)] ignored when using the aps btx rendering specification?
Why is [left=(, right=)] ignored in \setupbtx when using the aps btx rendering specification? This works: \usebtxdataset [default] [../bibliography/bibliography] \setupbtx [default:cite:num] [left=(,right=)] \setupbtx [default:list] [left=(,right=),authorconversion=invertedshort] \starttext \cite[Carp:2012a, Carp:2012b] \cite[Weishaupt:2014] \cite[Knecht:2003] \cite[Jansen:2006b] \subject{References} \placelistofpublications \stoptext So, why does this not work? \usebtxdataset [default] [../bibliography/bibliography] \usebtxdefinitions[aps] \setupbtx [aps:cite:num] [left=(,right=)] \setupbtx [aps:list] [left=(,right=),authorconversion=invertedshort] \starttext \cite[Carp:2012a, Carp:2012b] \cite[Weishaupt:2014] \cite[Knecht:2003] \cite[Jansen:2006b] \subject{References} \placelistofpublications \stoptext Thank you for your help. ___ 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 ___
[NTG-context] Adjust rendering of BibTeX entries
Dear list, I would like to render BibTeX-entries with the provided APA-style, however, in the text use superscript cross references. I have the following issues, which I don't know how to resolve. I was hoping, you could help me. 1. When choosing the style APA, the change to \setupcite seems to be ignored, see the minimal example below. (When changing alternative=apa back to alternative=ams, it works again.) 2. As I am citing bibliography entries with numbers, adding letters to the end of the publication years makes no sense. How can I loose the letters? Now, also the provided AMS-style adds these letters, which I don't think should be the case, too. 3. The edition field when citing a book is rendered wrong. It should be 7th edition followed by a period. (Compare this with the ams-style, where the edition field is rendered correctly.) How can I add the period and automatically add the st, nd, rd, th to a edition number? 4. Say, I would revert back to AMS-style but using superscripts rather than the [#Number] default. How can I loose the square brackets in the reference section? Thank you very much in advance. Thomas example.tex \setupbibtex[database={references},sort=author] \setuppublications[alternative=apa,sorttype=authoryear,numbering=yes] \setupcite[num][ left=\raisebox{1ex}\hbox\bgroup\tfxx, right=\egroup, lastpubsep={, }] \starttext \title{Test with APA} \section{Some text} This\cite[Mustermann:2014, Doe:2012a] and that,\cite[Doe:2012b] also that\cite[Doe:2012a] and this book.\cite[Mustermann:2001] \section{References} \placepublications [criterium=text] \stoptext example.bib @article{Mustermann:2014, title = {One hell of a title}, author = {Max {Mustermann}}, journal = {SomeJournal}, year= 2014, volume = 63, number = 2, pages = {289-298} } @article{Doe:2012b, title = {Another title}, author = {John {Doe}}, journal = {SomeJournal}, year= 2012, volume = 3, number = 2, pages = {189-198}, } @article{Doe:2012a, title = {Foo Bar Zap}, author = {John {Doe}}, journal = {SomeJournal}, year= 2012, volume = 4, number = 1, pages = {89-92}, } @book{Mustermann:2001, title = {How does this work?}, author= {Max {Mustermann}}, publisher = {Springer}, year = {2014}, edition = 7, address = {Berlin/Heidelberg} } ___ 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 ___
[NTG-context] figure numbering S3, S4, S6, ...
Dear list, I am compiling some figures as supplementary material and would like to have figure captions follow the convention: Figure S3 Figure S4 Figure S5 ... and I need that the numbering starts with S3 instead of S1. How can I achieve this? Minimal example: \setuppapersize[A6] \setupexternalfigures[location=default] \setupcaptions[way=bytext] \placefigure {Cow} {\externalfigure[cow][width=2cm]} \placefigure {Another Cow} {\externalfigure[cow][width=2cm]} ___ 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 ___
[NTG-context] Two column layout with footnotes do not work as expected
Hi, footnotes in two column layouts are typeset at the bottom of the respected column but with the width of two columns. Expected: 1) Either footnotes spanning the whole page from left to right at the bottom of the page. 2) Or have the footnote be restricted to one column only. How can I achieve the former? I would be thankful for help. Best, Thomas mtx-context | ConTeXt Process Management 0.61 mtx-context | mtx-context | main context file: /usr/share/texmf/tex/context/base/context.mkiv mtx-context | current version: 2015.07.01 21:40 Minimal example: On the first page, footnotes run into each other. On the second page, footnote runs into text. \setuppapersize[A5][A5] \setupbodyfont[10pt] \definestartstop[abstract] [before={\blank\midaligned{\bf Abstract}\startnarrower[2*middle]}, after={\stopnarrower\blank[big]}] \definecolumnset[TwoColumns][n=2] \starttext \title{Two Column Layout with Footnotes Spanning Page} \startabstract Footnotes start at the wrong place. And why is blank[big] ignored after this abstract? \stopabstract \godown[1em] \startcolumnset[TwoColumns] \section{The first} This is a test.\footnote{Why do footnotes only span this one column and don't go across the whole space?} \input knuth \footnote{Why do footnotes only span this one column and don't go across the whole space?} \input knuth \input knuth \footnote{Why do footnotes only span this one column and don't go across the whole space?} \input knuth \input knuth \input knuth \stopcolumnset \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] How to define a new environment / function?
Dear list, having used ConTeXt for years now, I am the first time in need to, well, programming something. And I realised, I am a little bit lost. I have a rather long list of variable descriptions that I would like to typeset in a usable and readable way. It should look something like this: ---snip: minimal example--- \starttext \setupdelimitedtext[blockquote] {{\bf Geschlecht} \qquad Geschlecht \hfill $0,1$} \startblockquote Das Geschlecht des Probanden. \stopblockquote \blank {{\bf SoB} \qquad Geburtssaison \hfill $1,\dots,4$} \startblockquote Jahreszeit der Geburt. Kodierung: 1 = Winter, 2 = Frühling, 3 = Sommer, 4 = Herbst. \stopblockquote \blank {{\bf BildungV} \qquad Bildung Vater \hfill $1,\dots,6$} \startblockquote Ordinale Beschreibung der Bildung des Vaters zum Zeitpunkt der Erhebung. Kodierung: 0 = kein Abschluss, 1 = Volksschule, 2 = Hauptschule, 3 = Realschule, 4 = Fachabitur, 5 = Abitur, 6 = Studium. \stopblockquote \blank {{\bf BildungM} \qquad Bildung Mutter \hfill $1,\dots,6$} \startblockquote Ordinale Beschreibung der Bildung der Mutter zum Zeitpunkt der Erhebung. Kodierung siehe {\bf BildungV}. \stopblockquote \blank {{\bf Urb15} \qquad Urbanität \hfill $\naturalnumbers$} \startblockquote Beschreibung der Urbanität des Umfelds in den ersten 15 Lebensjahren. Kodierung: $\sum_{i=1}^{15} u_i$ mit $u_i=$ ein Punkt für eine Stadt bis 10.000 Einwohner, 2 Punkte für bis 100.000 Einwohner, 3 Punkte über 100.000 Einwohner im Jahr $i$. \stopblockquote \blank {{\bf LQ} \qquad Händigkeit \hfill $(0,1)$} \startblockquote Lateralisierungsquotient, wobei -1 = perfekt linkshändig und +1 = perfekt rechtshändig. \stopblockquote \stoptext ---end snip--- What I would like to have is a function/environment/something that would allow me to write the above text in the following way: ---snip: want to example--- \starttext \startvariable [alias=Geschlecht, name=Geschlecht, range={$0,1$}] Das Geschlecht des Probanden. \stopvariable \startvariable [alias=SoB, name=Geburtssaison, range={$1,\dots,4$}] Jahreszeit der Geburt. Kodierung: 1 = Winter, 2 = Frühling, 3 = Sommer, 4 = Herbst. \stopvariable \startvariable [alias=BildungV, name={Bildung Vater}, range={$1,\dots,6$}, reference=bildungDesVater] Ordinale Beschreibung der Bildung des Vaters zum Zeitpunkt der Erhebung. Kodierung: 0 = kein Abschluss, 1 = Volksschule, 2 = Hauptschule, 3 = Realschule, 4 = Fachabitur, 5 = Abitur, 6 = Studium. \stopvariable \startvariable [alias=BildungM, name={Bildung Mutter}, range={$1,\dots,6$}] Ordinale Beschreibung der Bildung der Mutter zum Zeitpunkt der Erhebung. Kodierung siehe \in[bildungDesVater]. \stopvariable \startvariable [alias=Urb15, name=Urbanität, range={$\naturalnumbers$}] Beschreibung der Urbanität des Umfelds in den ersten 15 Lebensjahren. Kodierung: $\sum_{i=1}^{15} u_i$ mit $u_i=$ ein Punkt für eine Stadt bis 10.000 Einwohner, 2 Punkte für bis 100.000 Einwohner, 3 Punkte über 100.000 Einwohner im Jahr $i$. \startvariable [alias=LQ, name=Händigkeit, range={$(0,1)$}] Lateralisierungsquotient, wobei -1 = perfekt linkshändig und +1 = perfekt rechtshändig. \stopvariable \stoptext ---end snip--- Could someone point me in the right direction, or get me started somehow? Is this difficult to accomplish? Or is it super easy and I just don't know it? Thank you so much! Best Thomas ___ 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] setuppage is ignored
Dear list, it seems as if \setupnumber is ignored or I am using the wrong way to reset the page numbering. How to start the page numbering at 1 in the bodymatter? ---minimal exampe--- \setuppapersize[A5] \setuppagenumbering[start=start,alternative=doublesided,location=] \setupheader[style=small] \setupheadertexts [{\getmarking[sectionnumber]~\getmarking[section]}] [pagenumber] [pagenumber] [{\getmarking[chapternumber]~\getmarking[chapter]}] \setuphead[chapter][page={yes,right},header=empty,textstyle=\tfc] \definehead [intro] [chapter] \setuphead [intro] [number=no] \definecombinedlist [content][intro,chapter,section] \setuplist [intro] [headnumber=no] \starttext \startfrontmatter \setuppagenumber[numberconversion=romannumerals,state=start,number=1] %\setupnumber[page][1] \completecontent \intro{No number} \input knuth \input knuth \input knuth \stopfrontmatter \startbodymatter \setuppagenumber[numberconversion=numbers,state=start,number=1] %\setupnumber[page][1] \chapter{Has number} \input knuth \input knuth \input knuth \chapter{Has number} \input knuth \input knuth \input knuth \chapter{Has number} \input knuth \input knuth \input knuth \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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] How to place a verbatim environment in the text such that the following paragraph is not indented?
Dear list, how do I place a verbatim environment in the text such that the following paragraph is not indented? I expect the environment to behave the same as the formula-environment. How can I achieve this? --- minimal example --- \starttext \setupindenting[1.3em] \setupindenting[yes] \definetyping [R] [options=R, style={\ss}, before={\startframedtext [width=.975\makeupwidth, frame=off, bottomframe=on, topframe=on, background=screen, backgroundscreen=.95]}, after={\stopframedtext}, bodyfont=9pt, margin=1.3em] \input ward You can use the following syntax \startR f - function(x) x^2 \stopR to define a function. (Begging of line should not be indented.) \input ward Have a look at \startformula f(x) = x^2 \stopformula where $f$ is a function. (No indent as expected.) \input ward \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] text with background does not break properly around float
Has really no one an idea how to solve this problem? It is driving me crazy... Thanks for any help. Thomas 2014-04-30 12:24 GMT+02:00 Thomas Möbius kont...@thomasmoebius.de: Dear ConTeXt list, text that has some background attached to it, does not properly break if a float appears on the same page. How to work around it? ---minimal example--- \starttext \chapter {Bsaoteh} \defineenumeration [excursion] [text=Excursion, listtext={Excursion~}, counter=theorem, before={\blank\startbackground}, after={\stopbackground\blank}] \input knuth \input knuth \input knuth \placetable [here] [tab:bala] {Blaoesunthaoeusatoheu saohusaoteh asotehu asoehu aseohu}{ \bTABLE \setupTABLE[frame=off] \setupTABLE[r][first][topframe=on,rulethickness=1.3pt] \setupTABLE[r][2][topframe=on] \setupTABLE[r][last][bottomframe=on,rulethickness=1.3pt] \setupTABLE[c][each][align=left] \setupTABLE[c][1][align=right] \setupTABLE[c][1][width=.7\textwidth] \setupTABLE[c][2][width=.2\textwidth] \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \eTABLE} \excursion \input knuth\input knuth\input knuth \input knuth \input knuth \input knuth \input knuth \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Force two figures to appear on the same page
Dear ConTeXt list, I have multiple figures appearing in a single chapter which are roughly half a page in height. They would fit on top of each other. It seems as if context is only putting floats on top of each other if at least 2 lines of text fit underneath them. How to force two figures which fit on one page to also appear on one page? As you can see in the example below, the chapter would otherwise end with a lengthy list of figures. I'd prefer, if the chapter ends with text. If I'd use `force`, text would stop wrapping around the floats. The cow.png file is a copy of the graphic appearing on http://wiki.contextgarden.net/Command/externalfigure ---minimal example-- \starttext \chapter{Aasntheo asoetnh} \input knuth \input knuth \input knuth \placefigure [here] [fig:experiment:h:box:sd] {Hey} {\externalfigure[cow.png][height=.45\textheight,frame=on]} \placefigure [here] [fig:experiment:h:box:sd] {Ho} {\externalfigure[cow.png][height=.45\textheight,frame=on]} \placefigure [here] [fig:experiment:h:box:sd] {Ho} {\externalfigure[cow.png][height=.45\textheight,frame=on]} \placefigure [here] [fig:experiment:h:box:sd] {Ho} {\externalfigure[cow.png][height=.45\textheight,frame=on]} \input knuth \input knuth \input knuth \input knuth \input knuth \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] text with background does not break properly around float
Dear ConTeXt list, text that has some background attached to it, does not properly break if a float appears on the same page. How to work around it? ---minimal example--- \starttext \chapter {Bsaoteh} \defineenumeration [excursion] [text=Excursion, listtext={Excursion~}, counter=theorem, before={\blank\startbackground}, after={\stopbackground\blank}] \input knuth \input knuth \input knuth \placetable [here] [tab:bala] {Blaoesunthaoeusatoheu saohusaoteh asotehu asoehu aseohu}{ \bTABLE \setupTABLE[frame=off] \setupTABLE[r][first][topframe=on,rulethickness=1.3pt] \setupTABLE[r][2][topframe=on] \setupTABLE[r][last][bottomframe=on,rulethickness=1.3pt] \setupTABLE[c][each][align=left] \setupTABLE[c][1][align=right] \setupTABLE[c][1][width=.7\textwidth] \setupTABLE[c][2][width=.2\textwidth] \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \eTABLE} \excursion \input knuth\input knuth\input knuth \input knuth \input knuth \input knuth \input knuth \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] setupenumerations overwriting setupitemize
A general question. I use setupenumerations to define theorem-, lemma-, and definition-environments for my document. I realised that setupenumerations is overwriting keys that are set in setupitemize (and groups defined by defineitemgroup). ~~~snip~~~ \setupenumerations [numberconversion=numbers] \starttext \startitemize[a] \item Text Text \item Text Text \stopitemize \stoptext ~~~snip~~~ vs. ~~~snip~~~ %\setupenumerations [numberconversion=numbers] \starttext \startitemize[a] \item Text Text \item Text Text \stopitemize \stoptext ~~~snip~~~ This is unintuitive for me.. Is this expected behaviour?? ___ 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] Unexpected behaviour of enumeration in mkiv
2013/11/19 Thomas Möbius kont...@thomasmoebius.de: 2013/11/18 Wolfgang Schuster schuster.wolfg...@gmail.com: Am 15.11.2013 um 17:02 schrieb Thomas Möbius kont...@thomasmoebius.de: Hi, please have a look at the minimal example at the bottom. I am typesetting theorems and lemmata which are numbered consecutively within chapters in a book. I used the same code for a document written in mkii, and I thought I could just reuse it in mkiv. Obviously, there is something I am missing. Question: How do I get the same output when compiling the following code with 'context' as when compiled with 'texexec'. When compiled with 'context', the chapter number is missing in the numbering of theorems. Lemmas are not numbered at all. ~~~snip~~~ \setupenumerations [title=yes, style=normal, list=all, before={\blank[big]}, after={\blank[big]}, location=serried, Change “location=serried” to “alternative=serried”. width=broad, distance=0.5em, headstyle=bold, titlestyle=bold, way=bychapter, conversion=numbers] You have to change “conversion” to “numberconversion” but this isn’t necessary because numbers are the default conversion format. To have chapter numbers as part of the counter add “prefix=yes”. \defineenumeration [theorem] [text=Theorem, listtext={Theorem }] \defineenumeration [lemma] [text=Lemma, listtext={Lemma }, number=theorem] To use the counter of another enumeration use “counter=theorem”, not “name=theorem”. Wolfgang Thanks Wolfgang for the quick answer. I changed my code accordingly. The prefix=yes option, though, does not entirely do as I expect it. It adds the chapter+section number as a prefix to each theorem (and lemma). As I have way=bychapter in my options, though, it doesn't reset after a new section started (which is what I want!). The effect is odd as you can see in the minimal example. I only want to have the chapter number as a prefix. It's probably simple? difficult? Minimal example: ~~~snip~~~ \setupenumerations [title=yes, style=normal, list=all, before={\blank[big]}, after={\blank[big]}, alternative=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=bold, way=bychapter, prefix=yes] \defineenumeration [theorem] [text=Theorem, listtext={Theorem }] \defineenumeration [lemma] [text=Lemma, listtext={Lemma }, counter=theorem] \starttext \chapter{First chapter} \section{First section} \theorem Hello \theorem Hello \lemma Hello \theorem Hello \section{Second section} \lemma Hello \theorem Hello \chapter{Second chapter} \section{First section} \theorem Hello \lemma Hello \section{Second section} \lemma Hello \theorem Hello \stoptext ~~~snip~~~ To answer my own question, adding way=bychapter, prefixsegments=chapter, did the job! ___ 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] Unexpected behaviour of enumeration in mkiv
2013/11/18 Wolfgang Schuster schuster.wolfg...@gmail.com: Am 15.11.2013 um 17:02 schrieb Thomas Möbius kont...@thomasmoebius.de: Hi, please have a look at the minimal example at the bottom. I am typesetting theorems and lemmata which are numbered consecutively within chapters in a book. I used the same code for a document written in mkii, and I thought I could just reuse it in mkiv. Obviously, there is something I am missing. Question: How do I get the same output when compiling the following code with 'context' as when compiled with 'texexec'. When compiled with 'context', the chapter number is missing in the numbering of theorems. Lemmas are not numbered at all. ~~~snip~~~ \setupenumerations [title=yes, style=normal, list=all, before={\blank[big]}, after={\blank[big]}, location=serried, Change “location=serried” to “alternative=serried”. width=broad, distance=0.5em, headstyle=bold, titlestyle=bold, way=bychapter, conversion=numbers] You have to change “conversion” to “numberconversion” but this isn’t necessary because numbers are the default conversion format. To have chapter numbers as part of the counter add “prefix=yes”. \defineenumeration [theorem] [text=Theorem, listtext={Theorem }] \defineenumeration [lemma] [text=Lemma, listtext={Lemma }, number=theorem] To use the counter of another enumeration use “counter=theorem”, not “name=theorem”. Wolfgang Thanks Wolfgang for the quick answer. I changed my code accordingly. The prefix=yes option, though, does not entirely do as I expect it. It adds the chapter+section number as a prefix to each theorem (and lemma). As I have way=bychapter in my options, though, it doesn't reset after a new section started (which is what I want!). The effect is odd as you can see in the minimal example. I only want to have the chapter number as a prefix. It's probably simple? difficult? Minimal example: ~~~snip~~~ \setupenumerations [title=yes, style=normal, list=all, before={\blank[big]}, after={\blank[big]}, alternative=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=bold, way=bychapter, prefix=yes] \defineenumeration [theorem] [text=Theorem, listtext={Theorem }] \defineenumeration [lemma] [text=Lemma, listtext={Lemma }, counter=theorem] \starttext \chapter{First chapter} \section{First section} \theorem Hello \theorem Hello \lemma Hello \theorem Hello \section{Second section} \lemma Hello \theorem Hello \chapter{Second chapter} \section{First section} \theorem Hello \lemma Hello \section{Second section} \lemma Hello \theorem Hello \stoptext ~~~snip~~~ ___ 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] Unexpected behaviour of enumeration in mkiv
Hi, please have a look at the minimal example at the bottom. I am typesetting theorems and lemmata which are numbered consecutively within chapters in a book. I used the same code for a document written in mkii, and I thought I could just reuse it in mkiv. Obviously, there is something I am missing. Question: How do I get the same output when compiling the following code with 'context' as when compiled with 'texexec'. When compiled with 'context', the chapter number is missing in the numbering of theorems. Lemmas are not numbered at all. ~~~snip~~~ \setupenumerations [title=yes, style=normal, list=all, before={\blank[big]}, after={\blank[big]}, location=serried, width=broad, distance=0.5em, headstyle=bold, titlestyle=bold, way=bychapter, conversion=numbers] \defineenumeration [theorem] [text=Theorem, listtext={Theorem }] \defineenumeration [lemma] [text=Lemma, listtext={Lemma }, number=theorem] \starttext \chapter{First chapter} \theorem Hello \theorem Hello \lemma Hello \theorem Hello \stoptext ~~~snip~~~ ___ 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 ___