Hi, this is a rather long mail, but I'll add the answers to the wiki. For the future: Should I write one mail per question or all in one? :) 1. Color of references and table of content: How can I define/change the colors of references and the table of content? And why are some references red and others green? 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? 3. Text size in t-vim I've defined a smaller text size in t-vim, but this seems to affect \inline... as well. Is there a way to circumvent this? Minimal example: ``` \setupinteraction[state=start] \usemodule[t-vim] \definevimtyping[python][syntax=python, style={\switchtobodyfont[8pt,tt]},] \starttext \startpython for line in foo: print(line) \stoppython This is keyword \inlinepython{in} Python. \stoptext ``` 4. Captions of combinations The wiki shows, how to completely autolabel figures in a combination with mkiv. Is there a way to simply prefix the label with a), b), c),...? Another related question: Is there a way to define the width and align of the labels of a combination? 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 3 foobar Abbildung 4 otherfoo Abbildung 5 lastfoo Is there anything, I can do, to prevent this? 6. Multiple references I want to create the same footnote on multiple locations in the text. Therefore I used: ``` \setupinteraction[state=start] \starttext This\footnote[letter-s]{"s" is a letter.} is\note[letter-s] a nons\note[letter-s]ens\note[letter-s]e text. \stoptext ``` But this uses different fonts for the number in the text. Is there a way to fix this or do it better?
On Fri, 28 Jul 2017, Gerion Entrup wrote:
3. Text size in t-vim I've defined a smaller text size in t-vim, but this seems to affect \inline... as well. Is there a way to circumvent this?
Minimal example: ``` \setupinteraction[state=start]
\usemodule[t-vim] \definevimtyping[python][syntax=python, style={\switchtobodyfont[8pt,tt]},] \starttext \startpython for line in foo: print(line) \stoppython This is keyword \inlinepython{in} Python. \stoptext ```
The simplest solution is: \definetyping[python][syntax=python] \definetyping[smallpython][python][style={\switchtobodyfont[8pt]] And use \inlinepython{....} and \startsmallpython .... \stopsmallpython Aditya
On 28 Jul 2017, at 02:22, Gerion Entrup
wrote: 1. Color of references and table of content: How can I define/change the colors of references and the table of content? And why are some references red and others green?
This is what I use to control the TOC % state=start enables clickable links; contrastcolor= prevents green links \setupinteraction [state=start, style=, color=, contrastcolor=, openaction=FitWindow] % enable TOC in PDF sidebar \placebookmarks
On 07/28/2017 02:22 AM, Gerion Entrup wrote:
[...] 6. Multiple references I want to create the same footnote on multiple locations in the text. Therefore I used: ``` \setupinteraction[state=start]
\starttext This\footnote[letter-s]{"s" is a letter.} is\note[letter-s] a nons\note[letter-s]ens\note[letter-s]e text. \stoptext
``` But this uses different fonts for the number in the text. Is there a way to fix this or do it better?
Hi Gerion, the easiest way is to disable bold in links: \setupinteraction[state=start, style=] Or I guess you would have to enable bold in the footnote reference numbers. Just in case it helps, Pablo -- http://www.ousia.tk
Am Freitag, 28. Juli 2017, 16:34:01 CEST schrieb Pablo Rodriguez:
On 07/28/2017 02:22 AM, Gerion Entrup wrote:
[...] 6. Multiple references I want to create the same footnote on multiple locations in the text. Therefore I used: ``` \setupinteraction[state=start]
\starttext This\footnote[letter-s]{"s" is a letter.} is\note[letter-s] a nons\note[letter-s]ens\note[letter-s]e text. \stoptext
``` But this uses different fonts for the number in the text. Is there a way to fix this or do it better?
Hi Gerion,
the easiest way is to disable bold in links:
\setupinteraction[state=start, style=]
Or I guess you would have to enable bold in the footnote reference numbers. Ah ok, then both types of references are treated different. Your solution works, thank you.
Gerion
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
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 3 foobar Abbildung 4 otherfoo Abbildung 5 lastfoo
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. I hope it helps, Pablo -- http://www.ousia.tk
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 3 foobar Abbildung 4 otherfoo Abbildung 5 lastfoo
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
On 07/29/2017 04:45 AM, Gerion Entrup wrote:
Was not that simple, but I found the problem, that causes it: subsubsections without numbers. [...] Is there a way to fix this?
I would say this may be a bug. I don’t know how it is implemented, but prefixsegments (or prefixes) for captions only work when number is enabled. This makes sense if the section is part of the prefixsegments, but not if it isn’t. Another sample that shows the problem: \mainlanguage[de] \setupexternalfigures[location=default] \setuphead[subsection][number=no] \setupcaptions[prefixsegments=chapter] \setuphead[subsubsection][number=yes] \starttext \chapter[title=Kapitel] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \section[title=Abschnitt] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \subsection[title=Hier gibt’s ein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \subsection[title=Und hier gibt’s ein Problem auch] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \subsubsection[title=Aber hier gibt’s kein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \stoptext If this isn’t a bug, the code to avoid the problem is too tricky for me (and simply far beyond my knowledge). Excuse my ignorance, Pablo -- http://www.ousia.tk
Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez:
On 07/29/2017 04:45 AM, Gerion Entrup wrote:
Was not that simple, but I found the problem, that causes it: subsubsections without numbers. [...] Is there a way to fix this?
I would say this may be a bug. Does someone know a way to workaround?
This only way I see is to simply simulate a subsubsection (with some blanks and a big font). Gerion
I don’t know how it is implemented, but prefixsegments (or prefixes) for captions only work when number is enabled.
This makes sense if the section is part of the prefixsegments, but not if it isn’t.
Another sample that shows the problem:
\mainlanguage[de] \setupexternalfigures[location=default] \setuphead[subsection][number=no] \setupcaptions[prefixsegments=chapter] \setuphead[subsubsection][number=yes]
\starttext
\chapter[title=Kapitel] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\section[title=Abschnitt] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsection[title=Hier gibt’s ein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsection[title=Und hier gibt’s ein Problem auch] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsubsection[title=Aber hier gibt’s kein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \stoptext
If this isn’t a bug, the code to avoid the problem is too tricky for me (and simply far beyond my knowledge).
Excuse my ignorance,
Pablo
Dear Gerion, Add \setuphead[subsubsection] [incrementnumber=no] Regards, Jan Willem Flamma
On 30 Jul 2017, at 22:51, Gerion Entrup
wrote: Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez:
On 07/29/2017 04:45 AM, Gerion Entrup wrote:
Was not that simple, but I found the problem, that causes it: subsubsections without numbers. [...] Is there a way to fix this?
I would say this may be a bug. Does someone know a way to workaround?
This only way I see is to simply simulate a subsubsection (with some blanks and a big font).
Gerion
I don’t know how it is implemented, but prefixsegments (or prefixes) for captions only work when number is enabled.
This makes sense if the section is part of the prefixsegments, but not if it isn’t.
Another sample that shows the problem:
\mainlanguage[de] \setupexternalfigures[location=default] \setuphead[subsection][number=no] \setupcaptions[prefixsegments=chapter] \setuphead[subsubsection][number=yes]
\starttext
\chapter[title=Kapitel] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\section[title=Abschnitt] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsection[title=Hier gibt’s ein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsection[title=Und hier gibt’s ein Problem auch] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsubsection[title=Aber hier gibt’s kein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \stoptext
If this isn’t a bug, the code to avoid the problem is too tricky for me (and simply far beyond my knowledge).
Excuse my ignorance,
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 ___________________________________________________________________________________
Am Montag, 31. Juli 2017, 08:01:49 CEST schrieb Jan Willem Flamma:
Dear Gerion,
Add
\setuphead[subsubsection] [incrementnumber=no] This works :). Thank you very much!
Gerion
On 30 Jul 2017, at 22:51, Gerion Entrup
wrote: Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez:
On 07/29/2017 04:45 AM, Gerion Entrup wrote:
Was not that simple, but I found the problem, that causes it: subsubsections without numbers. [...] Is there a way to fix this?
I would say this may be a bug. Does someone know a way to workaround?
This only way I see is to simply simulate a subsubsection (with some blanks and a big font).
Gerion
I don’t know how it is implemented, but prefixsegments (or prefixes) for captions only work when number is enabled.
This makes sense if the section is part of the prefixsegments, but not if it isn’t.
Another sample that shows the problem:
\mainlanguage[de] \setupexternalfigures[location=default] \setuphead[subsection][number=no] \setupcaptions[prefixsegments=chapter] \setuphead[subsubsection][number=yes]
\starttext
\chapter[title=Kapitel] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\section[title=Abschnitt] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsection[title=Hier gibt’s ein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsection[title=Und hier gibt’s ein Problem auch] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]}
\subsubsection[title=Aber hier gibt’s kein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} \stoptext
If this isn’t a bug, the code to avoid the problem is too tricky for me (and simply far beyond my knowledge).
Excuse my ignorance,
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 ___________________________________________________________________________________
On 07/31/2017 08:01 AM, Jan Willem Flamma wrote:
Dear Gerion,
Add
\setuphead[subsubsection] [incrementnumber=no]
Dear Jan Willem, do you have an explanation for that behaviour? At least to me, it isn’t very intuitive (I’m trying to understand). Many thanks for your help, Pablo -- http://www.ousia.tk
Dear Pablo, I experienced the same caption numbering issue late 2015. See https://www.mail-archive.com/ntg-context@ntg.nl/msg80129.html https://www.mail-archive.com/ntg-context@ntg.nl/msg80129.html and https://www.mail-archive.com/ntg-context@ntg.nl/msg80131.html https://www.mail-archive.com/ntg-context@ntg.nl/msg80131.html Can’t really recall exactly but probably found the answer eventually via the test suite (see http://www.pragma-ade.com/download-1.htm http://www.pragma-ade.com/download-1.htm) Regards, Jan Willem
On 31 Jul 2017, at 17:15, Pablo Rodriguez
wrote: On 07/31/2017 08:01 AM, Jan Willem Flamma wrote:
Dear Gerion,
Add
\setuphead[subsubsection] [incrementnumber=no]
Dear Jan Willem,
do you have an explanation for that behaviour?
At least to me, it isn’t very intuitive (I’m trying to understand).
Many thanks for your help,
Pablo -- http://www.ousia.tk ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (4)
-
Aditya Mahajan
-
Gerion Entrup
-
Jan Willem Flamma
-
Pablo Rodriguez