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

tie author (year) as "Smith et al.~(1986)" #363

Closed
ryofurue opened this issue Dec 30, 2015 · 12 comments
Closed

tie author (year) as "Smith et al.~(1986)" #363

ryofurue opened this issue Dec 30, 2015 · 12 comments

Comments

@ryofurue
Copy link

Hi,

I've just started to use biblatex and I'm almost satisfied with

\usepackage[style=chicago-authordate,maxcitenames=1,maxbibnames=1,natbib=true]{biblatex}
. . .
\citet{Smith-ETAL:1986}

But, in the result, "Smith et al." and "(1986)" aren't tied with "~" and the year "et al." sometimes comes at the end of a line, which is not good typography (because it looks like the end of a sentence). [I checked the .log file and didn't see any overfull or underfull. That means that there is no tie there.]

So, I wish the author part and the "(year)" part are tied by default. At present, I even don't know how to do it manually.

Regards,

Ryo

@moewew
Copy link
Collaborator

moewew commented Dec 30, 2015

In the standard styles there already is \nameyeardelim (which defaults to \addspace) to control the delimiter between labelname and year. You could easily make that read \addnbspace via \renewcommand*{\nameyeardelim}{\addnbspace}. Fortunately, biblatex-chicago also makes use of that command (but note that \nameyeardelim contains a bit more code in biblatex-chicago than it does in biblatex.def, you will have to cater to that.).

The standard textcite macros don't use \nameyeardelim, they have a plain \addspace there, maybe that is something to ponder.

If you need any more pointers, you might want to ask over at TeX.SX.

@plk plk closed this as completed Dec 30, 2015
@ryofurue
Copy link
Author

Thank you for your help! I appreciate it very much. But are you sure that you should "close" this issue?

This is not a help forum. I think I have submitted a bug report . My point is that this should be fixed: The default should be to tie.

The standard textcite macros don't use \nameyeardelim

Shouldn't this also be fixed?

Another point is: I hope this issue is documented somewhere. I browsed the main manual of biblatex but didn't find any comment on tying the name and year. (Sorry if I missed it.)

Ryo

@ryofurue
Copy link
Author

note that \nameyeardelim contains a bit more code
in biblatex-chicago than it does in biblatex.def,
you will have to cater to that.).

I've found the source code of \nameyeardelim but I've found it impossible for me to modify it unless I familiarize myself with the coding of biblatex styles.

So, let me repeat: This is an issue that should be fixed on the developers' side, by changing the default or by providing an option or preferably both.

Of course, I'm not demanding an immediate fix at all. I'm just saying that this issue should remain in the bug list (or feature-request list).

@plk plk reopened this Dec 30, 2015
@plk
Copy link
Owner

plk commented Dec 30, 2015

I'm open to changing \addspace in the default author-year style \textcite to \nameyeardelim - this seems like a bug to me too. @josephwright, @aboruvka - any comments?

@moewew
Copy link
Collaborator

moewew commented Dec 30, 2015

I also noted that the default delimiter between label and year (i.e. if no labelname is present and the label field takes its place) is a hard-coded \addspace. Maybe that could be \nameyeardelim as well for consistency, I thought that label was a drop-in replacement for labelname in case the latter is missing.

If we change textcite to use \nameyeardelim which seems quite reasonable to, the same should probably be done for \nametitledelim in authortitle and friends.


@ryofurue \nameyeardelim is documented in §3.9.1 Generic Commands and Hooks, p. 100 in the 3.2 version of the biblatex manual. For standard biblatex styles it is enough to just have

\renewcommand*{\nameyeardelim}{\addnbspace}

which seems reasonably short to me. It is only slightly longer than, say, a preamble option.

In biblatex-chicago you can basically do the same, due to all the trickery done there you will need to replace all the \addspaces by \addnbspaces and are good to go.

Now, the discussion whether the default should be a tie or not seems a bit useless to me since the default behaviour is documented and can reasonably easy be changed. Other people might argue that a breaking space is OK, I would much rather have a citation break before the year than mess up my line breaking. A change to a tie would affect backwards compatibility (not massively, I admit, but it is something to keep in the back of one's mind).

@plk
Copy link
Owner

plk commented Dec 30, 2015

I have uploaded biblatex 3.3 DEV to Sourceforge which parameterises these hard-coded values in the author* styles.

  • \nameyeardelim and \nametitledelim are now used instead of \addspace where appropriate
  • A new macro \nonameyeardelim is available for when no labelname is present. Defaults to \addspace
  • A new macro \extpostnotedelim is available for the case where the shorthand is used and there is a postnote. Used to separate the shorthand from the parenthetical postnote. This was prevously hard-coded as \addspace which is the default.

I don't want to change the default for any of these, for the reason @moewew mentions.

@ryofurue
Copy link
Author

Folks, thank you for your responses!

Other people might argue that a breaking space is OK,
I would much rather have a citation break
before the year than mess up my line breaking.

You seem to miss one important point: that "et al." is special. The word "al." ends with a period (full stop) and for that reason, this bad typography happens:

blah blah blah . . . . Smith et al.
(1986) argued that . . .

See? For "et al.", your fear ("mess up my line breaking") seldom materializes because the problem of overfull or underfull can almost always be avoided by

blah blah blah . . . . . . Smith et
al. (1986) argued that . . .

and nobody argues that the first typeset is better than the second. The end-of-line period looks like ending the sentence at a glance. That's why the don't-end-a-line-with-a-non-sentence-ending-period rule exists in English typography. And, this is the reason why the traditional bibtex+natbib combination ties (uses a non-breaking space) "author et al." and "(year)".

In biblatex-chicago you can basically do the same,
due to all the trickery done there you will need to
replace all the \addspaces by \addnbspaces and are good to go.

I'm afraid I don't think so. As I describe above, we should treat "et al." specially. You need some coding to do so.

@moewew
Copy link
Collaborator

moewew commented Jan 2, 2016

Once you use the fixed version that also uses \nameyeardelim in \textcite-like commands you can try the following definition

\makeatletter
\renewcommand*{\nameyeardelim}{%
  \ifnum\spacefactor=\blx@sf@dot
    \addnbspace
  \else
    \addspace
  \fi}
\makeatother

This adds a non-breaking space if preceded by a dot (such as in "et al." or "Smitzh, F.") and a normal (breakable) space otherwise. It thus avoids a dot dangling at the end of a line, but allows breaks in other situations.

Once again, for biblatex-chicago the solution is similar, but a bit more elaborate and longer.

@ryofurue
Copy link
Author

ryofurue commented Jan 4, 2016

Thank you for your code! But, do you agree that "et al." should be tied with (connected by a non-breaking space to) the year by default? I think it should, and I would consider the current behavior of biblatex to be a bug.

The long-standing LaTeX tradition also agrees with my position. For example, we are told to write Mr.~Smith in LaTeX.

Once again, for biblatex-chicago the solution is similar, but a bit more elaborate and longer.

Would your re-definition of \nameyeardelim work for biblatex-chicago, at least in suppressing line-breaking after "et al."? I just copied your re-definition into my document, where I use biblatex-chicago. It's not easy to tell whether that's working or not unless I happened to have a line break between an "author et al." and the year. (As I kept editing my current document, the problematic instance of the year separated from "et al." has been gone.)

@moewew
Copy link
Collaborator

moewew commented Jan 4, 2016

The definition above would tie "et al." (and indeed everything that ends in a abbreviation dot) to the year even in biblatex-chicago. But it will destroy some of the thought-through features of biblatex-chicago (\nameyeardelim contains some logic there).

In order to get what you want with biblatex-chicago you need to find the definition of \nameyeardelim (in chicago-authordate.cbx) and replace every \addspace with \ifnum\spacefactor=\blx@sf@dot\addnbspace\else\addspace\fi.


EDIT

I should probably warn you that the above works for textcite only with the fix PLK commited five days ago.

Since biblatex-chicago is not affected by this fix, you will want to notify the developer about these changes so he implements them as well, only then will everything work as expected.

@ryofurue
Copy link
Author

ryofurue commented Jan 5, 2016

Since biblatex-chicago is not affected by this fix,
you will want to notify the developer about these
changes so he implements them as well,
only then will everything work as expected.

Thank you for your advice. I've just sent an email message to David Fussner, the maintainer of biblatex-chicago, referring him to this thread. I've also asked him to change biblatex-chicago to tie "et al." with the year by default.

@moewew
Copy link
Collaborator

moewew commented Mar 11, 2016

Your suggestion in #373 sounds nice I think, but I would definitely wait for Ulrike's opinion.

One thing I think needs to be considered is that in \textcite, which always comes with brackets, one should never have a comma in the delimiter; while for all other cite commands one would probably want to have the same delimiter. So defaulting to the normal cite is risky in these cases.

If you want to go with a more low-tech approach I think it is reasonable to define special delimiters only for bibmacros that deviate from the standard cite macro. Then the only new thing we need is a delimiter for textcite commands, which was previously hard-coded \addspace and should probably default to that to preserve backwards compatibility.

@plk plk closed this as completed Mar 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants