خط ۱۲
\usepackage[explicit]{titlesec}
را حذف کنید و خط نخست را بصورت زیر تغییر دهید:
\documentclass[11pt,fleqn,explicit]{biditufte-book}
همانطور که خودتان اشاره کردید خود biditufte-book
از بسته titlesec
استفاده میکند بنابراین دوباره فراخوانی آن با فعال کردن گزینه دیگر اشتباه است و باعث خطا میشود. اگر گزینه explicit
را به خود کلاس biditufte-book
بدهید، این گزینه بصورت خودکار به بسته titlesec
افزوده میشود.
\documentclass[11pt,fleqn,explicit]{biditufte-book}
% add numbers to chapters, sections, subsections
\setcounter{secnumdepth}{2}
\usepackage{ptext}
\usepackage{xcolor}
\definecolor{mybluei}{RGB}{0,173,239}
\definecolor{myblueii}{RGB}{63,200,244}
\definecolor{myblueiii}{RGB}{199,234,253}
\usepackage{tikz}
\usepackage{xepersian}
\settextfont{Yas}
\newcommand\chapnumfont{%
\fontsize{380}{130}\color{myblueii}\selectfont%
}
\newcommand\chapnamefont{%
\normalfont\color{white}\scshape\small\bfseries
}
\titleformat{\chapter}
{\normalfont\huge\filleft}
{}
{0pt}
{\stepcounter{chapshift}%
\begin{tikzpicture}[remember picture,overlay]
\fill[myblueiii]
(current page.north west) rectangle ([yshift=-13cm]current page.north east);
\node[
fill=mybluei,
text width=2\paperwidth,
rounded corners=6cm,
text depth=18cm,
anchor=center,
inner sep=0pt] at (current page.north east) (chaptop)
{\thechapter};%
\node[
anchor=south east,
inner sep=0pt,
outer sep=0pt] (chapnum) at ([xshift=-20pt]chaptop.south)
{\chapnumfont\thechapter};
\node[
anchor=south,
inner sep=0pt] (chapname) at ([yshift=2pt]chapnum.south)
{};
\node[
anchor=north east,
align=right,
inner xsep=0pt] at ([yshift=-0.5cm]chapname.east|-chapnum.south)
{\parbox{.7\textwidth}{\raggedleft#1}};
\end{tikzpicture}%
}
\titleformat{name=\chapter,numberless}
{\normalfont\huge\filleft}
{}
{0pt}
{\begin{tikzpicture}[remember picture,overlay]
\fill[myblueiii]
(current page.north west) rectangle ([yshift=-13cm]current page.north east);
\node[
fill=mybluei,
text width=2\paperwidth,
rounded corners=6cm,
text depth=18cm,
anchor=center,
inner sep=0pt] at (current page.north east) (chaptop)
{};%
\node[
anchor=south east,minimum width=2in,
inner sep=0pt,
outer sep=0pt] (chapnum) at ([xshift=-20pt]chaptop.south)
{};
\node[
anchor=south,
inner sep=0pt] (chapname) at ([yshift=2pt]chapnum.south)
{};
\node[
anchor=north east,
align=right,
inner xsep=0pt] at ([yshift=-0.5cm]chapname.east|-chapnum.south)
{\parbox{.7\textwidth}{\raggedleft#1}};
\end{tikzpicture}%
}
\titlespacing*{\chapter}{0pt}{0pt}{3.5in}
\newcounter{chapshift}
\addtocounter{chapshift}{-1}
\begin{document}
\chapter{فصل}
\section{مقدمه}
\ptext[4]
\subsection{معرفنامه}
\ptext[1-10]
\chapter{فصل بعدی}
\section{قسمت آخر}
\ptext
\end{document}