I am working on creating reference to help my document looks more fancy, however I would like paraphase the label and reference so that it wouldn't look ugly and terrible. Here below I give the information how should it look like. The input : \section{Problem No. 1} &quot;Problem sentences go here.&quot; (\ref{Solution #1}{Solution}) %  &lt;---- The code is just imaginary (I mean the desired code) \section{Problem No. 2} &quot;Problem sentences go here.&quot; (\ref{Solution #2}{Solution}) \section{Problem No. 1 - Solution}\label{Solution #1} \section{Problem No. 2 - Solution}\label{Solution #2}  So that the desired output : 1. Problem No. 1 &quot;Problem sentences go here.&quot; (Solution) % &lt;---- This refers to the Solution's section below the problem's section. 2. Problem No.2 &quot;Problem sentences go here.&quot; (Solution) % &lt;---- Should refer to the &quot;Problem No. 2 - Solution&quot; section 3. Problem No. 1 - Solution (Should refer to this section after clicking that hyperlink from Problem No. 1 section) 4. Problem No. 2 - Solution (Should refer to this section after clicking that hyperlink from Problem No. 2 section)  Is there any possible method that I could use? (Perhaps also for equations, chapeters and numberings?)
120941
Is there a way to make a cross reference to a label of a header with custom text? That is, its text should differ from the Header text, or its number or page (not like the predefined formats in Lyx). Something like the the hyperlinks or bookmarks in MS word, and in such a way that I can write the different text for each cross-reference individually. I'm not looking to define a new format for the references.  For example, if the header text is "State and Path functions", I want to make a cross reference to it with the text "state function".
121212
\documentclass{scrbook}  \usepackage{listings} \usepackage{cleveref}  \begin{document}  Ref: \ref{test}. Cref: \cref{test}.  \begin{lstlisting}[caption={Test},label={test}] test \end{lstlisting}  \end{document}   This produces Ref: 1. Cref: ?? 1.. I expected something like Ref: 1. Cref: Listing 1.  I get a LaTeX Warning: \Cref reference format for label type 'lstlisting' undefined on input line 9.
40452
hyperref provides the command \hyperlink, with syntax:  \hyperlink{name}{text}   where name is the name of a hypertext object, and text is used as the link to jump to the defined mark. Page anchors, e.g., page.12, can also be used as hypertext objects. For example,  Click \hyperlink{page.23}{here} to jump to page 23.   This was proposed by Martin Scharrer as a solution to  .  I would  like to link a string of text to a page (by page number) using \hyperlink, but being able to refer to an implicit page anchor page.&lt;number&gt; whose ''number'' is not known in advance. That is, use a value of the counter page, which is only set later in the document, in the argument of \hyperlink.  Here's a hypothetical solution:  \documentclass{article}  \usepackage[pageanchor]{hyperref} % option is the default anyway  %% Martin Scharrer's patch for hyperref %% available at https://tex.stackexchange.com/a/19416/9237 \makeatletter \let\orig@Hy@EveryPageAnchor\Hy@EveryPageAnchor \def\Hy@EveryPageAnchor{%     \begingroup     \hypersetup{pdfview=Fit}%     \orig@Hy@EveryPageAnchor     \endgroup } \makeatother   \def\getpageref{???}   % \getpageref extracts the numeric value of \pageref{key}                        % for use in the first argument of \hyperlink  \begin{document}  See \hyperlink{page.\getpageref{lkd}}{this page} for further clarification.  \newpage  This is the linked page.\label{lkd}  \end{document}   I know how to achieve a similar solution by simply using \label and then \pageref (or \autopageref), but I am interested in making use of a hyperref patch proposed  by Martin to make all page anchors be displayed in full page mode. (This patch only seems to work with \hyperlink.)
52456
I want to reference a section with cleveref like in the following example:  \section{Foobar} \label{sec:foobar}  See \cref{sec:foobar}.   The output of this is:     See section 1.   But what I would like is this:     See section 1 Foobar.   I understand that there is no command by default, that produces this output.  So I tried to build my own command like suggested for the hyperref package in . However, I could not find an equivalent command to hyperref's \nameref in cleveref's documentation.  Is it possible to create a new command, that produces my desired output?
101412
I have a section that is devoted to the proof of a theorem, and hence I used  \section{Proof of Theorem~\ref{thm}}   Of course, because of the headers that are capitalized, it asks for \ref{THM} when producing the header, and I get an obvious error. What is the proper way to handle such a case? Below is a MWE:  \documentclass{amsbook} \usepackage{lipsum} \newtheorem{thm}{Theorem} \begin{document} \chapter{First Chapter} \section{The Theorem} \begin{thm}[Lipsum Theorem] \label{thm} \lipsum[1] \end{thm} \section{Proof of Theorem~\ref{thm}} \lipsum[1-23] \end{document}   When compiling I get:  LaTeX Warning: Reference `THM' on page 3 undefined on input line 14.   (each time it produces a header), and the header shows     `2. PROOF OF THEOREM ??'
55202
When a reference is undefined, LaTeX shows simply [??] which doesn't give much information. I would like it to show the label instead. This is useful when more collaborators work on the same preprint and the references are yet to be done.  I'm using neither biblatex nor natbib. I do use bibtex but it is irrelevant for this question.  MWE:  \documentclass{article}  \begin{document}  This: \cite{undef} should look like: [{\bfseries ?? undef}]  \end{document}
95804
I am writing a LaTeX document in which I number equations within sections.  Thus, in my preamble I have  \makeatletter     \@addtoreset {equation}{section}     \renewcommand{\theequation}{\thesection.\@arabic\c@equation} \makeatother   and this works the way I would like it to.  When I cross-reference an equation with "see Eq.\ (\ref{mylabel})" I get, for example, "see Eq. (3.4.15)" for the 15th equation in Sec. 3.4.    However, I would like to be able to cross-reference the equation from within the section where it resides and omit the section number.  In this case, I would like to obtain "see Eq. (15)"  I am using the hyperref package, so the information in the .aux file looks like  \newlabel{mylabel}{{3.4.15}{43}{GENERALIZED SPEEDS\relax }{equation.3.4.15}{}}   I gather that the \ref command looks in the .aux file for {mylabel}, finds {3.4.15}, and uses the string within the braces.  I am wondering if it is possible to define a new command, call it \myref, and have it discard "3.4."  So the result of "see Eq.\ (\myref{mylabel})" would be "see Eq. (15)"  The \hyperref command has the syntax  \hyperref[mylabel]{text}   so if I could figure out a way to use mylabel to go into the .aux file, bring back the string 3.4.15, and discard "\thesection.", I could use what remains as the argument {text} for \hyperref.    @Ricardo:  Thank you so very much for this solution.  It works very well without hyperref, but unfortunately I run into a problem with hyperref.  When I use  \renewcommand{\theequation}{\@arabic\c@equation}   to create abbreviated equation numbers in the home section, this leads to non-unique entries in the aux file, and I get the error   ! pdfTeX warning (ext4): destination with the same identifier (name{equation.1} ) has been already used, duplicate ignored   The problem is that each section has an equation (1).  I tried to fix the problem according to the advice on ``Subordinate counters'' in the hyperref README, but have been unsuccessful.  Here is a combination of your code and @Lockstep's example that should reproduce the problem:  \documentclass{book}  % The book class numbers equations within chapters. % We want to number these within sections.      \makeatletter     \@addtoreset {equation}{section}     \renewcommand{\theequation}{\@arabic\c@equation} \makeatother  \usepackage[colorlinks=true, linkcolor={blue}]{hyperref} \usepackage{smartref}  \addtoreflist{section}  \newcommand*{\srefaux}[1]{%   \issectionchanged{#1}% checks if section number has changed   \ifsectionchanged% if section is different   \sectionref{#1}.% put the section reference   \fi% else do nothing   \ref*{#1}%  &lt;-&lt;-&lt;--- we changed this to ref* }  \newcommand*\sref[1]{\hyperref[#1]{\hbox{\srefaux{#1}}}}  \begin{document}  \chapter{first} \section{bla}  If we include a first equation \begin{equation}\label{eq:xyz} x^2 + y^2 = z^2 \end{equation} in this section then hyperref will not be happy with another first equation in the  next section.  As shown in Eq.\ (\sref{eq:def}) \dots  \section{blubb}  As shown in Eq.\ (\sref{eq:abc}) \dots  \begin{equation}\label{eq:abc} a^2 + b^2 = c^2 \end{equation}  \begin{equation}\label{eq:def} d^2 + e^2 = f^2 \end{equation}  \section{foo}  As shown in Eq.\ (\sref{eq:abc}) \dots  \end{document}
32485
I'm including \usepackage{hyperref} so that each instance of \ref (as well as each page number in the index and the table of contents) automatically links to that page.  When I'm viewing the document (in ) and I click a link, I jump to the linked page.  Is there any easy way to go "back" to where I was before I clicked the link?  (And is the answer any different when using Adobe Acrobat reader?)
26462
I am running into a rather weird error that apparently originates from the combination of \include, \let\clearpage\relax and a referenced label after a page break.  In this particular example, the label mylabel defined in the listing cannot be referenced anymore when the reference and the label are close enough to a page break.  The MWE consists of two files, the main-file and an included file. I am using the \let\clearpage\relax command to . The error does not occur if the file is \input instead of \included.  \documentclass[11pt,twoside]{book} %  \usepackage[utf8]{inputenc} % Enoding \usepackage[english]{babel} % Language \usepackage{listings} \usepackage{forloop}  \begin{document} \begingroup \let\clearpage\relax  \include{includedfile} % changing include for input would work  \endgroup \end{document}   Included file:   \newcounter{ct} \forloop{ct}{1}{\value{ct} &lt; 40}% {%     .\\ }  Listing \ref{mylabel}.  \begin{lstlisting}[caption=somecaption, label=mylabel] some code; \end{lstlisting}   Running this example will have an output where the label cannot be referenced (even after multiple runs):    Now, one solution is to use \input as mentioned earlier but I am rather interested in why this happens. Does the \clearpage command fulfil an important function for references to work? And can the error be avoided without removing \let\clearpage\relax while using \include?  EDIT: I just found  with the same issue (though it does not have a definite answer).
103244
I have searched far and wide after a solution, but haven't found one that works.  The most prominent ones looks like:   and   My relevant setup is:  \documentclass[a4paper,11pt,oldfontcommands]{memoir} \usepackage[colorlinks=true]{hyperref} \usepackage{natbib} %\bibliographystyle{agsm} \bibliographystyle{myabbrvnat} \newcommand{\myand}{\&amp;\ } \setcitestyle{authoryear,aysep={},open={(},close={)}} \begin{document} In the book (Book Name) such and such is told to be true \citep{RefWorks:}. \bibliography{cource} \end{document}   with my source.bib-file looking like:  @book{RefWorks:1      author={John Johnson},      year={2015},      title={Book Name},      publisher={Publishing Company},      address={United States of America},      edition={1st},      isbn={XXX-X-XXXX-XXXX-X} }   Probably the reason why some of the suggestions that I have found won't work is the \bibliographystyle{myabbrvnat}. I can't remember where I found it, but it's to setup my bibliography the way I need it. Is that important? If needed to be posted, where can I post the text, since it goes over the character limit here?  I know there is a "sort of" solution, where I can make a citation aliasing like \defcitealias{RefWorks:1}{Book Name} and then insert it in the text like \citetalias{RefWorks:1} to give the title of the source. It's fine, but it's not what I'm looking for, because then I would need to set this up for my whole library, which would get tiresome.   Is there a way to setup a \cite+-type to give the title of a source?  Edit: I forgot to put hyperref package in my setup.
107603
I am using cleveref's \cref{label} command with multiple arguments. I want to ensure that it explicitly lists all three sections that I am referencing regardless of if they are in order or not.  At the moment they are referenced as "sections 1 to 3" with the 1 and 3 being hyperlinked.  I need all three listed something like "sections 1, 2 and 3" with all digits hyperlinked so that the reader can click through directly to section 2.  I am using hyperref for the links (and I've put the \usecommand{cleveref} after the one for hyperref).
3391
In the following code, the command \label{my} appears on page 4, as well \pageref{my} says "4", but the hyperlink points to the page one. Why is that?  \documentclass{book} \usepackage{hyperref} \usepackage{lipsum}  \begin{document}    % Four pages of text.   \lipsum[1-20]     % The label is on fourth page.   \label{my}        % Buggy pageref. It produces the number 4, but the link leads to the first page.   \pageref{my}   \end{document}
46316
Here is a minimal example showing the problem.  \documentclass[10pt]{article} \usepackage[usenames,dvipsnames]{color} \usepackage{soul} %\soulregister{\ref}{1} \begin{document}  \section*{x}\label{x}  \section*{y} \hl{ Some text.   Section~\ref{x}. } \end{document}   I'm getting the error  LaTeX Warning: Reference `{x}' on page 0 undefined on input line 12.  ! Argument of \ref has an extra }.   The problem is with \ref. Commenting out the line beginning with "Subsection" makes the error disappear. \soulregister is intended for font commands. I don't know if \ref is a font command, but I could not get \soulregister to fix the problem (see the commented line above).
66786
I can't seem to get the reference within my {refsection}.  \documentclass[a4paper]{article}  \newcommand{\myparagraph}[1]{\paragraph{#1}\mbox{}\\}  \usepackage[     backend=bibtex,     isbn=false,     url=false,     doi=false,     eprint=false, ]{biblatex}  %Point to the bibliography db \addbibresource{mybib.bib}  \begin{document}  \include{myparagraph}  \end{document}   My paragraph file  \myparagraph{\fullcite{dante1320}} \begin{refsection}  \cite{manzoni1827}  \printbibliography[heading=subbibliography] \end{refsection}   I get the first citation (dante1320) right, but the second prints as [manzoni1827]. I don't get any error when I run Bibtex concerning the missing reference. But I got it when I run Latex: LaTeX Warning: Citation 'manzoni1827' on page 2 undefined on input line 5.
39220
Suppose I have the following code  \begin{subequations}  \begin{align} a+b = c \label{eq.1}\\  d+e = f \label{eq.2} \end{align} \end{subequations}   I want now that upon giving the reference, it should appear as (1a-b). \eqref{eq.1} and \eqref{eq.2} will give output as 1a and 1b not what I want, which is (1a-b).
77153
Is there any way to cross-reference to sections/subsections via their title? I find myself writing "Please see section 4 for more details", and it gets annoying very soon, especially when I have to change the numbers repeatedly.  I am using lyx, so it would be nice if there's some way of automating some of the steps.
98093
This question led to a new package:      I'm using hyperref to have footnote marks link to the footnote proper and I'd like to have some sort of "backreferences" from the footnote proper back to where they're called (à la Wikipedia). For example:  This[1] is the text[2] that serves[3] as an example[1] to the footnote[2] backrefence thing[4]. ------- [1] The first footnote. [a, d] [2] The second footnote. [b, e] [3] The third footnote. [c] [4] The fourth footnote. [f]   Where a, b, c, d, e and f are links to the first, second, third, fourth, fifth and sixth places where footnotemarks are respectively.  I hope I managed to communicate what I'd like, I'm not that good at it :P  A MWE follows.  \documentclass{book} \usepackage{hyperref} \begin{document}   This\footnote{The first footnote. [a, d]} is the text\footnote{The second footnote. [b, e]}   that serves\footnote{The third footnote. [c]} as an example\footnotemark[1] to   the footnote\footnotemark[2] backrefence thing\footnote{The fourth footnote. [f]}. \end{document}