LaTeX基礎四:字體字號設置


代碼如下:

 1 %導言區
 2 \documentclass[10pt]{article} %確定normalsize大小,為可選參數,在中括號內,此為10磅,只有10,11,12磅三個選項。
 3 
 4 \usepackage{ctex} 
 5 
 6 %自定義字體
 7 \newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}
 8 
 9 %文稿區
10 \begin{document}
11     %字體族設置(羅馬字體、無襯線字體、打印機字體)
12     \textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}    
13     
14     {\rmfamily Roman Family} {\sffamily Sans Serif Family} {\ttfamily Typewriter Family}
15     
16     {\sffamily who you are? you find self on everyone around. take you as the same as others!}
17     
18     {\ttfamily Are you wiser than others? definitely on. in some days, my it is true. What can you achieve? a luxurious house? a brillilant car? an admirable career? who knows?}
19     
20     %字體系列設置(粗細、寬度)
21     \textmd{Medium Series} \textbf{Boldface Series}
22     
23     {\mdseries Medium Series} {\bfseries Boldface Series}
24     
25     %字體形狀(直立、斜體、偽斜體、小型大寫)
26     \textup{Upright Shape} \textit{Italic Shape} \textsl{Slanted Shape} \textsc{Small Caps Shape}
27     
28     {\upshape Upright Shape} {\itshape Italic Shape} {\slshape Slanted Shape} {\scshape Small Caps Shape}
29     
30     %中文字體
31     {\songti 宋體} \quad {\heiti 黑體} \quad {\fangsong 仿宋} \quad {\kaishu 楷書}
32     
33     中文字體的 \textbf{粗體} 和 \textit{斜體} 。
34     
35     %字體大小,根據normalsize的大小確定,normalsize 在文檔類的參數決定
36     {\tiny           Hello}\\
37     {\scriptsize     Hello}\\
38     {\footnotesize   Hello}\\
39     {\small          Hello}\\
40     {\normalsize      Hello}\\
41     {\large          Hello}\\
42     {\Large          Hello}\\
43     {\LARGE          Hello}\\
44     {\huge           Hello}\\
45     {\Huge           Hello}\\
46     
47     %中文字號設置命令、
48     \zihao{-0} 你好!
49     \zihao{5} 你好!
50     
51     \myfont
52     
53 \end{document}

 

運行結果:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM