初始化

This commit is contained in:
laoyang
2022-05-13 19:50:33 +08:00
parent c80842ba01
commit e77db37db6
59 changed files with 785 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
report.aux
report.log
report.synctex.gz
+15 -1
View File
@@ -1,2 +1,16 @@
# 中国海洋大学科技报告Latex模板
# progartcn
简洁大方的科技类或IT类文章、教程模板
**特性**
- 方便科技类或IT类文章、教程的编写,简洁大方,去繁从简;
- 英文使用 `Minion Pro`, `Myriad Pro``Courier Std` 字体,中文,使用方正系列字体;
- 定制摘要、各级节标题、表格、页眉页脚等样式;
- 定义 JavaScript/ES6, TypeScript, golang 等`listings`未定议的语言样式;
- 定义 shell 命令及输出展示环境:`shellbox``invertedshellbox`
- 使用`tcolorbox`新建 notebox, importantbox 本文框,用于展示“注意”和“重要”信息。
具体效果见样例输出的 PDF。
字体下载及模板更新请移步 GitHub仓库:https://github.com/WisdomFusion/latex-templates。
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+427
View File
@@ -0,0 +1,427 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DrYang - A Report LaTeX Template for OUC
%% yangyq@ouc.edu.cn
%% 2022-03-01
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{report}[A Report LaTeX Template for OUC]
\LoadClass[a4paper]{ctexart}
\RequirePackage{xunicode}
\RequirePackage[dvipsnames]{xcolor}
\RequirePackage[open,openlevel=0,atend]{bookmark}
\RequirePackage{fontspec}
\RequirePackage{titlesec}
\RequirePackage{zhnumber}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% hyperref settings
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{hyperref}
\hypersetup{
bookmarksnumbered,
colorlinks,
linkcolor={black},
citecolor={black},
urlcolor={black}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% graphicx settings
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{graphicx}
\RequirePackage{graphbox}
\RequirePackage{wrapfig}
\graphicspath{{./figs/}{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% geometry settings
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{geometry}
\geometry{
textwidth=138mm,
textheight=215mm,
left=27mm,
%% or
%% inner=23mm,
right=27mm,
%% or
%% outer=18mm,
top=25.4mm, bottom=25.4mm,
headheight=2.17cm,
headsep=4mm,
footskip=12mm,
heightrounded,
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% fonts settings
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \usepackage{ebgaramond}
%%
%\punctstyle{kaiming}
%\setmainfont{Minion Pro}
\setmainfont{Myriad Pro}
\setsansfont{Myriad Pro}
\setmonofont{Courier Std}
\setCJKmainfont[BoldFont={_GBK}, ItalicFont={_GBK}, BoldItalicFont={仿_GBK}]{_GBK}
\setCJKsansfont{_GBK}
\setCJKmonofont{线_GBK}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
\setCJKfamilyfont{fzss}{_GBK}
\newcommand{\fzss}{\CJKfamily{fzss}}
\setCJKfamilyfont{fzxbs}{_GBK}
\newcommand{\fzxbs}{\CJKfamily{fzxbs}}
\setCJKfamilyfont{fzhei}{_GBK}
\newcommand{\fzhei}{\CJKfamily{fzhei}}
\setCJKfamilyfont{fzkai}{_GBK}
\newcommand{\fzkai}{\CJKfamily{fzkai}}
\setCJKfamilyfont{fzfs}{仿_GBK}
\newcommand{\fzfs}{\CJKfamily{fzfs}}
\setCJKfamilyfont{fzzdx}{线_GBK}
\newcommand{\fzzdx}{\CJKfamily{fzzdx}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% titlesec
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \renewcommand\abstractname{Summary}
%%\renewenvironment{abstract}{\noindent\rule{\textwidth}{.5pt}\\[2ex] \centering\begin{minipage}{.97\textwidth}{\zihao{-4}\sffamily\bfseries \centering{\abstractname}}\\}
%%{\par\noindent\end{minipage}\\[2ex] \rule{\textwidth}{.5pt}}
\renewenvironment{abstract}{\noindent\rule{\textwidth}{.5pt}\\[2ex] \centering\begin{minipage}{.97\textwidth}\begin{center}{\zihao{-4}\sffamily\bfseries \abstractname} \\ \end{center}}
{\par\end{minipage}\\[2ex] \noindent\rule{\textwidth}{.5pt}}
%% section
\titleformat{\section}
[hang]
{\sffamily}
{\centering\zihao{-3}\bfseries\thesection\enspace}
{1pt}
{\zihao{-3}\bfseries}
%% subsection
\titleformat{\subsection}
[hang]
{\sffamily}
{\zihao{4}\bfseries\thesubsection\enspace}
{1pt}
{\zihao{4}\bfseries\filright}
%% subsubsection
\titleformat{\subsubsection}
[hang]
{\sffamily}
{\zihao{-4}\bfseries\thesubsubsection\enspace}
{1pt}
{\zihao{-4}\bfseries\filright}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% boxes
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[many]{tcolorbox}
\RequirePackage{fontawesome}
%%
\newtcolorbox{titledbox}[1]{%
tikznode boxed title,
enhanced,
arc=3pt,
interior style={white},
attach boxed title to top center = {yshift=-\tcboxedtitleheight/2},
fonttitle=\normalfont,
colbacktitle=white,coltitle=black,
boxed title style={size=normal,colframe=white,boxrule=0pt},
boxrule=.5pt,
left=5pt, right=5pt, top=5pt, bottom=0pt,
boxsep=5pt,
title={#1},
halign=left,
fontupper=\fzkai
}
%% Note
\newtcolorbox{notebox}{%
enhanced,
arc=2pt,
boxrule=.5pt,
left=5pt, right=5pt, top=0pt, bottom=0pt,
boxsep=5pt,
colframe=NavyBlue,
colback=NavyBlue!5!White,
colbacktitle=NavyBlue!5!White,
coltext=NavyBlue,
title={\textcolor{NavyBlue}{\faStickyNoteO\hspace{.5em}\bfseries{\textbf{}}}},
halign=left,
fontupper=\fzkai
}
%% Important
\newtcolorbox{importantbox}{%
enhanced,
arc=2pt,
boxrule=.5pt,
left=5pt, right=5pt, top=0pt, bottom=0pt,
boxsep=5pt,
colframe=Orange,
colback=Orange!5!White,
colbacktitle=Orange!5!White,
coltext=Orange,
title={\textcolor{Orange}{\faExclamationCircle\hspace{.5em}\bfseries{\textbf{}}}},
halign=left,
fontupper=\fzkai
}
%% verbatim 使
%% \VerbatimEnvironment \begin{Verbatim}
\RequirePackage{fancyvrb}
%%
\newenvironment{shellbox}
{%
\VerbatimEnvironment
\begin{tcolorbox}[
enhanced,
arc=2pt,
boxrule=.5pt,
left=5pt, right=5pt, top=0pt, bottom=0pt,
boxsep=5pt,
colframe=black,
colback=white,
coltext=black,
title={},
fontupper=\linespread{1.2}
]%
\begin{Verbatim}
}
{%
\end{Verbatim}
\end{tcolorbox}
}
%%
\newenvironment{invertedshellbox}
{%
\VerbatimEnvironment
\begin{tcolorbox}[
enhanced,
arc=2pt,
boxrule=.5pt,
left=5pt, right=5pt, top=0pt, bottom=0pt,
boxsep=5pt,
colframe=black!70!white,
colback=black!70!white,
coltext=white,
title={},
fontupper=\linespread{1.2}
]%
\begin{Verbatim}
}
{%
\end{Verbatim}
\end{tcolorbox}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% head and foot
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
\RequirePackage{zhnumber}
\pagestyle{fancy}
\fancyhf{}
\renewcommand\headrulewidth{.5pt}
\renewcommand\footrulewidth{0pt}
%\futurelet\TMPheadrule\def\headrule{{\color{violet}\TMPheadrule}}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhead[C]{\fzkai{\rightmark}}
%\fancyhead[R]{\thepage}
\fancyfoot[L]{\fzkai{\author}}
\fancyfoot[R]{\thepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% code listings
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{listings,verbatim}
\definecolor{codecolorkeywords}{rgb}{0,0,1}
\definecolor{codecolorcomments}{rgb}{0,0.5,0}
\definecolor{codecolorxmlcomments}{rgb}{0.5,0.5,0.5}
\definecolor{codecolorstrings}{rgb}{0.64,0.08,0.08}
\definecolor{codecolortypes}{rgb}{0.17,0.57,0.68}
\lstdefinelanguage{JavaScript}{
keywords={do, if, in, for, let, new, try, var, case, else, enum, eval, null, this, true, void, with, await, break, catch, class, const, false, super, throw, while, yield, delete, export, import, public, return, static, switch, typeof, default, extends, finally, package, private, continue, debugger, function, arguments, interface, protected, implements, instanceof},
sensitive=true,
comment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]',
morestring=[b]"
}
\lstdefinelanguage{TypeScript}{
keywords={abstract, break, case, catch, class, const, continue, debugger, default, delete, do, else, enum, export, extends, false, finally, for, function, if, import, in, instanceof, new, null, return, super, switch, this, throw, true, try, typeof, var, void, while, with, as, implements, interface, let, package, private, protected, public, static, yield, any, boolean, constructor, declare, get, module, require, number, set, string, symbol, type, from, of},
sensitive=true,
comment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]',
morestring=[b]"
}
\lstdefinelanguage{golang}{
keywords={break, default, func, interface, select, case, defer, go, map, struct, chan, else, goto, package, switch, const, fallthrough, if, range, type, continue, for, import, return, var},
sensitive=true,
comment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]',
morestring=[b]"
}
\lstdefinestyle{mystyle}{
% Basic design
basicstyle=\linespread{1.2}\ttfamily,
frame=tb,
framesep=5pt,
framerule=.5pt,
framexleftmargin=10pt,
rulecolor=\color{black},
abovecaptionskip=0pt,
belowcaptionskip=5pt,
aboveskip=5pt,
backgroundcolor=\color{black!5!white},
% Code design
keywordstyle=\color{codecolorkeywords},
commentstyle=\color{codecolorcomments},
stringstyle=\color{codecolorstrings},
numberstyle=\small\color{gray},
breakatwhitespace=false,
breaklines=true,
captionpos=t,
keepspaces=true,
% Line numbers
numbers=none,
numbersep=15pt,
xleftmargin=10pt,
stepnumber=1,
firstnumber=1,
numberfirstline=true,
% Code
tabsize=4,
showspaces=false,
showstringspaces=false,
showtabs=false,
breaklines=true,
}
\lstset{style=mystyle}
%%
\lstdefinestyle{bashstyle}{
backgroundcolor=\color{NavyBlue!10!white},
basicstyle=\linespread{1.2}\ttfamily,
keepspaces=true,
numbers=none,
numbersep=10pt,
frame=l,
framerule=2pt,
framesep=5pt,
framexleftmargin=3pt,
framextopmargin=-5pt,
xleftmargin=10pt,
rulecolor=\color{NavyBlue},
% Code
tabsize=4,
showspaces=false,
showstringspaces=false,
showtabs=false,
breaklines=true,
}
%%
\lstdefinestyle{bashoutputstyle}{
backgroundcolor=\color{black!10!white},
basicstyle=\linespread{1.2}\ttfamily,
keepspaces=true,
numbers=none,
numbersep=10pt,
frame=l,
framerule=2pt,
framesep=5pt,
framexleftmargin=3pt,
framextopmargin=-5pt,
xleftmargin=10pt,
rulecolor=\color{black!70!white},
% Code
tabsize=4,
showspaces=false,
showstringspaces=false,
showtabs=false,
breaklines=true,
}
%%
\RequirePackage{caption}
\DeclareCaptionFormat{codecaptionformat}{%
%%\colorbox{black!20}{
%% \parbox{\textwidth}{#1#2\ttfamily#3}
%%}
\parbox{\textwidth}{\textcolor{violet}\faCode~\textcolor{violet}{#1#2}\hspace{.5em}\fzkai#3}
}
\captionsetup[lstlisting]{format=codecaptionformat}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Chinese names
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\figurename}{}
\renewcommand{\tablename}{}
\renewcommand{\lstlistingname}{}
\renewcommand{\abstractname}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% global settings
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\RequirePackage{indentfirst}
\setlength{\parindent}{2em}
%%
\linespread{1.5}
%%
\RequirePackage[singlelinecheck=false]{caption}
\captionsetup[table]{belowskip=0pt,aboveskip=5pt}
BIN
View File
Binary file not shown.
+340
View File
@@ -0,0 +1,340 @@
%!TEX program = xelatex
\documentclass{report}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{wrapfig}
\usepackage{enumerate}
\usepackage{amsmath,mathrsfs,amsfonts}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{colortbl}
\usepackage{multirow,makecell}
\usepackage{multicol}
\usepackage{ulem} % \uline
\usepackage{listings}
\usepackage{tikz}
\usepackage{tcolorbox}
\usepackage{fontawesome}
\usepackage[justification=centering]{caption}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% title and author
%% 标题和作者
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\bfseries\sffamily
这是一个Latex模板\\
\normalfont\zihao{-3}
Subtitle Here
}
%%作者这里,可以加入自己的网站,图标,可以使用fontawesome
\author{作者名字 \\ \faGithubAlt~ https://github.com/}
%%可以加入日期
\date{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% head and foot
%% 页眉页脚
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}
\RequirePackage{zhnumber}
\RequirePackage{lastpage}
\pagestyle{fancy}
\fancyhf{}
\renewcommand\headrulewidth{.5pt}
\renewcommand\footrulewidth{0pt}
%\futurelet\TMPheadrule\def\headrule{{\color{violet}\TMPheadrule}}
%\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhead[C]{\fzkai{这是一个Latex模板}}
%\fancyhead[C]{\@title}
%\fancyhead[R]{\thepage}
%\fancyfoot[L]{\fzkai{\@author}}
\fancyfoot[C]{\thepage / \pageref{LastPage}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 设置页面水印
% \usepackage[firstpage]{draftwatermark} % 只有第一页加水印
\usepackage{draftwatermark} % 所有页加水印
\SetWatermarkText{中国海洋大学计算机科学与技术学院} % 设置水印文字内容
% \SetWatermarkText{\includegraphics{fig/ZJDX-WaterMark.eps}} % 设置水印LOGO
\SetWatermarkLightness{0.95} % 设置水印透明度 0-1
\SetWatermarkScale{0.2} % 设置水印大小 0-1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 正文开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\sloppy % 解决中英文混排文字超出边界问题
%首页封面开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 封面页面开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{titlepage} % Suppresses headers and footers on the title page
\centering % Centre everything on the title page
\scshape % Use small caps for all text on the title page
\vspace*{\baselineskip} % White space at the top of the page
%------------------------------------------------
% 标题
%------------------------------------------------
\rule{\textwidth}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt} % Thick horizontal rule
\rule{\textwidth}{0.4pt} % Thin horizontal rule
\vspace{0.75\baselineskip} % Whitespace above the title
{\heiti\zihao{2} 这是一个\\ 很好用的Latex模板\\} % Title
\vspace{0.75\baselineskip} % Whitespace below the title
\rule{\textwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} % Thin horizontal rule
\rule{\textwidth}{1.6pt} % Thick horizontal rule
\vspace{2\baselineskip} % Whitespace after the title block
%------------------------------------------------
% Subtitle
%------------------------------------------------
这里是副标题 % Subtitle or further description
\vspace*{3\baselineskip} % Whitespace under the subtitle
%------------------------------------------------
% Editor(s)
%------------------------------------------------
作者
\vspace{0.5\baselineskip} % Whitespace before the editors
{\scshape\Large 作者名字 } % Editor list
\vspace{0.5\baselineskip} % Whitespace below the editor list
\textit{一级单位 \\ 二级单位 \\ 三级单位} % Editor affiliation
\vfill % Whitespace between editor names and publisher logo
%------------------------------------------------
% Publisher
%------------------------------------------------
%\plogo % Publisher logo
\vspace{0.3\baselineskip} % Whitespace under the publisher logo
%2017 % Publication year
{\large 2022年3月} % 日期
\end{titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 封面页面结束
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 正文开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\maketitle
\thispagestyle{empty}
\begin{abstract}
这是一个很好用的Latex模板,经过不断的修改和迭代进化。这里,就介绍一下这个模板的使用方法,希望对你有所帮助。
\vspace{2ex}
\textbf{关键字:}Latex,\hspace{.5em}模板,\hspace{.5em}学习
\end{abstract}
\section{准备工作}
在正式开始使用模板之前,需要你安装LiveTex,并安装任何可用的编辑器。
然后安装字体,字体文件,都在font文件夹中。
\section{字体}
在模板中,可以使用多种字体。包括英文字体和中文字体。
英文字体,默认使用的是Myriad Pro,现在你看到的应该就是这个字体的效果。等宽英文字体使用的是Courier Std。这些设置,可以在cls中,字体设定里面进行修改。
中文字体,使用的是方正黑体、方正小标宋、方正楷体、方正仿宋、方正黑体、方正中等线等。
中文的默认字体是方正书宋,加粗字体是方正小标宋,就像这样:\textbf{这里是加粗字体}。斜体的字体是方正楷体,就像这样:\textit{这里是中文斜体}。斜体粗体的字体是方正仿宋,就像这样:\textbf{\textit{这里是粗体斜体}}。中文的无衬线字体sans font使用的是方正黑体,你应该可以在标题中看到它。中文等宽字体,使用的是方正中等线字体。
同样,上述的字体,在cls中,都可以进行设置。
另外,可以使用额外的命令,来临时改变某一段文字的字体设置,这些命令包括:fzss(方正书宋)、 fzxbs(方正小标宋)、fzhei(方正黑体)、fzkai(方正楷体)、fzfs(方正仿宋)、fzzdx(方正中等线)。使用方法是使用斜线命令的方式,这样:{\fzss 方正书宋}{\fzxbs 方正小标宋}{\fzhei 方正黑体}{\fzkai 方正楷体}{\fzfs 方正仿宋}{\fzzdx 方正中等线}
\section{标题}
文档模板支持三级标题,并且自动编号。上面就是一级标题的样子。
\subsection{这里是二级标题}
\subsubsection{这里是三级标题}
\section{列表}
列表分为有序列表和无序列表。
\subsection{无序列表}
无序列表使用itemize。
\begin{itemize}
\item \textbf{第一个有序列表}。可以在这里写列表的内容。
\item \textbf{第二条列表}。这里继续显示列表内容。
\end{itemize}
默认的前缀是实心的 黑色原点, 但是我们可以在 \textbackslash item[] 中进行自定义符号, 一般来说, 想要的符号都能够进行显示。
\begin{itemize}
\item[-] 条目1
\item[+] 条目2
\item[x] 条目3
\item[/] 条目4
\item[*] 条目5
\item[a] 条目6
\item[$\circ$] 条目7
\item[$\bigotimes$] 条目8
\item .....
\end{itemize}
\subsection{有序列表}
有序列表使用enumerate。
\begin{enumerate}
\item 方括号中写的是列表的样式。可以是()、[]等。如果要改变编号样式,可使用begin\{enumerate\}[(1)]等。
\item 如果使用了特殊的样式导致没有了缩进,可以使用begin\{enumerate\}[itemindent=2em]设置缩进。
\end{enumerate}
\section{图表信息}
可以插入表格,如表\ref{table1}所示\footnote{更复杂的表格,可以使用在线工具生成 https://www.tablesgenerator.com/}
\noindent
\begin{table}[h!]
\caption{一个表格的实例}\label{table1}
\begin{tabularx}{\textwidth}{>{\hsize=.6\hsize\raggedright\arraybackslash}X>{\raggedright\arraybackslash}X}\toprule
\bfseries{食物} & \bfseries{菜谱}\\ \midrule
热狗 & 面包、香肠 \\
包子 & 面粉、馅料 \\ \bottomrule
\end{tabularx}
\end{table}
可以插入图片,如图\ref{fig1}所示。
\begin{figure}[!h]
\centering
\includegraphics[width=12cm]{figs/1.jpg}
\caption{这是一个示例图片}
\label{fig1}
\end{figure}
在其他的地方,通过输入图片的label来引用图片,就像这样:如图\ref{fig1}所示。
\section{代码}
模板中支持插入代码片段。
就像下面这些例子一样:
\begin{lstlisting}[language=TypeScript,caption={src/app/app.module.ts}]
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
@NgModule({
imports: [ BrowserModule ],
providers: [ Logger ],
declarations: [ AppComponent ],
exports: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
\end{lstlisting}
\begin{lstlisting}[language=Java,caption={src/app/app.module.ts}]
import org.sun.com;
public class helloworld{
public static void main()
{
System.out.println("hello world!");
}
}
\end{lstlisting}
\begin{lstlisting}[style=bashstyle]
cd my-app
ng serve --open
\end{lstlisting}
\begin{lstlisting}[style=bashoutputstyle]
blablabla
\end{lstlisting}
还可以展示linux shell命令:
\begin{invertedshellbox}
npm install -g @angular/cli
\end{invertedshellbox}
也可以使用shell box。
\begin{shellbox}
cd my-app
ng serve --open
\end{shellbox}
还可以展示shell执行结果:
\begin{lstlisting}[style=bashoutputstyle]
src
app
app.component.css
app.component.html
app.component.spec.ts
app.component.ts
app.module.ts
assets
.gitkeep
environments
environment.prod.ts
environment.ts
browserslist
favicon.ico
index.html
...
\end{lstlisting}
\section{文本框}
模板支持三中文本框,分别是titledbox、notebox和importantbox。
\begin{titledbox}{HTTP/Console 内核}
HTTP 内核继承自 \verb|Illuminate\Foundation\Http\Kernel| 类,该类定义了一个 \verb|bootstrappers| 数组,这个数组中的类在请求被执行前运行,这些 \verb|bootstrappers| 配置了错误处理、日志、检测应用环境以及其它在请求被处理前需要执行的任务。
\end{titledbox}
\begin{notebox}
HTTP 内核继承自 \verb|Illuminate\Foundation\Http\Kernel| 类,该类定义了一个 \verb|bootstrappers| 数组,这个数组中的类在请求被执行前运行,这些 \verb|bootstrappers| 配置了错误处理、日志、检测应用环境以及其它在请求被处理前需要执行的任务。
\end{notebox}
\begin{importantbox}
HTTP 内核继承自 \verb|Illuminate\Foundation\Http\Kernel| 类,该类定义了一个 \verb|bootstrappers| 数组,这个数组中的类在请求被执行前运行,这些 \verb|bootstrappers| 配置了错误处理、日志、检测应用环境以及其它在请求被处理前需要执行的任务。
\end{importantbox}
\section{图标}
模板还支持使用图标,图标主要来自于fontawesome。其使用说明,可以参考文件夹中的fontawesome.pdf。
\faHeart
\end{document}