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 [ref]

The tag has no usage guidance.

0
votes
1answer
21 views

Problem with \ContinuedFloat subfigs

I am trying to have multiple tabulars as subfloats using the subfig package and the table environment. Adding another table environment and binding them with \ContinuedFloat and stopping the table-...
1
vote
1answer
29 views

Wrong hyperref with repeated counter

I'm having an interesting problem with hyperref. Apparently, when a counter is reset by \setcounter{mycounter}{0} then hyperref always links to the first possible instance of the counter and not the ...
0
votes
0answers
42 views

Why \ref displays the label itself rather than the number

I met a strange problem. If a have a label \label{fig:Name}. The cross referencing code \ref{fig:Name} cannot show the proper number. 1 for example, but the label fig:Name itself. And the label is ...
1
vote
1answer
55 views

reference to a \section*{}

I need to answer my assignment in latex with a Assignment 1a Assignment 1b Assignment 1c Assignment 2a Assignment 2b I have tried to use the \section*{}, but referencing then doesn't work. Is ...
3
votes
2answers
144 views

Table mislabeled as figure

I have an image and a table and they need to appear in the same page. The way I'm doing that right now is by wrapping them both in a figure. The problem I'm having is I'm trying to reference the table ...
1
vote
1answer
35 views

How to use \refstepcounter correctly in attempt to implement subfigures?

Trying to use space on a page more economically, I developed the idea to arrange graphics as a table being part of a figure. As I still wanted to refer to individual graphics, I also wanted to have ...
2
votes
1answer
29 views

\autoref and subequations

I have an issue with \autoref and the subequations environment. I have added the () around the equation reference of \autoref (as explained here) and it works fine with normal equations. On the other ...
1
vote
1answer
27 views

Including a pdf into latex and reference it

A friend recommended me to use elsarticle for a report, which I am currently doing. Now I need to add an external pdf which contains a figure. Adding the figure works fine, but I wonder if I can ...
3
votes
1answer
34 views

How to use \ref Inside lstlistings

How can I use \ref inside lstlisting. I create two lstlistings, e.g. listing1 and listing2. Now, in the third lstlisting, I want to give a reference to them. But when I do, I do not get the ...
2
votes
1answer
29 views

Doc-Start appearing when using xr package

I am trying to write up an article that uses the xr package (or maybe it needs to be zref) to reference labels in two different documents: an article and a beamer presentation. The references from ...
0
votes
0answers
14 views

Expand references to implicit local paragraph and line numbers

I just submitted a revised manuscript to a journal that demanded a list of locations in which the manuscript had been changed. It did not allow visible line numbers to be typeset on every page—...
0
votes
0answers
26 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} \...
0
votes
2answers
100 views

Why does a figure get numbered once with Arabic and once with Roman numerals--when the same command is used?

This seems rather bizarre. I use the same command Fig.~\ref{fig:twoqubitplot} twice in my LaTeX overleaf.com document. In the output, once I get Fig. 2 and once Fig. II. Mico asked for a minimum ...
0
votes
0answers
20 views

appear the word “Lemma ” automatically [duplicate]

If we want to refer to "Lemma 3.4", we can write " Lemma \ref{number9}". Is there a command that the word "Lemma" or "Theorem" or ... appear automatic too? (i.e we write ... and in pdf appear "Lemma ...
0
votes
0answers
29 views

Reference in latex document to Matplotlib(pgf) generated figure

I have a python script which draws a plot similar to this: fig = plt.figure() ax = plt.axes() x = np.linspace(-2,2,10) y = x**2 ax.plot(x, y, label='$x^2$', color="#07529a", linewidth=2.0) # <--...
0
votes
0answers
66 views

Reference 'fig:01_01' on page 1 undefined

I'm writing my thesis and I've founded some problems with refer a figure. For example, in the below code, I have a main.tex and I call other chapters with input or include (e.g. ch1). In the "ch1" I ...
0
votes
0answers
16 views

How do we get figure references to not render as “??” [duplicate]

Below is some source code for a short/brief document. When I compile the short document document only once, the source code \ref{figure:FORMULA:anatomy} becomes ?? in the pdf. If I run PDFLaTeX a ...
1
vote
1answer
34 views

Macro to add to a \ref number - broken by babel package

I need to add an integer to a reference number. For context, suppose I have a list of exercises where the first has \label{exr:thisone} (let's say it's number 6) and then I want to say something like "...
6
votes
1answer
135 views

Cyrilic characters in \label and \ref in pdflatex

I want to write \label and \ref with Cyrillic(Russian) characters in pdflatex. \usepackage[russian]{babel} in preamble. I tried \label{\detokenize{}}, but it doesn't work. \documentclass[a4paper,...
2
votes
1answer
60 views

Font style in ref and autoref

I'd like to use both \autoref and \ref, so when enumerating references in the text I can get something like "Ecuaciones 1 y 2" (with Ecuación 1 being a link inserted by \autoref and 2 a link inserted ...
3
votes
1answer
39 views

Use same reference count for lstlisting and figure/graphics

I have the following code on overleaf: \begin{lstlisting}[caption={Código inicial para o sistema de arquivos},label={lst:Figura1}] abstract sig FSObject { } sig File, Dir extends FSObject { } sig ...
3
votes
2answers
45 views

How can I temporarily replace 'and' with 'or' when using `\cref` command?

The code below generates correct output. However, I would like to know how I can temporarily replace every instance of 'and' with 'or' just for specific instances of \cref usage. I included xcolor and ...
2
votes
1answer
51 views

\footnoteref (= modified \footnotemark) works perfectly fine *outside* of chapters but not within them

Because I need a reference to the same footnote, I like to use \footnoteref which is defined here. Writing \documentclass[12pt,a4paper]{report} \usepackage[british]{babel} \usepackage[utf8]{inputenc}...
0
votes
1answer
34 views

Separate labels in dcases lines and then reference to them [duplicate]

I use of mathtools package and dcases environment. Ideally, I would like to be able to write something like below: ‎\documentclass[12pt,a4paper]{article}‎ ‎\usepackage{amsthm,amssymb,amsmath,mathrsfs}...
1
vote
1answer
59 views

Change font of theoremref from italic to normal

I'm using the theoremref package. Some of my sections are numbered with letters, i.e. A, B, C, ... instead of 1, 2, 3, ... If there is a theorem in, e.g., section A \begin{Theorem}\thlabel{theo} \...
5
votes
2answers
116 views

Indications for improving the numbering of equations contained in a system

As you can easily see from the attached image and code, I numbered each equation manually using \textbf. How do you have to proceed to have a correct automatic numbering of this type with a correct ...
1
vote
1answer
67 views

how to add references (basic)

This may seem an easy problem to you but for me I am struggling with it!.I need a little help with adding references in my report. I am able to compile and get a pdf doc but my problem is how to cite. ...
3
votes
1answer
58 views

how to label and refer subfigures under tabular environment?

I have two subfigures and I need to refer them in text such as Fig. 1.1(a) and Fig. 1.1(a) using Fig. \ref{fig1.1a:chap1} and Fig. \ref{fig1.1b:chap1}. The output is not coming. Instead, a double ...
1
vote
1answer
37 views

how to use \href or \ref for creating a link within the document

I would like that when I click the word 'universe' in the following MWE, it takes me to Fig of duck. How can that be done? \documentclass[]{report} \usepackage[]{graphicx} \usepackage{chngcntr} ...
1
vote
1answer
44 views

Conditionals that use \ref

Consider the following minimal example: \documentclass[a4paper,12pt]{article} \begin{document} \section{First Section}\label{sect_1} Question: Is this Section \ref{sect_1}? IFX Answer: \ifx\ref{...
3
votes
3answers
116 views

add a label to a AtBeginSection slide

I would like to put a \ref to one of the slides created with \AtBeginSection, is that possible? In more detail, I abuse \setbeamertemplate{background canvas}{% \hspace{.8\textwidth}\includegraphics[...
3
votes
2answers
108 views

My own ref command

I would like to make my own \ref system. I wrote \Problem command to denote the serial number and title. I want a new \myref command which yields the number and title by referencing the label. Could ...
2
votes
1answer
61 views

how not to affect \ref by hyperref [closed]

This script \documentclass{article} \usepackage{hyperref} \begin{document} We use this equation \begin{equation} c=\frac{a}{b} \label{eq:frac} \end{equation} Equation \ref{eq:frac} can be seen ...
4
votes
2answers
144 views

Custom label for references using tasks inside a xsim exercise

In order to create an assignment sheet, I am using the xsim package and to create subquestions within a question, I use the package tasks. The problem comes while referring to the subquestions. ...
1
vote
2answers
521 views

Why table reference numbers are incorrect? [duplicate]

The code below shows in the caption "table 1", which is correct, but in the text reference, it shows "table 2". How can I fix that? \documentclass[]{article} \begin{document} \section{Description} \...
3
votes
1answer
122 views

Update counter in label for newcommand

I am trying to create a new section that automatically updates the counter with relevant label. newcommand-stepcounter sort of does what I am trying to do , but not quite. When I use the code below, ...
0
votes
1answer
38 views

\ref jumps not to the right figure in appendix

I renewcommand the numbering for my tables and figures in my appendix. But when I use the ref command in the text, it doesnt jump to the right figure in the appendix. For example I have figure 1 in my ...
2
votes
2answers
129 views

Label names not with leading number

I am currently working on a a documentation for some benchmark libraries for MIP solvers. This includes a description for every problem type. e.g. for binpacking I have \section{Bin Packing Problem}\...
1
vote
1answer
54 views

Appendix Figures cited 'Appendix .II'

I am trying to cite my Appendix figures using the \ref command, but for some reason it displays the citations as " Appendix .I", I would like to remove the full stop before the number. Any idea how ...
0
votes
0answers
31 views

Order appendix as in occurence in text

I'm writing a paper and want to attach an appendix. The appendix will contain several subsections, that I want to refer to individually. The appendix should be ordered as the sections are referred to ...
0
votes
1answer
204 views

autoref for subsection

When I use autoref for subsection, I want the in-text to be section 1.1 instead of subsection 1.1. How to do that. I tried to write it with ref as: section \ref{sec:subsection} But the problem is ...
0
votes
1answer
117 views

remove reference title when using \usepackage{apacite}

I am using the {apacite} package for referencing, however I would like to remove the title 'reference' which is auto input my {apacite} so that I can create a section called REFERENCES and have it ...
4
votes
1answer
378 views

About reference to enumii

I have the following MWE: \documentclass[12pt]{article} \usepackage{amssymb,amsmath,amsthm} \renewcommand{\theenumi}{\roman{enumi}} \renewcommand{\labelenumi}{(\theenumi)} \renewcommand{\theenumii}{...
0
votes
0answers
27 views

Number Lemmas based on when they are referenced in text

I'm currently writing my thesis, and I have Lemmas in the main text as well as the appendix. Lemmas are numbered based on their order in the text, therefore all Lemmas in the main text are numbered ...
1
vote
0answers
31 views

Referencing an item within an algorithm box

At the moment I am using a reference to an enumeration within an algorithm box. However, the reference only shows the number of the enumeration but nothing of the algorithm. How can I put the number ...
0
votes
1answer
65 views

hyperlink the pre-label instead of only the number

I'm trying to get the "Figure 1" in hyperlink and not only the number. I tried to use \ref and \nameref but it appear only the 1 or the full caption instead of figure 1 only in example: \begin{...
0
votes
0answers
17 views

Reference in the same style for section and appendix

I have a small macro when referencing a section/appendix: \newcommand{\secref}[1]{Sec.~\ref{#1}} Now, when referencing a section, it works just fine and puts something like Sec. 2.5. When ...
0
votes
1answer
32 views

\ref{nametable} inside \caption doesn't work

I have already searched in the forum but also in similar questions I have not found solutions that work for my case. I'm working with \documentclass[italian,11pt,a4paper]{article} and I have a \ref{} ...
2
votes
2answers
43 views

Configuring \ref for different levels of enumerate environment

The standard behavior for the \ref command in a layered enumerate environment creates references with this structure: enumi_label.enumii_label. I would like to configure the \ref command so that the ...
1
vote
2answers
1k views

Problem with label and references and subfig/subcaption

Dear stackexchange users, I want to use subfigures in my document but the solution I got so far scrambles my ability to use labels and references in my documents. \documentclass{scrartcl} \...