TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to change the default font size of the algorithm in algpseudocode environment to small. This is because my algorithm is lengthy and i have page limitations. Please help

share|improve this question

Package algorithmicx provides hooks for use before and after the pseudocode: \ALG@beginalgorithmic and \ALG@endalgorithmic. You can redefine them to suit your needs:





  \State $x \gets 42$


Note that other algorithmicx layouts may redefine the commands. Also note that this doesn't affect line number size, which is controlled by \alglinenumber.

share|improve this answer

Your Answer


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.