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

Autocomplete with \nameref{} & \pageref{} #2593

Closed
mafsi opened this issue Dec 1, 2022 · 3 comments
Closed

Autocomplete with \nameref{} & \pageref{} #2593

mafsi opened this issue Dec 1, 2022 · 3 comments

Comments

@mafsi
Copy link

mafsi commented Dec 1, 2022

According to documentation, autocomplete labels is triggered by \ref command. It would be nice to have the same trigger for nameref package also for cleverref.
Thanks!

@lervag
Copy link
Owner

lervag commented Dec 1, 2022

I can consider that. Could you first provide a small example on which I can test things?

@mafsi
Copy link
Author

mafsi commented Dec 2, 2022

MWE

\documentclass{article}
\usepackage{nameref}
\usepackage{hyperref}

\begin{document}

\section{Introduction}
\label{sec:intro}

We would like to propose that \texttt{vimtex} autotrigger for
\texttt{nameref} package and also for the \texttt{cleveref}.

\section{Methodology}
\label{sec:meth}

As we stated on section §\nameref{sec:intro} on page
\pageref{sec:intro} we want to propose that to cover all types of
crossreferences, \textbf{maybe for \emph{pageref}} too?

\end{document}

@mafsi mafsi changed the title Autocomplete with \nameref{} Autocomplete with \nameref{} & \pageref{} Dec 2, 2022
lervag added a commit that referenced this issue Dec 2, 2022
@lervag
Copy link
Owner

lervag commented Dec 2, 2022

I believe this should work as expected now, please test.

Notice, though: VimTeX does not do autocompletion. It only provides an omnicomplete function. However, VimTeX should work well with most common autocomplete plugins (see :help vimtex-complete-auto for more info).

@lervag lervag closed this as completed Dec 2, 2022
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

2 participants