# Tag Info

## New answers tagged cross-referencing

2

The ieeetr bibliography style dates back to the early 1980s. It's almost as old as very first version of LaTeX. As such, it no longer represents the current IEEE reference guide for how bibliographic entries should be formatted. What to do? Very easy: switch to the IEEEtran bibliography style. Observe that the pages field is placed after the year field. \...

1

Well, simply add an new label after the closing } for the while loop: \label{alg:endWhile} and add an label \label{alg:startWhile} for the start of the while loop ... So with the following mwe \documentclass{article} \usepackage[linesnumbered]{algorithm2e} \begin{document} Reference to Lines~\ref{alg:taskA}--\ref{alg:taskC}. How do I achieve a ...

0

Hi I suggest you to use MathJax option instead of svg option in lwarp, which is supported in most of the explorers. I tried, and it works pretty well with math formulas.

0

This is a fixed version of tim6her's answer . The problem in that answer is that \creflabelformat{listthm}{#2\thethm.#1#3} doesn't take the thm counter from the label, instead it uses the value of the thm counter that is current when \cref is called. The fix proposed below consists in setting ref=\thethm.(\roman{thmlisti}) in the \setlist[thmlist]{...} ...

3

You can use the following (I came to the same conclusion as Ulrike Fischer: the original code doesn't take the thm counter from the label, instead it uses the value of the thm counter that is current when \cref is called). The theorem number to use in references can be set with ref=\thethm.(\roman{thmlisti}) in the \setlist[thmlist]{...} command related to ...

3

You need two labels for this, one for the number and one for the destination. You can then use \hyperref to setup the link. \documentclass[a4paper,12pt]{amsart} \usepackage[utf8]{inputenc} \usepackage{nameref,hyperref} \hyperbaseurl{.} \usepackage[capitalize]{cleveref} \usepackage{enumitem} \usepackage{amsmath,amscd,amssymb,...

1

LaTeX has no direct way of "knowing" that the graph shown in the subfigure that's numbered "1a" gets repeated in the subfigure that's numbered "2b". For sure, it's not a good idea to employ non-unique \label directives. LaTeX issues the warning message LaTeX Warning: There were multiply-defined labels when it encounters, well, multiply-defined labels. ...

2

The functionality you're looking may be obtained in a straightforward fashion by loading the varioref, hyperref, and cleveref packages -- in this order. Then, \vref{eq:1} produces equation (1) if the cross-referencing call-out (produced by \vref) and the object being cross-referenced (here, an equation numbered (1)) are both on the same page; equation (1)...

1

answer based on Test equality between number of the current page and the one of one reference indicated \documentclass{book} \usepackage{amsmath} \usepackage{nameref} \usepackage[unicode,pdfpagelabels]{hyperref} \usepackage{ifthen} \usepackage{refcount} \newcounter{sp} \newcommand{\myautoref}[1]{% \stepcounter{sp}\label{sp-\thesp}% \autoref{#1}% ...

4

To reset a document completely, it is always necessary, to delete all the temporary files in the folder (basically everything, which is not the .tex-file), where you compile the document! There are some lists, that LaTeX reuses, which might cause the problem in your case.

0

This should work: \externaldocument[someprefix-]{../folder-2/file-2} Notice: Do not include the .tex extension.

4

with unicode-math \symbf selects a bold from the same font and as in classic latex \boldmath switches all math for to a bold font if it is available. Currently however there are not many bold unicode math fonts available and so you are limited to the bold math alphabet within the main font. \documentclass{article} \usepackage{amsmath, amsthm, amssymb, ...

0

This will give bold math: \documentclass{article} \usepackage{amsmath, amsthm, amssymb, mathtools, thmtools, unicode-math} \usepackage{hyperref, cleveref} \begin{document} $$\label{eq:my-equation} \pmb{x=y}$$ {\bfseries(\ref{eq:my-equation})} \end{document}

2

You need to execute the \declaretheorem statements after loading cleveref. Everything else about your setup is fine. ... \usepackage{thmtools} \usepackage{hyperref} \usepackage[capitalise,noabbrev]{cleveref} \declaretheorem[numberwithin=chapter,name=Theorem, refname={theorem,theorems}, Refname={Theorem,Theorems}]{theorem} \declaretheorem[numberlike=...

0

There's also the simple \label-\ref system combined with the optional example label (\ex.[]). \label right after the dot, and \ref in square brackets. Here also illustrated for sub-examples. \documentclass{article} \usepackage{linguex} \begin{document} \ex. Some text \ex. Some text \ex.\label{ex:aa} Some text (example number to be remembered: \ref{ex:...

0

The name of a cross-referencing-label is something that in LaTeX comes into being during the process of writing/creating/preparing the .tex-input-file. Unlike the program MS-Word, which also intervenes during the stage of writing/creating/preparing the input-file/the .doc(x)-file, the program (La)TeX comes into action when the .tex-input-file is already ...

2

You also get on the terminal and in the .log-file some error-messages of the pattern: pdfTeX warning (ext4): destination with the same identifier (name{cp.1}) has been already used, duplicate ignored The reason is within the ending-part of your computaion-environment the line \setcounter{cp}{0} : When \rcp is carried out, \refstepcounter{cp} is ...

0

The specification is quite bizarre: if a section is numbered “I” (with a Roman numeral), also cross-references should follow the scheme. Anyway, it is quite easy to provide the required numbering scheme, because IEEEtran detaches title numbering from the related counter's representation: for the numbering of \section it uses \thesectiondis. Thus the ...

0

The following minimal example updates \refstepcounter in a way that re-stores \@currentlabel using \arabic rather than \Roman specifically when the section counter is being stepped. Both \subsections and \subsubsections require similar treatment and have been added as well. \documentclass[journal]{IEEEtran} \makeatletter \let\oldrefstepcounter\...

0

The first two lines of the preamble snippet will produce the error ! LaTeX Error: Option clash for package biblatex. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. This is the typical message you get when you load a package twice with conflicting options. In general it is best to avoid loading packages ...

1


3

\documentclass{report} \usepackage{etoolbox} \makeatletter \patchcmd\@makechapterhead{\thechapter}{\thechapter.}{}{\fail} \patchcmd\@seccntformat{\csname the#1\endcsname}{\csname the#1\endcsname.}{}{\fail} \makeatother \begin{document} \chapter{chapter}\label{chap} \section{section}\label{sec} \ref{chap}, \ref{sec} \end{document}

1

Really, it seems almost impossible to safely nest pgfpictures (as is clearly stated everywhere). So I implemented a different strategy that you can see in this answer to the original question: https://tex.stackexchange.com/a/496665/38080 old answer: works sometime Ok --- I simplified the wonderful @marmot answer ... here is a small package: warning: it ...

2

With the subfig package, the default numbering system for subfigure items uses lowercase alphabetic characters, e.g., (a), (b), etc. In contrast, your document appears to use (A), (B), etc to "number" consecutive subfigure items within a given figure. Put differently, your document must contain some subfig-relevant code that you didn't mention in your query. ...

4

The following should do what you want (thanks to Ulrike Fischer for her useful comments!). I used (n--p) style for ranges, but switching to (n-p) style or something similar if you prefer is trivial (just look at \__cis_output_parnum_range:nn: this is the function doing the formatting of parnum info; it should be fairly easy to modify for this kind of change)....

3

I suppose you could achieve your desired output simply by writing (Eq.~\ref{eq5}), right? Before I delve into alternative suggestions, I would like provide an excerpt from the user guide of the cleveref package (cf p. 4, fn. 2). In a related context, Toby Cubitt (the author and maintainer of the cleveref package) writes that Trying to determine the ...

Top 50 recent answers are included