Referencing line numbers in an algorithm using autoref
up vote
3
down vote
favorite
What is the autoref command to reference a line number of an algorithm? I tried to define stepautorefname
, linenoautorefname
and alglinenoautorefname
commands as shown below but they don't work like the algorithmautorefname
command.
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
usepackage[hidelinks,
colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
newcommand{algorithmautorefname}{Algorithm}
newcommand{stepautorefname}{Step}
newcommand{linenoautorefname}{Line}
newcommand{alglinenoautorefname}{ALine}
begin{document}
begin{algorithm}
caption{Algorithm} label{alg:A}
begin{algorithmic}
REQUIRE $Input$
STATE A
STATE B
STATE C
STATE D label{step:A4}
end{algorithmic}
end{algorithm}
In autoref{step:A4} of autoref{alg:A}
end{document}
hyperref cross-referencing algorithms algorithmic autoref
New contributor
add a comment |
up vote
3
down vote
favorite
What is the autoref command to reference a line number of an algorithm? I tried to define stepautorefname
, linenoautorefname
and alglinenoautorefname
commands as shown below but they don't work like the algorithmautorefname
command.
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
usepackage[hidelinks,
colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
newcommand{algorithmautorefname}{Algorithm}
newcommand{stepautorefname}{Step}
newcommand{linenoautorefname}{Line}
newcommand{alglinenoautorefname}{ALine}
begin{document}
begin{algorithm}
caption{Algorithm} label{alg:A}
begin{algorithmic}
REQUIRE $Input$
STATE A
STATE B
STATE C
STATE D label{step:A4}
end{algorithmic}
end{algorithm}
In autoref{step:A4} of autoref{alg:A}
end{document}
hyperref cross-referencing algorithms algorithmic autoref
New contributor
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
What is the autoref command to reference a line number of an algorithm? I tried to define stepautorefname
, linenoautorefname
and alglinenoautorefname
commands as shown below but they don't work like the algorithmautorefname
command.
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
usepackage[hidelinks,
colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
newcommand{algorithmautorefname}{Algorithm}
newcommand{stepautorefname}{Step}
newcommand{linenoautorefname}{Line}
newcommand{alglinenoautorefname}{ALine}
begin{document}
begin{algorithm}
caption{Algorithm} label{alg:A}
begin{algorithmic}
REQUIRE $Input$
STATE A
STATE B
STATE C
STATE D label{step:A4}
end{algorithmic}
end{algorithm}
In autoref{step:A4} of autoref{alg:A}
end{document}
hyperref cross-referencing algorithms algorithmic autoref
New contributor
What is the autoref command to reference a line number of an algorithm? I tried to define stepautorefname
, linenoautorefname
and alglinenoautorefname
commands as shown below but they don't work like the algorithmautorefname
command.
documentclass{article}
usepackage{algorithm}
usepackage{algorithmic}
usepackage[hidelinks,
colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
newcommand{algorithmautorefname}{Algorithm}
newcommand{stepautorefname}{Step}
newcommand{linenoautorefname}{Line}
newcommand{alglinenoautorefname}{ALine}
begin{document}
begin{algorithm}
caption{Algorithm} label{alg:A}
begin{algorithmic}
REQUIRE $Input$
STATE A
STATE B
STATE C
STATE D label{step:A4}
end{algorithmic}
end{algorithm}
In autoref{step:A4} of autoref{alg:A}
end{document}
hyperref cross-referencing algorithms algorithmic autoref
hyperref cross-referencing algorithms algorithmic autoref
New contributor
New contributor
New contributor
asked Nov 14 at 16:56
User525412790
1507
1507
New contributor
New contributor
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
User525412790 is a new contributor. Be nice, and check out our Code of Conduct.
User525412790 is a new contributor. Be nice, and check out our Code of Conduct.
User525412790 is a new contributor. Be nice, and check out our Code of Conduct.
User525412790 is a new contributor. Be nice, and check out our Code of Conduct.
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%2f459979%2freferencing-line-numbers-in-an-algorithm-using-autoref%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