Place parentheses around a cross-referenceHow to auto bracket ( ) referenced math equation numbers?What is...
Do I really need to have a scientific explanation for my premise?
How to resolve: Reviewer #1 says remove section X vs. Reviewer #2 says expand section X
Can one live in the U.S. and not use a credit card?
The meaning of ‘otherwise’
What is the generally accepted pronunciation of “topoi”?
Proving a statement about real numbers
Shifting between bemols and diesis in the key signature
How many characters using PHB rules does it take to be able to have access to any PHB spell at the start of an adventuring day?
Why couldn't the separatists legally leave the Republic?
Do cubics always have one real root?
Why do we say ‘pairwise disjoint’, rather than ‘disjoint’?
How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?
Power Strip for Europe
Outlet with 3 sets of wires
Why restrict private health insurance?
Making a kiddush for a girl that has hard time finding shidduch
MySQL importing CSV files really slow
Is it possible to avoid unpacking when merging Association?
Does "Until when" sound natural for native speakers?
Is it safe to abruptly remove Arduino power?
How do we create new idioms and use them in a novel?
Giving a career talk in my old university, how prominently should I tell students my salary?
Should I take out a loan for a friend to invest on my behalf?
Expressing logarithmic equations without logs
Place parentheses around a cross-reference
How to auto bracket ( ) referenced math equation numbers?What is null and when do we need to use it?Cross-Reference with custom textLatex - Miktex cross references linking back to ref pointCross reference figure appears as “??”How to cross-reference another documentCross Referencing numbers missing for the Sections only, of a document prepared in latexAutomatic parentheses around example numbersRemoving automatic parentheses around references with linguexRenumbering chapter after part, include part number as suffix in cross-reference to chapter numberExtra space after cross referencePlace square bracket around a cross-reference
Is possible to surround a cross-reference with brackets or parentheses? For example when I write a command like some text ref{some label}
then when compiled the output was some text (12) without manually placing parentheses in latex command, like some text (ref{some label})
.
hyperref cross-referencing
add a comment |
Is possible to surround a cross-reference with brackets or parentheses? For example when I write a command like some text ref{some label}
then when compiled the output was some text (12) without manually placing parentheses in latex command, like some text (ref{some label})
.
hyperref cross-referencing
4
In case of equations, there iseqref
of packageamsmath
that adds parentheses around the equation number.
– Heiko Oberdiek
Apr 22 '14 at 1:35
If I need to apply that for any referencing, not just the equation??
– Mohammad Fajar
Apr 22 '14 at 1:41
2
Have a good look at thecleveref
package. It is (a) fully compatible with thehyperref
package (and must be loaded afterhyperref
) and (b) allows full customization of the appearance of cross-references.
– Mico
Apr 22 '14 at 1:46
I've taken the liberty of replacing hyperlink/hyperref with "cross-reference" since that's what your posting is mainly about. (A hyperlink is a special type of a cross-reference.)
– Mico
Apr 22 '14 at 1:54
add a comment |
Is possible to surround a cross-reference with brackets or parentheses? For example when I write a command like some text ref{some label}
then when compiled the output was some text (12) without manually placing parentheses in latex command, like some text (ref{some label})
.
hyperref cross-referencing
Is possible to surround a cross-reference with brackets or parentheses? For example when I write a command like some text ref{some label}
then when compiled the output was some text (12) without manually placing parentheses in latex command, like some text (ref{some label})
.
hyperref cross-referencing
hyperref cross-referencing
edited Apr 22 '14 at 1:52
Mico
282k31385774
282k31385774
asked Apr 22 '14 at 1:28
Mohammad FajarMohammad Fajar
4693816
4693816
4
In case of equations, there iseqref
of packageamsmath
that adds parentheses around the equation number.
– Heiko Oberdiek
Apr 22 '14 at 1:35
If I need to apply that for any referencing, not just the equation??
– Mohammad Fajar
Apr 22 '14 at 1:41
2
Have a good look at thecleveref
package. It is (a) fully compatible with thehyperref
package (and must be loaded afterhyperref
) and (b) allows full customization of the appearance of cross-references.
– Mico
Apr 22 '14 at 1:46
I've taken the liberty of replacing hyperlink/hyperref with "cross-reference" since that's what your posting is mainly about. (A hyperlink is a special type of a cross-reference.)
– Mico
Apr 22 '14 at 1:54
add a comment |
4
In case of equations, there iseqref
of packageamsmath
that adds parentheses around the equation number.
– Heiko Oberdiek
Apr 22 '14 at 1:35
If I need to apply that for any referencing, not just the equation??
– Mohammad Fajar
Apr 22 '14 at 1:41
2
Have a good look at thecleveref
package. It is (a) fully compatible with thehyperref
package (and must be loaded afterhyperref
) and (b) allows full customization of the appearance of cross-references.
– Mico
Apr 22 '14 at 1:46
I've taken the liberty of replacing hyperlink/hyperref with "cross-reference" since that's what your posting is mainly about. (A hyperlink is a special type of a cross-reference.)
– Mico
Apr 22 '14 at 1:54
4
4
In case of equations, there is
eqref
of package amsmath
that adds parentheses around the equation number.– Heiko Oberdiek
Apr 22 '14 at 1:35
In case of equations, there is
eqref
of package amsmath
that adds parentheses around the equation number.– Heiko Oberdiek
Apr 22 '14 at 1:35
If I need to apply that for any referencing, not just the equation??
– Mohammad Fajar
Apr 22 '14 at 1:41
If I need to apply that for any referencing, not just the equation??
– Mohammad Fajar
Apr 22 '14 at 1:41
2
2
Have a good look at the
cleveref
package. It is (a) fully compatible with the hyperref
package (and must be loaded after hyperref
) and (b) allows full customization of the appearance of cross-references.– Mico
Apr 22 '14 at 1:46
Have a good look at the
cleveref
package. It is (a) fully compatible with the hyperref
package (and must be loaded after hyperref
) and (b) allows full customization of the appearance of cross-references.– Mico
Apr 22 '14 at 1:46
I've taken the liberty of replacing hyperlink/hyperref with "cross-reference" since that's what your posting is mainly about. (A hyperlink is a special type of a cross-reference.)
– Mico
Apr 22 '14 at 1:54
I've taken the liberty of replacing hyperlink/hyperref with "cross-reference" since that's what your posting is mainly about. (A hyperlink is a special type of a cross-reference.)
– Mico
Apr 22 '14 at 1:54
add a comment |
4 Answers
4
active
oldest
votes
You could renew the reference command, perhaps something like:
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
Here's a complete MWE to play with:
% arara: pdflatex
% arara: pdflatex
documentclass{article}
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
begin{document}
section{Section heading}label{sec:testlabel}
Reference: ref{sec:testlabel}
end{document}
8
You should probably provide a note that this solution isn't compatible withhyperref
: regardless of whether that package is loaded before or after your code, the result is that no parentheses will be placed around the section number.
– Mico
Apr 22 '14 at 11:09
add a comment |
Try using eqref{fig:label}
from the amsmath
package.
(Taken from here: https://groups.google.com/forum/#!topic/latexusersgroup/e1CHoBfj8pQ)
Welcome to TeX.SE. The OP has stated in a comment that he (?) needs to parentheses to be placed around all cross-referencing call-outs, not just around call-outs to equations. Thus, your answer doesn't address the query fully.
– Mico
Jun 16 '15 at 0:15
you are right, and I just read some comments about the issue on the OP. I'll remove my answer soon. Sorry and thank you for your comment.
– guest2015
Jun 18 '15 at 22:02
Upvoted for the equation-only option.
– grfrazee
Jul 23 '15 at 1:47
@Mico Haven't tried other stuff yet, buteqref
works well w/ enumeration items (besides equations)
– jaam
3 hours ago
add a comment |
I prefer the autoref
function provided in the hyperref package.
Taking examples for tables and figures:
The Table reference is autoref{tab:VHTRC}.
The equation reference is autoref{eq:3}.
Next, new reference styles should be renewed at the preamble.
Usually I define them just after including the hyperref package.
usepackage{hyperref}
defequationautorefname~#1null{Equation (#1)null}
The def
define the auto-reference variable #1
in the style Equation (#1)
, which is enclosed in ()
.
Then you will get the result like this:
If you want to use curly braces {}
, they should be escaped with the .
usepackage{hyperref}
defequationautorefname~#1null{Equation {#1}null}
1
This is dark magic for me. I usually do things likenewcommand{lemmaautorefname}{Lemma}
to change what comes before the reference number. But I have no idea why~#1null
works at all.
– Billiska
Aug 18 '17 at 16:13
1
There is already question aboutnull
: macro. It only reserves no space but shows TeX that there is a box which is taken into account for typesetting.
– selwyndd21
Aug 24 '17 at 2:13
add a comment |
I tried cmhughes' answer in my code, it didn't work (no parentheses -- which is strange, because the minimal example worked). guest2015's worked, but required an extra package. I ended up using newcommandpef[1]{(ref{#1})}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f172736%2fplace-parentheses-around-a-cross-reference%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could renew the reference command, perhaps something like:
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
Here's a complete MWE to play with:
% arara: pdflatex
% arara: pdflatex
documentclass{article}
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
begin{document}
section{Section heading}label{sec:testlabel}
Reference: ref{sec:testlabel}
end{document}
8
You should probably provide a note that this solution isn't compatible withhyperref
: regardless of whether that package is loaded before or after your code, the result is that no parentheses will be placed around the section number.
– Mico
Apr 22 '14 at 11:09
add a comment |
You could renew the reference command, perhaps something like:
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
Here's a complete MWE to play with:
% arara: pdflatex
% arara: pdflatex
documentclass{article}
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
begin{document}
section{Section heading}label{sec:testlabel}
Reference: ref{sec:testlabel}
end{document}
8
You should probably provide a note that this solution isn't compatible withhyperref
: regardless of whether that package is loaded before or after your code, the result is that no parentheses will be placed around the section number.
– Mico
Apr 22 '14 at 11:09
add a comment |
You could renew the reference command, perhaps something like:
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
Here's a complete MWE to play with:
% arara: pdflatex
% arara: pdflatex
documentclass{article}
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
begin{document}
section{Section heading}label{sec:testlabel}
Reference: ref{sec:testlabel}
end{document}
You could renew the reference command, perhaps something like:
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
Here's a complete MWE to play with:
% arara: pdflatex
% arara: pdflatex
documentclass{article}
letoldrefref
renewcommand{ref}[1]{(oldref{#1})}
begin{document}
section{Section heading}label{sec:testlabel}
Reference: ref{sec:testlabel}
end{document}
answered Apr 22 '14 at 2:28
cmhughescmhughes
79.3k17200300
79.3k17200300
8
You should probably provide a note that this solution isn't compatible withhyperref
: regardless of whether that package is loaded before or after your code, the result is that no parentheses will be placed around the section number.
– Mico
Apr 22 '14 at 11:09
add a comment |
8
You should probably provide a note that this solution isn't compatible withhyperref
: regardless of whether that package is loaded before or after your code, the result is that no parentheses will be placed around the section number.
– Mico
Apr 22 '14 at 11:09
8
8
You should probably provide a note that this solution isn't compatible with
hyperref
: regardless of whether that package is loaded before or after your code, the result is that no parentheses will be placed around the section number.– Mico
Apr 22 '14 at 11:09
You should probably provide a note that this solution isn't compatible with
hyperref
: regardless of whether that package is loaded before or after your code, the result is that no parentheses will be placed around the section number.– Mico
Apr 22 '14 at 11:09
add a comment |
Try using eqref{fig:label}
from the amsmath
package.
(Taken from here: https://groups.google.com/forum/#!topic/latexusersgroup/e1CHoBfj8pQ)
Welcome to TeX.SE. The OP has stated in a comment that he (?) needs to parentheses to be placed around all cross-referencing call-outs, not just around call-outs to equations. Thus, your answer doesn't address the query fully.
– Mico
Jun 16 '15 at 0:15
you are right, and I just read some comments about the issue on the OP. I'll remove my answer soon. Sorry and thank you for your comment.
– guest2015
Jun 18 '15 at 22:02
Upvoted for the equation-only option.
– grfrazee
Jul 23 '15 at 1:47
@Mico Haven't tried other stuff yet, buteqref
works well w/ enumeration items (besides equations)
– jaam
3 hours ago
add a comment |
Try using eqref{fig:label}
from the amsmath
package.
(Taken from here: https://groups.google.com/forum/#!topic/latexusersgroup/e1CHoBfj8pQ)
Welcome to TeX.SE. The OP has stated in a comment that he (?) needs to parentheses to be placed around all cross-referencing call-outs, not just around call-outs to equations. Thus, your answer doesn't address the query fully.
– Mico
Jun 16 '15 at 0:15
you are right, and I just read some comments about the issue on the OP. I'll remove my answer soon. Sorry and thank you for your comment.
– guest2015
Jun 18 '15 at 22:02
Upvoted for the equation-only option.
– grfrazee
Jul 23 '15 at 1:47
@Mico Haven't tried other stuff yet, buteqref
works well w/ enumeration items (besides equations)
– jaam
3 hours ago
add a comment |
Try using eqref{fig:label}
from the amsmath
package.
(Taken from here: https://groups.google.com/forum/#!topic/latexusersgroup/e1CHoBfj8pQ)
Try using eqref{fig:label}
from the amsmath
package.
(Taken from here: https://groups.google.com/forum/#!topic/latexusersgroup/e1CHoBfj8pQ)
edited May 13 '18 at 2:00
Bashful Beluga
10515
10515
answered Jun 15 '15 at 23:02
guest2015guest2015
26132
26132
Welcome to TeX.SE. The OP has stated in a comment that he (?) needs to parentheses to be placed around all cross-referencing call-outs, not just around call-outs to equations. Thus, your answer doesn't address the query fully.
– Mico
Jun 16 '15 at 0:15
you are right, and I just read some comments about the issue on the OP. I'll remove my answer soon. Sorry and thank you for your comment.
– guest2015
Jun 18 '15 at 22:02
Upvoted for the equation-only option.
– grfrazee
Jul 23 '15 at 1:47
@Mico Haven't tried other stuff yet, buteqref
works well w/ enumeration items (besides equations)
– jaam
3 hours ago
add a comment |
Welcome to TeX.SE. The OP has stated in a comment that he (?) needs to parentheses to be placed around all cross-referencing call-outs, not just around call-outs to equations. Thus, your answer doesn't address the query fully.
– Mico
Jun 16 '15 at 0:15
you are right, and I just read some comments about the issue on the OP. I'll remove my answer soon. Sorry and thank you for your comment.
– guest2015
Jun 18 '15 at 22:02
Upvoted for the equation-only option.
– grfrazee
Jul 23 '15 at 1:47
@Mico Haven't tried other stuff yet, buteqref
works well w/ enumeration items (besides equations)
– jaam
3 hours ago
Welcome to TeX.SE. The OP has stated in a comment that he (?) needs to parentheses to be placed around all cross-referencing call-outs, not just around call-outs to equations. Thus, your answer doesn't address the query fully.
– Mico
Jun 16 '15 at 0:15
Welcome to TeX.SE. The OP has stated in a comment that he (?) needs to parentheses to be placed around all cross-referencing call-outs, not just around call-outs to equations. Thus, your answer doesn't address the query fully.
– Mico
Jun 16 '15 at 0:15
you are right, and I just read some comments about the issue on the OP. I'll remove my answer soon. Sorry and thank you for your comment.
– guest2015
Jun 18 '15 at 22:02
you are right, and I just read some comments about the issue on the OP. I'll remove my answer soon. Sorry and thank you for your comment.
– guest2015
Jun 18 '15 at 22:02
Upvoted for the equation-only option.
– grfrazee
Jul 23 '15 at 1:47
Upvoted for the equation-only option.
– grfrazee
Jul 23 '15 at 1:47
@Mico Haven't tried other stuff yet, but
eqref
works well w/ enumeration items (besides equations)– jaam
3 hours ago
@Mico Haven't tried other stuff yet, but
eqref
works well w/ enumeration items (besides equations)– jaam
3 hours ago
add a comment |
I prefer the autoref
function provided in the hyperref package.
Taking examples for tables and figures:
The Table reference is autoref{tab:VHTRC}.
The equation reference is autoref{eq:3}.
Next, new reference styles should be renewed at the preamble.
Usually I define them just after including the hyperref package.
usepackage{hyperref}
defequationautorefname~#1null{Equation (#1)null}
The def
define the auto-reference variable #1
in the style Equation (#1)
, which is enclosed in ()
.
Then you will get the result like this:
If you want to use curly braces {}
, they should be escaped with the .
usepackage{hyperref}
defequationautorefname~#1null{Equation {#1}null}
1
This is dark magic for me. I usually do things likenewcommand{lemmaautorefname}{Lemma}
to change what comes before the reference number. But I have no idea why~#1null
works at all.
– Billiska
Aug 18 '17 at 16:13
1
There is already question aboutnull
: macro. It only reserves no space but shows TeX that there is a box which is taken into account for typesetting.
– selwyndd21
Aug 24 '17 at 2:13
add a comment |
I prefer the autoref
function provided in the hyperref package.
Taking examples for tables and figures:
The Table reference is autoref{tab:VHTRC}.
The equation reference is autoref{eq:3}.
Next, new reference styles should be renewed at the preamble.
Usually I define them just after including the hyperref package.
usepackage{hyperref}
defequationautorefname~#1null{Equation (#1)null}
The def
define the auto-reference variable #1
in the style Equation (#1)
, which is enclosed in ()
.
Then you will get the result like this:
If you want to use curly braces {}
, they should be escaped with the .
usepackage{hyperref}
defequationautorefname~#1null{Equation {#1}null}
1
This is dark magic for me. I usually do things likenewcommand{lemmaautorefname}{Lemma}
to change what comes before the reference number. But I have no idea why~#1null
works at all.
– Billiska
Aug 18 '17 at 16:13
1
There is already question aboutnull
: macro. It only reserves no space but shows TeX that there is a box which is taken into account for typesetting.
– selwyndd21
Aug 24 '17 at 2:13
add a comment |
I prefer the autoref
function provided in the hyperref package.
Taking examples for tables and figures:
The Table reference is autoref{tab:VHTRC}.
The equation reference is autoref{eq:3}.
Next, new reference styles should be renewed at the preamble.
Usually I define them just after including the hyperref package.
usepackage{hyperref}
defequationautorefname~#1null{Equation (#1)null}
The def
define the auto-reference variable #1
in the style Equation (#1)
, which is enclosed in ()
.
Then you will get the result like this:
If you want to use curly braces {}
, they should be escaped with the .
usepackage{hyperref}
defequationautorefname~#1null{Equation {#1}null}
I prefer the autoref
function provided in the hyperref package.
Taking examples for tables and figures:
The Table reference is autoref{tab:VHTRC}.
The equation reference is autoref{eq:3}.
Next, new reference styles should be renewed at the preamble.
Usually I define them just after including the hyperref package.
usepackage{hyperref}
defequationautorefname~#1null{Equation (#1)null}
The def
define the auto-reference variable #1
in the style Equation (#1)
, which is enclosed in ()
.
Then you will get the result like this:
If you want to use curly braces {}
, they should be escaped with the .
usepackage{hyperref}
defequationautorefname~#1null{Equation {#1}null}
edited May 13 '18 at 0:57
Bashful Beluga
10515
10515
answered Apr 22 '14 at 2:35
selwyndd21selwyndd21
9441014
9441014
1
This is dark magic for me. I usually do things likenewcommand{lemmaautorefname}{Lemma}
to change what comes before the reference number. But I have no idea why~#1null
works at all.
– Billiska
Aug 18 '17 at 16:13
1
There is already question aboutnull
: macro. It only reserves no space but shows TeX that there is a box which is taken into account for typesetting.
– selwyndd21
Aug 24 '17 at 2:13
add a comment |
1
This is dark magic for me. I usually do things likenewcommand{lemmaautorefname}{Lemma}
to change what comes before the reference number. But I have no idea why~#1null
works at all.
– Billiska
Aug 18 '17 at 16:13
1
There is already question aboutnull
: macro. It only reserves no space but shows TeX that there is a box which is taken into account for typesetting.
– selwyndd21
Aug 24 '17 at 2:13
1
1
This is dark magic for me. I usually do things like
newcommand{lemmaautorefname}{Lemma}
to change what comes before the reference number. But I have no idea why ~#1null
works at all.– Billiska
Aug 18 '17 at 16:13
This is dark magic for me. I usually do things like
newcommand{lemmaautorefname}{Lemma}
to change what comes before the reference number. But I have no idea why ~#1null
works at all.– Billiska
Aug 18 '17 at 16:13
1
1
There is already question about
null
: macro. It only reserves no space but shows TeX that there is a box which is taken into account for typesetting.– selwyndd21
Aug 24 '17 at 2:13
There is already question about
null
: macro. It only reserves no space but shows TeX that there is a box which is taken into account for typesetting.– selwyndd21
Aug 24 '17 at 2:13
add a comment |
I tried cmhughes' answer in my code, it didn't work (no parentheses -- which is strange, because the minimal example worked). guest2015's worked, but required an extra package. I ended up using newcommandpef[1]{(ref{#1})}
add a comment |
I tried cmhughes' answer in my code, it didn't work (no parentheses -- which is strange, because the minimal example worked). guest2015's worked, but required an extra package. I ended up using newcommandpef[1]{(ref{#1})}
add a comment |
I tried cmhughes' answer in my code, it didn't work (no parentheses -- which is strange, because the minimal example worked). guest2015's worked, but required an extra package. I ended up using newcommandpef[1]{(ref{#1})}
I tried cmhughes' answer in my code, it didn't work (no parentheses -- which is strange, because the minimal example worked). guest2015's worked, but required an extra package. I ended up using newcommandpef[1]{(ref{#1})}
answered 6 mins ago
jaamjaam
1646
1646
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f172736%2fplace-parentheses-around-a-cross-reference%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
In case of equations, there is
eqref
of packageamsmath
that adds parentheses around the equation number.– Heiko Oberdiek
Apr 22 '14 at 1:35
If I need to apply that for any referencing, not just the equation??
– Mohammad Fajar
Apr 22 '14 at 1:41
2
Have a good look at the
cleveref
package. It is (a) fully compatible with thehyperref
package (and must be loaded afterhyperref
) and (b) allows full customization of the appearance of cross-references.– Mico
Apr 22 '14 at 1:46
I've taken the liberty of replacing hyperlink/hyperref with "cross-reference" since that's what your posting is mainly about. (A hyperlink is a special type of a cross-reference.)
– Mico
Apr 22 '14 at 1:54