Re: [NTG-context] setuphead question

2009-01-30 Thread Mohamed Bana

i also have a question;  why can't i use different fonts in

\def\myCommand#1#2{{\ss\sc #1}{\rm\sc #2}{\ss\sc\bf #1}{\rm\sc\bf #2}}
\setuphead[part][command=\myCommand]

the font commands are simply ignored.  I don't want to have to resort to 
using numberstyle and textstyle.


Thanks

___
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] setuphead question

2009-01-30 Thread Wolfgang Schuster


Am 30.01.2009 um 13:13 schrieb Mohamed Bana:


i also have a question;  why can't i use different fonts in

\def\myCommand#1#2{{\ss\sc #1}{\rm\sc #2}{\ss\sc\bf #1}{\rm\sc\bf #2}}
\setuphead[part][command=\myCommand]

the font commands are simply ignored.  I don't want to have to  
resort to using numberstyle and textstyle.


You code works but the style and number/textstyle values act
as part of #1 and #2 and you have to set them to nothing to
get your own settings.

\setuphead[part][command=\myCommand,style=]

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] setuphead question

2009-01-29 Thread Alan Stone
Hello,

In the example below...



%\def\myCommand#1#2{}
\def\myCommand#1#2{#1 #2}
%\def\myCommand{}

\setuphead[chapter]
[number=yes,
 align=middle,
%  anyotherparameter=whatever,
command=\myCommand]
%command=]

\starttext

\startfrontmatter
%\placecontent
\completecontent
\stopfrontmatter

\startbodymatter
\chapter{chapter one}

\dorecurse{5}{\input tufte\par}

\chapter{chapter two}

\dorecurse{5}{\input douglas\par}
\stopbodymatter

\stoptext



... how do you define myCommand so

\setuphead[chapter]
[(any other parameter settings),
command=\myCommand,
(any other parameter settings)]

is equal to

\setuphead[chapter]
[(any other parameter settings),
command=,
(any other parameter settings)]

i.e. with any other parameter settings remaining active.

In the example above, with align=middle and

- \def\myCommand#1#2{} the ToC and chapter heads are blank
- \def\myCommand#1#2{#1 #2} the ToC and chapter head alignment is lost
- \def\myCommand{} the ToC and chapter head alignment is lost


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
___


Re: [NTG-context] setuphead question

2009-01-29 Thread Wolfgang Schuster
On Thu, Jan 29, 2009 at 11:50 AM, Alan Stone
software.list.1e...@gmail.com wrote:

 ... how do you define myCommand so

 \setuphead[chapter]
 [(any other parameter settings),
 command=\myCommand,
 (any other parameter settings)]

 is equal to

 \setuphead[chapter]
 [(any other parameter settings),
 command=,
 (any other parameter settings)]

 i.e. with any other parameter settings remaining active.

This is not possible because ConTeXt use the \normalplacehead command
by default (even for command=, as fallback) and this is where the align
key is used, with your \myCommand this \normalplacehead is repleaced
and the align key and many of the others are no longer used by ConTeXt.

The best thing is to key that are used in higher level macros like style, color
or \numbercommand and \textcommand because they act independent of
the command key.

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] \setuphead question

2008-09-10 Thread Alan Stone
How do you obtain the same result as

\setuphead[chapter][header=option(,footer=option)]

( option = none empty high nomarking )

in a document where

[header/footer][left/rightedge]=not empty on chapter pages

i.e. only [header/footer][text]=option for chapter pages and
others ( left/right edge ) are not modified ?

-- 
Best,
Alan

* using ConTeXt ver: 2008.08.18 14:00 MKIV fmt: 2008.8.22 int:
english/english (on Windows XP)
___
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] \setuphead question (long section lines not wrapping)

2003-12-14 Thread Thomas A . Schmitz
Re your question about the section numbering with a dot: This is 
nothing I found out, but something Hans (who else?) posted to the list 
a while ago, and I believe it does what you want to achieve:

\setuplabeltext[section={{},{.}}]

Best

Thomas

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setuphead question (long section lines not wrapping)

2003-12-11 Thread Hans Hagen
At 22:58 10/12/2003, you wrote:
On Wed, 10 Dec 2003, Hans Hagen wrote:

 hm, must be some kind of complex thing then, what is \thanks supposed 
to do?

No, it's not complex at all, and the answer ended up being trivial.  The
\thanks command is essentially a footnote to be used in the title portion
of an article (or book, etc.) -- the big problem I was having was that the
footnote mark was appearing fine, but the footnote text was nowhere to be
found -- this was solved once I found the essentially hiden \footnotetext
command and used that to place the text where I wanted it.  After that, I
needed to figure out how to reset the footnote counter (which was a pretty
minor problem to solve).
\startstandardmakeup
  \startlocalfootnotes
  Thanks \footnote{test}
  \stoplocalfootnotes
  \vfill \placelocalfootnotes
\stopstandardmakeup
That's not doing what I need.  What I need is for the section headings in
the text of the article to look like {section number}.  {section title} --
I was able to insert the . between the number and the title easily
enough, but my solution turned off line wrapping for the title.  I've
attached an example that shows both what I am trying to do, and how my
solution fails (on page 2 of the accompanying dvi).
\setuplabeltext[en][section={{},{.}},subsection={{},{.}}]

should do that; i don't know why it does not break in your case

Hans  

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \setuphead question (long section lines not wrapping)

2003-12-10 Thread William D. Neumann
I'm trying to layout a paper for a conference that requires a format
different from the standard latex layout, and for the most part context
has been making this quite easy on me (excluding the four hours I spent
trying to mimic the latex \thanks{} construct), however, I've encoutered a
new problem that's confusing me.  since I'm sure the problem stems from my
lack of plain tex and context knowledge, I figured someone here would know
what I'm doing wrong, and asking you for help is certainly more pleasant
than banging my head for another four hours only to find another trivial
solution...

My problem is this:  I needed to place a . after the number in the
section and subsection headings, so I included the following in my
preamble:

% setup section headings to include a . after the section number
\setuphead
  [section]
  [command=\mysec,
   indentnext=yes]
\def\mysec#1#2{#1. #2}
\setuphead
  [subsection]
  [command=\mysubsec,
   indentnext=yes]
\def\mysubsec#1#2{#1. #2}

This works just fine as far as inserting the ., however, it has the
side-effect of not wrapping long section of subsection headings.  For
example, \subsection[longsubsec]{This is a really long subsection heading
that won't wrap} gets typeset all on a single line, which is not good
since the paper is set in two columns...

So, is there either a better (more proper) way to insert the ., or at
least a better command to use for \mysec and \mysubsec

Thanks,
William D. Neumann

---

Well I could be a genius, if I just put my mind to it.
And I...I could do anything, if only I could get 'round to it.
Oh we were brought up on the space-race, now they expect you to clean toilets.
When you've seen how big the world is, how can you make do with this?
If you want me, I'll be sleeping in - sleeping in throughout these glory days.

-- Jarvis Cocker
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setuphead question (long section lines not wrapping)

2003-12-10 Thread Hans Hagen
At 18:10 10/12/2003, you wrote:

I'm trying to layout a paper for a conference that requires a format
different from the standard latex layout, and for the most part context
has been making this quite easy on me (excluding the four hours I spent
trying to mimic the latex \thanks{} construct), however, I've encoutered a
hm, must be some kind of complex thing then, what is \thanks supposed to do?

new problem that's confusing me.  since I'm sure the problem stems from my
lack of plain tex and context knowledge, I figured someone here would know
what I'm doing wrong, and asking you for help is certainly more pleasant
than banging my head for another four hours only to find another trivial
solution...
My problem is this:  I needed to place a . after the number in the
section and subsection headings, so I included the following in my
preamble:
% setup section headings to include a . after the section number
\setuphead
  [section]
  [command=\mysec,
   indentnext=yes]
\def\mysec#1#2{#1. #2}
\setuphead
  [subsection]
  [command=\mysubsec,
   indentnext=yes]
\def\mysubsec#1#2{#1. #2}
\setuplabeltext[en][chapter={{A},{B}}]

\setuphead[section][separator={XXX}]

\setuplist[chapter,section][stopper=.]

\placecontent[criterium=text]

\chapter{\input tufte \relax}
\section{test}
Hans  

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setuphead question (long section lines not wrapping)

2003-12-10 Thread William D. Neumann
On Wed, 10 Dec 2003, Hans Hagen wrote:

 hm, must be some kind of complex thing then, what is \thanks supposed to do?

No, it's not complex at all, and the answer ended up being trivial.  The
\thanks command is essentially a footnote to be used in the title portion
of an article (or book, etc.) -- the big problem I was having was that the
footnote mark was appearing fine, but the footnote text was nowhere to be
found -- this was solved once I found the essentially hiden \footnotetext
command and used that to place the text where I wanted it.  After that, I
needed to figure out how to reset the footnote counter (which was a pretty
minor problem to solve).

 \setuplabeltext[en][chapter={{A},{B}}]

 \setuphead[section][separator={XXX}]

 \setuplist[chapter,section][stopper=.]

 \placecontent[criterium=text]

 \chapter{\input tufte \relax}
 \section{test}

That's not doing what I need.  What I need is for the section headings in
the text of the article to look like {section number}.  {section title} --
I was able to insert the . between the number and the title easily
enough, but my solution turned off line wrapping for the title.  I've
attached an example that shows both what I am trying to do, and how my
solution fails (on page 2 of the accompanying dvi).

Thanks,
William D. Neumann

---

Well I could be a genius, if I just put my mind to it.
And I...I could do anything, if only I could get 'round to it.
Oh we were brought up on the space-race, now they expect you to clean toilets.
When you've seen how big the world is, how can you make do with this?
If you want me, I'll be sleeping in - sleeping in throughout these glory days.

-- Jarvis Cocker

HORSE_ex.zip
Description: Zip archive