Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

\small or other tag seems can not change the font size of the line number.

The package I use is \usepackage{algorithmic}.

share|improve this question
5  
Hi, welcome to tex.SX. So that people can better understand your question, it's helpful to add a minimal example that illustrates your problem. What package are you loading to display the algorithms? –  Alan Munn Feb 26 '11 at 11:13
    
I agree with Alan, there are several different packages that can be used to describe an algorithm, without knowing which one you are using, there really isn't much anybody can do to help you. –  Jan Hlavacek Feb 26 '11 at 14:29
    
@ Alan I use the \usepackage{algorithmic} –  Fan Zhang Feb 27 '11 at 5:51

1 Answer 1

up vote 2 down vote accepted

Use \algsetup{linenosize=\small}. See p. 12 of the documentation of the algorithms bundle for details.

\documentclass{article}

\usepackage{algorithmic}
\algsetup{linenosize=\small}

\begin{document}

\begin{algorithmic}[1]
\IF{some condition is true}
\STATE do some processing
\ELSE
\STATE do the default actions
\ENDIF
\end{algorithmic}

\end{document}
share|improve this answer
    
it only changes the size of the number of line but not the global font, how can i change the font size??? –  flow Jun 29 '11 at 15:14
    
@gpu_drug: \usepackage{etoolbox}\AtBeginEnvironment{algorithmic}{\small} –  lockstep Jun 29 '11 at 15:25
1  
This did't work for me. The solution from tex.stackexchange.com/questions/16059/… works. –  Alejandro Jul 13 '11 at 22:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.