This is Haji's MSc thesis codes. Use it with ultimate caution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sharif-thesis.sty 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. % !TEX encoding = UTF-8 Unicode
  2. % Originally designed by Jafar Muhammadi and modified by Ali Zarezade
  3. \ProvidesPackage{sharif-thesis}
  4. %=======================================================
  5. % Packages
  6. %=======================================================
  7. \usepackage{geometry}
  8. \usepackage{amsthm,amssymb,amsmath,bm}
  9. \usepackage{algorithmic,algorithm}
  10. \usepackage{multicol}
  11. \usepackage{multirow}
  12. \usepackage{graphicx}
  13. \usepackage{adjustbox}
  14. \usepackage{subfig}
  15. \usepackage{fancyhdr}
  16. \usepackage[font=small,format=plain]{caption}
  17. \usepackage[table]{xcolor}
  18. \usepackage{enumerate}
  19. \usepackage{setspace}
  20. \usepackage{xspace} % to use \xspace
  21. \usepackage{shadethm} % shaded theorem
  22. \usepackage{xifthen} % used in glossary style
  23. \usepackage[hang,splitrule,bottom]{footmisc} % footnote setup
  24. \usepackage{zref-perpage} % footnote per-page numbering
  25. \usepackage{appendix} % for more control over appendices
  26. % Do not change order of the following packages!
  27. \usepackage{hyperref}
  28. \usepackage[xindy,acronym,nonumberlist=true]{glossaries}
  29. \usepackage{xepersian}
  30. %=======================================================
  31. % General setup
  32. %=======================================================
  33. \graphicspath{{images/}}
  34. %=======================================================
  35. % Page setup
  36. %=======================================================
  37. \geometry{top=3cm,right=3.5cm,bottom=2.5cm,left=2.5cm}
  38. %=======================================================
  39. % Table of content setup
  40. %=======================================================
  41. \SepMark{-}
  42. \makeatletter
  43. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  44. \refstepcounter{chapter}%
  45. \typeout{\@chapapp\space\thechapter.}%
  46. \addcontentsline{toc}{chapter}%
  47. {\@chapapp~\protect\numberline{\thechapter}#1}%
  48. \else
  49. \addcontentsline{toc}{chapter}{#1}%
  50. \fi
  51. \chaptermark{#1}%
  52. \addtocontents{lof}{\protect\addvspace{10\p@}}%
  53. \addtocontents{lot}{\protect\addvspace{10\p@}}%
  54. \if@twocolumn
  55. \@topnewpage[\@makechapterhead{#2}]%
  56. \else
  57. \@makechapterhead{#2}%
  58. \@afterheading
  59. \fi}
  60. \renewcommand*\l@section{\@dottedtocline{1}{3.5em}{2.3em}}
  61. \renewcommand*\l@subsection{\@dottedtocline{2}{5.8em}{3.2em}}
  62. \makeatother
  63. %=======================================================
  64. % Paragraph setup
  65. %=======================================================
  66. \linespread{1.3}
  67. \setlength{\parindent}{0pt} %The indent of the paragraph first line
  68. \setlength{\parskip}{7pt} %Befor paragraph space
  69. \frenchspacing
  70. %=======================================================
  71. % Font setup
  72. %=======================================================
  73. \settextfont[Scale=1.27,ItalicFont=IRXLotus-Italic]{IRXLotus}
  74. \setiranicfont[Scale=1.27]{IRXLotus-Italic}
  75. \setdigitfont[Scale=1.27]{IRXLotus}
  76. \defpersianfont\nastaliq[Scale=2]{IranNastaliq}
  77. \defpersianfont\chapternumber[Scale=3]{HMXYas}
  78. \defpersianfont\titr[Scale=1]{HMXTitr}
  79. \defpersianfont\titlefont[Scale=1.8]{HMXYas}
  80. %=======================================================
  81. % Equation setup
  82. %=======================================================
  83. % use dot instead of dash for equation numbering
  84. \renewcommand{\theequation}{\thechapter.\arabic{equation}}
  85. %% change equations font size
  86. %\DeclareMathSizes{12}{10}{9}{9}
  87. %=======================================================
  88. % Glossary setup
  89. %%=======================================================
  90. \newcommand{\trans}[3][]{
  91. \newtrans{#2}{#3}% add to glossary
  92. \term[#1]{#2}%cite the added word
  93. }
  94. %=======================================================
  95. % Footnote setup
  96. %=======================================================
  97. % rest footnote number in each page
  98. \zmakeperpage{footnote}
  99. \interfootnotelinepenalty=10000
  100. % correct footnote horizontal spacing
  101. \addtolength{\footskip}{0cm}
  102. \setlength{\footnotemargin}{0.2 cm}
  103. \setlength{\footnotesep}{0.3 cm}
  104. %=======================================================
  105. % Theorem setup
  106. %%=======================================================
  107. \theoremstyle{definition}
  108. \newshadetheorem{theorem}{قضیه}
  109. \newshadetheorem{definition}[theorem]{تعریف}
  110. \newshadetheorem{proposition}[theorem]{گزاره}
  111. \newshadetheorem{lemma}[theorem]{لم}
  112. %=======================================================
  113. % Header Footer setup
  114. %=======================================================
  115. \pagestyle{fancy}
  116. \fancyhead{}
  117. %\fancyfoot{\hline\scriptsize\lr{\copyright} کلیه حقوق این سند محفوظ بوده و متعلق به دانشگاه صنعتی شریف می‌باشد.}
  118. \lhead{\fatitle - \thepage}
  119. \rhead{}
  120. \lfoot{}
  121. \rfoot{}