user-is-inactive-forever / xepersian

Persian for LaTeX, using XeTeX
https://ctan.org/pkg/xepersian
5 stars 1 forks source link

Footnote #6

Closed Mahicopoli closed 5 years ago

Mahicopoli commented 5 years ago

I wrote a book with TeXLive and using XePersian package. But I some some problems with the numbers footnotes.

Check/indicate

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode

\documentclass[a4paper,11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{amsbsy,amssymb,amsmath,amsfonts}
\usepackage{perpage} %the perpage package
\MakePerPage{footnote} %the perpage package command
\usepackage{import}%\import command
\usepackage[toc,page]{appendix}
\usepackage{ouralgorithmic,ouralgorithm}%Algorithm
\usepackage{glossaries}
\usepackage[xindy]{imakeidx}
\usepackage{graphicx}
\usepackage[numbers]{natbib}
\usepackage[colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref}
\hypersetup{backref,
colorlinks=True}
[SAMPLE.pdf](https://github.com/vafakhalighi/xepersian/files/3563135/SAMPLE.pdf)
[SAMPLE.pdf](https://github.com/vafakhalighi/xepersian/files/3563137/SAMPLE.pdf)

[SAMPLE.pdf](https://github.com/vafakhalighi/xepersian/files/3563155/SAMPLE.pdf)
[SAMPLE.pdf](https://github.com/vafakhalighi/xepersian/files/3563159/SAMPLE.pdf)
\usepackage[perpage]{footmisc}%Footnote numbering reset each page
\usepackage{xepersian}
\defpersianfont\nastaligh[Scale=1.6]{IranNastaliq}%فونت تقدیر
\defpersianfont\stitr[Scale=1]{XB Titre Shadow}%فونت کتاب
\defpersianfont\khayam[Scale=1]{XB Kayhan Bold}
\defpersianfont\kamran[Scale=1.5]{B Kamran}
\defpersianfont\roya[Scale=1]{XB Roya}
%\defpersianfont\yagut[Scale=1]{XB Yagut}
%\defpersianfont\grana[Scale=1.2]{Mj_Granada}
%\defpersianfont\titr[Scale=1.5]{XB Titre}
%\defpersianfont\zar[Scale=1]{XB Zar}
%\setromantextfont[Scale=1]{Tahoma}
%\setdigitfont[Scale=1]{XB Zar}
%\setdigitfont[Scale=1]{XP Ziba}
%\defpersianfont\fontname[Scale=2]{IranNastaliq}
%\settextfont{Persian Modern}
\settextfont{XB Zar}%فونت متن
\setdigitfont[Scale=0.9]{Persian Modern}%فونت اعداد

% Theorem *****************************************************
% Template \newtheorem{envname}[counter]{name}[section]
% Use    ÷  \begin{abb. name}[label that is shown between ()] \label{abb. name:label} \end{name}
\newenvironment{myquotem}[1]%
  {\list{}{\leftmargin=#1\rightmargin=#1}\item[]}%
  {\endlist}

\newenvironment{myquote}%
  {\list{}{\leftmargin=10mm\rightmargin=10mm}\item[]}%
  {\endlist}

\newcounter{example}[chapter]
\numberwithin{example}{chapter}
\newenvironment{example}[1][]
{
  \refstepcounter{example}\par\medskip
  \vspace{.5cm}\noindent\textbf{$\blacksquare$\quad مثال~\theexample #1}\\[-.1cm]%\begin{center}\begin{minipage}{.9\textwidth\raggedleft}\rmfamily
  \vspace{-1.5em}\begin{sloppypar}\begin{myquote}
}
{
   %\end{minipage}\end{center}
   \end{myquote}\end{sloppypar}\medskip%\\[.3cm]
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                       Commands                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\counterwithout{footnote}{section}%Footnote numbering reset each section
\newcommand{\MIN}{\textnormal{\lr{minimize}}}
\newcommand{\MAX}{\textnormal{\lr{maximize}}}
\newcommand{\dom}{\textnormal{\lr{dom}}}
\newcommand{\SUB}{\textnormal{\lr{subject to}}}
\newcommand{\er}{\textnormal{\lr{erf}}}
\newcommand{\BS}[1]{\boldsymbol{#1}}
\newcommand{\Real}{\Re}%{\mathcal{R}}
\newcommand{\x}{\BS{x}}
\newcommand{\y}{\BS{y}}
\newcommand{\A}{\BS{A}}
\newcommand{\h}{\BS{H}}
\newcommand{\vr}{\BS{r}}
\newcommand{\vt}{\BS{t}}
\newcommand{\vF}{\BS{F}}
\newcommand{\vP}{\BS{P}}
\newcommand{\bsu}{\BS{u}}
\newcommand{\bsv}{\BS{v}}
\newcommand{\To}{\rightarrow}
\newcommand{\s}{\BS{s}}
\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n}
\newcommand{\pl}{\pazocal{L}}
\newcommand{\pk}{\pazocal{K}}
\newcommand{\pn}{\pazocal{N}}
\newcommand{\pp}{\pazocal{P}}
\newcommand{\kr}[1]{\textnormal{\kamran{#1}}}
\newcommand{\roy}[1]{\textnormal{\roya{#1}}}
\newcommand{\vect}[3]{#1_#2,\ldots,#1_#3}
\newcommand{\sd}[3]{#1_#2+\ldots+#1_#3}
\makeindex%{intoc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 'dedication' environment: To add a dedication paragraph at the start of book %
% Source: http://www.tug.org/pipermail/texhax/2010-June/015184.html            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{dedication}
{
   \cleardoublepage
   \thispagestyle{empty}
   \vspace*{\stretch{1}}
   \hfill\begin{minipage}[t]{0.66\textwidth}
   \raggedright
}%
{
   \end{minipage}
   \vspace*{\stretch{3}}
   \clearpage
}
%**************************** Algorithm ******************************
\newenvironment{algo}
{
   \hfill\begin{minipage}[t]{0.9\textwidth}
   \hrule
   %\raggedright
}%
{
   \end{minipage}
}
%***********************************************************************

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chapter quote at the start of chapter        %
% Source: http://tex.stackexchange.com/a/53380 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter 
\renewcommand{\@chapapp}{}% Not necessary...
\newenvironment{chapquote}[2][2em]
  {\setlength{\@tempdima}{#1}%
   \def\chapquote@author{#2}%
   \parshape 1 \@tempdima \dimexpr\textwidth-2\@tempdima\relax%
   \itshape}
  {\par\normalfont\hfill--\ \chapquote@author\hspace*{\@tempdima}\par\bigskip}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% First page of book which contains 'stuff' like: %
%  - Book title, subtitle                         %
%  - Book author name                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Book's title and subtitle
\title{{\Huge {\stitr{بهینه‌سازی مهندسی}}}\\%  \footnote{این یک پانوشت.} \\
\vspace{1cm} \huge {\khayam معرفی به همراه کاربردهایی از الگوریتم‌های فراابتکاری}} %\footnote{این یک پانوشت دیگر است.}}
% Author
\author{\textsc{محمد گلستانی و علیرضا سپاسیان}}%\thanks{\url{www.example.com}}
\date{دی ماه 1396}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Glassory %%%%%%%%%%%%%%%%%%%%%%%%
%\makeglossaries

\begin{document}
\providecommand{\url}[1]{{#1}}
\providecommand{\urlprefix}{URL }
\expandafter\ifx\csname urlstyle\endcsname\relax
  \providecommand{\doi}[1]{DOI~\discretionary{}{}{}#1}\else
  \providecommand{\doi}{DOI~\discretionary{}{}{}\begingroup
  \urlstyle{rm}\Url}\fi

\frontmatter
\maketitle
\end{document}

Expected behavior

Log and PDF files , I can not attached the sample file!

Mahicopoli commented 5 years ago

SAMPLE.pdf