این کد برای من خطا نمیده. در ضمن با این کد من جواب دو تا از سوالهای شما را میدهم.
کد: [انتخاب]
\documentclass[12pt,oneside]{bidipresentation}
\usepackage[RL]{flowfram}
\geometry{paperwidth=225mm,paperheight=180mm,rmargin=40mm,lmargin=4mm,top=10mm,bottom=10mm}
\usepackage{hyperref}
\newstaticframe{30mm}{\paperheight}%
{\dimexpr(\paperwidth-40mm)}% Why minus 40mm? because your rmargin=40mm in your geometry setup
{0.5\paperheight}[sidebar]
\setstaticframe*{sidebar}{valign=b}
\usepackage{xepersian}
\makeatletter
\renewcommand\tableofcontents{%
\begin{staticcontents*}{sidebar}
\@starttoc{toc}%
\end{staticcontents*}
}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
\let\@svsec\@empty
\else
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\fi
\@tempskipa #5\relax
\ifdim \@tempskipa>\z@
\begingroup
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M #8\@@par}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
#7}%
\else
\def\@svsechd{%
#6{\hskip #3\relax
\@svsec #8}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
#7}}%
\fi
\@xsect{#5}}
\renewcommand*\l@section[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty\@secpenalty
\addvspace{0.1em \@plus\p@}%
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \bfseries
\advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
\hskip -\if@RTL\rightskip\else\leftskip\fi
\footnotesize#1\hfill\nobreak\par
\endgroup
\fi}
\makeatother
\begin{document}
\tableofcontents
\section{مقدمه} \label{sec:Intro}\newpage
\section{لایه فیزیکی} \label{sec:section2}
\end{document}