Questions tagged [ref]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

“~” operator functionality in LaTeX [duplicate]

I was curious to figure out what the purpose of using "~" operator in Latex is. I noticed the following piece of code which stated: Figure~\ref{fig:x} However, if you had to, for example, ...
0
votes
0answers
15 views

Cross referencing sections one number off

I'm having trouble with cross referencing to (sub)sections. Each time I refer to a certain subsection in my text (e.g. Article 2. Second title), the compiled pdf doesn't refer to '2' but to '1'. In ...
1
vote
2answers
31 views

Hide appendix subsections from toc while keeping the reference

I would like my table of contents to show both sections and subsections for the main content but only sections for the appendices. I can achieve this with \setcounter{tocdepth}{2} and then using a ...
1
vote
0answers
43 views

Define a custom counter with optional textual postfix annotation useable in crossreferencing

Question summery: How to change my implementation, that counter can print 1.1 , 1.2a, 1.2b , 1.3 where the number before the point is the section number an the part after the point is a own counter? ...
0
votes
0answers
18 views

What are refhg, refmark, refhgb?

This question has this code block: \setlength{\textwidth}{6.5in} \setlength{\textheight}{8.5in} \def\refhg{\hangindent=20pt\hangafter=1} \def\refmark{\par\vskip 2mm\noindent\refhg} \def\refhg{\...
0
votes
1answer
28 views

Making categories of \ref to colour them differently?

It is possible to define particular category of \ref{} and then set colour for that particular category across the entire document? Currently, all my citations are blue, which is fine. I have cross ...
1
vote
0answers
39 views

Trouble With \ref{ }'ing (Equation Numbers In Margins). Also Vertical Spacing Issues

I'm using a macro which takes equation, puts a * after it, suppressing the equation number, then using \stepcounter{equation}, and \marginpar{\centering(\theequation)} which puts the equation number ...
1
vote
1answer
48 views

use \cref within enumerate and theorem

I want to reference a certain part of a definition, which is separated using the enumerate environment. In a MWE I have \documentclass[a4paper,12pt,oneside]{scrbook} \usepackage{amsthm} \usepackage[...
0
votes
1answer
28 views

Labeling sentences and words

Is there an easy way to label a sentence or a word inside a document to reference it somewhere else, something like an internal, invisible label? I mean I could also put it into a subsection and write ...
0
votes
2answers
46 views

Use of ref/label: Also linking word before label number

Is it somehow possible that I can extend the link to something which I produce by using \ref with a label by the word standing before \ref? If I write something like that: For further information, ...
0
votes
0answers
25 views

Defining a new example environment and giving reference it

How to give cross-reference to all words, Example 1, as follows? I defined a new environment as follows: \newtheorem{exmp}{Example} When I give a \label{Example} to the example and write \ref{Example}...
1
vote
2answers
28 views

Create numbered footnote, but no reference in document

I want to create a footnote with a specific number, but with no reference in the text. The reason is because I am attaching an image in which I've put a footnote citation, but I don't know how to add ...
2
votes
2answers
61 views

hyperref display problem

I am currently having a problem with the \usepackage{hyperref} in my file. Here are my settings \documentclass[11pt,a4paper]{article} \usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm]{geometry} %pour ...
0
votes
1answer
41 views

How to label a figure outside of the float environment? [duplicate]

I am trying to label a figure outside of the float environment. I am using the command \label{} and \ref{}. Unfortunately, Latex does print the correct number of the figure. Does someone know how to ...
2
votes
1answer
28 views

Problem with ref and box of theorem

Dear all I have a problem when \label and \ref as it is in this minimal example please help me \documentclass[12pt,a4paper,openany]{book} %------------------------------------------------------- \...
4
votes
1answer
38 views

Let a macro check for references in its input

I want to write a macro that checks whether there are undefined references in the input and if so omits producing anything. I'd like to work it like this: \begin{document} some text... \defref{We will ...
0
votes
0answers
20 views

ULR Reference in latex appear fist

The right position of my reference must appear as [1], but it appears [4]. And the reference of URL online appears as [1] my bibtex file ordered as appearance and bibliography style is {unsrt}.
2
votes
2answers
43 views

Customizing font style for numbering and referencing equations

I'm typesetting a bunch of proofs and I want to follow a convention that whenever I introduce a premise it is numbered using a bold font (e.g. (1)), but then when I reference it in text it is written ...
1
vote
1answer
39 views

\ref command not working in the argument of redefined section/subsection command (UAI template)

So I used this template from this UAI conference https://auai.org/uai2021/submission_instructions.php I found that the \section{\ref{some_label}} or \subsection{\ref{some_label}} are only compiled to ...
4
votes
1answer
86 views

There is a space between label and punctuation/comma when I used \ref{label} command

I am writing a thesis using my institution's template. However, when I use \ref{label} command, there is a spacing after the label and punctuation/comma. My working is as follows: \makeatletter \let\...
1
vote
0answers
25 views

How to make in RevTex format a reference for a specific word?

Hi I'm using a RevTex template and I would like to create a reference for a single word for instance 'molecule'. So i would like to use the reference for this word everytime I should write the word ...
0
votes
0answers
33 views

ref and cref point to page of label, not label

I have the case that \ref (also \cref) point to the page of the label, but not directly the label. How can I make it point to the label directly? Example which uses the ICML 2021 template: \...
1
vote
1answer
23 views

How to include the name of the label on \ref?

Usually when i use \ref for referring a figure, table, and equation, i only get the number. I mean, the only clickable part and shown on the document is the number. I want to include the name of the ...
0
votes
1answer
17 views

How can I reference to an Algorithm employed in figure environment in latex? When I'm using \ref{} , latex does not know its associated label

\documentclass[twocolumn]{autart} \usepackage{algpseudocode} \usepackage{algorithm} \usepackage{amsmath} \usepackage{graphicx} \begin{document} \begin{figure} \label{Fig1} \begin{...
0
votes
1answer
38 views

\label inside \caption throws an error. If after the \caption, references to it point to the section instead of the figure number

I am using the tufte-book document class to compose a document in Overleaf. I was getting an issue where when I referenced figures. Instead of \ref{} giving me the number for the figure itself, it ...
1
vote
1answer
33 views

Display the title of a section (or subsection) in a reference [duplicate]

I understood how to use \ label {} and \ ref} to get the number of a section or subsection. I would like to know if it was possible to also obtain the title of a section or sub-section. For example (...
0
votes
1answer
42 views

How to remove extra space between the \ref and text

How to remove extra spaces between \ref{...} and text? This is the example: \begin{table} \begin{center} \caption{Some text\label{tab1}} \begin{tabular*}{500pt}{@{\extracolsep\fill}lccD{.}{.}{3}c@{\...
0
votes
0answers
18 views

How to label multiple paragraph of texts, then \ref it in another document?

As the title said, I want to make some texts (at least 2 paragraphs) labeled (or any way like that), and then, I need to exactly "reproduce" (for now I use \ref) its appearance in the first ...
0
votes
1answer
31 views

How to modify the contents of a reference, i.e. the output of \ref

I would like to add some text to what outputs \ref. So for example, instead of Sec. 2, I would have Sec. @2@. For some reason, simply redefining \ref: \let\oldref\ref \renewcommand{\ref}[1]{$@$\oldref{...
0
votes
0answers
40 views

Cross reference .xlsx file to main.tex

I have .xlsx file and I need to reference it in main.tex with \ref{}. Is there a way to do that?
0
votes
1answer
34 views

Create a label if reference undefined, else reference it (unique label)

I'm trying to label items on a table. In my use, multiple labels may exist, so the initial location of the creation of the label is irrelevant (not trying to hyperlink). I want to use one command that ...
2
votes
1answer
44 views

Including references in a tokenlist using expl3

I am trying to create a document with math exercises, for each math exercise one or more hints are given that should be show in a later section. From the inserted hints it should be possible to jump ...
1
vote
1answer
21 views

TeXmaker doesn't show subfigure's reference number

I am running a main.tex file in which I use the \input{} command for my subfiles: subfile1.tex, ... Now, I have some figures in my subfiles, say subfile1.tex, and I want to insert a reference to that ...
1
vote
1answer
17 views

How to use \ref{} command with a list of figures? [duplicate]

I need to use \ref{} command with a list of figures. So, instead of using the command multiple times as follows: Figures \ref{fig:1}, \ref{fig:2}, and \ref{fig:3} %the output will be Figures 1,2 and 3....
0
votes
0answers
16 views

How to edit my bibliography (Reference) style so no “In” appear before name of journal, [duplicate]

I'm new here I would really like to know how can I edit my bibliography to appear with no "in" before the names of journals as can be seen here: Best regards, Lital
0
votes
0answers
29 views

Referencing Table Rows

I have a table in my file, replicated here without the real content. I've been trying to reference it (using Overleaf) but keep getting [??]s, can anyone see the problem? \usepackage{xcolor} \...
0
votes
0answers
18 views

What is the 'correct way' (from the compiler's point of view) for starting a line with a \ref{}?

I write tex in vim and have an automatic linter. I write sentences in the same paragraph on separate lines (for clarity and version control) and I often want to use a \ref{} like a name to begin a ...
0
votes
1answer
15 views

How could I “adjust” (in authomatic way) the way in which a reference to an appendix result appears? Could that be customized? (A.1 vs 1)

In the following lines of code (a MWE), I intend to have appendix results named like A.1, A.2, etc. (see line "\newtheorem{APP.}{A.}"). \documentclass[12pt,oneside,english]{report} \...
0
votes
1answer
34 views

Usage of hyperref, varioref and cleveref creates bug

Not really a question, more of a bug I seemed to have found and fixed. Consider the minimal code below. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{...
2
votes
3answers
189 views

Receiving a wrong output from \ref when \ContinuedFloat is involved

I get my custom numbering scheme in captions in the following form: Figure A.1.5 the "5" is the chapter counter, the "1" is the figure counter, and the "A" is the ...
0
votes
1answer
66 views

tikz-plot label and ref in beamer inside only overlay

MWE: \documentclass{beamer} \usepackage{pgfplots, pgfplotstable,stackengine} \begin{document} \begin{frame}{Frame Title} \only<1>{} \only<2>{ \begin{tikzpicture} \begin{axis} \...
0
votes
0answers
16 views

Insert figure automatically at first \ref (not at declaration)

I have inherited a long document with a high density of figures. As I am going through the editing process, I noticed that it is prone to producing errors with respect to the position and sequence of ...
0
votes
2answers
37 views

out of order table of contents entries with pdfpages

currently i am in a situation where i have inserted some pages via includepdf, followed by additional \includepdf calls that use the addtotoc function, as follows: \includepdf{pdffile1} \includepdf{...
0
votes
1answer
52 views

linking specific page of document with pdfpages' linktotoc option

i am wondering if there is an easy way to link a specific page of a document added via pdfpages. for example if i have: \includepdf[addtotoc={1, section, 1, sectionname, sectionlabel, ...
1
vote
1answer
19 views

Restatable Does not Show Theorem Number

I learned about restatable from this answer. However, when I put the theorem in the appendix, its reference does not have a number. Here is a MWE: \documentclass{amsart} \usepackage{thmtools} \...
0
votes
0answers
37 views

How to use -cd label in latexmkrc when “No file C1.aux LABELS NOT IMPORTED.” error occured

I just get No file C1.aux LABELS NOT IMPORTED. error when I try to use \usepackage[subpreambles=true]{standalone} and \externaldocument{C1} commands, in order to quote from another latex files. I'm ...
0
votes
2answers
144 views

Non-breaking space (`~') should have been used in table

I am making a table with \ref{key} as only content in the first column. I am dynamically referring to item numbers in an \enumerate{}. CHKTeX gives me the warning Non-breaking space (`~') should have ...
0
votes
0answers
102 views

Color stack action is missing & Missing number, treated as zero

I am writing my thesis and I have roughly a lot of packages that were used during my research. Which could confuse the latex? I got a number of errors, and references do not show up. Package ...
0
votes
0answers
35 views

Custom Algorithm Environment - Automatically Inserting a Caption causes \ref to refer to the line number instead of algorithm number

I have a custom environment using xparse which I am using for pseudocode. \NewDocumentEnvironment{MyFunc}{o m o g d<> o} { \IfValueTF{#1}{\begin{algorithm}[#1]}{\begin{algorithm}[ht]} \...
0
votes
1answer
48 views

Referencing a Figure from an Appendix in the main text so that it includes the Appendix letter and figure number

I am referencing a figure from an Appendix in my main text, but I would like the reference to show the Appendix letter and figure number if it referencing a figure in the Appendix. For example, right ...