Stack Exchange Network

Stack Exchange network consists of 174 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
0answers
9 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) # <--...
1
vote
0answers
16 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
29 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
118 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
39 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
33 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
32 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 ...
1
vote
1answer
38 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
19 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
51 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
96 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
40 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
45 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
29 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
43 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
82 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
72 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
60 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
113 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
153 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
84 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
26 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
122 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
26 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
20 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
114 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
57 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
232 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
26 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
0answers
26 views

How to adopt the ieeeannot.bst to show the bib entry ordering chronologically?

I was trying to adapt the IEEEannot.bst to show the abstract from the entry in the references section. Now the entries in the references are not sorted chronologically. References are ordered ...
0
votes
1answer
53 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
15 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
24 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
25 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
343 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} \...
1
vote
1answer
34 views

Reference to wrong appendix

In my report I have quite a lot of appendices (pdf's). I want to refer to them as A.1, A.2.....and so on It all works fine for A , B and C, but when i refer to any appendix under C, the refrence in ...
2
votes
1answer
55 views

hidden/invisible ref?

I am writing a textbook which I want to be consistent. Sometimes I do not refer to a statement explicitly, but I want to add an invisible reference, so if latter I will decide to delete the ...
0
votes
1answer
166 views

I don't know how to use \ref [duplicate]

I want know how to use \ref. I don't know why it doesn't work. \documentclass[11pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \...
3
votes
1answer
68 views

Is there any package where the reference writes the equation?

Just a question for knowledge. I would like to know if there is a package that by doing a label of a equation and referring to it with \eqref of whatever command it is, that equation appears ...
0
votes
0answers
10 views

referencing figure does not work tried a few things [duplicate]

In most of my document the referencing of figure doesn't work. I am not sure what I am doing wrong I have tried ~\ref and \ref but I just get ?? \begin{figure}[h!] \label{fig:tcshock} \centering \...
0
votes
0answers
69 views

Autoref returns mispelled section in Portuguese

When using autoref on a section like \autoref{sec:sample}, in Portuguese, it should return: Secção 1 And instead it returns Seção 1 Secção is used on Portuguese while Seção is used on ...
0
votes
0answers
71 views

How do i reference a variable?

I am using XeTeX. I have something like this \newcommand{\refname}{name1} ... \label{\refname} ... \ref{\refname} ... \renewcommand{\refname}{name2} ... \label{\refname} ... \ref{\refname} The ...
4
votes
1answer
102 views

Custom definition of \ref causes problem inside argument of \caption

I am trying to implement a custom version of the \ref command. I found out that in order for me being able to redefine this command I need to do so via \AtBeginDocument as otherwise my change seemed ...
1
vote
0answers
38 views

Conditional pageref for labels that are in another section and on a page far away

Currently I am experimenting with the cleverref and the varioref package. These packages are great, however, I would like to have a reference command with the following subtle behavior: If the label ...
1
vote
1answer
42 views

Changing footnote symbol breaks \ref

I am using XeLaTex and the Memoir class. I redefined the footnote symbols like this: \renewcommand{\thefootnote}{{\ding{\numexpr171+\value{footnote}}}} However, this breaks the \ref number when I ...
1
vote
1answer
41 views

Labels for Each plot PGFplots

Given the following Graph: \begin{tikzpicture} \begin{axis}[ybar, xticklabels={{Less Than 100 Bytes}, {100-1000 Bytes}, {1000-10000 Bytes}, {Greater than 10000 Bytes}}, xtick = {2, 4, 6, 8}, ...
3
votes
2answers
147 views

How do I change the numbering in inner \item?

\documentclass[a4paper,11pt]{report} \usepackage{enumitem} \renewcommand{\labelenumi}{\bf Matter \arabic{enumi}.} \renewcommand{\labelenumii}{\bf Matter \arabic{enumi}.\arabic{enumii}.} \begin{...
1
vote
1answer
78 views

Label inside of \newtcbinputlisting giving incorrect ref number

In the code below, I am trying to reference some matlab code that is written using a \newtcbinputlisting environment. When I attach a label to the code, the reference number come in as "1" or "a)" or ...