New answers tagged

4 votes

Change references to question marks when I use a multiply-defined label

Labels are saved as global macros. For example, \label{eq} is saved as \r@eq. These macros are created by \newlabel when the aux file is read. Note that packages like hyperref and cleveref replace \...
user avatar
  • 70.2k
0 votes

How can I hide a figure but keep its numbering?

Redefine \includegraphics To hide all figures, add the following line after declaring packages (i.e. after usepackage commands). Here you redefine \includegraphics to do nothing instead of showing the ...
user avatar
1 vote
Accepted

Unable to reference chapter from main to subfile when compiling ONLY the subfile

Replace \externaldocument{main.tex} by \externaldocument{main}, then it works. Actually, when running LaTeX on sobolev.tex, the log file contains the complaint: Package xr Warning: No file main.tex....
user avatar
  • 44.9k
2 votes

Warning in arxiv compilation: LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right

TLDR: This is a class of warning that can always be ignored in the first run. arXiv processes a minimum of twice (if the first pass is successful), and maximally 4 times. This warning will always ...
user avatar
  • 718
3 votes
Accepted

How to separate between the reference of figure and subfigure?

Reference: https://tex.stackexchange.com/a/423080/133968 \documentclass[10pt]{article} \usepackage{caption,subcaption} \usepackage{cleveref} \usepackage{graphicx} \makeatletter \renewcommand{\p@...
user avatar
  • 363
1 vote
Accepted

How to reference an url on a frame in a beamer environment

You can add a link in the caption to the \item with the url \documentclass[xcolor=dvipsnames]{beamer} \hypersetup{% colorlinks=true, linkcolor=blue, urlcolor=magenta, } \begin{...
user avatar
  • 25.9k
2 votes
Accepted

Including parentheses in link to equation

Rather than reinvent the proverbial wheel, I would like to suggest that you (a) load the cleveref package with the options nameinlink and noabbrev and (b) use \labelcref and \cref to generate cross-...
user avatar
  • 439k
1 vote

How to make the references appear in order in LaTeX?

The comment thread has gotten entirely too long … I am posting an example of what I think you might be wanting, even though it's impossible to tell without a proper MWE: \documentclass{article} % ...
user avatar
  • 5,340
3 votes

How to add a hint (arrow up/down) at the reference for direction in which to look for the referenced figure/float?

This approach is not foolproof and, at best, can only work if one use [ht] positioning of one's figures. What it does is use up/down arrows to indicate whether a \label has already been defined or ...
user avatar
1 vote

Arabic numbers for theorem, Roman numbers for \phantomsection in theorem

\phantomsection has nothing to do with a section, it only sets an anonymous anchor. The printed layout of your label depends only on the position of the \label. You can get your wanted output by ...
user avatar
2 votes
Accepted

Arabic numbers for theorem, Roman numbers for \phantomsection in theorem

A \label generally refers to the last counter to which \refstepcounter has been applied in the same scope. Issuing \label far away from the place where a counter has been “refstepped” is usually not ...
user avatar
  • 992k
1 vote

Arabic numbers for theorem, Roman numbers for \phantomsection in theorem

I take it that your real objective is to make a given inline formula into a hypertarget, so that readers can "jump" to that formula from elsewhere in the document by "clicking" on ...
user avatar
  • 439k
6 votes

Why is there a space before the last full stop in the citation?

Never trust Google Scholar for BibTeX data. The article you're citing is not in a journal, but in a collection. You find it here Here's a better BibTeX entry: \begin{filecontents*}{\jobname.bib} @...
user avatar
  • 992k
0 votes

How can I use a label (produced by \ref) as URL in hyperref's \href?

Thanks to Ulrich's answer I was able to find the very answer to my question which I'll write down here for my own reference and for others who are looking for exactly this without distractions: The ...
user avatar
  • 145
1 vote
Accepted

How can I use a label (produced by \ref) as URL in hyperref's \href?

I suggest using a .bib-file and biblatex. If you don't like to maintain two files containing source of input, you can maintain the .bib-file within the .tex-file by means of a filecontents*-...
user avatar
  • 23.4k
2 votes
Accepted

How can I access the name of the label of the current bibitem?

You can modify \bibitem to save its argument for later usage in the same item. \documentclass{article} \makeatletter % Define the label #1 to be #2 (so \ref{X} gives Y): \newcommand{\LABEL}[2]{\...
user avatar
  • 992k
2 votes
Accepted

Cleveref and Algorithm2e: typesetting procedure name

You can do \crefalias besides changing the counter. \documentclass{article} \usepackage[ruled,procnumbered]{algorithm2e} \usepackage{cleveref} \newcounter{procedure} \makeatletter % https://tex....
user avatar
  • 992k

Top 50 recent answers are included