Setup Counter in tex

📅 February 29, 2024   |   👁️ Views: 154




Votre navigateur ne supporte pas les PDFs. Voir le Lien de Téléchargement au dessous .

\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\newcounter{num}
\setcounter{num}{0}
\renewcommand{\thenum}{\Alph{num}}%
\newcommand{\num}{\stepcounter{num}\thenum}%
\newcommand{\ccc}{%
    \begin{tikzpicture}[overlay, remember picture]
        \node[circle, inner sep=0.5pt,
              draw=black, outer sep=0pt]
            at (0.5,0.2) {\num};
    \end{tikzpicture}
}
\newenvironment{mycontent}{% mycontent begins
    hello world \ccc
}% end of mycontent

\begin{document}
\begin{mycontent}\end{mycontent}
\begin{mycontent}\end{mycontent}
\begin{mycontent}\end{mycontent}
\begin{mycontent}\end{mycontent}
\begin{mycontent}\end{mycontent}
\begin{mycontent}\end{mycontent}
\begin{mycontent}\end{mycontent}
\begin{mycontent}\end{mycontent}
\end{document}


Related Courses, Exams, and Exercises


Course PDF:

📥 Download Setup Counter in tex (PDF)