biblatex-ext icon indicating copy to clipboard operation
biblatex-ext copied to clipboard

How do I set the position of footnote marks?

Open ralessi opened this issue 7 years ago • 11 comments

Hi @moewew ,

Many many thanks for this wonderful extension of biblatex standard styles! I am deeply grateful as it will save me quite some time, let alone its being clean and straightforward even though we are dealing here with complex formatting.

This is a feature resquest, unless I missed something in the documentation.

As regards some typographical standards, at least in French typography, footnote marks must go between the preceding word the footnote is applied to and the punctuation mark, like so:

On this particular point, see Smith(1).

where (1) is the footnote mark. So after having selected babel's french option in the preamble (\usepackage[french]{babel}), I tried this with ext-verbose-inote:

On this particular point, see \textcite[25]{Smith}.

But the footnote mark is printed after the dot all the same. Is there a way to prevent the footnote mark from being automatically moved after the punctuation mark?

With many thanks again!

Robert

ralessi avatar Mar 22 '18 09:03 ralessi

Thank you very much for the feature request.

\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=ext-verbose-inote, backend=biber]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \textcite{sigfridsson}.
\printbibliography
\end{document}

shows the behaviour you describe. It seems that this is behaviour is explicitly implemented in verbose-inote.cbx. I'll see what I can do.

moewew avatar Mar 22 '18 09:03 moewew

biblatex defines the autopunct option. This option has two primary uses

  1. It tracks punctuation after citation commands and suppresses double punctuation
  2. It can move punctuation around certain \...cite commands.

The latter function is by default only built in for \autocite and apparently also for the verbose family's \textcite (I didn't know that). The behaviour for \autocite can be modified with the optional position argument that can take the values r (don't move punctuation), l (move punctuation to the left of, i.e. before, the citation), f (like r in footnotes, like l in the body)

\DeclareAutoCiteCommand{footnote}[r]{\smartcite}{\smartcites}

disables the moving of punctuation for \autocite.

\textcite does not have a simple interface for this at the moment.

moewew avatar Mar 22 '18 10:03 moewew

I was not aware this was already set in verbose-inote.cbx as I use Dominik Waßenhoven's excellent footnote-dw style which does not move footnote marks.

Many thanks for looking into this.

ralessi avatar Mar 22 '18 10:03 ralessi

I'll think about this a bit longer. Maybe there are some good changes to be made that are useful for the biblatex core as well.

moewew avatar Mar 22 '18 10:03 moewew

Thanks! So if I understand well, the moving of punctuation for \textcite cannot be disabled the same way as for \autocite at least in biblatex's standard styles?

ralessi avatar Mar 22 '18 10:03 ralessi

Precisely.

At the moment you have two options:

  1. Disable autopunct completetly with autopunct=false, this will stop biblatex from suppressing double punctuation after citations, though.
  2. Modify the textcite command.
    \DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]
      {\usebibmacro{textcite:init}%
       \gdef\cbx@savedkeys{}%
       \DeferNextCitekeyHook}
      {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}
         {\protected@xappto\cbx@footcite@args{%
            (\thefield{multiprenote})(\thefield{multipostnote})}}
         {}%
       \xappto\cbx@savedkeys{\thefield{entrykey},}%
       \iffieldequals{namehash}{\cbx@lasthash}
         {}
         {\usebibmacro{textcite:count}%
          \savefield{namehash}{\cbx@lasthash}}%
       \ifnumequal{\value{citecount}}{\value{citetotal}}
         {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}%
          \protected@xappto\cbx@footcite@args{%
            [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}
         {}}
      {}
      {}
    
    should do that.

moewew avatar Mar 22 '18 10:03 moewew

Yes, it worked perfectly. So at present, I have to use both \DeclareAutoCiteCommand{footnote}[r]{\smartcite}{\smartcites} and your modified \textcite command to get exactly what is expected in French typography. That is a great improvement.

ralessi avatar Mar 22 '18 10:03 ralessi

I opened a discussion at the biblatex issue tracker (https://github.com/plk/biblatex/issues/733), feel free to share your thoughts on moving punctuation there.

moewew avatar Mar 27 '18 16:03 moewew

I looked into an interface that can be used to let non-\autocite commands shuffle punctuation as well. See https://github.com/plk/biblatex/issues/733 and https://github.com/plk/biblatex/pull/830. As it turns out that new interface, as useful as it might be for other applications, is of no real help here, because the punctuation handling is built deep into the \textcite macro of the verbose styles. That means we are stuck with the two options I explained above.

moewew avatar Oct 19 '18 08:10 moewew

Many thanks for so much efforts on this! So if I understand well, as of v3.12 to come we should have:

  1. \DeclareAutoCiteCommand{footnote}[r]{\smartcite}{\smartcites} for \autocite.
  2. A new \DeclareCitePunctuationPosition for all other commands except \textcite in verbose styles.
  3. Nothing for \textcite in verbose styles unless either autopunct be disabled or \textcite be modified.

In the end \textcite should only be redefined in rare cases.

It may be worth writing a caveat to the attention of French users as they always insert footnotes before any punctuation mark: so disabling autopunct might be an option to consider.

ralessi avatar Oct 21 '18 22:10 ralessi

Assuming you don't want footnotes and punctuation moved around.

  1. Yes.
  2. That would not be necessary, the default of all commands except \autocite (and verbose's \textcite) is not to move the punctuation. So \DeclareCitePunctuationPosition would bring no change here. It is more useful for the opposite case where people want \footcite to move the punctuation around. That was not possible before.
  3. You have to redefine verbose's \textcite as shown above.

moewew avatar Oct 22 '18 07:10 moewew