-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathminimalist-doc.dtx
2039 lines (1660 loc) · 89.9 KB
/
minimalist-doc.dtx
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
% \iffalse meta-comment
%
% Copyright (C) 2021-2022 by Jinwen XU
% -------------------------------
%
% This file may be distributed and/or modified under the conditions of the LaTeX
% Project Public License, either version 1.3c of this license or (at your option)
% any later version. The latest version of this license is in:
%
% http://www.latex-project.org/lppl.txt
%
% \fi
%
%<*driver>
\ProvidesFile{minimalist-doc.dtx}
%</driver>
%
%<minimalist-doc>\documentclass[classical, simple name]{minimart}
%<einfart-doc-cn,einfart-doc-en,einfart-doc-fr>\documentclass[classical, simple name]{einfart}
%<simplivre-doc-cn,simplivre-doc-en,simplivre-doc-fr>\documentclass[use boldface, simple name]{simplivre}
\linenumbers % Enable line numbers
%%================================
%% Import toolkit
%%================================
\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
\usepackage{blindtext}
%<minimalist-doc,einfart-doc-en,simplivre-doc-en>\UseLanguage{English}
%<einfart-doc-cn,simplivre-doc-cn>\UseLanguage{Chinese}
%<einfart-doc-fr,simplivre-doc-fr>\UseLanguage{French}
%%================================
%% For typesetting code
%%================================
\usepackage{listings}
\usepackage{xcolor}
\usepackage{setspace}
\definecolor{code-main}{RGB}{70,130,180}
\definecolor{code-expl3}{RGB}{240,50,60}
\definecolor{code-option}{RGB}{40,110,20}
\definecolor{code-keys}{RGB}{100,130,150}
\definecolor{code-comment}{RGB}{20,120,80}
\definecolor{code-background}{gray}{0.99}
\lstset{
language = [LaTeX]TeX,
basicstyle = \ttfamily,
keywordstyle = \color{code-main},
commentstyle = \color{code-comment},
showstringspaces = false,
breaklines = true,
frame = lines,
backgroundcolor = \color{code-background},
flexiblecolumns = true,
escapeinside = {(*}{*)},
alsoletter = {_,:},
% numbers = left,
% firstnumber = last,
numberstyle = \scriptsize\ttfamily,
stepnumber = 1,
numbersep = 5pt,
}
\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{% LaTeX2 commands
classoffset = 0,
texcsstyle =* \color{code-main},
moretexcs =
{
linenumbers,nolinenumbers,
part,parttext,chapter,section,subsection,subsubsection,
frontmatter,mainmatter,backmatter,
tableofcontents,
href,
color,
NameTheorem,CreateTheorem,
cref,
ProjLib,
DNF,
UseLanguage,UseOtherLanguage,AddLanguageSetting,
maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,
qedhere,
}
}
\lstset{% LaTeX3 commands
classoffset = 1,
texcsstyle =* \color{code-expl3},
moretexcs =
{
}
}
\lstnewenvironment{code}{\setstretch{1.05}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
\newcommand{\classoption}[1]{\texttt{\textcolor{code-option}{#1}}}
\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}
%%================================
%% tip
%%================================
\usepackage[many]{tcolorbox}
%<einfart-doc-cn,simplivre-doc-cn>\newenvironment{tip}[1][提示]
%<minimalist-doc,einfart-doc-en,simplivre-doc-en>\newenvironment{tip}[1][Tip]
%<einfart-doc-fr,simplivre-doc-fr>\newenvironment{tip}[1][Astuce]
{%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
width = \textwidth,
colback = paper, colbacktitle = paper,
colframe = gray!50, boxrule=0.2mm,
coltitle = black,
fonttitle = \sffamily,
attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm},
boxed title style = {boxrule=0pt, colframe=paper},
before skip = 3mm,
after skip = 3mm,
top = 2.5mm,
bottom = 1.5mm,
title={\scshape\sffamily #1}]%
}
{%
\end{tcolorbox}%
\ResumeLineNumbers%
}
%%================================
%% Names
%%================================
\providecommand{\minimalist}{\textsf{minimalist}}
\providecommand{\minimart}{\textsf{minimart}}
\providecommand{\minimbook}{\textsf{minimbook}}
\providecommand{\einfart}{\textsf{einfart}}
\providecommand{\simplivre}{\textsf{simplivre}}
%%================================
%% Titles
%%================================
%<*minimalist-doc,einfart-doc-en,einfart-doc-cn,einfart-doc-fr>
\let\LevelOneTitle\section
\let\LevelTwoTitle\subsection
\let\LevelThreeTitle\subsubsection
%</minimalist-doc,einfart-doc-en,einfart-doc-cn,einfart-doc-fr>
%
%<*simplivre-doc-en,simplivre-doc-cn,simplivre-doc-fr>
\let\LevelOneTitle\chapter
\let\LevelTwoTitle\section
\let\LevelThreeTitle\subsection
%</simplivre-doc-en,simplivre-doc-cn,simplivre-doc-fr>
%%================================
%% Main text
%%================================
\begin{document}
\def\PackageVersion{2022/09/03}
%<*minimalist-doc>
\title{\minimalist{}, write your articles or books in a simple and clear way}
\author{Jinwen XU}
\thanks{Corresponding to: \texttt{\minimalist{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
\maketitle
%</minimalist-doc>
%
%<*einfart-doc-en>
\title{\einfart{}, write your articles in a simple and clear way}
\author{Jinwen XU}
\thanks{Corresponding to: \texttt{\einfart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{\TheDate{\PackageVersion}[only-year-month], in Paris}
\maketitle
%</einfart-doc-en>
%
%<*simplivre-doc-en>
\LocallyStopLineNumbers
\frontmatter
\TitlePage [ style = simple ]
{
, title = \simplivre{}
, subtitle = {
\textsc{Write your books in \\a simple and clear way}\\[20pt]
\smaller[3] Corresponding to: \texttt{\simplivre{} \PackageVersion}
}
, author = Jinwen XU
, date = {\TheDate{\PackageVersion}[only-year-month], in Paris}
}
\ResumeLineNumbers
%</simplivre-doc-en>
%
%<*einfart-doc-cn>
\title{\einfart{},以极简主义风格排版你的文章}
\author{许锦文}
\thanks{对应版本. \texttt{\einfart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{\TheDate{\PackageVersion}[only-year-month],巴黎}
\maketitle
%</einfart-doc-cn>
%
%<*simplivre-doc-cn>
\frontmatter
\LocallyStopLineNumbers
\TitlePage [ style = simple ]
{
, title = \simplivre{}
, subtitle = {
\textsc{以极简主义风格排版你的图书}\\[20pt]
\smaller[3] 对应版本. \texttt{\simplivre{} \PackageVersion}
}
, author = 许锦文
, date = {\TheDate{\PackageVersion}[only-year-month],巴黎}
}
\ResumeLineNumbers
%</simplivre-doc-cn>
%
%<*einfart-doc-fr>
\title{\einfart{}, écrivez vos articles de manière simple et claire}
\author{Jinwen XU}
\thanks{Correspondant à : \texttt{\einfart{} \PackageVersion}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{\TheDate{\PackageVersion}[only-year-month], à Paris}
\maketitle
%</einfart-doc-fr>
%
%<*simplivre-doc-fr>
\frontmatter
\LocallyStopLineNumbers
\TitlePage [ style = simple ]
{
, title = \simplivre{}
, subtitle = {
\textsc{Écrivez vos livres \\de manière simple et claire}\\[20pt]
\smaller[3] Correspondant à : \texttt{\simplivre{} \PackageVersion}
}
, author = Jinwen XU
, date = {\TheDate{\PackageVersion}[only-year-month], à Paris}
}
\ResumeLineNumbers
%</simplivre-doc-fr>
%<*minimalist-doc>
\begin{abstract}
\minimalist{} is a series of styles and classes for you to typeset your articles or books in a simple and clear manner. The original intention in designing this series was to write drafts and notes that look simple yet not shabby. With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication.
Finally, this documentation is typeset using the \minimart{} class (with the option \classoption{classical}). You can think of it as a short introduction and demonstration.
\end{abstract}
%</minimalist-doc>
%
%<*einfart-doc-en>
\begin{abstract}
\einfart{} is part of the \minimalist{} class series, whose name is taken from German word ``einfach'' (``simple''), combined with the first three letters of ``artikel'' (``article''). The entire collection includes \minimart{} and \einfart{} for typesetting articles, and \minimbook{} and \simplivre{} for typesetting books. My original intention in designing them was to write drafts and notes that look simple yet not shabby.
\einfart{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \einfart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
This documentation is typeset using \einfart{} (with the option \classoption{classical}). You can think of it as a short introduction and demonstration.
\end{abstract}
%</einfart-doc-en>
%
%<*einfart-doc-cn>
\begin{abstract}
\einfart{} 是 \minimalist{} 文档类系列的成员之一,其名称取自于德文的 einfach (``简约''),并取了 artikel (``文章'') 的前三个字母组合而成。整个 \minimalist{} 系列包含用于排版文章的 \minimart{}、\einfart{} 以及用于排版书的 \minimbook{}、\simplivre{}。我设计这一系列的初衷是为了撰写草稿与笔记,使之看上去简朴而不简陋。
\einfart{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
这篇说明文档即是用 \einfart{} 排版的 (使用了参数 \classoption{classical}),你可以把它看作一份简短的说明与演示。
\end{abstract}
%</einfart-doc-cn>
%
%<*einfart-doc-fr>
\begin{abstract}
\einfart{} fait partie de la série de classes \minimalist{}, dont le nom est tiré du mot allemand «~einfach~» (simple), combiné avec les trois premières lettres de «~artikel~» (article) . L'ensemble de la collection comprend \minimart{} et \einfart{} pour la composition d'articles, et \minimbook{} et \simplivre{} pour celle des livres. Mon intention initiale en les concevant était d'écrire des brouillons et des notes qui semblent simples mais pas grossières.
\einfart{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \einfart{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
Cette documentation est composée à l'aide de \einfart{} (avec l'option \classoption{classical}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\end{abstract}
%</einfart-doc-fr>
%<*simplivre-doc-en>
\chapter{Preface}
\simplivre{} is part of the \minimalist{} class series. Its name is taken from French words ``simple'' and ``livre'' (for ``book''). The entire collection includes \minimart{} and \einfart{} for typesetting articles, and \minimbook{} and \simplivre{} for typesetting books. My original intention in designing them was to write drafts and notes that look simple yet not shabby.
\simplivre{} has multi-language support, including Chinese (simplified and traditional), English, French, German, Italian, Japanese, Portuguese (European and Brazilian), Russian and Spanish. These languages can be switched seamlessly in a single document. Due to the usage of custom fonts, \einfart{} requires \hologo{XeLaTeX} or \hologo{LuaLaTeX} to compile.
This documentation is typeset using \simplivre{} (with the option \classoption{use boldface}). You can think of it as a short introduction and demonstration.
\bigskip
\begin{tip}
Multi-language support, theorem-like environments, draft marks and some other features are provided by the \ProjLib{} toolkit. Here we only briefly discuss how to use it with this document class. For more detailed information, you can refer to the documentation of \ProjLib{}.
\end{tip}
%</simplivre-doc-en>
%
%<*simplivre-doc-cn>
\chapter{前言}
\simplivre{} 是 \minimalist{} 文档类系列的成员之一,其名称取自于法文的 simple (“简约”),以及 livre (“书”),由二者组合而成。整个 \minimalist{} 系列包含用于排版文章的 \minimart{}、\einfart{} 以及用于排版书的 \minimbook{}、\simplivre{}。我设计这一系列的初衷是为了撰写草稿与笔记,使之看上去简朴而不简陋。
\simplivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \classoption{use boldface}),你可以把它看作一份简短的说明与演示。
\bigskip
\begin{tip}
多语言支持、定理类环境、未完成标记等功能是由 \ProjLib{} 工具箱提供的,这里只给出了将其与本文档类搭配使用的要点。如需获取更详细的信息,可以参阅 \ProjLib{} 的说明文档。
\end{tip}
%</simplivre-doc-cn>
%
%<*simplivre-doc-fr>
\chapter{Préface}
\simplivre{} fait partie de la série de classes \minimalist{}, dont le nom est tiré des mots «~simple~» et «~livre~». L'ensemble de la collection comprend \minimart{} et \einfart{} pour la composition d'articles, et \minimbook{} et \simplivre{} pour celle des livres. Mon intention initiale en les concevant était d'écrire des brouillons et des notes qui semblent simples mais pas grossières.
\simplivre{} prend en charge plusieurs langues, notamment le chinois (simplifié et traditionnel), l'anglais, le français, l'allemand, l'italien, le japonais, le portugais (européen et brésilien), le russe et l'espagnol. Ces langues peuvent être commutées de manière transparente dans un seul document. En raison de l'utilisation de polices personnalisées, \simplivre{} demande soit \hologo{XeLaTeX} soit \hologo{LuaLaTeX} pour la compilation.
Cette documentation est composée à l'aide de \simplivre{} (avec l'option \classoption{use boldface}). Vous pouvez le considérer comme une courte introduction et une démonstration.
\bigskip
\begin{tip}
La prise en charge multilingue, les environnements de type théorème, les marques de brouillon et quelques autres fonctionnalités sont fournis par la boîte à outils \ProjLib{}. Ici, nous ne discutons que brièvement de la façon de l'utiliser avec cette classe de document. Pour plus d'informations, veuillez vous référer à la documentation de \ProjLib{}.
\end{tip}
%</simplivre-doc-fr>
%<minimalist-doc,einfart-doc-cn,einfart-doc-en,einfart-doc-fr>\setcounter{tocdepth}{2}
%<!einfart-doc-cn>\tableofcontents
%<einfart-doc-cn>{\setstretch{1.07}\tableofcontents}
%<*simplivre-doc-en>
\mainmatter
\part{Instruction}
\parttext{You can add some introductory text here via \lstinline|\\parttext|\meta{text}.}
%</simplivre-doc-en>
%
%<*simplivre-doc-cn>
\mainmatter
\part{说明}
\parttext{可以通过 \lstinline|\\parttext|\meta{text} 在这里添加一些说明}
%</simplivre-doc-cn>
%
%<*simplivre-doc-fr>
\mainmatter
\part{Instruction}
\parttext{Vous pouvez ajouter quelque texte d'introduction ici via \lstinline|\\parttext|\meta{text}.}
%</simplivre-doc-fr>
%<*minimalist-doc,einfart-doc-en,simplivre-doc-en>
\medskip
\LevelOneTitle*{Before you start}
%<minimalist-doc,einfart-doc-en>\addcontentsline{toc}{section}{Before you start}
%<simplivre-doc-en>\addcontentsline{toc}{chapter}{Before you start}
%
In order to use the package or classes described here, you need to:
\begin{itemize}
\item install TeX Live or MikTeX of the latest possible version, and make sure that \texttt{minimalist} and \texttt{projlib} are correctly installed in your \TeX{} system.
%<minimalist-doc> \item download and install the required fonts if needed.
%<!minimalist-doc> \item download and install the required fonts, see the section "On the default fonts".
\item be familiar with the basic usage of \LaTeX{}, and know how to compile your document with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}
%</minimalist-doc,einfart-doc-en,simplivre-doc-en>
%
%<*einfart-doc-cn,simplivre-doc-cn>
\medskip
\LevelOneTitle*{开始之前}
%<minimalist-doc,einfart-doc-en>\addcontentsline{toc}{section}{开始之前}
%<simplivre-doc-en>\addcontentsline{toc}{chapter}{开始之前}
%
为了使用这篇文档中提到的文档类,你需要:
\begin{itemize}
\item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{minimalist} 和 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
\item 下载并安装所需的字体,参考“关于默认字体”这一节。
\item 熟悉 \LaTeX{} 的基本使用方式,且会用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
\end{itemize}
%</einfart-doc-cn,simplivre-doc-cn>
%
%<*einfart-doc-fr,simplivre-doc-fr>
\LevelOneTitle*{Avant de commencer}
%<einfart-doc-fr>\addcontentsline{toc}{section}{Avant de commencer}
%<simplivre-doc-fr>\addcontentsline{toc}{chapter}{Avant de commencer}
Pour utiliser les classes de documents décrites ici, vous devez :
\begin{itemize}
\item installer TeX Live ou MikTeX de la dernière version possible, et vous assurer que \texttt{minimalist} et \texttt{projlib} sont correctement installés dans votre système \TeX{}.
\item télécharger et installer les polices requises, voir «~À propos des polices par défaut~».
\item être familiarisé avec l'utilisation de base de \LaTeX{}, et savoir comment compiler vos documents avec \hologo{pdfLaTeX}, \hologo{XeLaTeX} ou \hologo{LuaLaTeX}.
\end{itemize}
%</einfart-doc-fr,simplivre-doc-fr>
%<*minimalist-doc>
\LevelOneTitle{Introduction}
\minimalist{} is a series of styles and classes for you to typeset your articles or books in a simple and clear manner. The original intention in designing this series was to write drafts and notes that look simple yet not shabby.
The entire collection includes \verb|minimalist.sty|, which is the main style shared by all of the following classes; \verb|minimart.cls| for typesetting articles and \verb|minimbook.cls| for typesetting books. They compile with any major \TeX{} engine, with native support to English, French, German, Italian, Portuguese (European and Brazilian) and Spanish typesetting via \lstinline|\UseLanguage| (see the instruction below for detail).
You can also found \einfart{} and \simplivre{} on CTAN. They are the enhanced version of \minimart{} and \minimbook{} with unicode support. With this, they can access to more beautiful fonts, and additionally have native support for Chinese, Japanese and Russian typesetting. On the other hand, they need to be compiled with \hologo{XeLaTeX} or \hologo{LuaLaTeX} (not \hologo{pdfLaTeX}).
With the help of the \ProjLib{} toolkit, also developed by the author, the classes provided here have multi-language support, preset theorem-like environments with clever reference support, and many other functionalities such as draft marks, enhanced author information block, mathematical symbols and shortcuts, etc. Notably, using these classes, one can organize the author information in the \AmS{} fashion, makes it easy to switch to journal classes later for publication. For more detailed information, you can refer to the documentation of \ProjLib{} by running \lstinline|texdoc projlib| in the command line.
%</minimalist-doc>
%<*minimalist-doc>
\LevelOneTitle{Usage and examples}
\LevelTwoTitle{How to load it}
You can directly use \minimart{} or \minimbook{} as your document class. In this way, you can directly begin writing your document, without having to worry about the configurations.
\begin{code}
\documentclass{minimart} (*{\normalfont or}*) \documentclass{minimbook}
\end{code}
\begin{tip}
You may wish to use \einfart{} or \simplivre{} instead, which should produce better result. All the examples later using \minimart{} or \minimbook{} can be adopted to \einfart{} and \simplivre{} respectively, without further modification.
\end{tip}
You can also use the default classes \textsf{article} or \textsf{book}, and load the \minimalist{} package. This way, only the basic styles are set, and you can thus use your preferred fonts and page layout. All the features mentioned in this article are provided.
\begin{code}
\documentclass{article} (*{\normalfont or}*) \documentclass{book}
\usepackage{minimalist}
\end{code}
%</minimalist-doc>
%
%<*einfart-doc-en>
\LevelOneTitle{Usage and examples}
\LevelTwoTitle{How to load it}
One only needs to put
\begin{code}
\documentclass{einfart}
\end{code}
as the first line to use the \einfart{} class. Please note that you need to use either \hologo{XeLaTeX} or \hologo{LuaLaTeX} engine to compile.
%</einfart-doc-en>
%
%<*simplivre-doc-en>
\LevelOneTitle{Usage and examples}
\LevelTwoTitle{How to load it}
One only needs to put
\begin{code}
\documentclass{simplivre}
\end{code}
as the first line to use the \simplivre{} class.
\begin{tip}[Attention]
You need to use either \hologo{XeLaTeX} or \hologo{LuaLaTeX} engine to compile.
\end{tip}
%</simplivre-doc-en>
%
%<*einfart-doc-cn>
\LevelOneTitle{使用示例}
\LevelTwoTitle{如何加载}
只需要在第一行写:
\begin{code}
\documentclass{einfart}
\end{code}
即可使用 \einfart{} 文档类。请注意,要使用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎才能编译。
%</einfart-doc-cn>
%
%<*simplivre-doc-cn>
\LevelOneTitle{使用示例}
\LevelTwoTitle{如何加载}
只需要在第一行写:
\begin{code}
\documentclass{simplivre}
\end{code}
即可使用 \simplivre{} 文档类。
\begin{tip}[请注意]
要使用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎才能编译。
\end{tip}
%</simplivre-doc-cn>
%
%<*einfart-doc-fr>
\LevelOneTitle{Utilisation et exemples}
\LevelTwoTitle{Comment l'ajouter}
Il suffit simplement de mettre
\begin{code}
\documentclass{einfart}
\end{code}
comme première ligne pour utiliser la classe \einfart{}. Veuillez noter que vous devez utiliser le moteur \hologo{XeLaTeX} ou \hologo{LuaLaTeX} pour compiler.
%</einfart-doc-fr>
%
%<*simplivre-doc-fr>
\LevelOneTitle{Utilisation et exemples}
\LevelTwoTitle{Comment l'ajouter}
Il suffit simplement de mettre
\begin{code}
\documentclass{simplivre}
\end{code}
comme première ligne pour utiliser la classe \simplivre{}.
\begin{tip}[Attention]
Vous devez utiliser le moteur \hologo{XeLaTeX} ou \hologo{LuaLaTeX} pour compiler.
\end{tip}
%</simplivre-doc-fr>
%<*minimalist-doc>
\LevelTwoTitle{Example - \minimart}
Let's first look at a complete example of \minimart{} (the same works for \einfart{}).
%</minimalist-doc>
%
%<*einfart-doc-en,simplivre-doc-en>
\LevelTwoTitle{Example - A complete document}
Let's first look at a complete document.
%</einfart-doc-en,simplivre-doc-en>
%
%<*einfart-doc-cn,simplivre-doc-cn>
\LevelTwoTitle{一篇完整的文档示例}
首先来看一段完整的示例。
%</einfart-doc-cn,simplivre-doc-cn>
%
%<*einfart-doc-fr,simplivre-doc-fr>
\LevelTwoTitle{Exemple - Un document complet}
Regardons d'abord un document complet.
%</einfart-doc-fr,simplivre-doc-fr>
%<*minimalist-doc,einfart-doc-cn,einfart-doc-en,einfart-doc-fr>
\begin{code*}
%<minimalist-doc>\documentclass{minimart}
%<einfart-doc-cn,einfart-doc-en,einfart-doc-fr>\documentclass{einfart}
\usepackage{ProjLib}
\UseLanguage{French}
\begin{document}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
Ceci est un résumé. \DNF<(*\meta{some hint}*)>
\end{abstract}
\begin{keyword}
AAA, BBB, CCC, DDD, EEE
\end{keyword}
\section{Un théorème}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
\end{theorem}
Référence du théorème: \cref{thm:abc}
\end{document}
\end{code*}
%</minimalist-doc,einfart-doc-cn,einfart-doc-en,einfart-doc-fr>
%<*simplivre-doc-cn,simplivre-doc-en,simplivre-doc-fr>
\begin{code*}
\documentclass{simplivre}
\usepackage{ProjLib}
\UseLanguage{French}
\begin{document}
\frontmatter
\begin{titlepage}
(*\meta{code for titlepage}*)
\end{titlepage}
\tableofcontents
\mainmatter
\part{(*\meta{part title}*)}
\parttext{(*\meta{text after part title}*)}
\chapter{(*\meta{chapter title}*)}
\section{(*\meta{section title}*)}
\DNF<(*\meta{some hint}*)>
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
\end{theorem}
Référence du théorème: \cref{thm:abc}
\backmatter
...
\end{document}
\end{code*}
%</simplivre-doc-cn,simplivre-doc-en,simplivre-doc-fr>
%<*minimalist-doc,einfart-doc-en,simplivre-doc-en>
If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
%</minimalist-doc,einfart-doc-en,simplivre-doc-en>
%
%<*einfart-doc-cn,simplivre-doc-cn>
如果你觉得这个例子有些复杂,不要担心。现在我们来一点点地观察这个例子。
%</einfart-doc-cn,simplivre-doc-cn>
%
%<*einfart-doc-fr,simplivre-doc-fr>
Si vous trouvez cela un peu compliqué, ne vous inquiétez pas. Examinons maintenant cet exemple pièce par pièce.
%</einfart-doc-fr,simplivre-doc-fr>
%<*minimalist-doc>
\medskip
\LevelThreeTitle{Initialization}
\medskip
\begin{code}
\documentclass{minimart}
\usepackage{ProjLib}
\end{code}
Initialization is straightforward. The first line loads the document class \minimart{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
%</minimalist-doc>
%
%<*einfart-doc-en>
\LevelThreeTitle{Initialization}
\medskip
\begin{code}
\documentclass{einfart}
\usepackage{ProjLib}
\end{code}
Initialization is straightforward. The first line loads the document class \einfart{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
%</einfart-doc-en>
%
%<*simplivre-doc-en>
\LevelThreeTitle{Initialization}
\medskip
\begin{code}
\documentclass{simplivre}
\usepackage{ProjLib}
\end{code}
Initialization is straightforward. The first line loads the document class \simplivre{}, and the second line loads the \ProjLib{} toolkit to obtain some additional functionalities.
%</simplivre-doc-en>
%
%<*einfart-doc-cn>
\LevelThreeTitle{初始化部分}
\medskip
\begin{code}
\documentclass{einfart}
\usepackage{ProjLib}
\end{code}
初始化部分很简单:第一行加载文档类 \einfart{},第二行加载 \ProjLib{} 工具箱,以便使用一些附加功能。
%</einfart-doc-cn>
%
%<*simplivre-doc-cn>
\LevelThreeTitle{初始化部分}
\medskip
\begin{code}
\documentclass{simplivre}
\usepackage{ProjLib}
\end{code}
初始化部分很简单:第一行加载文档类 \simplivre{},第二行加载 \ProjLib{} 工具箱,以便使用一些附加功能。
%</simplivre-doc-cn>
%
%<*einfart-doc-fr>
\LevelThreeTitle{Initialisation}
\medskip
\begin{code}
\documentclass{einfart}
\usepackage{ProjLib}
\end{code}
L'initialisation est simple. La première ligne ajoute la classe de document \einfart{}, et la deuxième ligne ajoute la boîte à outils \ProjLib{} pour obtenir des fonctionnalités supplémentaires.
%</einfart-doc-fr>
%
%<*simplivre-doc-fr>
\LevelThreeTitle{Initialisation}
\medskip
\begin{code}
\documentclass{simplivre}
\usepackage{ProjLib}
\end{code}
L'initialisation est simple. La première ligne ajoute la classe de document \simplivre{}, et la deuxième ligne ajoute la boîte à outils \ProjLib{} pour obtenir des fonctionnalités supplémentaires.
%</simplivre-doc-fr>
%<*minimalist-doc,einfart-doc-en,simplivre-doc-en>
\LevelThreeTitle{Set the language}
\medskip
\begin{code}
\UseLanguage{French}
\end{code}
This line indicates that French will be used in the document (by the way, if only English appears in your article, then there is no need to set the language). You can also switch the language in the same way later in the middle of the text. Supported languages include Simplified Chinese, Traditional Chinese, Japanese, English, French, German, Spanish, Portuguese, Brazilian Portuguese and Russian%
%<minimalist-doc>\footnote{The language Simplified Chinese, Traditional Chinese, Japanese and Russian requires Unicode support, thus the classes \einfart{} or \simplivre{}.}%
.%
For detailed description of this command and more related commands, please refer to the section on the multi-language support.
%</minimalist-doc,einfart-doc-en,simplivre-doc-en>
%
%<*einfart-doc-cn,simplivre-doc-cn>
\LevelThreeTitle{设定语言}
\medskip
\begin{code}
\UseLanguage{French}
\end{code}
这一行表明文档中将使用法语(如果你的文章中只出现英语,那么可以不需要设定语言)。你也可以在文章中间用同样的方式再次切换语言。支持的语言包括简体中文、繁体中文、日文、英语、法语、德语、西班牙语、葡萄牙语、巴西葡萄牙语、俄语。
对于这一命令的详细说明以及更多相关命令,可以参考后面关于多语言支持的小节。
%</einfart-doc-cn,simplivre-doc-cn>
%
%<*einfart-doc-fr,simplivre-doc-fr>
\LevelThreeTitle{Choisir la langue}
\medskip
\begin{code}
\UseLanguage{French}
\end{code}
Cette ligne indique que le français sera utilisé dans le document (d'ailleurs, si seul l'anglais apparaît dans votre article, alors il n'est pas nécessaire de choisir la langue). Vous pouvez également changer de langue de la même manière plus tard au milieu du texte. Les langues prises en charge sont les suivantes : chinois simplifié, chinois traditionnel, japonais, anglais, français, allemand, espagnol, portugais, portugais brésilien et russe.
Pour une description détaillée de cette commande et d'autres commandes associées, veuillez vous référer à la section sur le support multilingue.
%</einfart-doc-fr,simplivre-doc-fr>
%<*minimalist-doc,einfart-doc-en>
\LevelThreeTitle{Title, author information, abstract and keywords}
\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
(*\meta{abstract}*)
\end{abstract}
\begin{keyword}
(*\meta{keywords}*)
\end{keyword}
\end{code}
This part begins with the title and author information block. The example shows the basic usage, but in fact, you can also write:
\begin{code}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
...
\end{code}
In addition, you may also write in the \AmS{} fashion, i.e.:
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
\begin{abstract}
(*\meta{abstract}*)
\end{abstract}
\maketitle
\end{code}
%</minimalist-doc,einfart-doc-en>
%
%<*einfart-doc-cn>
\LevelThreeTitle{标题,作者信息,摘要与关键词}
\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
(*\meta{abstract}*)
\end{abstract}
\begin{keyword}
(*\meta{keywords}*)
\end{keyword}
\end{code}
开头部分是标题和作者信息块。这个例子中给出的是最基本的形式,事实上你还可以这样写:
\begin{code}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
...
\end{code}
另外,你还可以采用 \AmS{} 文档类的写法:
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
\begin{abstract}
(*\meta{abstract}*)
\end{abstract}
\maketitle
\end{code}
%</einfart-doc-cn>
%
%<*einfart-doc-fr>
\LevelThreeTitle{Titre, informations sur l'auteur, résumé et mots-clés}
\medskip
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
\date{\TheDate{2022-04-01}}
\maketitle
\begin{abstract}
(*\meta{abstract}*)
\end{abstract}
\begin{keyword}
(*\meta{keywords}*)
\end{keyword}
\end{code}
Cette partie commence par le titre et le bloc d'informations sur l'auteur. L'exemple montre l'utilisation de base, mais en fait, vous pouvez également écrire comme :
\begin{code}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
...
\end{code}
De plus, vous pouvez également écrire à la manière \AmS{}, c'est-à-dire :
\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
\date{\TheDate{2022-04-01}}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
\begin{abstract}
(*\meta{abstract}*)
\end{abstract}
\maketitle
\end{code}
%</einfart-doc-fr>
%<*minimalist-doc,einfart-doc-en,simplivre-doc-en>
\LevelThreeTitle{Draft marks}
\medskip
\begin{code}
\DNF<(*\meta{some hint}*)>
\end{code}
When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.
%</minimalist-doc,einfart-doc-en,simplivre-doc-en>
%
%<*einfart-doc-cn,simplivre-doc-cn>
\LevelThreeTitle{未完成标记}
\medskip
\begin{code}
\DNF<(*\meta{some hint}*)>
\end{code}
当你有一些地方尚未完成的时候,可以用这条指令标记出来,它在草稿阶段格外有用。
%</einfart-doc-cn,simplivre-doc-cn>
%
%<*einfart-doc-fr,simplivre-doc-fr>
\LevelThreeTitle{Marques de brouillon}
\medskip
\begin{code}
\DNF<(*\meta{some hint}*)>
\end{code}
Lorsque vous avez des endroits qui ne sont pas encore finis, vous pouvez les marquer avec cette commande, ce qui est particulièrement utile lors de la phase de brouillon.
%</einfart-doc-fr,simplivre-doc-fr>
%<*minimalist-doc,einfart-doc-en,simplivre-doc-en>
\LevelThreeTitle{Theorem-like environments}
\medskip
\begin{code}
\begin{theorem}\label{thm:abc}
Ceci est un théorème.
\end{theorem}
Référence du théorème: \cref{thm:abc}