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.

I am making a checklist to print, where users can check their answers on a printed paper. For this I am using itemize and \renewcommand{\labelitemi}{\Box}, \renewcommand{\labelitemii}{\Box} etc..., which works fine.

What I now want is to make items, sub-items and sub-sub-items different sized, so that the higher the hierarchy, the bigger font. Since I have a lot of things to check, I don't want to specify each line in the latex document, but was hoping to use a \renewcommand{\itemi}{something} or something like that.

Is this possible in any way?

share|improve this question

1 Answer 1

up vote 9 down vote accepted

Define your own itemize environment which uses the normal one but changes the font size first. The relsize package gives you the handy \smaller and \larger macros.

This would make every level one font size step smaller.

\usepackage{relsize}

\newenvironment{xitemize}{%
    \smaller
    \itemize
}{%
    \enditemize
}

This would make the first level smaller then the text. If this is not wanted change \smaller to \ifnum\csname @itemdepth\endcsname=0\else\smaller\fi.

If you want to keep the itemize name in your documents, use:

\let\olditemize\itemize
\let\oldenditemize\enditemize
\renewenvironment{itemize}{%
    \smaller
    \olditemize
}{%
    \endolditemize
}

You could define your own set of e.g. \fontitemi, \fontitemii, ... macros:

\makeatletter
\newenvironment{xitemize}{%
    \@nameuse{fontitem\romannumeral\the\@itemdepth}
    \itemize
}{%
    \enditemize
}
\makeatother
\newcommand{\fontitemi}{\Large}
\newcommand{\fontitemii}{\large}
\newcommand{\fontitemiii}{\normalsize}
\newcommand{\fontitemiv}{\small}
share|improve this answer
1  
Thanks a bunch, that did exactly what i needed –  Gunnar Sjúrðarson Knudsen Feb 9 '11 at 23:58

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.