ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* customizing footnote numbers
@ 2005-04-03 19:58 Paul Tremblay
  2005-04-04  6:10 ` Paul Tremblay
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Tremblay @ 2005-04-03 19:58 UTC (permalink / raw)


Is there a way to manually set the number of a footnote rather than
letting ConTeXt determining it? Something that works in the same way as
\page[25]? 

For example, I might want to start footnote numbering at 1 at each
chapter, *but I won't be using traditional ConTeXt divisions.* 

I've been searching the web and it seems that LaTeX has a way to reset
counters, but I can't get this to work in ConTeXt. 

Thanks

Paul

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

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

* Re: customizing footnote numbers
  2005-04-03 19:58 customizing footnote numbers Paul Tremblay
@ 2005-04-04  6:10 ` Paul Tremblay
  2005-04-04  8:29   ` Hans Hagen
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Tremblay @ 2005-04-04  6:10 UTC (permalink / raw)


On Sun, Apr 03, 2005 at 03:58:42PM -0400, Paul Tremblay wrote:
> 
> Is there a way to manually set the number of a footnote rather than
> letting ConTeXt determining it? Something that works in the same way as
> \page[25]? 
> 
> For example, I might want to start footnote numbering at 1 at each
> chapter, *but I won't be using traditional ConTeXt divisions.* 
> 
> I've been searching the web and it seems that LaTeX has a way to reset
> counters, but I can't get this to work in ConTeXt. 

Answering my own email. I've had a look at core-not.tex, and I see a lot
of definitions such as \internalfootreference. I've tried setting some
of these myself with no luck. But it seems if I can just figure out the
right definition and the way to set it, I should be able to insert the
type of footnote I want. 

On the other hand, isn't there a way to just enter text in for your
footnote marker, and totally bypass any automatic numbering?

Paul

 

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

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

* Re: customizing footnote numbers
  2005-04-04  6:10 ` Paul Tremblay
@ 2005-04-04  8:29   ` Hans Hagen
  2005-04-04 10:14     ` Patrick Gundlach
  2005-04-04 17:12     ` Paul Tremblay
  0 siblings, 2 replies; 15+ messages in thread
From: Hans Hagen @ 2005-04-04  8:29 UTC (permalink / raw)


Paul Tremblay wrote:
> On Sun, Apr 03, 2005 at 03:58:42PM -0400, Paul Tremblay wrote:
> 
>>Is there a way to manually set the number of a footnote rather than
>>letting ConTeXt determining it? Something that works in the same way as
>>\page[25]? 
>>
>>For example, I might want to start footnote numbering at 1 at each
>>chapter, *but I won't be using traditional ConTeXt divisions.* 
>>
>>I've been searching the web and it seems that LaTeX has a way to reset
>>counters, but I can't get this to work in ConTeXt. 
> 
> 
> Answering my own email. I've had a look at core-not.tex, and I see a lot
> of definitions such as \internalfootreference. I've tried setting some
> of these myself with no luck. But it seems if I can just figure out the
> right definition and the way to set it, I should be able to insert the
> type of footnote I want. 
> 
> On the other hand, isn't there a way to just enter text in for your
> footnote marker, and totally bypass any automatic numbering?
\starttext

test \footnote{test} test
\setupnumber[footnote][start=45]
test \footnote{test} test
\setnumber[footnote]{99}
test \footnote{test} test
\setupnumber[footnote][way=bysection,start=0]
test \footnote{test} test

\section{test}
test \footnote{test} test
test \footnote{test} test

\section{test}
test \footnote{test} test
test \footnote{test} test

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: customizing footnote numbers
  2005-04-04  8:29   ` Hans Hagen
@ 2005-04-04 10:14     ` Patrick Gundlach
  2005-04-04 20:30       ` Thomas A.Schmitz
  2005-04-04 17:12     ` Paul Tremblay
  1 sibling, 1 reply; 15+ messages in thread
From: Patrick Gundlach @ 2005-04-04 10:14 UTC (permalink / raw)


Hello,

while we are at it, I played around (a bit) with \setupfootnotes but
didn't get what I wanted to achieve:

|text text text text text
|
|-------------   (a shorter rule)
|  1  hello
|  2  footnote
| 10  tenth footnote that
|     wraps like this 
|----------------------------------------------

So I'd like to make the rule shorter, the numbers not in the margin,
but in the area <text>. Right aligned and large (style=\tf works OK).


Patrick
-- 
ConTeXt wiki: http://contextgarden.net

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

* Re: customizing footnote numbers
  2005-04-04  8:29   ` Hans Hagen
  2005-04-04 10:14     ` Patrick Gundlach
@ 2005-04-04 17:12     ` Paul Tremblay
  2005-04-04 19:40       ` Hans Hagen
  1 sibling, 1 reply; 15+ messages in thread
From: Paul Tremblay @ 2005-04-04 17:12 UTC (permalink / raw)


On Mon, Apr 04, 2005 at 10:29:41AM +0200, Hans Hagen wrote:
> \starttext
> 
> test \footnote{test} test
> \setupnumber[footnote][start=45]
> test \footnote{test} test
> \setnumber[footnote]{99}
> test \footnote{test} test
> \setupnumber[footnote][way=bysection,start=0]
> test \footnote{test} test
> 
> \section{test}
> test \footnote{test} test
> test \footnote{test} test
> 
> \section{test}
> test \footnote{test} test
> test \footnote{test} test
> 
> \stoptext
> 
> 

Thanks. So it looks like the way to reset counters in ConTexT is with
the 

\setupnumber[somecounter]{x}

That helps.

Paul

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

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

* Re: customizing footnote numbers
  2005-04-04 17:12     ` Paul Tremblay
@ 2005-04-04 19:40       ` Hans Hagen
  0 siblings, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2005-04-04 19:40 UTC (permalink / raw)


Paul Tremblay wrote:
> On Mon, Apr 04, 2005 at 10:29:41AM +0200, Hans Hagen wrote:
> 
>>\starttext
>>
>>test \footnote{test} test
>>\setupnumber[footnote][start=45]
>>test \footnote{test} test
>>\setnumber[footnote]{99}
>>test \footnote{test} test
>>\setupnumber[footnote][way=bysection,start=0]
>>test \footnote{test} test
>>
>>\section{test}
>>test \footnote{test} test
>>test \footnote{test} test
>>
>>\section{test}
>>test \footnote{test} test
>>test \footnote{test} test
>>
>>\stoptext
>>
>>
> 
> 
> Thanks. So it looks like the way to reset counters in ConTexT is with
> the 
> 
> \setupnumber[somecounter]{x}

no, it's \setnumber, setupnumber is a key/val one use to tune numbering

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: Re: customizing footnote numbers
  2005-04-04 10:14     ` Patrick Gundlach
@ 2005-04-04 20:30       ` Thomas A.Schmitz
  2005-04-05  1:27         ` Paul Tremblay
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas A.Schmitz @ 2005-04-04 20:30 UTC (permalink / raw)


Hey, that's just the question I was going to ask! I played around some 
with margin= and margindistance=, but all I could achieve was getting 
the footnote ref typeset to the right, into the text of the note -- 
interesting, but not very useful. So is this possible? And: can we have 
a hanging indent for footnotes like this:

--------------------
      1 note that will
wrap like this?

Best

Thomas

On Apr 4, 2005, at 12:14 PM, Patrick Gundlach wrote:

> Hello,
>
> while we are at it, I played around (a bit) with \setupfootnotes but
> didn't get what I wanted to achieve:
>
> |text text text text text
> |
> |-------------   (a shorter rule)
> |  1  hello
> |  2  footnote
> | 10  tenth footnote that
> |     wraps like this
> |----------------------------------------------
>
> So I'd like to make the rule shorter, the numbers not in the margin,
> but in the area <text>. Right aligned and large (style=\tf works OK).
>

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

* Re: Re: customizing footnote numbers
  2005-04-04 20:30       ` Thomas A.Schmitz
@ 2005-04-05  1:27         ` Paul Tremblay
  2005-04-05 11:28           ` Patrick Gundlach
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Tremblay @ 2005-04-05  1:27 UTC (permalink / raw)


On Mon, Apr 04, 2005 at 10:30:44PM +0200, Thomas A. Schmitz wrote:
> 
> Hey, that's just the question I was going to ask! I played around some 
> with margin= and margindistance=, but all I could achieve was getting 
> the footnote ref typeset to the right, into the text of the note -- 
> interesting, but not very useful. So is this possible? And: can we have 
> a hanging indent for footnotes like this:
> 
> --------------------
>      1 note that will
> wrap like this?
> 

Here's what I just figured out literally 10 minutes ago. It works, but
it seems a bit of a hack. Is there a better way? 

Paul

%Footnotes with indenting 

\starttext
% define amount to indent
\setupnarrower[left=12pt]

At present I am a sojourner in civilized life
again. \footnote{\startnarrower[left]
% need a negatvie vskip so ConTeXt won't read this as a paragrpah.
\vskip-12pt
\hskip-12pt Thoreau started writing {\sl Walden} in 1846, a few
months after he started living at Walden Pond. He moved back to
Concord late in 1847. By that point he had drafted half of the
manuscript. He continued to work on it for several years.
\stopnarrower}

\stoptext

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

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

* Re: customizing footnote numbers
  2005-04-05  1:27         ` Paul Tremblay
@ 2005-04-05 11:28           ` Patrick Gundlach
  2005-04-05 15:52             ` Paul Tremblay
  0 siblings, 1 reply; 15+ messages in thread
From: Patrick Gundlach @ 2005-04-05 11:28 UTC (permalink / raw)


Hello Paul,

> Here's what I just figured out literally 10 minutes ago. It works, but
> it seems a bit of a hack. Is there a better way? 

a bit? a very huge bit. Assume that you have 200 footnotes in your
text. Then change from 12pt fontsize to 10pt.... Bang!

Patrick
-- 
ConTeXt wiki: http://contextgarden.net

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

* Re: Re: customizing footnote numbers
  2005-04-05 11:28           ` Patrick Gundlach
@ 2005-04-05 15:52             ` Paul Tremblay
  2005-04-05 16:17               ` Patrick Gundlach
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Tremblay @ 2005-04-05 15:52 UTC (permalink / raw)


On Tue, Apr 05, 2005 at 01:28:01PM +0200, Patrick Gundlach wrote:
 
> > Here's what I just figured out literally 10 minutes ago. It works, but
> > it seems a bit of a hack. Is there a better way? 
> 
> a bit? a very huge bit. Assume that you have 200 footnotes in your
> text. Then change from 12pt fontsize to 10pt.... Bang!
> 

Why wouldn't this be the case with any fontsize change? I guess because
you have to change the \vskip each time. Well, in that case one could
write a macro, but I have no idea how to write macros. Also, one could
set up a definition 

\def\FontSkipSize{\vskip-12pt}

and use that instead. Then you would only have to change the definition
once.

Of course, that begs the question. Is there a better way? 

Paul

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

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

* Re: customizing footnote numbers
  2005-04-05 15:52             ` Paul Tremblay
@ 2005-04-05 16:17               ` Patrick Gundlach
  2005-04-05 22:52                 ` Paul Tremblay
  0 siblings, 1 reply; 15+ messages in thread
From: Patrick Gundlach @ 2005-04-05 16:17 UTC (permalink / raw)


Hello,


[most evil footnote hackery]

> Of course, that begs the question. Is there a better way? 

Sorry to say, but in this case, no solution would be much better than
this solution. There is nothing(!) worse than mixing visual markup with
logical markup this way. We are in a fully programmable environment,
and it is extremely unConTeXtish to hack the visual appearance. If I
have some minutes off tonight, I'll look into it. But I'd guess that
Hans already has several different solutions to this problem, because
every time I write "no solution yet" on this mailinglist, Hans
presents some unknown/forgotten secret.

Patrick
-- 
ConTeXt wiki: http://contextgarden.net

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

* Re: Re: customizing footnote numbers
  2005-04-05 16:17               ` Patrick Gundlach
@ 2005-04-05 22:52                 ` Paul Tremblay
  2005-04-06  8:38                   ` Patrick Gundlach
  0 siblings, 1 reply; 15+ messages in thread
From: Paul Tremblay @ 2005-04-05 22:52 UTC (permalink / raw)


On Tue, Apr 05, 2005 at 06:17:39PM +0200, Patrick Gundlach wrote:
 
> Sorry to say, but in this case, no solution would be much better than
> this solution. 

Really? Wow! So if if the requirements for some document are hanging
indents footnotes, and I have asked how to do them on the mailing list,
and no one gives me a solution; and I then use my solution and create a
nice looking document and satisfy the requirements, say for the thesis
committee--that is *worse* than producing a document that does not fulfill
the requirements and is not accepted? Wow, that's amazing that Patrick
Gunlach as power over the editors and committees. 

>There is nothing(!) worse than mixing visual markup with
> logical markup this way. 

Except no solution at all when you have a deadline to meet and must
produce a document. Or except global warming. A little perspective would
be nice.

>We are in a fully programmable environment,
> and it is extremely unConTeXtish to hack the visual appearance. 

I am an XML author, so am pretty amazed to hear that one should not mix
appearance and content in ConTeXt. Most of a ConTeXt document involves
visual appearance. What is one saying when one writes \blank[12pt]?

>If I
> have some minutes off tonight, I'll look into it. But I'd guess that
> Hans already has several different solutions to this problem, because
> every time I write "no solution yet" on this mailinglist, Hans
> presents some unknown/forgotten secret.
> 

Yes, that would be nice.  But until I see a concrete solution, I will
continue to use and post my solution. A rule of etiquette is that if you
don't have a better solution, or don't want to document it, don't attack
the current solution, not matter how impure. 

Paul

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

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

* Re: customizing footnote numbers
  2005-04-05 22:52                 ` Paul Tremblay
@ 2005-04-06  8:38                   ` Patrick Gundlach
  2005-04-06 12:21                     ` Hans Hagen
  2005-04-06 20:03                     ` Patrick Gundlach
  0 siblings, 2 replies; 15+ messages in thread
From: Patrick Gundlach @ 2005-04-06  8:38 UTC (permalink / raw)



[...]


>>We are in a fully programmable environment,
>> and it is extremely unConTeXtish to hack the visual appearance. 
>
> I am an XML author, so am pretty amazed to hear that one should not mix
> appearance and content in ConTeXt. Most of a ConTeXt document involves
> visual appearance. What is one saying when one writes \blank[12pt]?

This is visual appearance, of cource. But I am not talking about one
single instance of \blank anywhere, I am talking about changing a
reaeated statement (like the footnotes) by visual means. And
formatting instructions have no right to exist there (in fact they
should be filtered out by \sanitizelogigalmarkup{\footnote...}. This
is one of the great advantages of using a high level language such as
LaTeX or ConTeXt (and ConTeXt so much more than LaTeX) that we can
define layout in this way.

Since you come from an XML background and only have to change your
stylesheet, the hackary is doable, nobody ever sees it. But this
hackery is not to be used when using Context directly.

> Yes, that would be nice.  But until I see a concrete solution, I will
> continue to use and post my solution. A rule of etiquette is that if you
> don't have a better solution, or don't want to document it, don't attack
> the current solution, not matter how impure. 

Sorry, but I strongly disagree. It is not nice to teach/show other
people such code. They will take it for granted and put in their
documents. I have seen far too many LaTeX documents where exactly this
procedure leaded to unmaintainable code. It took me hours to extract
and correct those ugly hacks. One example: a person learned how to
remove indentation from a paragraph by saying \noindent. So every
paragraph had a \noindent before the paragraph (instead of doing it
right by saying \noindent0pt). And it was a long
document (and the \noindent was just one of the stupid things). So my 
advice is not to publish such code without several dangerous bend
signs.

Patrick
-- 
ConTeXt wiki: http://contextgarden.net

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

* Re: Re: customizing footnote numbers
  2005-04-06  8:38                   ` Patrick Gundlach
@ 2005-04-06 12:21                     ` Hans Hagen
  2005-04-06 20:03                     ` Patrick Gundlach
  1 sibling, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2005-04-06 12:21 UTC (permalink / raw)


Patrick Gundlach wrote:
> [...]
> 
> 
> 
>>>We are in a fully programmable environment,
>>>and it is extremely unConTeXtish to hack the visual appearance. 
>>
>>I am an XML author, so am pretty amazed to hear that one should not mix
>>appearance and content in ConTeXt. Most of a ConTeXt document involves
>>visual appearance. What is one saying when one writes \blank[12pt]?
> 
> 
> This is visual appearance, of cource. But I am not talking about one
> single instance of \blank anywhere, I am talking about changing a
> reaeated statement (like the footnotes) by visual means. And
> formatting instructions have no right to exist there (in fact they
> should be filtered out by \sanitizelogigalmarkup{\footnote...}. This
> is one of the great advantages of using a high level language such as
> LaTeX or ConTeXt (and ConTeXt so much more than LaTeX) that we can
> define layout in this way.

to this i can add that concerning the blank, one preferably should follow the 
indirect approach, thereby avoiding hard coded numbers in the document source

\defineblank[mybig][33pt]

....

\blank[mybig]


Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: customizing footnote numbers
  2005-04-06  8:38                   ` Patrick Gundlach
  2005-04-06 12:21                     ` Hans Hagen
@ 2005-04-06 20:03                     ` Patrick Gundlach
  1 sibling, 0 replies; 15+ messages in thread
From: Patrick Gundlach @ 2005-04-06 20:03 UTC (permalink / raw)



[...]

> remove indentation from a paragraph by saying \noindent. So every
> paragraph had a \noindent before the paragraph (instead of doing it
> right by saying \noindent0pt). And it was a long

talking about teaching: 

a) it is \parindent=0pt, not \noindent=0pt

b) the ConTeXt way is using

\setupindenting and \indenting


Patrick
-- 
ConTeXt wiki: http://contextgarden.net

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

end of thread, other threads:[~2005-04-06 20:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-03 19:58 customizing footnote numbers Paul Tremblay
2005-04-04  6:10 ` Paul Tremblay
2005-04-04  8:29   ` Hans Hagen
2005-04-04 10:14     ` Patrick Gundlach
2005-04-04 20:30       ` Thomas A.Schmitz
2005-04-05  1:27         ` Paul Tremblay
2005-04-05 11:28           ` Patrick Gundlach
2005-04-05 15:52             ` Paul Tremblay
2005-04-05 16:17               ` Patrick Gundlach
2005-04-05 22:52                 ` Paul Tremblay
2005-04-06  8:38                   ` Patrick Gundlach
2005-04-06 12:21                     ` Hans Hagen
2005-04-06 20:03                     ` Patrick Gundlach
2005-04-04 17:12     ` Paul Tremblay
2005-04-04 19:40       ` 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).