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

Kerns added by \textcoquote cause microtype to not see quotation mark properly #58

Open
fredrikpaues opened this issue Apr 16, 2022 · 1 comment

Comments

@fredrikpaues
Copy link

fredrikpaues commented Apr 16, 2022

Description

When I compile the minimal example below, which uses microtype and biblatex with the american language option, using LuaLaTeX, then closing quotation marks in the bibliography don't protrude into the right margin.

If I remove csquotes then quotation marks protrude, but then biblatex issues a warning.

I have posted a question regarding this over at Stack Exchange previously. And, before I realized that there was a public repo also for csquotes and that the root cause was in this package, I posted issues in the bug trackers of biblatex and microtype.

@moewew noted in the biblatex issue that "the kerns added by csquotes \textcoquote cause microtype to no longer see the quotation mark properly".

Minimal example demonstrating the issue

Screenshot of MWE showing how closing quotation marks don't protrude into the right margin

\documentclass[american]{article}
\usepackage[
  style=authoryear,
  backend=biber,
  dashed=false,
]{biblatex}

\setlength{\bibhang}{0pt}

\usepackage{filecontents}
\begin{filecontents*}{mwe.bib}
  @article{andersson2011,
    title={An article title that ought to have a closing quotation mark that protrudes iiinto the margin},
    author={Anderson, A Lengthy List of First Names to Move the Article Title to the Next Line},
    journaltitle={Review of Utter Nonsense},
    date={2011},
    volume={5},
  }

  @article{andersson2021,
    title={An article title that ought to have a closing quotation mark that protrudes iiiinto the margin},
    date={2021},
    volume={40},
    crossref={andersson2011}
  }
\end{filecontents*}

\addbibresource{mwe.bib}

\usepackage[showframe, text={140mm, 230mm}]{geometry}
\usepackage{babel}
\usepackage[babel]{microtype}
\usepackage[babel]{csquotes}

\begin{document}
  \noindent ``We see that quotation marks protrude into the right margin when outside the bibliography.''

  \nocite{andersson2021,andersson2011}

  \printbibliography
\end{document}
@fredrikpaues
Copy link
Author

I just realized that @moewew provided a better minimal working example that reproduces the issue without throwing biblatex into the mix.

Screenshot of compiled minimal working example

\documentclass[british, american]{article}
\usepackage[showframe, text={140mm, 230mm}]{geometry}
\usepackage{babel}
\usepackage[babel]{microtype}
\usepackage[autostyle]{csquotes}

\begin{document}
  Lorem

  ``We see that quotation marks protrude the right margin when outside the bibliography.''

  \enquote{We see that quotation marks protrude the right margin when outside the bibliography.}

  \textooquote We see that quotation marks protrude the right margin when outside the bibliography.\textcoquote

  \selectlanguage{british}
  ipsum

  `We see that quotation marks protrude the right margin when outside the bibliography.'

  \enquote{We see that quotation marks protrude the right margin when outside the bibliography.}

  \textooquote We see that quotation marks protrude the right margin when outside the bibliography.\textcoquote

  dolor

  `We see that quotation marks protrude the right margin when outside the ``bibliography'' blob'

  \enquote{We see that quotation marks protrude the right margin when outside the \enquote{bibliography} blob}

  \textooquote We see that quotation marks protrude the right margin when outside the \textoiquote bibliography\textciquote{} blob\textcoquote
\end{document}

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

No branches or pull requests

1 participant