Questions tagged [nameref]

The `nameref` package is meant to extract the name of section or caption titles for a given label. It is part of the `hyperref` package bundle and provides basically the `\nameref` and `\nameref*` macros.

Filter by
Sorted by
Tagged with
2
votes
1answer
57 views

How to avoid “Infinite glue shrinkage found in a paragraph.” error with enumitem and nameref

There seems to be a problem when combining the enumitem and nameref package. With the code below I get the error: ! Infinite glue shrinkage found in a paragraph. I already checked the package ...
1
vote
1answer
61 views

Link map from referenced theorems in my document

I am writing a latex document full of hyperlinks pointing to various areas of the document itself (I am using \nameref to reference theorems). I have a questions regarding these: is it possible to ...
2
votes
1answer
38 views

Jump to item - not to chapter with “\nameref”

I use a "description" environment and want to refer to certain items by name (which works fine). But I also want, that when a reader clicks on the resulting hyperlink that one jumps directly to the ...
0
votes
1answer
40 views

How to get ride of the file extension in \currfilename

How to get ride of the file extension in \currfilename? The \jobname would only give me the name without the .tex, which is fine. But that's not what I want if I am using \input or \include. So \...
3
votes
1answer
176 views

Undefined control sequence while adding a new parameter to a existing \ExplSyntaxOn code

I am fixing my command \fullref, which internally uses \nameref and does not support multiple labels to be used simultaneously. However, on the question How to nameref multiple labels simultaneously?, ...
2
votes
2answers
29 views

Use \nameref without displaying the entire name

Say I have a TeX section: \section*{Appendix A: My Name is Blah} \label{appendix} but I want to refer to "Appendix A" without the ": My Name is Blah". Is there a way to do this? The code \nameref{...
0
votes
0answers
14 views

Recover long name of a section in beamer (nameref used)

In beamer, I'm introducing a slide at the beginning of each section with \usepackage{nameref} \newcommand*{\currentname}{\@currentlabelname} \AtBeginSection[] { \begin{frame} \begin{...
2
votes
2answers
108 views

Enumitem with hyperref's \nameref, in complex environments

I provide this pre-amble of my main desired output, having been told that my below approach is inherently misguided (due to \nameref not being designed or able to obtain only a numeral, instead of a ...
0
votes
1answer
32 views

The name at the beginning of the letters in the appendix does not change in ToC

MWE \documentclass{book} \usepackage{lipsum} \usepackage{titletoc} \usepackage{appendix} \renewcommand{\chaptername}{\textit{Division}} \renewcommand{\appendixname}{\textit{Addition}} \...
2
votes
2answers
82 views

Use \nameref to get text from a custom environment

I've got an own environment for requirements. In my document I want to reference each requirement and get its text. If I use \namref I get only the name of the corresponding section. Can someone help ...
1
vote
1answer
59 views

How to nameref multiple labels simultaneously?

On this example, I use \cref{first,second} and cleveref correctly labels them: \documentclass[10pt,a5paper]{memoir} \usepackage[brazil]{babel} \usepackage{hyperref} \usepackage{cleveref} \begin{...
0
votes
1answer
48 views

How to add a custom TOC (automated “Section Break-down”) after each \chapter command?

Let's say we have a document broken into chapters and we want at the beginning of each chapter to add between two horizontal lines a "Section Break-Down" that shows all the sections and subsections of ...
0
votes
0answers
22 views

Unprotect and remove commands inside \nameref and TOC

How do I make my commands context aware, or in particular, how do I remove commands when I refer to them within \nameref or TOC? See an example below, where a counter is incremented when I refer to a ...
1
vote
1answer
44 views

nameref does not work with LLNCS

I'm trying to use the very practicle nameref package with lncs (sty file downloaded here). Unfortunately, instead of displaying the actual name of the definition, it displays the name of last section. ...
2
votes
1answer
51 views

Use name of referenced object as argument of string comparison

I have argument #1 which contains some text X representing some label. I would like to use \str_if_eq to compare X and name of paragraph referenced by this string. What I want to achieve is that if \...
0
votes
0answers
45 views

Redefine \autoref for paragraphs

I'm working with \autoref from the hyperref package to reference my sections, etc. What I currently work with: \documentclass[a4paper, 12pt, parskip]{scrreprt} \usepackage[utf8]{inputenc} \...
2
votes
1answer
39 views

How do I add graphicname like figurename?

MWE \documentclass[a4paper,11pt]{book} \usepackage{caption} \usepackage{tikz} \usepackage{graphicx} \usepackage{float} \newfloat{Grafik}{htbp}{loa} \begin{document} \chapter{A} \section{B} \begin{...
8
votes
1answer
277 views

Capitalization variants of nameref

Several packages that generate inline text (i.e. glossaries, cleverref) have commands to let the author choose capitalization. In particular, glossaries seems to be able to do parts of this ...
3
votes
1answer
253 views

\nameref use the long title instead of the short title

For my table of contents I need the short title, often formatted with \newline so it looks nice. For \nameref{label} I need the long title instead of the short title. Is it possible to have \nameref ...
1
vote
1answer
93 views

References and citations with bibtex

I use bibtex for my references and I am wondering, which is the best way to organise my list and citations? There are many question about references but I can not find a way to do what I want. with ...
1
vote
1answer
358 views

Undefined control sequence. --\nameref

I am using IEEETran document class, from https://www.computer.org/web/tpds/author My LaTeX source looks like: (See \S\ref{AnyLabel}--\nameref{AnyLabel}.) . . . \section{AnySec}\label{AnyLabel} I ...
2
votes
2answers
91 views

Use counters in a bar chart

I have a document consisting of different topics within multi-variable calculus. I want to start the document with a bar chart displaying how many problems there are of each kind, based on the number ...
1
vote
1answer
58 views

Custom counter printed correctly in situ, but not in nameref references

The journal that I'm submitting to has a LaTeX template (yay!), but the template suggests manually labeling supplemental figures. Since I'm too lazy to do that, I thought I would make a new counter ...
1
vote
2answers
336 views

Lower-case letter in \nameref

I use this before \begin{document}: \newcounter{mylabelcounter} \makeatletter \newcommand{\labelText}[2]{% #1\refstepcounter{mylabelcounter}% \immediate\write\@auxout{% \string\...
4
votes
3answers
236 views

Using \nameref in section name disturbs display of header

General description of the issue I have an appendix whose section names have to be identical to the names of sections of the main part of the dissertation. Therefore I used the \nameref command of ...
3
votes
0answers
64 views

References to a label

I would like to create a label and display in the pdf-output, where the label is used: \documentclass{report} \usepackage{nameref, hyperref} \begin{document} \chapter{The first chapter} \label{ch:...
0
votes
0answers
1k views

Cannot label a wrapfigure [duplicate]

I have the following environment to display a sidebar: \newcommand{\dummy}{} \newenvironment*{lsidebar}[2][0.5] { \renewcommand{\dummy}{#1} \wrapfigure{l}{#1\textwidth} \rule{#1\...
0
votes
1answer
94 views

Tabular Multiline and nameref

I have the following table Basically, I use \nameref{sec:USD} as a reference to a subsection of my paper that I would like to link to. However, I want to know if it is possible to make it take up ...
1
vote
1answer
245 views

(Name-)referencing to current chapter

As I understood, I define my chapter title as follows: \chapter[title in table of contents][title in header line]{title in body} afterwards I add a label e.g. \label{Chapter1} I know that I can ...
3
votes
1answer
85 views

Simultaneously get all forms of name reference

Is there a possibility of getting (within the same document) the various form of a chapter or section title, similarly to what the nameref package does (possibly not conflicting with loading hyperref),...
2
votes
2answers
690 views

Reference part of the title of the section

There are good answers already on how to refer to the title of the section; and both the title and the number of the section What I want to do is use the part of the Title; rather than the whole of ...
2
votes
1answer
1k views

ref to a label with a new link name

I would like to reference to a section. The section named as "My Section" and has the lable "sec:my-section" In default use cases I use \ref or \nameref to reference to the section. With \nameref ...
1
vote
1answer
222 views

How can I use \nameref with custom \addsubsec command?

I have the following code: \documentclass{scrartcl} \usepackage{nameref} % \addsubsec \makeatletter \newcommand*\addsubsec{\secdef\@addsubsec\@saddsubsec} \newcommand*{\@addsubsec}{} \def\@addsubsec[...
1
vote
1answer
39 views

Automatic reference of superior section in folderpath

Note the focus of this question changed slightly. See my answer for further clarification! I would like to make certain references/links dependent on where exactly I put certain content in my ...
2
votes
3answers
205 views

How to cross-reference a third-level sectioning header while including the higher-level sectioning numbers

My document structure looks like this: I. Example-heading 1. Example-subheading 2. Example-subheading 2 a) Example-subsubheading b) Example-subsubheading 2 (aa) Example-...
2
votes
1answer
196 views

Expand \nameref{} before creating index

I am using the theorem environment to arrange equations. I am assigning a distinct label for each equation. Some equations, e.g. \label{equation-a} and \label{equation-b}, are under the same theorem ...
2
votes
0answers
52 views

Unwanted space after \labeltext with \nameref package [duplicate]

I'm using the \nameref package and I need to obtain a labelled text within round brackets, but it adds some space before the right bracket, while it doesn't add space after the left bracket. Here is ...
3
votes
2answers
424 views

Can you influence any PDF element using JavaScript?

Using the package insDLJS, one can add JavaScript to PDF's generated by LaTeX. To reference a specific element, one can use this.getField("myElementName"). Can I give any element in LaTeX a field name?...
1
vote
2answers
941 views

Nameref does not work with StylishArticle

I have used the StylishArticle class several times, but I recently thought it would be a good idea to reference sections based on their names instead of using sections numbers or pageref. So I ...