-
Notifications
You must be signed in to change notification settings - Fork 1
/
thesisStyle.tex
1102 lines (879 loc) · 49.7 KB
/
thesisStyle.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%% Data: 2013/09/28 Time: 17:59:07
%% در مورد تقدم و تاخر وارد کردن بسته ها تنها باید به چند نکته دقت کرد:
%% الف) بسته xepersian حتما حتما باید آخرین بسته ای باشد که فراخوانی می شود
%% ب) بسته hyperref جزو آخرین بسته هایی باید باشد که فراخوانی می شود.
%% ج) بسته glossaries حتما باید بعد از hyperref فراخوانی شود.
%% د) بسته listings باید حتما قبل از hyperref فراخوانی شود.
%%% این سه بسته برای آوردن استایلهای فصلهای memoir مورد نیاز است.
\usepackage[scaled=.92]{helvet}
\usepackage{calc}
\usepackage{framed}
%%% تمام بسته های مورد نیاز برای ایجاد یک پایان نامه به صورت کامل اینجا آورده شده است در صورتی که بخواهید از بسته های دیگر استفاده کنید بهتر است که آنها را به گونه ای انتخاب کنید که با این بسته ها تداخل نداشته باشد. به نظر من استفاده از همین بسته ها کافی است.
\usepackage{amsthm,amssymb,amsmath}
\usepackage{thmtools}
\usepackage{dsfont}
\usepackage{etoolbox}
\usepackage{wasysym}
%%% بستهای برای فعالسازی پارامتر H در وارد کردن شکل
\usepackage{float}
%%% بستهای برای تولید نمایه در متن
\usepackage{makeidx}
\makeindex
%%% برای تنظیم حاشیه صفحات
\usepackage{geometry}
%%% بستهای برای تنظیم حاشیه و کادر دور فرمول و ...
\usepackage{empheq,fancybox}
%%% برای رنگی کردن متن و استفاده از رنگ در متن این دو بسته مورد نیاز است.
\usepackage[usenames,dvipsnames]{color,xcolor}
%%% بسته ای برای وارد کردن Watermarking
\usepackage{draftwatermark}
%%% بسته ای برای استفاده از اشکال برای آیتمها
\usepackage{pifont}
%%% بستهای برای رنگ آمیزی جداول
\usepackage{colortbl}
%%% بسته ای برای این که در جدول یک متن را در چند سطر بیاوریم.
\usepackage{multirow}
%%% بستهای برای رسم اشکال و تصاویر با Latex
\usepackage{tikz,times}
\usepackage{pstricks}
\usepackage{tikz-qtree}
%% برای ترسیم گانت چارت در گزارش و پیشنهاد پروژه
\usepackage{pgfgantt}
%% رسم یکسری تصاویر با Latex به مانند عکس یک پرنده
\usepackage{eso-pic}
\usepackage{pst-fun}
%%% بسته ای برای وارد کردن کدهای برنامه نویسی (MATLAB، JAVA و ...) در متن. بسته listings باید قبل از hyperref باشد و گرنه با خطا مواجه خواهیم شد.
\usepackage{listings}
%%% بستهای برای رفع خطای کمبود فضا در Latex و خطای morewrite
\usepackage{morewrites}
%%% بسته ای برای وارد کردن الگوریتم در متن
%\usepackage{algorithm}
%\usepackage{algorithmicx}
%\usepackage{algpseudocode}
%%% در این قالب از بسته graphx برای انجام کارهای گرافیکی استفاده میشود. این بسته برای اضافه کردن تصویرها به متن استفاده شده است.
\usepackage{graphicx}
%%% بستهای است که توسط آن میتوان شماره صفحه و آخرین صفحه را استخراج نمود.
\usepackage{lastpage}
%%% بستهای برای وارد کردن صفحات pdf در متن
\usepackage{pdfpages}
%%% دوبسته برای اضافه کردن دستورات if و else به برنامه.
\usepackage{xparse}
\usepackage{ifthen}
%%% بستهای برای تنظیم فرمت استایل بخشها، زیربخشها و ... .
\usepackage{titlesec}
%%% بسته ای برای رنگی کردن لینک ها و فعال سازی لینک ها در یک نوشتار، بسته hyperref باید جزو آخرین بستههایی باشد که فراخوانی میشود.
\usepackage{hyperref}
%%% بستهای برای وارد کردن واژه نامه در متن، این بسته باید بعد از hyperref حتما صدا زده شود.
\usepackage[sanitize={name=false,description=false,sort=false,symbol=false},nomain,xindy,acronym,acronymlists={main,tem}]{glossaries}
%%%زیپرشین (به انگلیسی: XePersian) یک بسته حروفچینی رایگان و متنباز برای نگارش مستندات پارسی/انگلیسی با زیلاتک است.
%%% در واقع، زیپرشین، کمک میکند تا به آسانی، مستندات را به پارسی، حروفچینی کرد. این بسته را وفا خلیقی نوشته است،
%%% و به طور منظم، آن را بروزرسانی کرده و باگهای آن را رفع میکند.
%%% نکته مهم این جا است که بسته Xepersian برای پشتیبانی از زبان فارسی آورده شده است، و
%%% می بایست آخرین بسته ای باشد که شما وارد می کنید، دقت کنید: آخرین بسته
\usepackage{xepersian}
%%% OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
%% تعریف برخی محیطها
\newenvironment{problem}{}{}
\newenvironment{info}{}{}
\newenvironment{refer}{}{}
\newenvironment{warning}{}{}
\newenvironment{goal}{}{}
\newenvironment{note}{}{}
\newenvironment{mydef}{}{}
\newenvironment{myshadowbox}{}{}
\newenvironment{colorBox}{}{}
\newenvironment{lemmaproof}{}{}
\newenvironment{mycomment}{}{}
% تعریف برخی دستورات
\newcommand{\goodRef}{}
\newcommand{\probsec}{}
\newcommand{\idx}{}
\newcommand{\arcm}{}
\newcommand{\arcmO}{}
\newcommand{\tick}{}
\newcommand{\tickO}{}
\newcommand{\X}{}
\newcommand{\XO}{}
\newcommand{\hand}{}
\newcommand{\handO}{}
\newcommand{\tree}{}
\newcommand{\treeO}{}
\newcommand{\two}{}
\newcommand{\twoO}{}
\newcommand{\sci}{}
\newcommand{\sciO}{}
\newcommand{\starE}{}
\newcommand{\starEO}{}
\newcommand{\music}{}
\newcommand{\musicO}{}
\newcommand{\gol}{}
\newcommand{\golO}{}
%%% تنظیم فاصله خطوط در متن اصلی
\newlength{\baselineskipVar}
%%% تنظیم فاصله خطوط در فهرستها
\newlength{\listlineskipVar}
%%% تعریف فونتهای پیش فرض برای متن
\newcommand{\defaultFont}{}
%% این متغیر برای استایل presentation مورد استفاده قرار میگیرد. در این استایل در صفحات اول سربرگ قرار داده نمیشود. این شمانده تعیین میکند که در چه صفحهای سربرگ قرار داده شود.
\newcounter{setfirstpage}
%% OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
%%% تعریف یکسری دستور برای صفحه عنوان
%% توسط دستور \myData می توانید تاریخ و ساعت را وارد متن خود کنید.
\newcommand{\myData}{
\شمارجدید\ساعت
\شمارجدید\دقیقه
\تر\زمانبهوقتامروز{%
\ساعت \زمان \تقسیم \ساعت 60 ساعت \محتوای\ساعت {}
\دقیقه \زمان \ضرب \ساعت 60 \بیفزابر \دقیقه -\ساعت
\گرعدد\دقیقه=0\گرنه و \محتوای\دقیقه{} دقیقه\رگ }
\امروز{} در \زمانبهوقتامروز{}
} %M
%%% تعریف یکسری متغیر برای صفحه عنوان مطالب
\makeatletter
\gdef\@type{نوع پروژه}
\def\type#1{\gdef\@type{#1}}
%% عنوان محصول را تعیین میکند. این عنواند در ایجاد عنوان در مستند استفاده
%% میشود این عنوان در هر مستند باید ایجاد شود در غیر این صورت از عنوان
%% پیشفرض استفاده خواهد شد.
\gdef\@title{عنوان پروژه}
\def\title#1{\gdef\@title{#1}}
%% زیر عنوان یک متن ساده را تعیین میکند که یک هدف مهم محصول را تعیین میکند
%% این عنوان می تواند برای یک محصول در نظر گرفته نشود. از این داده برای
%% ایجاد عنوان و سایر مکان های محصول استفاده میشود.
\gdef\@subtitle{کاربرد محصول برای استفاده در زیر عنوان}
\def\subtitle#1{\gdef\@subtitle{#1}}
%% افراد و گروه های که در تهیه این مستند و محصول همکاری داشته اند را تعیین
%% می کند این داده همواره باید بیان شود. این داده در نوشتن عنوان و دیگر قسمت
%% های مستند مورد استفاده قرار میگیرد.
\gdef\@author{افراد و گروههای پدید آورنده}
\def\author#1{\gdef\@author{#1}}
%% تاریخ نهایی نوشتن مستند را تعیین میکند این تاریخ در نوشتن عنوان استفاده
%% میشود این تارخ باید تعیین شود در غیر این صورت به صورت پیش فرض یک تاریخ
%% برای آن استفاده می شود.
\gdef\@date{ آخرین ویرایش: \myData}
\def\date#1{\gdef\@date{#1}}
\gdef\@supervisor{نام ناظر}
\def\supervisor#1{\gdef\@supervisor{#1}}
\gdef\@adviser{نام مشاور}
\def\adviser#1{\gdef\@adviser{#1}}
\gdef\@session{جلسه ارایه}
\def\session#1{\gdef\@session{#1}}
\gdef\@institute{پایگاه اینترنتی}
\def\institute#1{\gdef\@institute{#1}}
\gdef\@faculity{ موضوع}
\def\faculity#1{\gdef\@faculity{#1}}
\gdef\@group{ نام گروه}
\def\group#1{\gdef\@group{#1}}
\gdef\@community{نام زیرگروه}
\def\community#1{\gdef\@community{#1}}
\gdef\@projectManager{پیشنهاد دهنده}
\def\projectManager#1{\gdef\@projectManager{#1}}
\gdef\@comment{}
\def\comment#1{\gdef\@comment{#1}}
\gdef\@version{اول}
\def\version#1{\gdef\@version{#1}}
% هر نسخه از یک پیشنهاد طرح ممکن است در طول زمان به روز شود. این شماره تعیین
% میکند که این نسخه از پیشنهاد طرح چندتا به روز رسانی شده است.
\gdef\@update{1}
\def\update#1{\gdef\@update{#1}}
\gdef\@startData{تاریخ شروع}
\def\startData#1{\gdef\@startData{#1}}
\gdef\@stopData{تاریخ اتمام}
\def\stopData#1{\gdef\@stopData{#1}}
\gdef\@executionTime{مدت زمان اجرای پروژه}
\def\executionTime#1{\gdef\@executionTime{#1}}
%%% نام فایلی لوگوی مورد استفاده در نوشتار توسط این پارامتر مشخص میشود.
\gdef\@logofile{logonotfound}
\def\logofile#1{\gdef\@logofile{#1}}
%%% اندازه فایل لوگوی موجود در متن توسط این پارامتر مشخص میشود.
\gdef\@logoScale{.3\textwidth}
\def\logoScale#1{\gdef\@logoScale{#1}}
\gdef\@titleStyle{lshort}
\def\titleStyle#1{\gdef\@titleStyle{#1}}
\makeatother
\newcommand{\Godpage}[1]{}
\newcommand{\pejoheshTitle}[1]{}
\newcommand{\lshortTitle}[2]{}
\newcommand{\presTitle}{}
%%% OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
%%% اضافه کردن نماد استقلال به علایم ریاضی
\newcommand{\Perp}{\perp \! \! \! \perp}
\newcommand{\independent}{\protect\mathpalette{\protect\independenT}{\perp}} \def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
%% Data: 2013/09/28 Time: 17:59:07
%%% نام قالب را تعیین می کند و همچنین بیان می کند که آخرین به روز رسانی این قالب
%%% در چه زمانی بوده است. یک توصف مختصر هم از این بسته در اینجا امده است.
\ProvidesClass{Boostan-UserManual}
%%% تمام پارامترهای ورودی برای تنظیم متن را به کلاس زیر ارسال میکنیم.
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ProcessOptions
\LoadClass[10pt,a4paper,oneside]{memoir}
%% وارد کردن یکسری دستورات ابتدایی و بستههای مورد نیاز به استایل.
\input{Boostan-BasicStyle}
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%%==================== تنظیمات بسته geometry
%%% تنظیمات مربوط به حاشیه صفحه
\geometry{top=2.8cm, bottom=3cm, left=2.2cm, right=2.3cm}
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%==================== تنظیمات listing
%% در این قسمت تمام ابزارهای مورد نیاز در نوشتن برنامه ها اورده شده
%% است. با استفاده از این ابزارهای میتوان برنامه های مورد نیاز را در مستند جای داد.
\definecolor{listinggray}{gray}{.98}
\lstset{% general command to set parameter(s)
% زبان برنامه نویسی که به طور پیش فرض انتخاب می شود.
language=Java,
% رنگ پیش فرض برای پیش زمینه
backgroundcolor=\color{listinggray},
%% میزان طول محیط listings را مشخص می کند، به صورت پیش فرض \textwidth است.
%linewidth=\textwidth ,
%% نوع قالب دور محیط listings را تعیین می کند.
frameround=fttt,
frame=trBL,
%% is selected at the beginning of each listing. You could use \footnotesize,
%% \small, \itshape, \ttfamily, or something like that. The last token of
%% basic style must not read any following characters.
basicstyle=\ttfamily, % print whole listing small
%% با این دستور استایل keyword ها را مشخص می کنیم. مثلا در این حالت گفته ایم که keyword ها را با رنگ آبی مشخص کند، و آن ها را boldکند. دقت کنید که keyword های زبانهایی که این بسته پشتیبانی میکند،
%% در این بسته تعریف شده است. مثلا در JAVA کلمه main به صورت پیش فرض تعریف شده است و در صورت وجود آن در کد شما آن را Latex آبی رنگ میکند.
keywordstyle=\color{blue}\bfseries,
% underlined bold black keywords
%identifierstyle=, % nothing happens
%framexleftmargin=5mm, frame=shadowbox, rulesepcolor=\color{red}
%% استایل String را در متن مشخص می کند. مثلا در این جا گفته شده است که رشته ها را با رنگ قرمز و به صورت ایتالیک نمایش بده.
stringstyle=\ttfamily\color{red}, % typewriter type for strings
%% نحوه استایل comment را مشخص می کند. دقت کنید که رنگ انتخاب شده نوعی رنگ سبز است، برای این که این رنگ شناخته شود می بایست دو بسته color و xcolor به صورتی که فراخوانی شده است، فراخوانی شود.
commentstyle=\color{LimeGreen},
lineskip = .5pt,
%% سه دستور بعدی نحوه نمایش شماره خطوط را مشخص می کند.
numberstyle=\footnotesize,
%% تعیین فاصله بین شماره خطوط و محیط listings
numbersep=10pt,
%% محل قرارگیری شماره خطوط
numbers=left,
%% تعیین محل قرارگیری caption محیط. بطور پیش فرض در بالای محیط است که به پایین محیط تغییر داده شده است.
captionpos=b,
%% توسط breakline می توانید خاصیت شکسته شدن خطوط بلند را در محیط listings فعال و یا غیرفعال کنید.
%% activates or deactivates automatic line breaking of long lines.
breaklines=true,
%% باعث می شود که فاصله های بین رشته های نمایان شود.
%% lets blank spaces in strings appear or as blank spaces
showstringspaces=true
}%
%% البته شما می توانید این موارد پیش فرض را به ازای هر کد تغییر دهید. به عنوان مثال، ما یک کد در پوشه Code در شاخه فعلی قرار دادیم، می خواهیم آن را وارد متن کنیم، کافی است که خطوط زیر را در محل مناسبی که می خواهیم کد را قرار دهیم وارد کنیم. در این مثال یک فایل کد JAVA به نام myCode.java را می خواهیم وارد کنیم.
%%\begin{latin}
%%\lstinputlisting[breaklines=true,numbers=left,language=Java, basicstyle=\ttfamily, numberstyle=\footnotesize, numbersep=10pt, captionpos=b, frame=single, breakatwhitespace=false]{Code/myCode.java}
%%\end{latin}
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%==================== تنظیمات hyperref
%%% برای وارد کردن کلمه (بخش) در فهرست مطالب بسته hyperref برای حالت فارسی یک مشکل دارد. بدین منظور این
%%% مشکل را به صورت دستی حل شده است. برای این که رنگ keywordstyle که تعیین کننده رنگ کل قسمت فهرست مطالب
%%% نیز هست یکسان در آید یک پارامتر رنگ برای keywordstyle این جا تعریف میکنیم، و سپس از آن هم در تنظمیات hypperref
%%% و هم در اون کدهایی که به صورت دستی وارد شده است، استفاده میشود.
\newcommand{\keywordstyleColor}{blue}
\newsubfloat{figure}
%% در این قسمت تنظیمات بسته hyperref را قرار می دهیم.
%% این تنظیمات شامل موارد زیر است.
\hypersetup{
%% موقعی که فایل پی دی اف خروجی را باز می کنید صفحه به صورت عریض و بزرگ باز می شود.
pdfmenubar=false, pdfstartview=FitH,
%% در قسمت مراجع شماره صفحه ای که به آن مرجع ارجاع داده است را وارد می کند،
%% مواردی که برای فعال سازی این که شماره اشکال را به صورت ارجاعی نشان دهد
%pagebackref =true,hyperfigures=true,
%% به جای استفاده از مربع قرمز دور موارد ارجاعی از لینک های رنگی استفاده کند.
colorlinks=true,
%% رنگ برخی از لینک ها در زیر تعریف شده است.
linkcolor=\keywordstyleColor, anchorcolor=green, citecolor=magenta, urlcolor=cyan, filecolor=magenta, pdftoolbar=true,bookmarkstype=toc
%bookmarksopen = true,
%bookmarksopenlevel = 1
%%% اگر این option را true بکنیم، آنگاه در کنار bookmark شماره فصل و بخش و زیربخش نیز می آید. مثلا مینویسد: ۱.۲ طراحی شبکه
%bookmarksnumbered = true
} % M
%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%==================== تنظیمات tikz
\usetikzlibrary{mindmap,backgrounds,shadows,trees,arrows,shapes,positioning}
%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%==================== تنظیمات graphicx
% برای اضافه کردن تصاویر به متن این امکان وجود دارد که تصاویر را در پوشههای
% متفاوت قرار داد. با این کار از زیاد شدن پروندهها در مسیر مستند جلوگیری می
% شود. علاوه بر این دستهای از تصاویر وجود دارد که بین همه مستندها مشترک است
% برای نمونه نماد پژوهشکده که بین همه مشترک است. از این رو تعداد مسیر به عنوان
% مسیرهای پیش فرض برای جستجوی تصاویر تعیین شده است.
\graphicspath{{./}{./Pic/}{./images/}{../}{../Pic/}}
%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% تنظیم caption جداول و اشکال و ... توسط دستورات memoir
\captionnamefont{\small}
\captiontitlefont{\small}
%\captionstyle{}
%\captionwidth{\linewidth}
%\normalcaptionwidth
%\normalcaption
\captiondelim{: }
%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%==================== تنظیمات algorithm و algorithmic
%\floatname{algorithm}{الگوریتم}
%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%==================== تنظیمات مربوط به ایجاد watermarking
%% زاویه متن Watermark
\SetWatermarkAngle{45}
%% اندازه watermark
\SetWatermarkScale{1.5}
\let\oldSetWatermarkText\SetWatermarkText
%% اگر بخواهید watermark شما یک رنگ دیگر داشته باشد، این دو خط را فعال کنید و رنگ مورد نظر خود را انتخاب کنید
%\definecolor{orange}{RGB}{229,252,219}
%\renewcommand{\SetWatermarkText}[1]{\oldSetWatermarkText{\textcolor{orange}{#1}}}
\DeclareDocumentCommand{\SetWatermarkText}{m g}{
\oldSetWatermarkText{#1}
\IfValueTF{#2}{
\SetWatermarkLightness{#2}
}{%%
\SetWatermarkLightness{.94}
}%%
}%
%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%% تنظیم فونت
%%% تعریف یک دستور به عنوان فونت پیش فرض
\renewcommand{\defaultFont}{
%%% با دستور زیر می توانید فونتی مخصوص عبارات فارسی تعیین کنید:
\settextfont[Scale=1.3]{XB Niloofar}
%%\settextfont[Scale=1.2]{XB Niloofar}
%%% شما با دستور زیر بعد از فراخوانی بسته xepersian می توانید فونت انگلیسی را تعیین کنید
%%% دقت کنید که عبارات انگلیسی شما باید در دستور \lr{} قرار گیرد تا xepersian بتواند بفمهد که این عبارات انگلیسی است
%%\setlatintextfont[Scale=1]{Times New Roman}
\setlatintextfont[Scale=1.1]{Linux Libertine}
%% % تعریف برای فونت اعداد و ارقام
%\setdigitfont[Scale=1.1]{XB Zar}
} % M
\defaultFont
%% توسط دستورات defpersianfont و deflatinfont به ترتیب می توان یکسری فونت فارسی و انگلیسی دیگر تعریف کرد که در جاهای دیگر متن بتوان از آن استفاده کرد. برای استفاده کافی است که عبارتی که می خواهیم فونت آن عوض شود را به صورت زیر به عنوان نمونه بنویسیم.
%% \versionfont{این یک مثال است. }
%% تعریف یکسری فونت برای قسمت عنوان پروژه و ما بقی قسمت ها فونت قسمت "موسسه " در صفحه عنوان
\defpersianfont\pejoheshfont[Scale=1.4]{Titr Bold}
%%فونت اسم گروه XB Titre
\defpersianfont\groupfont[Scale=1.4]{Zar}
%%% فونت عنوان گزارش
\defpersianfont\titlefont[Scale=2.4]{Titr Bold}
%% فونت نسخه گزارش
\defpersianfont\versionfont[Scale=1.6]{Mitra}
\defpersianfont\payanFont[Scale=1.8]{XB Yas}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\farsifontshafigh[Scale=1.3]{Adobe Arabic}
\defpersianfont\titrt[Scale=1]{XB Titre}
\defpersianfont\traffict[Scale=1]{B Traffic}
\defpersianfont\farsifontsayeh[Scale=1.5]{XB Kayhan Sayeh}
\defpersianfont\titlefont[Scale=2.4]{Titr}
\defpersianfont\godFont[Scale=1]{B Nazanin}
\defpersianfont\titleFontEn[Scale=1]{Traffic}
%% فونتهای مورد نیاز برای صفحه شروع
%\defpersianfont\tablefont[Scale=.8]{XM Traffic}
\deflatinfont\tableFontEn[Scale=.9]{Adobe Arabic}
%% با استفاده از این دستور میتوان فونت و فارسی و یا انگلیسی بودن اعداد در فرمولها را به حالت اولیه (یعنی پیشفرض لاتک) برگرداند.
\DefaultMathsDigits
%% نحوه تغییر اندازه فونت عبارات ریاضی و فرمولها. این کار توسط دستور زیر انجام میشود.
%%\DeclareMathSizes{textsize}{mathsize}{scriptsize}{scriptscriptsize}
%% گزینه اول: این برای چه دسته فونتی است. پیش فرض استایل ما فونت 10pt است.
%% گزینه دوم: اندازه فونت توابع و موجودات ریاضی درون متن.
%% گزینه سوم: برای اسکریپت ها، اندازه زیرنویس و بالانویس.
%% گزینه چهارم: برای زیرنویس زیرنویس.
%% در دستورات زیر ما برای سه حالت، اندازههای مورد نظر را تعریف کرده ایم.
%%\DeclareMathSizes{10}{11}{9}{8} % For size 10 text
%%\DeclareMathSizes{11}{12}{11}{10} % For size 11 text
%%\DeclareMathSizes{12}{13}{12}{11} % For size 12 text
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% فایل Environments در برگیرنده تعریف یکسری محیط نوین است.
\input{Environments}
%% فایل Environments در برگیرنده تعریف یکسری استایل برای فصلها است.
\input{ChapterStyle}
%%% تعریف یکسری استایل برای صفحه شروع
\input{titleStyle}
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% تنظیم فاصله خطوط در متن اصلی
\setlength{\baselineskipVar}{1cm}
%% تنظیم فاصله خطوط در فهرستها
\setlength{\listlineskipVar}{0.9cm}
%%============================ پاورقی
%% تنظیمهای مربوط به پاورقی: فاصله پاورقی با متن + فاصله بین خطوط در پاورقی
\setlength{\footnotesep}{0.5cm}
\setlength{\skip\footins}{2cm}
%%%% تعریف یکسری دستور به منظور حل مشکل قرار دادن part در متن و آمدن آن در فهرست مطالب.
\makeatletter
\renewcommand*\l@part[2]{
\ifnum \c@tocdepth >-2\relax
\addpenalty{-\@highpenalty}
\addvspace{2.25em \@plus\p@}
\setlength\@tempdima{3em}
\begingroup
\parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
\parfillskip -\@pnumwidth
{\leavevmode
\large \bfseries\textcolor{\keywordstyleColor}{بخش} #1
\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
\nobreak
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}
\endgroup
\fi}
\makeatother
%%\part{part} -1 not in letters
%%\chapter{chapter} 0 only books and reports
%%\section{section} 1 not in letters
%%\subsection{subsection} 2 not in letters
%%\subsubsection{subsubsection} 3 not in letters
%%\paragraph{paragraph} 4 not in letters
%%\subparagraph{subparagraph} 5 not in letters
%% این دستور تعیین میکند که در متن تا چه عمقی شمارهگذاری انجام شود.
\setcounter{secnumdepth}{3}
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% باز تعریف محیط شکل
\makeatletter
\renewenvironment{figure}[1][]{
\baselineskip = .8cm
\ifthenelse{\equal{#1}{}}{
\@float{figure}
}{%%
\@float{figure}[#1]
}%%
%% این دستور centering در این قسمت موجب میشود که عکس شما در وسط متن قرار گیرد.
\centering
}{%
\end@float
}%
\makeatother
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%============================ تنظیمات مربوط به فونت و اندازه جداول
%% بازنویسی محیط جدول
\makeatletter
\renewenvironment{table}[1][]{
\ifthenelse{\equal{#1}{}}{\@float{table}}{\@float{table}[#1]}
\centering
}{%
\end@float
}%
\makeatother
%% بازنویسی محیط tabular به منظور تنظیم فونتهای جدول
\let\oldtabular\tabular
\let\endoldtabular\endtabular
\renewenvironment{tabular}{
\bgroup
\settextfont[Scale=.8]{XM Traffic}
\setlatintextfont[Scale=.9]{Linux Libertine}
\oldtabular
}{%
\endoldtabular
\egroup
}%
%% تنظیم کننده فاصله بین خطوط (ردیفها) در یک جدول
\renewcommand{\arraystretch}{1.3}
%% تنظیم کننده ضخامت خطوط جدول
%%\renewcommand{\arrayrulewidth}{.55pt}
%% تنظیم فاصله بین خطوط دو خطه (||) و یا (حالت افقی ||)
%%\renewcommand{\doublerulesep}{1pt}
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% دستوری برای سیاه و سفید کردن متن برای گرفتن پرینت. در این دستور در اولین گام رنگ تمامی ارجاعات که توسط hyperref فعال میشوند، سیاه میشود.
\newcommand{\printver}{
\renewcommand{\keywordstyleColor}{black}
\hypersetup{linkcolor=black, anchorcolor=black, citecolor=black, urlcolor=black, filecolor=black, pdftoolbar=true}
}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% باز تعریف محیط document، هر دستوری که می خواهید در ابتدای برنامه اجرا شود را در این قسمت بنویسید.
%% بازنویسی محیط \begin{document}
\let\olddocument\document
\let\endolddocument\enddocument
\makeatletter
\renewenvironment{document}{
\olddocument
%% تنظیم استایل سرفصل
\chapterstyle{BlueBox}
\pagestyle{plain}
%% تنظیم فاصله بین خطوط با دستور \baselineskip
\baselineskip = \baselineskipVar
\pagenumbering{arabic}
\SetWatermarkText{}
}{%
\endolddocument
}%
\makeatother
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% محیطی برای قرار دادن abstract در گزارش و یا در ابتدای هر فصل. در صورت استفاده از این محیط، متون داخل آن با فونتی متفاوت با فونت متن نوشته شده و در ابتدای متن نیز یک کلمه چکیده اضافه می شود.
\renewenvironment{abstract}{%
\section*{چکیده}
\settextfont[Scale=1.2]{Adobe Arabic}
\setlatintextfont[Scale=1]{Times New Roman}
}{%
\bigskip
} % M
%% این دستور تعیین میکند که چه تا چه عمقی شمارهگذاری شود. در خود متن نه در فهرست مطالب دقت کنید که برای تعیین این که در فهرست مطالب تا چه عمقی شماره گذاری صورت بگیرد باید از دستور
%% \setcounter{tocdepth}{....}
%% استفاده کرد که در ادامه می آید.
\setcounter{tocdepth}{3}
%% تنظیمات مربوط به فهرست مطالب، بازنویسی محیط فهرست مطالب برای تعیین فاصله خطوط، قرار دادن در bookmark ها
\let\Oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{
%% این دستور مشخص میکند که نحوه شمارهگذاری این قسمت به صورت یاد شده باشد.
\pagenumbering{alph}
\baselineskip = \listlineskipVar
\Oldtableofcontents\clearpage
\baselineskip = \baselineskipVar
\savepagenumber
\pagenumbering{arabic}
}%
% با این دستور در فهرست مطالب در هنگام آوردن شماره و عنوان فصل در ابتدای آن یک کلمه فصل می گذارد یعنی مثلا می نویسد: (فصل اول: مقدمه ای بر شبکه ..................... ۱)
\renewcommand*{\cftchaptername}{
فصل
\space}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%=========================== تنظمیات محیط فهرست اشکال
%% این دستورات موجب میشود که یک تصویر بند انگشتی در فهرست مطالب ظاهر شود. برای این کار میبایست در قسمت caption به صورت زیر فایل تصویر نیز وارد شود.
%% ٍExample: \caption{\lofimage{/Introduction/Person/Shannon} \lr{Claude Shannon}}
\newlength{\lofthumbsize}
\setlength{\lofthumbsize}{2em}
\newif\iflofimage
\DeclareRobustCommand*{\lofimage}[2][]{%
\iflofimage
$\vcenter to \lofthumbsize{\vss%
\hbox to \lofthumbsize{\hss\includegraphics[{width=\lofthumbsize,height=\lofthumbsize,keepaspectratio=true,#1}]{#2}\hss}%
\vss}$%
\quad
\fi
\ignorespaces
}
%% در دستورات زیر محیط فهرست اشکال باز تعریف شده و اولا این محیط به bookmark اضافه شده و ثانیا مشکل صفحات اضافی حل شده است. ثالثا فاصله خطوط برای زیبایی در این
%% محیط اندکی کم شده است، ولی دوباره بعد از آوردن این محیط به حالت اولیه برگشته است. در ضمن از شماره گذاری حرفی برای این محیط استفاده شده است.
\let\Oldlistoffigures\listoffigures
\renewcommand{\listoffigures}{
%% این دستور مشخص میکند که نحوه شمارهگذاری این قسمت به صورت یاد شده باشد.
\pagenumbering{alph}
\restorepagenumber
\baselineskip = \listlineskipVar
\cleardoublepage
\phantomsection
\lofimagetrue
\Oldlistoffigures\clearpage
\lofimagefalse
\baselineskip = \baselineskipVar
\savepagenumber
%% با این دستور نحوه شمارهگذاری به حالت اولیه یعنی (arabic) باز میگردد.
\pagenumbering{arabic}
}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% در دستورات زیر محیط فهرست جداول باز تعریف شده و اولا این محیط به bookmark اضافه شده و ثانیا مشکل صفحات اضافی حل شده است. ثالثا فاصله خطوط برای زیبایی در این
%% محیط اندکی کم شده است، ولی دوباره بعد از آوردن این محیط به حالت اولیه برگشته است. در ضمن از شماره گذاری حرفی برای این محیط استفاده شده است.
\let\Oldlistoftables\listoftables
\renewcommand{\listoftables}{
%% این دستور مشخص میکند که نحوه شمارهگذاری این قسمت به صورت یاد شده باشد.
\pagenumbering{alph}
\restorepagenumber
\baselineskip = \listlineskipVar
\cleardoublepage
\phantomsection
\Oldlistoftables\clearpage
\baselineskip = \baselineskipVar
\savepagenumber
%% با این دستور نحوه شمارهگذاری به حالت اولیه یعنی (arabic) باز میگردد.
\pagenumbering{arabic}
}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%% دستورات لازم برای واژهنامهها، فهرست اختصارات و فهرست نمادها در فایل (Gloss) آورده شده است.
\input{Gloss}
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%============================ دستور برای قرار دادن فهرست اختصارات
\newcommand{\printabbreviation}{
%% این دستور مشخص میکند که نحوه شمارهگذاری این قسمت به صورت یاد شده باشد.
\pagenumbering{alph}
\restorepagenumber
\baselineskip=.75cm
\glossarystyle{mylistAbbr}
\cleardoublepage
\phantomsection
%% با این دستور عنوان فهرست اختصارات به فهرست مطالب اضافه میشود.
\addcontentsline{toc}{chapter}{فهرست اختصارات}
\Oldprintglossary[type=abrr]
\clearpage
\baselineskip = \baselineskipVar
\savepagenumber
%% با این دستور نحوه شمارهگذاری به حالت اولیه یعنی (arabic) باز میگردد.
\pagenumbering{arabic}
}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
\newcommand{\printnotation}{
\pagenumbering{harfi}
\restorepagenumber
\baselineskip = \listlineskipVar
\cleardoublepage
\phantomsection
%% با این دستور عنوان فهرست نمادها به فهرست مطالب اضافه میشود.
\addcontentsline{toc}{chapter}{فهرست نمادها}
\glossarystyle{mylistNotation}
\Oldprintglossary[type=symbols]
\clearpage
\baselineskip = \baselineskipVar
\savepagenumber
%% با این دستور نحوه شمارهگذاری به حالت اولیه یعنی (arabic) باز میگردد.
\pagenumbering{arabic}
}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
\let\Oldbibliography\bibliography
\renewcommand{\bibliography}[1]{
\let\appendix\relax
\baselineskip=.5cm
%% با این دستور عنوان این قسمت به (مراجع) تغییر پیدا میکند.
\renewcommand{\bibname}{مراجع}
\clearpage
\phantomsection
\bibliographystyle{ieeetr-fa}
\Oldbibliography{#1}
}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%%% در این جا محیط هر دو واژه نامه را باز تعریف کرده ایم، تا اولا مشکل قرار دادن صفحه اضافی را حل کنیم، ثانیا عنوان واژه نامه ها را با دستور addcontentlist وارد فهرست مطالب کرده ایم.
\renewcommand{\printglossary}{
\let\appendix\relax
\baselineskip=.75cm
\clearpage
\phantomsection
%% این دستور موجب این میشود که واژهنامهها در حالت دو ستونی نوشته شود.
\twocolumn{}
%% با این دستور عنوان واژهنامه به فهرست مطالب اضافه میشود.
\addcontentsline{toc}{chapter}{واژه نامه انگلیسی به فارسی}
\glossarystyle{mylistEn}
\Oldprintglossary[type=english]
\clearpage
\phantomsection
%% با این دستور عنوان واژهنامه به فهرست مطالب اضافه میشود.
\addcontentsline{toc}{chapter}{واژه نامه فارسی به انگلیسی}
\glossarystyle{mylistFa}
\Oldprintglossary[type=persian]
\onecolumn{}
\baselineskip = \baselineskipVar
}%
%%% 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
% دستوری برای رنگآمیزی محیط Item در dinglist
\newcommand{\itemcolor}[1]{\renewcommand{\makelabel}[1]{\color{#1}\hfil ##1}}
%%\begin{dinglist}{110}
%% \itemcolor{myblue}
%% \item Sample text
%% \itemcolor{green!70}
%% \item Sample text
%% \itemcolor{red!50}
%%\end{dinglist}
%%%
%%%
%%% %%% نام قالب را تعیین می کند و همچنین بیان می کند که آخرین به روز رسانی این قالب
%%% در چه زمانی بوده است. یک توصف مختصر هم از این بسته در اینجا امده است.
\ProvidesClass{Boostan-Thesis}
%%% تمام پارامترهای ورودی برای تنظیم متن را به کلاس زیر ارسال میکنیم
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{Boostan-UserManual}}
\ProcessOptions
\LoadClass[oneside]{Boostan-UserManual}
%%% AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
%%% برای تنظیم حاشیه صفحات
%\geometry{top=3cm, bottom=2.5cm, left=2cm, right=2.5cm}
%% با دستور زیر می توانید فونتی مخصوص عبارات فارسی تعیین کنید:
\settextfont[Scale=1.3]{B Nazanin}
%%\settextfont[Scale=1.2]{XB Niloofar}
%% شما با دستور زیر بعد از فراخوانی بسته xepersian می توانید فونت انگلیسی را تعیین کنید
%% دقت کنید که عبارات انگلیسی شما باید در دستور \lr{} قرار گیرد تا xepersian بتواند بفمهد که این عبارات انگلیسی است
\setlatintextfont[Scale=1]{Times New Roman}
%%\setlatintextfont[Scale=1.1]{Linux Libertine}
% % تعریف برای فونت اعداد و ارقام
%\setdigitfont[Scale=1.1]{XB Zar}
%% توسط دستورات defpersianfont و deflatinfont به ترتیب می توان یکسری فونت فارسی و انگلیسی دیگر تعریف کرد که در جاهای دیگر متن بتوان از آن استفاده کرد. برای استفاده کافی است که عبارتی که می خواهیم فونت آن عوض شود را به صورت زیر به عنوان نمونه بنویسیم.
%% \versionfont{این یک مثال است. }
%% تعریف یکسری فونت برای قسمت عنوان پروژه و ما بقی قسمت ها فونت قسمت "موسسه " در صفحه عنوان
\defpersianfont\tablefont[Scale=.8]{XM Traffic}
\defpersianfont\pejoheshfont[Scale=1.4]{Titr Bold}
%%فونت اسم گروه XB Titre
\defpersianfont\groupfont[Scale=1.4]{Zar}
%%% فونت عنوان گزارش
\defpersianfont\titlefont[Scale=2.4]{Titr Bold}
%% فونت نسخه گزارش
\defpersianfont\versionfont[Scale=1.6]{Mitra}
\defpersianfont\payanFont[Scale=1.8]{XB Yas}
\defpersianfont\nastaliq[Scale=2]{IranNastaliq}
\defpersianfont\farsifontshafigh[Scale=1.3]{Adobe Arabic}
\defpersianfont\titrt[Scale=1]{XB Titre}
\defpersianfont\traffict[Scale=1]{B Traffic}
\defpersianfont\farsifontsayeh[Scale=1.5]{XB Kayhan Sayeh}
\defpersianfont\titlefont[Scale=2.4]{Titr}
%% فونتهای مورد نیاز برای صفحه شروع
\defpersianfont\logofontR[Scale=1.2]{Zar}
\defpersianfont\typefontR[Scale=1.3]{B Nazanin}
\defpersianfont\titlefontR[Scale=2]{Titr}
\defpersianfont\datafontR[Scale=1.4]{Zar}
\deflatinfont\tableFontEn[Scale=.9]{Adobe Arabic}
%% با استفاده از این دستور میتوان فونت و فارسی و یا انگلیسی بودن اعداد در فرمولها را به حالت اولیه (یعنی پیشفرض لاتک) برگرداند.
\DefaultMathsDigits
%\DeclareMathSizes{textsize}{mathsize}{scriptsize}{scriptscriptsize}
% گزینه اول: این برای چه دسته فونتی است. پیش فرض استایل ما فونت 10pt است.
% گزینه دوم: اندازه فونت توابع و موجودات ریاضی درون متن.
% گزینه سوم: برای اسکریپت ها، اندازه زیرنویس و بالانویس.
% گزینه چهارم: برای زیرنویس زیرنویس.
% در دستورات زیر ما برای سه حالت، اندازههای مورد نظر را تعریف کرده ایم.
\DeclareMathSizes{10}{11}{9}{8} % For size 10 text
\DeclareMathSizes{11}{12}{11}{10} % For size 11 text
\DeclareMathSizes{12}{13}{12}{11} % For size 12 text
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% قالب صفحه و انتخاب حاشیه ها
%%% برای تعیین اندازه صفحه ابتدا باید اندازه stock و page را با دو دستور زیر تعیین کنیم. برای کارهای ما که هر صفحه ی خروجی در یک صفحه پرینت می شود، این دو مقدار به صورت مساوی مقدار دهی می شود.
%%% در دو دستور زیر ما مقادیر استاندارد برای کاغذ A4 را قرار داده ایم.
\setlength{\headsep}{30pt}
%%%%\setstocksize{29.7cm}{21cm}
%%%%\settrimmedsize{29.7cm}{21cm}{*}
%%%\setlength{\trimtop}{0pt}
%%%\setlength{\trimedge}{\stockwidth}
%%%\addtolength{\trimedge}{-\paperwidth}
%%% در مرحله ی بعدی باید ابعادمتن در کاغذ را مشخص کنیم.
%%%%\settypeblocksize{24.2cm}{16cm}{*}
%%% تعیین کننده حاشیه از بالا (آرگومان اول) و یا از پایین (آرگومان دوم) و یا نسبی (آرگومان سوم)
%%% دقت شود برای جلوگیری از ابهام تنها باید یکی از موارد فوق داده شود.
%%%%\setulmargins{2.5cm}{*}{*}
%%% به مانند دستور بالا، حاشیه از سمت چپ (آرگومان اول) و ...
%%%%\setlrmargins{2cm}{*}{*}
%%%\setmarginnotes{10pt}{10pt}{\onelineskip}
%%%%\setheadfoot{\onelineskip}{2\onelineskip}
%%%\setheaderspaces{*}{2\onelineskip}{*}
%%%%\checkandfixthelayout
%% محیطی برای قرار دادن abstract در گزارش و یا در ابتدای هر فصل. در صورت استفاده از این محیط، متون داخل آن با فونتی متفاوت با فونت متن نوشته شده و در ابتدای متن نیز یک کلمه چکیده اضافه می شود.
\let\oldabstract\abstract
\let\endoldabstract\endabstract
\renewenvironment{abstract}{
\section*{چکیده}
\settextfont[Scale=1.2]{Adobe Arabic}
\setlatintextfont[Scale=1]{Times New Roman}
}{\\*[8pt]}
\newcommand{\entitle}{Fullerene graphs with exponentially many perfect matchings}
\newcommand{\enAuthor}{Farhad Mehrvarzi}
\newcommand{\ensupervisor}{Prof. H. Yousefi Azari}
\newcommand{\engdate}{February 2011}
\newcommand{\enlevel}{{A thesis submitted to the Graduate Studies Office
\\In partical fulfillment of the requirements for}}
\newcommand{\enmajor}{ The degree of Master in thesis \\Applied Mathematics}
\newcommand{\enDep}{University College of Science\\ School of Mathematics, Statistics and\\ Computer Science}
\gdef\@englishtitle{Your Thesis Title}
\def\englishtitle#1{\gdef\@englishtitle{#1}}
\gdef\@englishAuthor{Moh Da}
\def\englishAuthor#1{\gdef\@englishAuthor{#1}}
\gdef\@englishsupervisor{Dr}
\def\englishsupervisor#1{\gdef\@englishsupervisor{#1}}
\gdef\@englishadvisor{Dr}
\def\englishadvisor#1{\gdef\@englishadvisor{#1}}
\gdef\@englishDate{Aug 2012}
\def\englishDate#1{\gdef\@englishDate{#1}}
\newcommand{\thesisInfo}{
\clearpage\newpage
\thispagestyle{empty}
\begin{center}
\large\bfseries به نام او
\end{center}
\vspace*{\stretch{3}}
\noindent
پایان نامه جهت دریافت \@farsilevel
\\*[20pt]
عنوان: \@farsititle
\\*[20pt]
نگارش: \@farsiAuthor
\\*[20pt]
حامی کار: \@farsisupervisor
\\*[20pt]
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\defpersianfont\chaptertitlefont[Scale=1.6]{B Titr}
\newcommand\mycustomraggedright{%
\if@RTL\raggedleft%
\else\raggedright%
\fi}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\ifnum \c@secnumdepth >-2\relax
\huge\bfseries \partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
\LARGE\bfseries #2\par}%
\@endpart}
\def\@makechapterhead#1{%
\vspace*{200\p@}%
{\parindent \z@ \raggedleft \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi