6

I found this question vertical week list in TikZ calendar and I need to create a similar style RTL week list with row for week starting from right side

Here an example with xelatex

\documentclass[12pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calendar,positioning}
\usepackage{fontspec}
\setmainfont[Script=Arabic]{Amiri}

\def\pgfcalendarmonthname#1{\translate{\ifcase#1\or جانفي\or فيفري\or مارس\or أفريل
\or ماي\or جوان\or جويلية\or أوت\or سبتمبر\or أكتوبر\or نوفمبر\or ديسمبر\fi} }

\pagestyle{empty}


%\tikzstyle{RTL week list}=[??]

\begin{document}

\begin{tikzpicture}
[every calendar/.style = {
    month label above centered,
    month text = {\Large{\%mt}},
    }]

\calendar[dates=2018-01-01 to 2018-01-last,week list]if (Friday) [red];

\end{tikzpicture}

\end{document}

With this output

enter image description here

What I need is like this

enter image description here

4

Use day xshift= with some negative spacing amount, please adjust to your personal preferences. The week list style uses day xshift etc. to separate the individual days, usually with positive values listing days from left to right, negative values reverse the list.

I had to disable the font settings (I don't own the Arabic fonts)

\documentclass[12pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calendar,positioning}
%\usepackage{fontspec}
%\setmainfont[Script=Arabic]{Amiri}

%\def\pgfcalendarmonthname#1{\translate{\ifcase#1\or جانفي\or فيفري\or مارس\or أفريل
%\or ماي\or جوان\or جويلية\or أوت\or سبتمبر\or أكتوبر\or نوفمبر\or ديسمبر\fi} }

\pagestyle{empty}


%\tikzstyle{RTL week list}=[??]

\begin{document}

\begin{tikzpicture}
[every calendar/.style = {
    month label above centered,
    month text = {\Large{\%mt}},
    }]

\calendar[dates=2018-01-01 to 2018-01-last, week list, day xshift=-3ex]if (Friday) [red];

\end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.