ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \setuphead question (long section lines not wrapping)
@ 2003-12-10 17:10 William D. Neumann
  2003-12-10 18:03 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: William D. Neumann @ 2003-12-10 17:10 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead question (long section lines not wrapping)
  2003-12-10 17:10 \setuphead question (long section lines not wrapping) William D. Neumann
@ 2003-12-10 18:03 ` Hans Hagen
  2003-12-10 21:58   ` William D. Neumann
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2003-12-10 18:03 UTC (permalink / raw)


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  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead question (long section lines not  wrapping)
  2003-12-10 18:03 ` Hans Hagen
@ 2003-12-10 21:58   ` William D. Neumann
  2003-12-10 22:10     ` Thomas A.Schmitz
  2003-12-11  8:41     ` Hans Hagen
  0 siblings, 2 replies; 7+ messages in thread
From: William D. Neumann @ 2003-12-10 21:58 UTC (permalink / raw)


[-- Attachment #1: Type: TEXT/PLAIN, Size: 1687 bytes --]

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

[-- Attachment #2: Type: APPLICATION/zip, Size: 12485 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead question (long section lines not  wrapping)
  2003-12-10 21:58   ` William D. Neumann
@ 2003-12-10 22:10     ` Thomas A.Schmitz
  2003-12-11  8:41     ` Hans Hagen
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas A.Schmitz @ 2003-12-10 22:10 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead question (long section lines not wrapping)
  2003-12-10 21:58   ` William D. Neumann
  2003-12-10 22:10     ` Thomas A.Schmitz
@ 2003-12-11  8:41     ` Hans Hagen
  2003-12-11 19:19       ` William D. Neumann
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2003-12-11  8:41 UTC (permalink / raw)


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  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead question (long section lines not wrapping)
  2003-12-11 19:19       ` William D. Neumann
@ 2003-12-11 18:10         ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2003-12-11 18:10 UTC (permalink / raw)


At 20:19 11/12/2003, you wrote:
>On Thu, 11 Dec 2003, Hans Hagen wrote:
>
> > \startstandardmakeup
> >    \startlocalfootnotes
> >    Thanks \footnote{test}
> >    \stoplocalfootnotes
> >    \vfill \placelocalfootnotes
> > \stopstandardmakeup
>
>This works fine for separate titlepages, is there a similar technique for
>doing this when the title is on the first page of the text (see the
>attached dvi from my last message for an example)?  I had tried using
>local footnotes during my experimentation the other day, but they always
>appeared between the title and the text, rather than below the first
>column of text, as is the norm.  Again, this is a minor issue, as a
>combination of \high, \footnotetext, and \resetnumber work just fine as a
>quick hack...

\title{test \footnote{test}}

\section{test \footnote{test}}

tets \footnote{test}

\framed{\postponefootnotes test \footnote{test}}

should work, but somehow the latest greatest multi note version messes up 
the postponed notes (they end up in a separate class)

> > \setuplabeltext[en][section={{},{.}},subsection={{},{.}}]
> >
> > should do that; i don't know why it does not break in your case
>
>Ah...thank you; this does work.  Although I must say, I would *never* have
>gotten this from the documentation which treats \setuphead and it's
>command parameter as the way to control the appearance of sectioning
>titles, and never provides a backreference to \setuplabeltext, which is
>tucked away in the chapter on language specific issues.  And even there,
>the documentation never comes close to describing the behavior shown

it started as an experiment -)

>above.  Thank goodness for the living breating documentation that this
>list provides then, eh?

hm, this double label thing is needed for chinese (which introduced a few 
more interesting non documented features)

anyhow, those few hours playing learned you read context source code -)

Hans  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: \setuphead question (long section lines not  wrapping)
  2003-12-11  8:41     ` Hans Hagen
@ 2003-12-11 19:19       ` William D. Neumann
  2003-12-11 18:10         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: William D. Neumann @ 2003-12-11 19:19 UTC (permalink / raw)


On Thu, 11 Dec 2003, Hans Hagen wrote:

> \startstandardmakeup
>    \startlocalfootnotes
>    Thanks \footnote{test}
>    \stoplocalfootnotes
>    \vfill \placelocalfootnotes
> \stopstandardmakeup

This works fine for separate titlepages, is there a similar technique for
doing this when the title is on the first page of the text (see the
attached dvi from my last message for an example)?  I had tried using
local footnotes during my experimentation the other day, but they always
appeared between the title and the text, rather than below the first
column of text, as is the norm.  Again, this is a minor issue, as a
combination of \high, \footnotetext, and \resetnumber work just fine as a
quick hack...

> \setuplabeltext[en][section={{},{.}},subsection={{},{.}}]
>
> should do that; i don't know why it does not break in your case

Ah...thank you; this does work.  Although I must say, I would *never* have
gotten this from the documentation which treats \setuphead and it's
command parameter as the way to control the appearance of sectioning
titles, and never provides a backreference to \setuplabeltext, which is
tucked away in the chapter on language specific issues.  And even there,
the documentation never comes close to describing the behavior shown
above.  Thank goodness for the living breating documentation that this
list provides then, eh?

Thank you again,
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-12-11 19:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-10 17:10 \setuphead question (long section lines not wrapping) William D. Neumann
2003-12-10 18:03 ` Hans Hagen
2003-12-10 21:58   ` William D. Neumann
2003-12-10 22:10     ` Thomas A.Schmitz
2003-12-11  8:41     ` Hans Hagen
2003-12-11 19:19       ` William D. Neumann
2003-12-11 18:10         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).