Setup Counter in tex
📅 February 29, 2024 | 👁️ Views: 154

\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
- gif animation in latex Course
- Love letter - again Course
- Répartition annuelle - Tronc Commun Scientifique Course
- عيد فطر مبارك Course
Course PDF:
Recent Articles

Quran Search: A Feature rich and modern design
13 Feb 2025
Categories