Skip to Content.
Sympa Menu

texmacs-users - Re: Problems with footnotes in section titles

Subject: mailing-list for TeXmacs Users

List archive

Re: Problems with footnotes in section titles


Chronological Thread 
  • From: address@hidden
  • To: Vladimir Fedonov <address@hidden>
  • Cc: address@hidden
  • Subject: Re: Problems with footnotes in section titles
  • Date: Wed, 12 Feb 2003 10:51:56 +0100

On Fri, Feb 07, 2003 at 07:02:04PM +0100, Vladimir Fedonov wrote:

> If I insert a footnote IN a section title (the document type is set
> to "article"), the number assigned to the footnote is 3 instead of
> 1.

According to Joris, things like footnotes and labels (generally
anything which can have structural side effects) do not belong in
section titles.

I do not really have any opinion one wether that restriction is
legitimate or not, but I can explain the observed behaviour. The
content of a 'section' macro (its 'name' argument) is evaluated
several times, in the 'article' style, it its evaluated to create the
t.o.c. entry, to set the page header and to display the actualy
(editable section title). Since every evaluation of the 'footnote'
macro increase the 'footnotenr', you end up with that result.

Since you probably do not want footnotes in t.o.c. and page header, I
cannot find an easy solution, but there is a workaround.

You can define your own package functions like:

(document
(assign "hidden" (func "x"
(if (equal (value "x") (quote "")) "")))
(assign "section!" (func "name" "label" (concat
(apply "hidden" (section (value "label")))
(section* (concat
(apply "thesection")
(apply "sectionsep")
(value "name")))))))

(paste with Edit->Paste from->Scheme)

This section corresponds to the definition of section for the article
style. You can look in packages/section/section-article.ts to find
the snippets to use in the '...*' expansions for other structures.

The idea is to use a function of two parameters, the first parameter
(name) is used for display and can have side effect (e.g. with
footnotes) the second parameter (label) is used for the t.o.c.,
headers etc. and must not have side effects.

For increased robustness and simplicity we handle the t.o.c., headers
etc. by simply expanding the structural macro ('section' in that case)
with the label parameter but in a dummy function ('hidden') which
produces no typeset result.

The section title is displayed by using the physical sectioning markup
(section* in that case) in the same way as it is used in the logical
markup macro (section), but ommiting all the rest (t.o.c, hearders,
etc.).

As usual, the problem is that such extensions require some coding to
be supported by the logical export filters (LaTeX and HTML). Things
should be more easily extensible soon, though.


> Another small (but striking) thing is:
> Document of language "english": Title "BY" Author
> Document of language "italian" : Title "PER" Author
> the correct translation is: Title "DI" Author.

If you want to improve the translations in TeXmacs I suggest you
contact the relevant localization team directly. In your case, that is
<address@hidden>.

--
David Allouche | GNU TeXmacs -- Writing is a pleasure
Free software engineer | http://www.texmacs.org
http://ddaa.net | http://alqua.com/tmresources
address@hidden | address@hidden
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.


  • Problems with footnotes, Vladimir Fedonov, 02/07/2003
    • Re: Problems with footnotes in section titles, david, 02/12/2003

Archive powered by MHonArc 2.6.19.

Top of Page