Skip to content

Concealment of \citet and \citep from natbib #2658

@kiryph

Description

@kiryph

I am wondering whether the concealment of \citet and \citep from natbib can be improved.

Here a screenshot from the documentation of natbib

Screenshot 2023-03-04 at 07 53 46

The corresponding code is

\documentclass{article}
\usepackage{natbib}

\begin{document}
\citet{jon90}
\citet[chap.~2]{jon90}
\citep{jon90}
\citep[chap.~2]{jon90}
\citep[see][]{jon90}
\citep[see][chap.~2]{jon90}
\citet*{jon90}
\citep*{jon90}
\end{document}

Currently concealed as following

Screenshot 2023-03-04 at 08 11 21

The most obvious change could be:

  • show \citep*?{jon90} with parentheses instead of square brackets (third and last line).

Prepend optional parameters and replace inner brackets with spaces

  • Conceal \citet[chap.~2]{jon90} as [chap. 2 jon90]
  • Conceal \citep[see][]{jon90} as (see jon90)
  • \citep[see][chap.~2]{jon90}. Here the chapter reference becomes completely invisible. I would at least show it. Showing it with less square brackets, e.g. as (see chap. 2 jon90).
  • for \citet one could drop the surrounding square brackets. Here I am not so sure.

I am not totally sold on all my suggestions and what is possible to mimic natbib functionality

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions