2

Consider following code:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{forloop}

\begin{document}

\newcounter{i}
\forloop{i}{0}{\value{i} < 3}
{
    % trying to get the text of the counter i i.e. 0 1 2
    % I tried the following and doesn't seem to work
    $\value{i}$
    $\text\value{i}$
}

\end{document}

I've looked online and couldn't find anything so hope you can help.

1
  • Welcome to TeX.sx! I'm not sure I understand correctly what you mean with “text value”. It seems like you're looking for \arabic{i}
    – cgnieder
    Aug 11, 2015 at 10:19

1 Answer 1

3

How about this:

\documentclass{article}
\usepackage{forloop}

\begin{document}

\newcounter{i}
\forloop{i}{1}{\value{i} < 4}
{
  $\thei$
}

\forloop{i}{1}{\value{i} < 4}
{
  \roman{i}
}

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .