# Latex; How to remove the algorithm number in algorithm captions?

25 08 17 • 22:08& Filed in: Latex

How one can remove the algorithm number in the algorithm caption?

Solution: just add

Solution:

Define a new command:

and put the text in \NoNumber{}

Sample Latex Code

Solution: just add

`\renewcommand{\thealgorithm}{}`

after `\begin {algorithm}`

*How one can remove the line number in the algorithm body?*

Solution:

Define a new command:

`\def\NoNumber#1{{\def\alglinenumber##1{}\State #1}\addtocounter{ALG@line}{-1}}`

and put the text in \NoNumber{}

Sample Latex Code

`\documentclass[11pt]{article}`

`\usepackage{algorithmicx}`

`\usepackage{algorithm}`

`\usepackage{algpseudocode}`

`\def\NoNumber#1{{\def\alglinenumber##1{}\State #1}\addtocounter{ALG@line}{-1}}`

`\begin{document}`

`\begin{algorithm}`

`\renewcommand{\thealgorithm}{}`

`\caption{Test Algorithm}\label{euclid}`

`\begin{algorithmic}[1]`

`\Procedure{Euclid}{$a,b$}\Comment{The g.c.d. of a and b}`

` \State $r\gets a\bmod b$`

` \While{$r\not=0$}\Comment{We have the answer if r is 0}`

` \State $a\gets b$`

` \State $b\gets r$`

` \State $r\gets a\bmod b$`

` \EndWhile\label{euclidendwhile}`

` \State \textbf{return} $b$\Comment{The gcd is b}`

` \NoNumber{This line will not have a number!}`

` \EndProcedure`

`\end{algorithmic}`

`\end{algorithm}`

`\end{document}`

# Using Latexdiff For Marking Changes To Tex Documents

05 08 13 • 22:29& Filed in: Latex

Latexdiff is a Perl script, which compares two latex files and marks up the significant differences between them. Various options are available for visual markup using standard latex packages such as "color.sty".

Project webpage:

__http://latexdiff.berlios.de__/

CTAN page:

__http://www.ctan.org/tex-archive/support/latexdiff__

An example output