Setup Counter in tex

📅 February 29, 2024   |   👁️ Views: 228




\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)

if you find this content helpful, Please consider supporting me with a small donation
إن وجدت هذا المحتوى مفيدا، من فضلك إدعمني بمبلغ بسيط كتبرع

Buy me a coffee — إشتر لي قهوة

PayPal.me • عبر بايبال

Or bank transfer • أو حوالة بنكية

Titulaire : RADOUAN MOSAID
RIB : 230 090 6501953211022000 65
IBAN : MA64 2300 9065 0195 3211 0220 0065
BIC / SWIFT : CIHMMAMC