Re: [NTG-context] glyph path
On 2/19/2014 7:41 PM, Peter Rolf wrote: Forgot to tell why I need the glyph paths... I implemented multi path support in drops yesterday and now I want to test it with some glyphs. Currently I use Inkscape (export the glyph path as PDF) and pdftoedit to finally get a MP path. Time consuming and the result still needs a manual clean-up. % macros=mkvi \definefont[RatherBig][Mono at 60pt] \defineeffect [justone] [alternative=outer,rulethickness=1pt] \defineeffect [justtwo] [alternative=inner] \starttexdefinition example #font#line#text \hbox { \framed [offset=\dimexpr#line/2\relax,strut=no,frame=off] { \definedfont[#font] \defineeffect[bg][alternative=outer,rulethickness=#line] \defineeffect[fg][alternative=inner] \hsmash{\red \effect[bg]{#text}} \hbox {\blue\effect[fg]{#text}} } } \stoptexdefinition \starttext {\effect[justone]{\RatherBig BIG}} {\effect[justtwo]{\RatherBig BIG}} \example{Mono at 60pt}{5pt}{BIG} \example{Mono at 80pt}{10pt}{BIG} \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 - ___ 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] solutions and problems
Hi, Just a question about blocks... I consulted the manual, but I'm in trouble: I have this definitions: % the exercise \defineenumeration [exercici] [alternative=serried,text={\startcolor[darkblue]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss,distance=0.25em,width=fit] \defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried] \defineblock[resposta] % the answer \hideblocks[resposta] And in my text, I have: \startexercici \beginresposta \resposta Exercici 2 (Solucions: \startitemize[a,text] \item D, \item I, \item D, \item No té relació, \item D, \item D, \item No té relació, \item No té relació, \item D.\stopitemize) \par \endresposta \stopexercici ... \startmode[solucions] \subject{Respostes} %Answers \selectblocks[resposta][criterium=section] \stopmode ... Is there any way that the answers (resposta) has the same number as the 'exercici' in which it belongs to? If not, I have to put Solutions of exercici 2 in my 'resposta' Thank you very much ___ 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] solutions and problems
Hi, Maybe this is what you looking for: begin question-hint-answer.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] \defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for question},stopper={.}] \defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to question},stopper={.}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer] \starttext \section{Questions} \beginquestion \startquestion Compute $4\times 5$. \stopquestion \endquestion \beginhint \starthint Use the fact that $2\times 5 = 10$. \stophint \endhint \beginanswer \startanswer $20$. \stopanswer \endanswer \beginquestion \startquestion What is the value of $100/10$? \stopquestion \endquestion \beginhint \starthint Remember that $10\times 10 = 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext end question-hint-answer.tex Best regards: OK On 20 févr. 2014, at 10:15, Xan dxpubl...@telefonica.net wrote: Hi, Just a question about blocks... I consulted the manual, but I'm in trouble: I have this definitions: % the exercise \defineenumeration [exercici] [alternative=serried,text={\startcolor[darkblue]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss,distance=0.25em,width=fit] \defineenumeration[resposta][headstyle=\ss,text={Solucions},width=fit,alternative=serried] \defineblock[resposta] % the answer \hideblocks[resposta] And in my text, I have: \startexercici \beginresposta \resposta Exercici 2 (Solucions: \startitemize[a,text] \item D, \item I, \item D, \item No té relació, \item D, \item D, \item No té relació, \item No té relació, \item D.\stopitemize) \par \endresposta \stopexercici ... \startmode[solucions] \subject{Respostes} %Answers \selectblocks[resposta][criterium=section] \stopmode ... Is there any way that the answers (resposta) has the same number as the 'exercici' in which it belongs to? If not, I have to put Solutions of exercici 2 in my 'resposta' Thank you very much ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] glyph path
Am 20.02.2014 09:58, schrieb Hans Hagen: On 2/19/2014 7:41 PM, Peter Rolf wrote: Forgot to tell why I need the glyph paths... I implemented multi path support in drops yesterday and now I want to test it with some glyphs. Currently I use Inkscape (export the glyph path as PDF) and pdftoedit to finally get a MP path. Time consuming and the result still needs a manual clean-up. % macros=mkvi \definefont[RatherBig][Mono at 60pt] \defineeffect [justone] [alternative=outer,rulethickness=1pt] \defineeffect [justtwo] [alternative=inner] \starttexdefinition example #font#line#text \hbox { \framed [offset=\dimexpr#line/2\relax,strut=no,frame=off] { \definedfont[#font] \defineeffect[bg][alternative=outer,rulethickness=#line] \defineeffect[fg][alternative=inner] \hsmash{\red \effect[bg]{#text}} \hbox {\blue\effect[fg]{#text}} } } \stoptexdefinition \starttext {\effect[justone]{\RatherBig BIG}} {\effect[justtwo]{\RatherBig BIG}} \example{Mono at 60pt}{5pt}{BIG} \example{Mono at 80pt}{10pt}{BIG} \stoptext Thanks for this nice example (I wasn't aware of this). But this doesn't really help me with my problem. I guess my example had too much irritating eye candy, so I made another one :-) http://www.wuala.com/indiego/public/ConTeXt/pathtest2.pdf The problem is, that I need direct access to the glyphs path(s), as I must calculate the offset paths for the sub shadows (umbra/penumbra). Inkscape has a similar function called inset/outset path, if I remember right. In the example I used a negative offset for the umbra shadow (udistance) and a positive for the penumbra shadow (pdistance). The original path is drawn as 'arrowpath'. The path creating algorithm (based on the Tiller-Hanson alg.) works quite good so far, but still needs a lot of tweaking. And glyphs have a wide range of shapes, so they are nearly ideal for testing purposes. Anyhow, it can't be helped, if 'glyph' is not working. I'll test some ConTeXt generated PDF glyphs (MPpage) then and see if I can optimize the manual path creation a little bit. Best wishes, Peter ___ 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] solutions and problems
Not exactly. If you don't have the same number of answers that the number of questions, so your counter is not properly set. See that: \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] \defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for question},stopper={.}] \defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to question},stopper={.}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer] \starttext \section{Questions} \beginquestion \startquestion Compute $4\times 5$. \stopquestion \endquestion \beginhint \starthint Use the fact that $2\times 5 = 10$. \stophint \endhint %\beginanswer %\startanswer % $20$. %\stopanswer %\endanswer \beginquestion \startquestion What is the value of $100/10$? \stopquestion \endquestion \beginhint \starthint Remember that $10\times 10 = 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext If you comment one solution, then, you get Answer to question 1, instead of Answer of question 2, which is really. No always a question has an answer provided by me ;-) Thanks, Hi, Maybe this is what you looking for: begin question-hint-answer.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] \defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for question},stopper={.}] \defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to question},stopper={.}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer] \starttext \section{Questions} \beginquestion \startquestion Compute $4\times 5$. \stopquestion \endquestion \beginhint \starthint Use the fact that $2\times 5 = 10$. \stophint \endhint \beginanswer \startanswer $20$. \stopanswer \endanswer \beginquestion \startquestion What is the value of $100/10$? \stopquestion \endquestion \beginhint \starthint Remember that $10\times 10 = 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext end question-hint-answer.tex Best regards: OK ___ 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] solutions and problems
On 02/20/2014 01:22 PM, Xan wrote: If you comment one solution, then, you get Answer to question 1, instead of Answer of question 2, which is really. No always a question has an answer provided by me;-) Thanks, Obviously you will have to give every question|answer|hint some sort of unique identifier to which you can later refer. So an enumeration is maybe not the best approach for this because these identifiers need to be shared between all your blocks. Just a personal impression: if you want to have many of these blocks, I would advise to use some format other than TeX to store them because it soon becomes difficult to read for you and unsustainable. I have written something in MAPS (http://www.ntg.nl/maps/42/12.pdf) which may be useful for 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] solutions and problems
Am 20.02.2014 um 13:22 schrieb Xan dxpubl...@telefonica.net: Not exactly. If you don't have the same number of answers that the number of questions, so your counter is not properly set. See that: \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] \defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for question},stopper={.}] \defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to question},stopper={.}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer] \starttext \section{Questions} \beginquestion \startquestion Compute $4\times 5$. \stopquestion \endquestion \beginhint \starthint Use the fact that $2\times 5 = 10$. \stophint \endhint %\beginanswer %\startanswer % $20$. %\stopanswer %\endanswer \beginquestion \startquestion What is the value of $100/10$? \stopquestion \endquestion \beginhint \starthint Remember that $10\times 10 = 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext If you comment one solution, then, you get Answer to question 1, instead of Answer of question 2, which is really. No always a question has an answer provided by me ;-) You can add a answer block which increments the answer counter. \defineblock[question] \defineblock[answer] \defineenumeration[question][text={Question}] \defineenumeration[answer] [text={Answer}] \keepblocks[question] \hideblocks[answer] \starttext \chapter{Question} \beginquestion \startquestion Question 1. \stopquestion \endquestion \beginanswer \startanswer Answer 1. \stopanswer \endanswer \beginquestion \startquestion Question 2. \stopquestion \endquestion \beginanswer \incrementcounter[answer] \endanswer \beginquestion \startquestion Question 3. \stopquestion \endquestion \beginanswer \startanswer Answer 3. \stopanswer \endanswer \chapter{Answers} \useblocks[answer] \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] 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] setupenumerations overwriting setupitemize
Am 20.02.2014 um 14:45 schrieb Thomas Möbius kont...@thomasmoebius.de: 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 behavior?? What is the problem, I can’t see a difference in the output of both examples? 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 ___
Re: [NTG-context] setupenumerations overwriting setupitemize
2014-02-20 14:52 GMT+01:00 Wolfgang Schuster schuster.wolfg...@gmail.com: Am 20.02.2014 um 14:45 schrieb Thomas Möbius kont...@thomasmoebius.de: 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 behavior?? What is the problem, I can’t see a difference in the output of both examples? Wolfgang Interesting.. In the first example I see 1. Text Text 2. Text Text in the second, I see a. Text Text b. Text Text I am using the context version from the Ubuntu package manager. % context --version mtx-context | ConTeXt Process Management 0.52 mtx-context | mtx-context | main context file: /usr/share/texmf/tex/contex t/base/context.mkiv mtx-context | current version: 2012.05.30 11:26 Probably, I should update. ___ 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] solutions and problems
Thanx Thomas very much for link to PDF file Using ConTEXt with Databases. I'm sure I will use it in the future. Jaroslav Hajtmar Dne 20.2.2014 13:57, Thomas A. Schmitz napsal(a): On 02/20/2014 01:22 PM, Xan wrote: If you comment one solution, then, you get Answer to question 1, instead of Answer of question 2, which is really. No always a question has an answer provided by me;-) Thanks, Obviously you will have to give every question|answer|hint some sort of unique identifier to which you can later refer. So an enumeration is maybe not the best approach for this because these identifiers need to be shared between all your blocks. Just a personal impression: if you want to have many of these blocks, I would advise to use some format other than TeX to store them because it soon becomes difficult to read for you and unsustainable. I have written something in MAPS (http://www.ntg.nl/maps/42/12.pdf) which may be useful for 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] solutions and problems
Thanx Wolfgang. For me this is valuable information Jaroslav Hajtmar Dne 20.2.2014 14:13, Wolfgang Schuster napsal(a): Am 20.02.2014 um 13:22 schrieb Xan dxpubl...@telefonica.net: Not exactly. If you don't have the same number of answers that the number of questions, so your counter is not properly set. See that: \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] \defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for question},stopper={.}] \defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to question},stopper={.}] \keepblocks[question] \hideblocks[hint] \hideblocks[answer] \starttext \section{Questions} \beginquestion \startquestion Compute $4\times 5$. \stopquestion \endquestion \beginhint \starthint Use the fact that $2\times 5 = 10$. \stophint \endhint %\beginanswer %\startanswer % $20$. %\stopanswer %\endanswer \beginquestion \startquestion What is the value of $100/10$? \stopquestion \endquestion \beginhint \starthint Remember that $10\times 10 = 100$. \stophint \endhint \beginanswer \startanswer $10$ \stopanswer \endanswer \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext If you comment one solution, then, you get Answer to question 1, instead of Answer of question 2, which is really. No always a question has an answer provided by me ;-) You can add a answer block which increments the answer counter. \defineblock[question] \defineblock[answer] \defineenumeration[question][text={Question}] \defineenumeration[answer] [text={Answer}] \keepblocks[question] \hideblocks[answer] \starttext \chapter{Question} \beginquestion \startquestion Question 1. \stopquestion \endquestion \beginanswer \startanswer Answer 1. \stopanswer \endanswer \beginquestion \startquestion Question 2. \stopquestion \endquestion \beginanswer \incrementcounter[answer] \endanswer \beginquestion \startquestion Question 3. \stopquestion \endquestion \beginanswer \startanswer Answer 3. \stopanswer \endanswer \chapter{Answers} \useblocks[answer] \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 ___ ___ 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] \doifemptyelse
Dear list, I have the following sample: \starttext \chapter{Chapter} .\doifemptyelse{\getmarking[section][current]} {\getmarking[chapter][current]} {\getmarking[section][current]}. \section{Section} .\doifemptyelse{\getmarking[section][current]} {\getmarking[chapter][current]} {\getmarking[section][current]}. \stoptext I must be missing something extremely basic, because I think that the first condiitonal occurs when \getmarking[section][current] is empty (dots have nothing in between). How can I make the first conditional work? 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \doifemptyelse
Am 20.02.2014 um 21:12 schrieb Pablo Rodriguez oi...@gmx.es: Dear list, I have the following sample: \starttext \chapter{Chapter} .\doifemptyelse{\getmarking[section][current]} {\getmarking[chapter][current]} {\getmarking[section][current]}. \section{Section} .\doifemptyelse{\getmarking[section][current]} {\getmarking[chapter][current]} {\getmarking[section][current]}. \stoptext I must be missing something extremely basic, because I think that the first condiitonal occurs when \getmarking[section][current] is empty (dots have nothing in between). How can I make the first conditional work? You can’t, markings are only reliable when you use them in the header of footer of the page. To access the values of a heading you can use the \structurevariable and \namedstructurevariable commands. \starttext \chapter{Chapter} A: \doifsomethingelse{\namedstructurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}} B: \structurevariable{title} \section{Section} A: \doifsomethingelse{\structurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}} B: \structurevariable{title} \subsection{Subsection} A: \doifsomethingelse{\structurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}} B: \structurevariable{title} \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 ___
Re: [NTG-context] \doifemptyelse
On 02/20/2014 09:39 PM, Wolfgang Schuster wrote: Am 20.02.2014 um 21:12 schrieb Pablo Rodriguez: [...] How can I make the first conditional work? You can’t, markings are only reliable when you use them in the header of footer of the page. To access the values of a heading you can use the \structurevariable and \namedstructurevariable commands. Many thanks for your reply, Wolfgang. My question was about headers, but I didn’t mention it to make a shorter sample. The code now is the following: \setupheadertexts[\hfill\namedstructurevariable{chapter}{title}\hfill] [] [] [\hfill\doifsomethingelse{\namedstructurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}}\hfill] Only a minor detail: is there a more proper way to center both headings? 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \doifemptyelse
Am 20.02.2014 um 23:09 schrieb Pablo Rodriguez oi...@gmx.es: On 02/20/2014 09:39 PM, Wolfgang Schuster wrote: Am 20.02.2014 um 21:12 schrieb Pablo Rodriguez: [...] How can I make the first conditional work? You can’t, markings are only reliable when you use them in the header of footer of the page. To access the values of a heading you can use the \structurevariable and \namedstructurevariable commands. Many thanks for your reply, Wolfgang. My question was about headers, but I didn’t mention it to make a shorter sample. In this case this was a important part for the solution because it makes a difference when you use \getmarking in \setupheadertexts or in the text. The code now is the following: \setupheadertexts[\hfill\namedstructurevariable{chapter}{title}\hfill] [] [] [\hfill\doifsomethingelse{\namedstructurevariable{section}{title}} {\namedstructurevariable{section}{title}} {\namedstructurevariable{chapter}{title}}\hfill] Only a minor detail: is there a more proper way to center both headings? You can use the simple version of \setupheadertexts and use \doifoddpageelse to check whether you’re on a left or right page. When you make a test for content of a \getmarking command you have to use \doiftext because the \doifempty etc. checks don’t work in this case. \startsetups[header] \doifoddpageelse { \getmarking[chapter] } { \doiftextelse { \getmarking[section] } { \getmarking[section] } { \getmarking[chapter] } } \stopsetups \setupheadertexts[\directsetup{header}] \setupfootertexts[pagenumber] \starttext \chapter{Chapter A} \page \chapter{Chapter B} \page \dorecurse{5} {\chapter{Chapter #1} \dorecurse{10} {\section{Section #1.##1} \dorecurse{3}{\input knuth\par}}} \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 ___
Re: [NTG-context] \doifemptyelse
Have you looked at: http://wiki.contextgarden.net/Headers_and_Footers#Marginal_headings_and_centered_headings ? ___ 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] Font affects columnar list layout
Hi, Been struggling with this issue: 1. Source test.tex: http://pastebin.com/raw.php?i=hPVmkATT 2. Chivo: https://www.google.com/fonts/specimen/Chivo 3. Gentium Basic: http://www.google.com/fonts/specimen/Gentium+Basic 4. Install fonts. 5. Run: context test.tex Looks fine. 1. Uncomment: %\setupbodyfont[TestFont] 2. Run: context.tex 3. View results: http://i.imgur.com/zttXyKA.png The columnar content has shifted from the left column to the right column. This can be addressed: 1. Uncomment: %before={\vskip-.5em}, 2. Run: context.tex 3. View results: http://i.imgur.com/OsUgiAy.png Works for two lines, but when additional content is added: 1. Uncomment: %\ingredient{1}{pkg}{applewood-smoked bacon}... 2. Run: context.tex 3. View results: http://i.imgur.com/4fjbWHv.png Several lines have disappeared completely, regardless of font. The lines can be made visible again, but then the situation reverts to shifting the content from the left column to the right column when there are only a couple of items in the list. I've tried grid=strut; grid=,; grid=verytolerant; and grid=stretch. Using a two-column setup, is there a way to reduce the amount of space? The best result I can achieve without losing any content contains too much extraneous whitespace: http://i.imgur.com/A3RhnjS.png 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 ___
Re: [NTG-context] Installation Bug with Minimals
I have identified the problem. I have ConTeXt minimals installed simultaneously with ConTeXt from TeXLive 2013. Unsetting the environmental variable TEXMFMAIN (which was set to my TeXLive 2013 TEXMF directory) fixes the problem. Perhaps the minimals installation should unset (or ignore) this variable. Troy ___ 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] Appendix Page Numbering
anyhow, i'll add this: \setupuserpagenumber[viewerprefix=titlepage] \startstandardmakeup The first page \stopstandardmakeup \setupuserpagenumber[viewerprefix=p ] Thanks Hans. That works great. Is it possible to have ONLY the prefix (not followed by the corresponding page number) with this implementation? If not, is that a feature that can also be added? Troy ___ 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 ___