[NTG-context] Command for the caption location inside \startplacefigure
Hello, What is the option to specify the CAPTION location in \startplacefigure (I already now that you can do it from \setupcaption)? I thought the first argument of 'location' was for the FIGURE location, and the second one for the CAPTION location, but the second one has no effect: \startplacefigure[location={left, top}, title=A cow] \externalfigure[cow] \stopplacefigure Best regards. ___ 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] Numberconversion problem in caption prefixes
Thanks again Wolfgang, with this setup everything is fine. But I wanted to bring to the attention of Hans the inconsistency of the prefix conversions by defaut, so that he can correct them: I A chapter [a figure] Figure I.1 % -- Here the conversion of the prefix to Romannumerals is done AUTOMATICALLY. 1.1 A section [a figure] Figure 1.2 % -- Here the conversion of the prefix to Romannumerals is NOT done AUTOMATICALLY (the presence of a section before seems to DISCARD THE AUTOMATIC CONVERSION). Nor in the prefix of the section. Code: \setuphead[chapter][conversion=Romannumerals] \starttext \chapter{A chapter} \placefigure{}{\externalfigure} \section{A section} \placefigure{}{\externalfigure} \stoptext Every prefix should be AUTOMATICALLY converted, not half of them. Hans, could you please correct that in the next betas? Best regards. ___ 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] Space problem after formulas inside itemize environments
Could you correct this space problem Hans? \startitemize \item Eeny, meeny, miny, moe \placeformula \startformula \text{Numbered formula: the space after is correct.} \stopformula \item Eeny, meeny, miny, moe \placeformula[-] \startformula \text{Unumbered formula: the space after is too big.} \stopformula \item Eeny, meeny, miny, moe \stopitemize ___ 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] Space problem after formulas inside itemize environments
What’s wrong with the second formula, both have the same space before and after the content? Then maybe Hans has corrected it recently. I am using ConTeXt version 2013.04.20, and you? ___ 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] Numberconversion problem in caption prefixes
Thank you Wolfgang, it does what I want. However, I realised after trying the following code inside environments (frontmatter, bodymatter, backmatter and appendices) that the default behaviour is WRONG because the conversions of prefixes are not always automatic. For instance, in the appendix environment, by default chapter numbers are Characters and every prefix representing a chapter number is also a Character (section prefixes, caption prefixes and so on). Now if you decide to switch chapter numbers to Romannumerals, you will get something totally inconsistent if you don’t do many conversions manually: *\startsectionblockenvironment[appendix]* *\defineconversionset[romannumeralsconversionset][][R]* *\setuphead[chapter][sectionconversionset=romannumeralsconversionset]* *\stopsectionblockenvironment* *\starttext* *\startappendices* *\chapter{Cool}* *\placefigure{A cow}{\externalfigure[cow]}* *\chapter{Cat}* *\section{Mouse}* *\section{Dog}* *\placefigure{A cow}{\externalfigure[cow]}* *\stopappendices* *\stoptext* which gives: *I Cool* *[figure] Figure I.I Cow % -- Here the prefix conversion from 'A' to 'I' works.* *II Cat* *B.1 Mouse % -- Here the prefix conversion from 'B' to 'II' does NOT work.* *B.2 Dog % -- Here the prefix conversion from 'B' to 'II' does NOT work.* *[figure] Figure B.II Cow % -- Here the prefix conversion from 'B' to 'II' does NOT work (because of the presence of the 2 sections B.1 and B.2 where the prefix conversion already did not work I think, so here is the BUG).* Extra: is it normal that caption NUMBERS (not prefixes) are converted to Romannumerals by default INSIDE the appendix environment (outside they are usual numbers)? ('Figure I.I Cow' and 'Figure B.II Cow' instead of 'Figure A.1 Cow' and 'Figure B.2 Cow'.) ___ 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] Numberconversion problem in caption prefixes
It should display: I Cool [figure] Figure 1.1 A cow % -- not: Figure I.1 A cow II Cat 2.1 Mouse 2.2 Dog [figure] Figure 2.1 A cow Could you look at this weird prefix conversion behaviour Hans? Géry Ogam 2013/11/12 Géry Ogam maggy...@gmail.com Hello, There is a numberconversion problem in caption prefixes. For instance, if chapter numbers are set to Romannumerals, the conversion of the caption prefixes depends on the presence of a section Minimal example: \setuphead[chapter][conversion=Romannumerals] \setupcaption[way=bychapter, prefixsegments=chapter] \starttext \chapter{Cool} \placefigure{A cow}{\externalfigure[cow]} \chapter{Cat} \section{Mouse} \section{Dog} \placefigure{A cow}{\externalfigure[cow]} \stoptext The previous code displays an inconsistent caption prefix (first time a Romannumeral, second time a number): I Cool [figure] Figure I.1 A cow II Cat 2.1 Mouse 2.2 Dog [figure] Figure 2.1 A cow ___ 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 local layout parameters (instead of global ones)?
\definemeasure[h1][1.2\measured{w1}+26mm] \definemeasure[h2][1.2\measured{w2}+26mm] \measured gives me this error (*Undefined control sequence*): *\17h1 ^^@-1.2\measured* * {w1}+26mm* *\measure ...sname \csname \??measure #1\endcsname* * \else \zeropoint \fi* *\page_layouts_synchronize ...tparameter \c!height* * }\ifx \p_page_layouts_heig...* *inserted text ...yout \previouslayout \page_layouts_synchronize* * \page_layouts_check_next \...* *\setup_layout ...out :}[#1]\the \everysetuplayout* * \the \everyswitchlayout \l...* *\syst_helpers_double_empty_one_spaced ...1[{#2}][]* I am using ConTeXt ver: 2013.04.20. So I tried to use \dimexpr: \definemeasure[h1][\the\dimexpr 1.2\measure{w1}+26mm\relax] \definemeasure[h2][\the\dimexpr 1.2\measure{w2}+26mm\relax] but it gives me this error (there is a problem with the decimal point in 1.2 because there is no error when I put an integer instead): *\17w1 .-0.* *7500\paperwidth* *\measure ...sname \csname \??measure #1\endcsname* * \else \zeropoint \fi* *\17h1 r-\the \dimexpr 1.2\measure {w1}* * + 26mm \relax* *\measure ...sname \csname \??measure #1\endcsname* * \else \zeropoint \fi* *\page_layouts_synchronize ...tparameter \c!height* * }\ifx \p_page_layouts_heig...* ___ 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 local layout parameters (instead of global ones)?
then use \dimexpr\measure{w2}\relax It works, thank you. ___ 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 use local layout parameters (instead of global ones)?
Hello, Here is my problem: \setuplayout[% width=0.75\paperwidth, height=\dimexpr\paperheight-1.2\paperwidth+1.2\textwidth+26mm] \definelayout[luxury][% width=0.6667\paperwidth, height=\dimexpr\paperheight-1.2\paperwidth+1.2\textwidth+26mm] \starttext - textwidth: \the\textwidth \crlf - textheight: \the\textheight \page \setuplayout[luxury] - textwidth: \the\textwidth \crlf - textheight: \the\textheight % -- The height (\texteight parameter) which depends on the width (\textwidth parameter) in my ‘luxury’ layout has NOT changed though the local width (\textwidth parameter) has changed. Therefore height used the global parameter \textwidth (defined in setuplayout) instead of the local parameter \textwidth (defined in definelayout[luxury]). Question: how to use the local one? \stoptext Best regards. ___ 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] Numberconversion problem in caption prefixes
Hello, There is a numberconversion problem in caption prefixes. For instance, if chapter numbers are set to Romannumerals, the conversion of the caption prefixes depends on the presence of a section Minimal example: \setuphead[chapter][conversion=Romannumerals] \setupcaption[way=bychapter, prefixsegments=chapter] \starttext \chapter{Cool} \placefigure{A cow}{\externalfigure[cow]} \chapter{Cat} \section{Mouse} \section{Dog} \placefigure{A cow}{\externalfigure[cow]} \stoptext The previous code displays an inconsistent caption prefix (first time a Romannumeral, second time a number): I Cool [figure] Figure I.1 A cow II Cat 2.1 Mouse 2.2 Dog [figure] Figure 2.1 A cow ___ 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 test the emptyness of a variable?
Thank you very much Aditya, now it works. As you said, the trick was to use \doiftextelse{}{}{} function as test of emptyness function, and \labeltext{chapter} instead of \currentstructurelabel as variable for the test because the latter was never found empty, even when it was. Thus the right code for me is: \define[1] \MyConversion{\doifelse{\currentsectioncountervalue}{1}{\doiftextelse{\labeltext{chapter}}{ONE}{#1}}{#1}} \defineconversion[MyConversion][\MyConversion] \setuphead[chapter][conversion=MyConversion] \starttext \setuplabeltext[chapter=] \chapter{Cool} \chapter{Cat} \chapter{Mouse} \setuplabeltext[chapter=CHAPTER~] \setupheadnumber[chapter][0] \chapter{Cool} \chapter{Cat} \chapter{Mouse} \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 test the emptyness of a variable?
I'm sure there is also a cleaner TeX way, but I'm not experienced enough for that. I think you misunderstood my issue: your Lua way does the same thing than my TeX way: it displays: ONE Cool 2 Cat 3 Mouse but that is NOT what I want. What I want is: 1 Cool 2 Cat 3 Mouse So I need to check if the chapter label has been set empty or not by the user, because it is not empty (let's say the user chose the string CHAPTER~ for the chapter label) I want to display this: CHAPTER ONE Cool CHAPTER 2 Cat CHAPTER 3 Mouse The way to do that is to check if the variable \currentstructurelabel is empty, so the code must be: \define[1] \MyCommand{\doifelse{\currentsectioncountervalue}{1}{\doifnotemptyelse{\currentstructurelabel}{ONE}{#1}}{#1}} \setuphead[chapter][deepnumbercommand=\MyCommand] \starttext \setuplabeltext[chapter=CHAPTER~] \chapter{Cool} \chapter{Cat} \chapter{Mouse} \stoptext \starttext \setuplabeltext[chapter=] \chapter{Cool} \chapter{Cat} \chapter{Mouse} \stoptext But the problem is that in the second case, even if the chapter label is set empty the command \doifnotemptyelse{\currentstructurelabel} thinks the variable \currentstructurelabel is not empty. So there must be something invisible in it, like a strut or something. ___ 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] Counter resetting
You can use “way=byhead” to reset the counter with each section. Wolfgang It does not work (with ConTeXt ver: 2012.05.30): \defineenumeration[cool][text=Cool, way=byhead] \starttext \section{Cat} \subsection{Cat} \cool{} \cool{} \subsection{Cat} \cool{} \cool{} \section{Cat} \cool{} \cool{} Hello world! \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 test the emptyness of a variable?
you can try \doifnothing\currentstructurelabel{Do something} It does not work in my case (even if the currenstructurelabel is empty it acts as if it not empty). In fact I asked that to get the following behaviour: — When there is a chapter label (\setuplabeltext[chapter=CHAPTER~]) I want that: CHAPTER ONE Cool CHAPTER 2 Cat CHAPTER 3 Mouse etc. — When there is no chapter label (\setuplabeltext[chapter=]) I want that: 1 Cool 2 Cat 3 Mouse etc. E.g.: \setuplabeltext[chapter=CHAPTER~] \define[1] \MyCommand{\doifelse{\currentsectioncountervalue}{1}{ONE}{#1}} \setuphead[chapter][deepnumbercommand=\MyCommand] \starttext \chapter{Cool} \chapter{Cat} \chapter{Mouse} \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 test the emptyness of a variable?
Any idea for achieving this behaviour? - When there is a chapter label (\setuplabeltext[chapter=CHAPTER~]), display : CHAPTER ONE Cool CHAPTER 2 Cat CHAPTER 3 Mouse etc. - When there is no chapter label (\setuplabeltext[chapter=]), display: 1 Cool 2 Cat 3 Mouse etc. My try achieves the first display, but not the second one since I don’t know how to test the emptyness of the chapter label. When I remove the chapter label, it displays: ONE Cool 2 Cat 3 Mouse instead of: 1 Cool 2 Cat 3 Mouse My code: \setuplabeltext[chapter=CHAPTER~] \define[1] \MyCommand{\doifelse{\currentsectioncountervalue}{1}{ONE}{#1}} \setuphead[chapter][deepnumbercommand=\MyCommand] \starttext \chapter{Cool} \chapter{Cat} \chapter{Mouse} \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] Preventing caption stoppers from appearing in references
What do you think about that Hans? Géry Ogam 2013/11/1 Géry Ogam maggy...@gmail.com Hello Hans, I would like to prevent caption stoppers from appearing in references in ConTeXt. Here is a minimal example: \starttext \setupcaptions[numberstopper=.~---~, distance=0em] \placefigure[][cow]{A Cow}{\externalfigure[cow]} \in{Figure}[cow] shows a cow. \stoptext Aditya suggested that I use suffix instead of numberstopper, which works very well, but Wolgang said: ‘I’m sorry to disappoint you but there is no official solution to achieve this. There are ways to change the stopper for section numbers in the heading and the text but not for the other counters (floats, descriptions etc.). The solution you got from Aditya at stackexchange works but it’s more a hack because suffixes are used when you use a splitted float (e.g. a table which spans multiple pages) where you get 1.a., 1.b etc. (the a and b are suffixes) as numbers.’ So since numberstoppers — of any kinds (for floats, sections, descriptions) — are supposed to separate numbers from titles, it would be logical that they don’t appear in references because references don’ have titles, only numbers, so no separation sign (numberstopper) is needed. Could you change that behaviour Hans, or add a command for setting the layout of the numbers in references (separators, counter conversion, etc.)? There is already such a command for section numbers and you only have to add another one for other counters. Best regards. ___ 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] Space problem after formulas inside itemize environments
Hello, I think there is a space problem after formulas inside itemize environments. E.g.: \starttext \startitemize \item Eeny, meeny, miny, moe \placeformula \startformula \text{Numbered formula: the space after is correct.} \stopformula \item Eeny, meeny, miny, moe \placeformula[-] \startformula \text{Unumbered formula: the space after is too big.} \stopformula \item Eeny, meeny, miny, moe \stopitemize \stoptext Best regards. ___ 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 test the emptyness of a variable?
Hello, How to test if the current structure label is empty? The following example does not work because I don’t know how to expand the variable \currentstructurelabel. E.g.: \define \MyCommand{\doifempty{\currentstructurelabel}{Do something}} Best regards. ___ 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] Counter resetting
Hello, How to reset a counter bysection and bysubsection at the same time? The following example does not work. Hans, could you had the support of lists for the 'way' argument please? E.g.: \defineenumeration[cool][text=Cool, way={bysection, bysubsection}] \starttext \section{Cat} \subsection{Cat} \cool{} \cool{} \subsection{Cat} \cool{} \cool{} \section{Cat} \cool{} \cool{} \stoptext Best regards. ___ 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] Preventing caption stoppers from appearing in references
Hello Hans, I would like to prevent caption stoppers from appearing in references in ConTeXt. Here is a minimal example: \starttext \setupcaptions[numberstopper=.~---~, distance=0em] \placefigure[][cow]{A Cow}{\externalfigure[cow]} \in{Figure}[cow] shows a cow. \stoptext Aditya suggested that I use suffix instead of numberstopper, which works very well, but Wolgang said: ‘I’m sorry to disappoint you but there is no official solution to achieve this. There are ways to change the stopper for section numbers in the heading and the text but not for the other counters (floats, descriptions etc.). The solution you got from Aditya at stackexchange works but it’s more a hack because suffixes are used when you use a splitted float (e.g. a table which spans multiple pages) where you get 1.a., 1.b etc. (the a and b are suffixes) as numbers.’ So since numberstoppers — of any kinds (for floats, sections, descriptions) — are supposed to separate numbers from titles, it would be logical that they don’t appear in references because references don’ have titles, only numbers, so no separation sign (numberstopper) is needed. Could you change that behaviour Hans, or add a command for setting the layout of the numbers in references (separators, counter conversion, etc.)? There is already such a command for section numbers and you only have to add another one for other counters. Best regards. ___ 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] Indenting in framed environments
Hi, How can I indent text within framedtext environments? I'm asking because my definitions/theorems/etc. commands are surrounded by startframed/stopframed and I want the text inside to be indented. Géry___ 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 ___