[NTG-context] Customizing chapter heads
I am new to ConTeXt. I am trying to define a customized head for chapters but I am finding some problems. The sentences below are based on the chapter Text Elements which may be found in the ConTeXt manual. Prior to setting up the title, a new Head command is defined by \def\HeadTitle#1#2%. It takes two arguments, the chapter number and the chapter title. The Head so defined will show the word "C h a p t e r" in capitals, then the chapter number at 80pt, then a horizontal line, and finally the title. The definition works quite well except that both, the chapter number and the chapter title, are not show at the specified font size. \definebodyfont[10pt,11pt,12pt][rm][tff=Regular at 80pt] \definebodyfont[10pt,11pt,12pt][rm][tfe=Regular at 42pt] \def\HeadTitle#1#2% {\hbox to \hsize \bgroup {\hfill % \setupframed[height=7cm,offset=.5em,frame=off] \framed[width=9cm,align=left] { {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\ \hairline {\ss \tfe #2} } } \egroup } \starttext \setuphead[chapter] [command=\HeadTitle] \chapter{An Insight\\Into Fred's Design} \stoptext An easy workaround for the chapter number replaces the argument #1 by \currentheadnumber \def\HeadTitle#1#2% {\hbox to \hsize \bgroup {\hfill % \setupframed[height=7cm,offset=.5em,frame=off] \framed[width=9cm,align=left] { {\tfc \sc {C~h~a~p~t~e~r}} ~~ {\tff #1}\\ \hairline {\ss \tfe #2} } } \egroup } Now the chapter number is shown at 80pt as defined. But I have not found the way to solve the problem with the head title, #2. ¿Any ideas? Thanks in advance. Alfredo. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering a defined text frame
Oh, I feel stupid. I think I need some more sleep. Thanks for the tip. Bart > In analogy to \framedtext after a define of a framedtext I expect > that that you should use \CenteredText{...} > And indeed. > > \defineframedtext[CenteredText][width=fit] > % This one fails! > \startalignment[center] > \dontleavehmode > \CenteredText{ > \startlines > The quick brown fox jumps over the lazy dog. > \stoplines} > %\stopCenteredText > > > Willi > > On Jan 24, 2009, at 3:30 PM, Bart C. Wise wrote: > > \defineframedtext[CenteredText][width=fit] > > > > \starttext > > > > % This one works! > > \startalignment[center] > > \dontleavehmode > > \framedtext[width=fit]{ > > \startlines > > The quick brown fox jumps over the lazy dog. > > \stoplines > > } > > \stopalignment > > > > % This one fails! > > \startalignment[center] > > \dontleavehmode > > \startCenteredText > > \startlines > > The quick brown fox jumps over the lazy dog. > > \stoplines > > \stopCenteredText > > > > \stoptext > > ___ > If your question is of interest to others as well, please add an > entry to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context webpage : > http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Centering a defined text frame
In analogy to \framedtext after a define of a framedtext I expect that that you should use \CenteredText{...} And indeed. \defineframedtext[CenteredText][width=fit] % This one fails! \startalignment[center] \dontleavehmode \CenteredText{ \startlines The quick brown fox jumps over the lazy dog. \stoplines} %\stopCenteredText Willi On Jan 24, 2009, at 3:30 PM, Bart C. Wise wrote: \defineframedtext[CenteredText][width=fit] \starttext % This one works! \startalignment[center] \dontleavehmode \framedtext[width=fit]{ \startlines The quick brown fox jumps over the lazy dog. \stoplines } \stopalignment % This one fails! \startalignment[center] \dontleavehmode \startCenteredText \startlines The quick brown fox jumps over the lazy dog. \stoplines \stopCenteredText \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] replacing words by underlines
Mein Hut ab für den Künstler :O) Alan On Sat, Jan 24, 2009 at 8:07 PM, Wolfgang Schuster < schuster.wolfg...@googlemail.com> wrote: > > Am 24.01.2009 um 19:00 schrieb Alan Stone: > > Hi, >> >> In the underneath example, how do you get each word replaced by an >> underline ? >> >> Or, if not possible, underlined word groups with correct underline breaks >> for multi-line phrases. >> > > \def\doUnderlineD#1% > {\bgroup > \setbox\scratchbox\hbox{#1}% > \underbar{\hskip\wd\scratchbox}\space > \egroup} > > \def\UnderlineD#1% > {\processseparatedlist[#1][ ]\doUnderlineD\removeunwantedspaces} > > 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Centering a defined text frame
I'm trying to have a centered text frame. There are two examples in the code below. 1) This one works. It uses a text frame that is in line in the code. 2) This one does not work! It's using a defined text frame and flushes the text frame to the left. How do I fix this? Thanks, Bart \defineframedtext[CenteredText][width=fit] \starttext % This one works! \startalignment[center] \dontleavehmode \framedtext[width=fit]{ \startlines The quick brown fox jumps over the lazy dog. \stoplines } \stopalignment % This one fails! \startalignment[center] \dontleavehmode \startCenteredText \startlines The quick brown fox jumps over the lazy dog. \stoplines \stopCenteredText \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] replacing words by underlines
Am 24.01.2009 um 19:00 schrieb Alan Stone: Hi, In the underneath example, how do you get each word replaced by an underline ? Or, if not possible, underlined word groups with correct underline breaks for multi-line phrases. \def\doUnderlineD#1% {\bgroup \setbox\scratchbox\hbox{#1}% \underbar{\hskip\wd\scratchbox}\space \egroup} \def\UnderlineD#1% {\processseparatedlist[#1][ ]\doUnderlineD\removeunwantedspaces} 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] framed typing with linenumbers in mkiv
Hi, I want numbered lines in my verbatim code but it did not work in mkiv. \setuptyping[numbering=line] \starttext \startframedtext \starttyping one two three \stoptyping \stopframedtext \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] replacing words by underlines
Hi, In the underneath example, how do you get each word replaced by an underline ? Or, if not possible, underlined word groups with correct underline breaks for multi-line phrases. \def\UnderlineA#1% {\underbars{#1}} \def\UnderlineB#1% {\underbars{\phantom{#1}}} %{\underbar{\phantom{#1}}} \definetextbackground[underline][% location=text, alternative=1, background=, frame=off] \def\UnderlineC{% \groupedcommand {\starttextbackground[underline]} {\stoptextbackground}} \starttext Thus, I came to \UnderlineA{the conclusion} that the designer of a new system \UnderlineA{must not only be the implementer and first} large--scale user; the designer should also write the first user manual. Thus, I came to \UnderlineB{the conclusion} that the designer of a new system \UnderlineB{must not only be the implementer and first} large--scale user; the designer should also write the first user manual. Thus, I came to \UnderlineC{the conclusion} that the designer of a new system \UnderlineC{must not only be the implementer and first} large--scale user; the designer should also write the first user manual. \stoptext Thanks, Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Something usefull?
I made something usefull and share it with you. Maybe it is usefull for other people also. Sometimes I switch a lot from tasks. Still I need to keep a good log of time spend on the different tasks. For this I made the first table. When I switch I can now log easily the new task and the time of the switch. And at the end of the day I can easily get a running total pro task. The second task is for writing down short notes. I used a table to get lined A7 paper. I have still some work to do on it. For example the tables are to close to edge and the tables stop to soon. But I think it is good enough to 'publish'. I also have some questions. ;-} At the moment there are the same number of the timesheet and the lined paper printed. That is not always what you want I think. The one time you need more timesheets, the other time you need more lined paper. Is there a way to ask for the number of timesheets, print those, and let the rest be printed as lined? (I can offcourse also switch to two different documents.) At the moment the lined paper starts counting from 9. Is there a way to reset it to 1? -- Cecil Westerhof tableHoursToDo.tex Description: TeX document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] een soort multi-\not?
Hi Liesbeth, In math-mode krijg je een streep door een letter met behulp van \not. De streep gaat echter altijd maar door één letter. Ik wil bijvoorbeeld het getal 10 doorstrepen of het getal 100. Hoe kan ik dit het beste doen? Please ask your questions in english, I don't know what effect do you want but you can simulate the \not effect with metapost. \definetextbackground [strikethrough] [location=text, alternative=4, background=, frame=off] \starttext $ a = b + \strikethrough{100} + c $ \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___