3
votes
4answers
149 views

Incorrect reference to a line in algorithmic using hyperref

I am using algpseudocode and algorithm packages to typeset pseudocode. I also use float, hyperref and caption packages. The problem is that when I reference a line in the pseudocode, the number is ...
3
votes
1answer
843 views

cleveref fails to reference algorithms

In the following example document, both \autoref and plain ref will correctly link and number an algorithm reference, but cleveref fails that task. It will just insert question marks instead. In ...
5
votes
1answer
205 views

Referring to function name in an algorithm

I have a LaTeX code which looks similar to the following example. \documentclass{article} \usepackage{amsmath,algorithm,algpseudocode} \begin{document} \begin{algorithm} \caption{My Algo.} ...
3
votes
1answer
747 views

Problem with algorithm(ic) and hyperref

The following code works ... fine! \documentclass{book} % \usepackage{subfig} % \usepackage{subcaption} \usepackage[colorlinks]{hyperref} \usepackage{algorithm} \usepackage[noend]{algorithmic} ...
7
votes
1answer
1k views

algorithmic, arbitrary names for algorithms

The question is advanced version of my previous one. I need to name algorithms (package algorithmic) with arbitrary names so it appears like: Algorithm MyAlgo and \ref{...} will appear like MyAlgo. ...
1
vote
0answers
118 views

Package algorithmic [closed]

So my problem is whenever I try to use the algorthmic package, it gives me an error related to citations! And when I comment out the algorithmic block, everything works fine. I read somewhere that ...
3
votes
1answer
156 views

Add label/link to a line of an algorithm

I am using the algorithmic package to write algorithms. I want to have a link to the line of the algorithm like I can do to formulas using \label and \ref.
5
votes
1answer
491 views

Reference algorithmic line numbers using cleveref

consider the following example: \documentclass[a4paper,final]{report} \usepackage{cleveref} \usepackage{algorithmic} \Crefname{ALC@unique}{Line}{Lines} \begin{document} Tests: ...
5
votes
1answer
3k views

label in algorithmic

if I have this code \begin{algorithm} \label{alg:the_alg} \begin{algorithmic}[1] \STATE operation 0 \STATE operation 1 \end{algorithmic} \end{algorithm} I can make a reference to ...
8
votes
1answer
4k views

Referencing line numbers in an algorithm

Referencing figures is simple: \begin{figure} \caption{Blah blah blah blah blah} \label{fig:name} %shtuff goes here \end{figure} See figure~\ref{fig:name}. I would like to know if it ...
33
votes
2answers
2k views

Why does an environment's label have to appear after the caption?

\documentclass{article} \usepackage{algorithm} \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label ...
11
votes
1answer
994 views

cleveref and algorithm2e

I'm currently working on a document where I was using algorithm+algorithmic along with cleveref. With this everything worked perfectly. Now I had to replace algorithm+algorithmic with algorithm2e. ...