LaTeX學習-day02

LaTeX學習-day02
教程鏈接:B站
使用環境:

  1. 代碼:
% 導言區
\documentclass[10pt]{article} %10pt-12pt

\usepackage{ctex}
%核心思想是:內容與格式分離,建議這裏定義命令執行格式,然後引用即可
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}

% 正文區(文稿區)
\begin{document}
	% 字體族設置(羅馬字體、無襯線字體、打字機字體)
	%註解:方式一使用字體命令,可以看到text-rm,即字體+簡寫
	\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}
	
	%方式二使用字體申明
	\rmfamily Roman Family {\sffamily Sans Serif Family} {\ttfamily Typewriter Family}
	
	%方式三
	\sffamily who you are? you find self on evryone around. take you as the same as others!
	
	%大括號限定作用範圍
	{\ttfamily Are you wiser than others? defintely no. in some ways, may it is true. What can you achieve? a luxurious house? a brillilant car? an admirable career? who knows?}
	
	%字體系列設置(粗細、寬度)
	\textmd{Medium Series} \textbf{Boldface Series}
	
	{\mdseries Medium Series} {\bfseries Boldface Series}
	
	%字體形狀(直立、斜體、僞斜體、小型大寫)
	\textup{Upright Shape} \textit{Italic Shape}
	\textsl{Slanted Shape} \textsc{Small Caps Shape}
	
	{\upshape Upright Shape} {\itshape Italic Shape}
	{\slshape Slanted Shape} {\scshape Small Caps Shape}
	
	%中文設置
	{\songti 宋體} \quad {\heiti 黑體} \quad {\fangsong 仿宋} \quad {\kaishu 楷書}
	
	中文字體的\textbf{粗體}與\textit{斜體}
	
	%字體大小與\documentclass[10pt]{article}中的[10pt]有關,10pt = 10磅
	{\tiny			Hello}\\
	{\scriptsize	Hello}\\
	{\footnotesize	Hello}\\
	{\small			Hello}\\
	{\normalsize	Hello}\\
	{\large			Hello}\\
	{\Large			Hello}\\
	{\LARGE			Hello}\\
	{\huge			Hello}\\
	{\Huge			Hello}\\
	
	%中文字號設置命令
	\zihao{-0} 你好!
	\zihao{5} 你好!
	
	\myfont
\end{document}
  1. 結果
    在這裏插入圖片描述
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章