JohnPaul
I copy this code from [here](https://tex.stackexchange.com/questions/733847/how-can-i-put-node-at-center-left-or-right-of-a-tikzpicture-automatically). This code makes calendar 2025. How can I use loop to make calendar from 2025 to 2030.
```
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{paracol}
\usetikzlibrary{calendar}
\newcommand{\printmonth}[2]{
\centering
\begin{tikzpicture}
\calendar[
dates=2025-#2-01 to 2025-#2-last,
at={(0, 0)},
week list,
if={(Sunday) [red, font=\bfseries]},
% month label above left,
month label above centered,
% month label above right,
month text={\Large\textbf{#1}},
every month/.append style={yshift=0.8cm}
]
;
\end{tikzpicture}
\vspace{.5cm}
}
\begin{document}
\begin{center}
\Huge \textbf{Calendar for 2025}
\end{center}
\begin{paracol}{3}
\printmonth{January}{01} \switchcolumn
\printmonth{February}{02} \switchcolumn
\printmonth{March}{03} \switchcolumn*
\printmonth{April}{04} \switchcolumn
\printmonth{May}{05} \switchcolumn
\printmonth{June}{06} \switchcolumn*
\printmonth{July}{07} \switchcolumn
\printmonth{August}{08} \switchcolumn
\printmonth{September}{09} \switchcolumn*
\printmonth{October}{10} \switchcolumn
\printmonth{ November}{11} \switchcolumn
\printmonth{December}{12} \switchcolumn*
\end{paracol}
\end{document}
```
![image.png](/image?hash=79500461ba99d5fa9829571342f4781a745b6a25f2a45c2372693e8754a6cb5d)
Top Answer
samcarter
You could add an additional argument to your `\printmonth` macro for the year and then use a loop to count from `2025` to `2030`:
```
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage{paracol}
\usetikzlibrary{calendar}
\newcommand{\printmonth}[3]{
\centering
\begin{tikzpicture}
\calendar[
dates=#3-#2-01 to #3-#2-last,
at={(0, 0)},
week list,
if={(Sunday) [red, font=\bfseries]},
% month label above left,
month label above centered,
% month label above right,
month text={\Large\textbf{#1}},
every month/.append style={yshift=0.8cm}
]
;
\end{tikzpicture}
\vspace{.5cm}
}
\begin{document}
\foreach \myyear in {2025,...,2030}{
\begin{center}
\Huge \textbf{Calendar for \myyear}
\end{center}
\begin{paracol}{3}
\printmonth{January}{01}{\myyear} \switchcolumn
\printmonth{February}{02}{\myyear} \switchcolumn
\printmonth{March}{03}{\myyear} \switchcolumn*
\printmonth{April}{04}{\myyear} \switchcolumn
\printmonth{May}{05}{\myyear} \switchcolumn
\printmonth{June}{06}{\myyear} \switchcolumn*
\printmonth{July}{07}{\myyear} \switchcolumn
\printmonth{August}{08}{\myyear} \switchcolumn
\printmonth{September}{09}{\myyear} \switchcolumn*
\printmonth{October}{10}{\myyear} \switchcolumn
\printmonth{November}{11}{\myyear} \switchcolumn
\printmonth{December}{12}{\myyear} \switchcolumn*
\end{paracol}
\clearpage
}
\end{document}
```