Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I set the position of footnote marks? #1

Open
ralessi opened this issue Mar 22, 2018 · 11 comments
Open

How do I set the position of footnote marks? #1

ralessi opened this issue Mar 22, 2018 · 11 comments
Labels
enhancement New feature or request

Comments

@ralessi
Copy link

ralessi commented Mar 22, 2018

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

@moewew moewew added the enhancement New feature or request label Mar 22, 2018
@moewew
Copy link
Owner

moewew commented Mar 22, 2018

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
Copy link
Owner

moewew commented Mar 22, 2018

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.

@ralessi
Copy link
Author

ralessi commented Mar 22, 2018

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.

@moewew
Copy link
Owner

moewew commented Mar 22, 2018

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.

@ralessi
Copy link
Author

ralessi commented Mar 22, 2018

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?

@moewew
Copy link
Owner

moewew commented Mar 22, 2018

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.

@ralessi
Copy link
Author

ralessi commented Mar 22, 2018

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.

@moewew
Copy link
Owner

moewew commented Mar 27, 2018

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

@moewew
Copy link
Owner

moewew commented Oct 19, 2018

I looked into an interface that can be used to let non-\autocite commands shuffle punctuation as well. See plk/biblatex#733 and plk/biblatex#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.

@ralessi
Copy link
Author

ralessi commented Oct 21, 2018

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.

@moewew
Copy link
Owner

moewew commented Oct 22, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants