Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
13 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
47 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
25 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
34 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{...
7
votes
1answer
178 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
157 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
45 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
230 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
69 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
42 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
206 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
191 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
60 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
516 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
52 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
170 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
61 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
504 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
606 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
173 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
168 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
156 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 ...
1
vote
0answers
35 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
334 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
673 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 ...