LatexNoteの使用概要

LaTexノート(Windowns)

1.LaTexのインストール

LaTexダウンロード

  1. 公式ウェブサイト(https://www.tug.org/texliveon DVDで選択しdownloading the TeX Live ISO image and burning your own DVD次に選択し、クリックしてdownload from a nearby CTAN mirror選択texlive2020-20200406.iso(isoファイルは約4GB)してダウンロードします。
  2. ダウンロードしたtexlive.isoファイルを開き、管理者としてinstall-tl-windowns.batWindowsバッチファイルを実行します。
  3. インストールが終了するのを待ちます。

LaTex統合開発ソフトウェアのダウンロード(ここでtexstudioソフトウェアを使用< http://texstudio.sourceforge.net/ >)

インストールが成功したかどうかを確認します

  プレスwin+がR入力し、プロンプトのコマンドを起動しcmd、ウィンドウに入力して、コマンドウィンドウにtex -vlatex -vインストールが成功したかどうかを確認するために及びそうで。

2.LaTexの使用と実行

Windowsのメモ帳でラテックスを書く

  1. 新しいメモ帳を作成し、そのサフィックスをに変更します.tex(または、Windowsコマンドラインにnotepad test.tex入力してLaTeXファイル作成します)。
  2. コンパイルコマンド:latex test.tex;中国のutf-8エンコーディングが保存するためのコンパイル済みファイルの最初の選択肢を含む.texファイル、およびコマンドを実行しxelatex test.texます;
  3. PDFファイルに変換コマンドdivpdffmx test.tex:;
  4. 途中で生成されたファイルを削除しますdel *.aux *.div *.log
上記のプロセスは、.bat実行するWindowsバッチファイルとして記述できます

フルイングリッシュドキュメント:

latex test.tex
divpdfmx test.div
del *.aux *.div *.log

中国語を含む文書:

xelatex test.tex
del *.aux *.div *.log

3.LaTexソースファイルの基本的なコンパイル

論文関連の操作を書くための\documentclass{}ドキュメントクラスであるドキュメントクラス導入するために使用し
articleます。

\documentclass{article}

\begin{document}

Hello \LaTex.

\end{document}

中国語を含むソースファイル(中国語をサポートするには、ソースファイルはutf-8エンコーディングをサポートする必要があります):

\documentclass{article}

\usepackage{ctex}  %ctex宏包为能够处理中文的宏包

\begin{document}

你好, \LaTex.

\end{document}

LaTexが中国語のステップを処理する:

  • ドキュメントctex内のマクロパッケージを参照する必要があります
  • ドキュメントはutf-8エンコーディングで保存されます
  • xelatexコマンドを使用てファイルコンパイルします

4.LaTexソースファイルの基本構造

% 导言区
\documentclass{article} % book, report, letter  

\title{My First Document}  
\author{Zhang San}
\date{\today}

% 正文区(文稿区)
\begin{document} 
    \maketitle % 输出标题

    Hello World!

    % here is my big formula
    Let $f(x)$ be defined by the formula $f(x)=3x^2+x-1$
    $$f(x)=3x^2+x-1$$
\end{document}
  • テキスト領域には1つだけのdocument環境があります
  • $公式$(ペアで$囲まれています)数学モードと呼ばれます
  • シングル$はラインフォーミュラを$$意味し、ダブルはラインフォーミュラを意味します
  • キャリッジリターンを示す空白行を追加します(テキストを2行に分割します)
  • newcommand{}{}使用してコマンド定義する

5.LaTexでの中国の処理方法

  • ソースファイルは次のようにエンコードされますutf-8
  • usepackage{ctex}参照ctex中国語マクロパッケージを使用する

equation環境は、番号付きの行間式を生成できます。

\begin{document}

    \begin{equation}  % equation环境产生带有编号的行间公式 
    AB^2 = BC^2 + AC^2.
    \end{equation}

\end{document}
  • cmdコマンドラインにコマンドを入力しtexdoc ctexて、ctexパッケージのマニュアル開くことができます
  • texdoc lshort-zhコマンドを使用してLaTexの簡単な使用法のチュートリアルを表示する

6.LaTexフォント設定

  • フォントファミリー
    • ローマンフォント:ストローク開始時の装飾
    • サンセリフフォント:ストロークの開始時に装飾なし
    • タイプライターフォント:各文字の幅は同じで、等幅フォントとも呼ばれます。
  • フォントファミリー
    • 厚さ
  • フォントの形
    • 直立
    • 斜体
    • 疑似イタリック
    • 小さな帽子
  • フォントサイズ

フォントファミリーの設定:

\documentclass[11pt]{article}  %[11pt]为字体大小为11磅(一般只有10、11、12磅)

\usepackage{ctex}

\newcommand{\myfont}{\textit{\textsf{Fancy Text}}}  % 使用newcommand命令定义一个\myfont命令

\begin{document}
    % 字体族设置(罗马字体、无衬线字体、打字机字体)
    \textrm{Roman Family}  % 设置字体族为Roman Family字体

    \textsf{Sans Serif Family}  % 无衬线字体

    \texttt{Typewriter Family}  % 打字机字体

    \rmfamily Roman Family  % 使用\rmfamily声明后续字体为Roman Family字体

    % 字体系列设置(粗细、宽度)
    \textmd{Medium Series} \textbf{Boldface Series}

    {\mdseries Medium Series} {\bfseries Boldface Series}

    % 字体形状(直立、斜体、伪斜体、小型大写)
    \textup{Uprignt Shape} \textit{Italic Shape}
    \textsl{Slanted Shape} \textsc{Small Caps Shape}

    {\upshape Uprignt Shape} {\itshape Italic Shape}
    {\slshape Slanted Shape} {\scshape Small Caps Shape}

    % 中文字体(必须使用ctex宏包)
    {\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书}

    中文字体的\textbf{粗体}与\textit{斜体}

    \myfont

\end{document}

その他の中国語フォント関連のコマンドは、ctexドキュメントにあります。

7.LaTexドキュメントの基本構造

  • 空白の1つ以上の行を段落に分割できます(最初の行はインデントされます)
  • \parコマンド:段落
  • \\コマンド:サブライン
  • \tableofcontentsコマンド:ディレクトリを生成する
% 引言
\documentclass{article}

\usepackage{ctex}

% 正文区(文稿区)
\begin{document}
	\tableofcontents	% \tableofcontents生成目录
	
	\section{引言}	% \section{title}为一级标题
	\section{实验方法}
	\section{实验结果}
	\subsection{数据}		%\subsection{title}为二级标题
	\subsection{图表}
	\subsubsection{实验条件}	%\subsubsection{title}三级标题
	\subsubsection{实验过程}
	\subsection{结果分析}
	\section{结论}
	\section{致谢}
	
\end{document}

8.LaTexの特殊文字

  • 空白行のセグメンテーション、複数の空白行は1に相当します
  • 自動インデント。代わりにスペース使用しないでください
  • 英語の複数のスペースは1つのスペースとして扱われ、中国語のスペースは自動的に無視されます
  • 漢字と他の文字の間隔はXeLaTexによって自動的に処理されます
  • 中国の全幅スペースは禁止されています
% 引言
% 引言
\documentclass{article}

\usepackage{ctex}

% 正文区(文稿区)
\begin{document}
	\section{空格字符}
	% 1em(当前字体中M的宽度)
	a\quad b
	
	% 2em
	a\qquad b
	
	% 约为1/6个em
	a\,b a\thinspace b
	
	% 0.5个em
	a\enspace b
	
	% 空格
	a\ b
	
	% 硬空格
	a~b
	
	% 1pc=12pt=4.218mm
	a\kern 1pc b
	
	a\kern -1em b
	
	a\hskip 1em b
	
	a\hspace{35pt}b
	
	% 占位宽度
	a\hphantom{xyz}b
	
	% 弹性长度
	a\hfill b
	\section{\LaTeX 控制符}
	\# \$ \% \{ \} \~{} \_{} \^{} \textbackslash % 反斜杠使用\textbackslash产生
	\&
	\section{排版符号}
	\S \P \dag \ddag \copyright \pounds
	\section{\TeX 标志符号}
	% 基本符号
	\TeX{} \LaTeX{} \LaTeXe{}
	\section{引号}
	` ' `` ''  ``你好''
	\section{连字符}
	- -- ---
	\section{非英文字符}
	\oe \OE \ae \AE \aa \AA \o \O \l \L \ss \SS !` ?`
	\section{重音符号(以o为例)}
	\`o \'o \^o \''o \~o \=o \.o \u{o} \v{o} \H{o} \r{o} \t{o} \b{o} \c{o} \d{o}
		
\end{document}

9.LaTexのイラスト

より多くのgraphicxの使用法texdoc graphicxはドキュメント見ることができます

  • 紹介エリア:\usepackage{graphicx}マクロパッケージ
  • 文法:\includegraphics[<选项>]{<文件名>}
  • フォーマット:EPS、PDF、PNG、JPEG、BMP
% 引言
\documentclass{article}

\usepackage{ctex}

%导言区:\usepackage{graphicx}
%语  法:\includegraphics[< 选项 >]{< 文件名 >}
%格  式:EPS,PNG,PDF,JPEG,BMP
\usepackage{graphicx}
\graphicspath{
   
   {figures/},{pics/}}	% 图片在当前目录下的 figures 目录, pics 目录


% 正文区(文稿区)
\begin{document}
	\LaTeX{}中的插图:
	
	\includegraphics{wallpaper}
	\includegraphics{wallpaper.jpg}
	
	\includegraphics[scale=0.3]{wallpaper}
	
	\includegraphics[height=2cm]{wallpaper}
	
	\includegraphics[width=2cm]{wallpaper}
	
\end{document}

10.LaTexのフォーム

  • texdoc booktab3ラインメーターを開く

  • texdoc longtabページ間で長いフォームを開く

  • texdoc tabu包括的なフォームを開く

% 引言
\documentclass{article}

\usepackage{ctex}

% 正文区(文稿区)
\begin{document}
	% 使用tabular环境生成表格
	% l:左对齐,c:居中对齐,r:右对齐,p{< 宽度 >}:产生指定宽度的列格式(内容超过宽度会自动换行)
	% |:产生竖线,\hline:产生表格横线
	\begin{tabular}{|l||c|c|c|r|p{1.5cm}|}	%两个|产生双竖线
		\hline  % 产生表格横线
		姓名 & 语文 & 数学 & 英语 &备注 & \\
		\hline \hline % 两个\hline产生双横线
		张三 & 87 & 100 & 98 & 优秀 & \\
		\hline
		李四 & 75 & 64 & 52 & 补考另行通知&  \\
		\hline
		王五 & 80 & 82 & 78 &  & \\
		\hline
	\end{tabular}
	
\end{document}

11.LaTexのフローティングボディ

  • フローティングボディ

  • フィギュア環境(テーブル環境と同様)

    • \begin{figure}[htbp]
    • < 任意内容 >
    • \end{figure}
  • <許容位置>パラメータ(デフォルトはtbp)

    • h、このページ(ここ)-コードが配置されているコンテキストの場所
    • t、ページの上部(top)-コード以降で作成されたページの上部
    • b、下(下)-コードが配置されているページの下部、またはコードを購入した後
    • p、独立したページ(ページ)-フローティングページ
  • タイトルコントロール(キャプション、バイキャプション、その他のマクロパッケージ)

  • 並べてサブチャート(サブキャプション、サブフィグ、フロートローなどのパッケージ)

  • ラップ(picinpar、wrapfig、その他のマクロパッケージ)

% 引言
\documentclass{article}

\usepackage{ctex}
\usepackage{graphicx}

\graphicspath{
   
   {figures/}}

% 浮动体
% figure环境(table环境类似)
% \begin{figure}[htbp]
% 	< 任意内容 >
% \end{figure}

% <允许位置>参数(默认tbp)
% h,此页(here)——代码所在的上下文的位置
% t,页顶(top)——代码所造的页面或之后的页面的顶部
% b,页底(bottom)——代码所在页面或也买你之后页面的底部
% p,独立一页(page)——浮动页面

% 标题控制(caption、bicaption等宏包)
% 并排与子图表(subcaption、subfig、floatrow等宏包)
% 绕排(picinpar、wrapfig等宏包)

% 正文区(文稿区)
\begin{document}
	\LaTeX{}中的插图:
	壁纸可图\ref{fig-wallpaper}
	
	% figure:图片浮动体环境
	\begin{figure}[htbp] % 允许各个位置
		\centering	% \centering 居中对齐
		\includegraphics[scale=0.3]{wallpaper.jpg}
		
		% \caption{text}:设置图片标题
		% \label{key}设置标签
		\caption{壁纸}\label{fig-wallpaper}
	\end{figure}


	
	在\LaTeX{}中的表格:
	
	% table:表格浮动体环境
	\begin{table}[h] % 允许各个位置
		\centering
		\caption{考试成绩单}
		\begin{tabular}{|l||c|c|c|r|}
			\hline
			姓名 & 语文 & 数学 & 英语 &备注 \\
			\hline \hline
			张三 & 87 & 100 & 98 & 优秀 \\
			\hline
			李四 & 75 & 64 & 52 & 补考另行通知 \\
			\hline
			王五 & 80 & 82 & 78 & \\
			\hline
		\end{tabular}
	\end{table}

\end{document}

12.予備的な数式

% 引言
\documentclass{article}

\usepackage{ctex}
\usepackage{amsmath}


% 正文区(文稿区)
\begin{document}
	\section{行内公式}
	\subsection{美元符号}
	交换律是 $a+b=b+a$
	\subsection{小括号}
	交换律是 \(a+b=b+a\)
	\subsection{math环境}
	交换率是 
	\begin{math}
		a+b=b+c
	\end{math}

	\section{上下标}
	\subsection{上标}
	$3x^{20} - x + 2 = 0$
	\subsection{下标}
	$a_1,a_2,a_3...a_{100}$
	\section{希腊字母}
	% 直接使用希腊字母对应的英文名称
	$\alpha$
	
	$\alpha^3 + \beta^2 + \gamma = 0$
	\section{数学函数}
	$\log$
	$\sin$
	$\cos$
	$\arcsin$
	$\arccos$
	$\ln$
	
	$\sin^2 x + \cos^2 x = 1$
	
	$\sqrt{2}$
	$\sqrt[3]{27}$
	\section{分式}
	$3/4$,
	$\frac{3}{4}$
	\section{行间公式}
	\subsection{美元符号}
	$$a+b=b+a$$
	\subsection{中括号}
	\[a+b=b+a\]
	\subsection{displaymath环境}
	\begin{displaymath}
		a+b=b+a
	\end{displaymath}
	\subsection{自动编号公式equation环境}
	交换律见式\ref{eq:commutative}
	\begin{equation}
		a+b=b+a \label{eq:commutative}
	\end{equation}
	\begin{equation}
		ax^2+bx+c=0
	\end{equation}
	\subsection{不编号公式equation*环境}
	% equation*环境需要添加amsmath宏包
	\begin{equation*}
		ax^2+bx+c=0
	\end{equation*}
		
\end{document}

13.数式の行列

amsmathマクロパッケージを導入する必要があります

% 引言
\documentclass{article}

\usepackage{ctex}
\usepackage{amsmath}


% 正文区(文稿区)
\begin{document}
	% 矩阵环境,用&分隔列,用\\分隔行
	\[
	\begin{matrix}
		0 & 1\\
		1 & 0
	\end{matrix} \qquad
	% 带有小括号的矩阵
	\begin{pmatrix}
		0 & 1\\
		1 & 0
	\end{pmatrix} \qquad
	% 矩阵两端加中括号
	\begin{bmatrix}
		0 & -1 \\
		1 & 0
	\end{bmatrix} \qquad
	% 矩阵两端加大括号
	\begin{Bmatrix}
		1 & 0 \\
		0 & -1
	\end{Bmatrix} \qquad
	% 行列式,两端加单竖线
	\begin{vmatrix}
		i & 0 \\
		0 & i
	\end{vmatrix} \qquad
	% 两端加双竖线
	\begin{Vmatrix}
		1 & 2 \\
		3 & 4
	\end{Vmatrix}
	\]
	
	
	\[
	A = \begin{pmatrix}
		a_{11}^2 & a_{12}^2 & a_{13}^2 \\
		a_{21} & a_{22} & a_{23} \\
		a_{31} & a_{32} & a_{33}
	\end{pmatrix}
	\]
	
	% 常用省略号:\dots、\vdots、\ddots
	\[
	A = \begin{bmatrix}
		a_{11} & \dots & a_{1n} \\
		& \ddots & \vdots \\
		0 & & a_{nn}
	\end{bmatrix}_{n \times n}
	\]
	
	% 行内小矩阵(smallmatrix)环境
	复数 $z = (x,y)$ 也可用矩阵
	\begin{math}
		\left(	% 需要手动加上左括号
		\begin{smallmatrix}
			x & -y \\
			y & x
		\end{smallmatrix}
		\right)	% 需要手动加上右括号
	\end{math}来表示。

	% array环境(类似于表格环境tabular)
	\[
	\begin{array}{r|r}
		\frac{1}{2} & 0 \\
		\hline
		o & -\frac{a}{b}c \\
	\end{array}
	\]

\end{document}

14.数式の複数行の数式

インポートamsmathしてamssymbマクロパッケージを作成する必要があります

  • \text{text}数学モードでのコマンドの使用に注意してください。このコマンドは数学モードで中国語を入力できます。
% 引言
\documentclass{article}

\usepackage{ctex}
\usepackage{amsmath}
\usepackage{amssymb}  % 输入花体字


% 正文区(文稿区)
\begin{document}
	% gather 和 gather* 环境(可使用\\换行)
	% 代编号
	\begin{gather}
		a + b = b + a \\
		ax^2+bx+c=0
	\end{gather}
	% 不代编号
	\begin{gather*}
		2 \times 8 =  8 \times 2 \\
		3 + 5 = 5 + 3 = 8
	\end{gather*}

	% 在\\前使用\notag 阻止编号
	\begin{gather}
		a + b = b + a \notag \\
		ax^2+bx+c=0 \notag
	\end{gather}

	% align 和align* 环境(用 & 进行对齐)
	% 带编号
	\begin{align}
		x &= t + \cos t + 1 \\
		y &= 2\sin t
	\end{align}
	% 不带编号
	\begin{align*}
		x &= t & x &= \cos t & x &= t\\
		y &= 2t & y &= \sin(t+1) & y &= \sin t
	\end{align*}

	% split 环境(对齐采用 align 环境的方式,编号在中间)
	\begin{equation}
		\begin{split}
			\cos 2x &= \cos^2 x - \sin^2 x \\
			&= 2\cos^2 x - 1
		\end{split}
	\end{equation}

	% cases 环境
	% 每行公式中使用 & 分隔为两部分
	% 通常表示值和后面的条件
	\begin{equation}
		D(x) = \begin{cases}
			1, & \text{if}~x \in \mathbb{Q}; \\
			0, & \text{if}~x \in \mathbb{R}\setminus\mathbb{Q}
		\end{cases}
	\end{equation}

\end{document}

15.参考文献BibTex

参照を直接引用する

% 引言
\documentclass{article}

\usepackage{ctex}


% 正文区(文稿区)
\begin{document}
	% 一次管理,一次使用
	% 参考文献格式:
	% \begin{thebibliography}{样本编号}
	%	 \bibitem[记号]{引用标志}文献条目1
	%	 \bibitem[记号]{引用标志}文献条目2
	%	 ......
	% \end{thebibliography}
	% 其中文献条目包括:作者,题目,出版社,年代,版本,页码等。
	% 引用时候可以采用:\cite{引用标志1,引用标志2,...}
	
	引用一篇文章\cite{article1},引用一篇文章\cite{article2}
	
	\centering
	\begin{thebibliography}{99}
		\bibitem{article1}李颖,李耀辉,王金鑫等.\emph{ SVM 和 ANN 在多光谱遥感影像分类中的比较研究}[J].海洋测绘.2016,36(05):19-22.
		\bibitem{article2}Huang C,Davis L S,Townshend J R G.\emph{An assessment of support vector machines for land cover classification}[J].International Journal of remote sensing.2002, 23(4):725-749.
	\end{thebibliography}
	
	
\end{document}

BibTexを使用して参照を管理する

  • 次のようにドキュメント管理ツールを構築することを選択する必要がありますBibTeX
% 引言
\documentclass{article}

\usepackage{ctex}
%\usepackage{natbib} % natbib宏包可以指定更多的排版格式

\bibliographystyle{plain} % plain unsrt alpha abbrv 排版格式


% 正文区(文稿区)
\begin{document}
	这是一个参考文献的引用:\cite{陈绍杰2010boosting}
	
	这是另一个引用:\cite{huang2002assessment}
	% 使用\bibliography{bib file}指定参考文件数据库
	\nocite{*}
	\bibliography{test}
	
\end{document}

16.参照BibLaTex

  • ビルドでドキュメント管理ツールを選択する必要がありますBiber
% 引言
\documentclass{article}

\usepackage{ctex}

% biblatex/biber
% 新的TEX参考文献排版引擎
% 样式文件(参考文献样式文件--bbx文件,引用样式文件--cbx)使用LATEX编写
% 支持根据本地化排版,如:
%		biber -l zh_pinyin texfile	用于指定按拼音排序
%		biber -l zh_stroke texfile	用于按笔画排序

% 添加biblatex宏包,指定样式和后端程序
\usepackage[style=numeric,backend=biber]{biblatex}
% 添加参考文献数据库,不可以省略文件后缀名
\addbibresource{test.bib}

% 正文区(文稿区)
\begin{document}
	% 一次管理,多次使用
	无格式化引用\cite{biblatex}
	
	带方括号的引用\parencite{李颖2016svm}
	
	上标引用\supercite{zhao2017object}
	
	\centering
	% \nocite{*}列出未引用文献,*表示所有为未引用文献
	\nocite{*}
	\printbibliography[title = {参考文献}]
	
\end{document}

17.LaTeXのカスタムコマンドと環境

\newcommandコマンド:

% 导言区
\documentclass{article}

\usepackage{ctex}

% \newcommand--定义命令
% 命令只能由字母组成,不能以\end 开头
% \newcommand{<命令>}[<参数个数>][<首参数默认值>]{<具体定义>}

% \newcommand可以是简单字符串替换,例如:
% 使用\PRC 相当于 People's Republic of \emph{China} 这一串内容
\newcommand{\PRC}{Peole's Republic of \emph{Chian}}

% \newcommand 也可以使用参数
% 参数个数可以从 1 到 9,使用时用 #1,#2,......,#9 表示
\newcommand{\loves}[2]{#1 喜欢 #2}
\newcommand{\hatedby}[2]{#2 不受 #1 喜欢}

% \newcommand的参数也可以有默认值
% 指定参数个数的同时指定了首个参数的默认值,那么这个命令
% 的第一个参数就成为可选参数(要使用中括号限定)
\newcommand{\love}[3][喜欢]{#2#1#3}

% 正文区(文稿区)
\begin{document}
	\PRC
	
	\loves{猫儿}{鱼}
	
	\hatedby{猫儿}{萝卜}
	
	\love{猫儿}{鱼}
	
	\love[最爱]{猫儿}{鱼}
	
\end{document}

\renewcommand\newenvironmentコマンド:

% 导言区
\documentclass{article}

\usepackage{ctex}

% \renewcommand--重定义命令
% 与\newcommand 命令作用和用法相同,但只能用于已有命令
% \renewcommand{<命令>}[<参数个数>][<首参数默认值>]{<具体定义>}
\renewcommand{\abstractname}{内容简介}

% 定义和重定义环境
% \newenvironment{<环境名称>}[<参数个数>][<首参数默认值>]{<环境前定义>}{<环境后定义>}
% \renewenvironment{<环境名称>}[<参数个数>][<首参数默认值>]{<环境前定义>}{<环境后定义>}

% 为 book 类中定义摘要(abstract)环境
\newenvironment{myabstract}[1][摘要] %
{\small\begin{center}\bfseries #1\end{center} %
	\begin{quotation}} %
	{\end{quotation}}

% 正文区(文稿区)
\begin{document}
	\begin{abstract}
		这是一段摘要...
	\end{abstract}

	\begin{myabstract}
		这是一段自定义格式的摘要...
	\end{myabstract}

	\begin{myabstract}[我的摘要]
	这是一段自定义格式的摘要...
	\end{myabstract}
	
\end{document}
最爱]{猫儿}{鱼}
	
\end{document}

\renewcommand\newenvironmentコマンド:

% 导言区
\documentclass{article}

\usepackage{ctex}

% \renewcommand--重定义命令
% 与\newcommand 命令作用和用法相同,但只能用于已有命令
% \renewcommand{<命令>}[<参数个数>][<首参数默认值>]{<具体定义>}
\renewcommand{\abstractname}{内容简介}

% 定义和重定义环境
% \newenvironment{<环境名称>}[<参数个数>][<首参数默认值>]{<环境前定义>}{<环境后定义>}
% \renewenvironment{<环境名称>}[<参数个数>][<首参数默认值>]{<环境前定义>}{<环境后定义>}

% 为 book 类中定义摘要(abstract)环境
\newenvironment{myabstract}[1][摘要] %
{\small\begin{center}\bfseries #1\end{center} %
	\begin{quotation}} %
	{\end{quotation}}

% 正文区(文稿区)
\begin{document}
	\begin{abstract}
		这是一段摘要...
	\end{abstract}

	\begin{myabstract}
		这是一段自定义格式的摘要...
	\end{myabstract}

	\begin{myabstract}[我的摘要]
	这是一段自定义格式的摘要...
	\end{myabstract}
	
\end{document}

おすすめ

転載: blog.csdn.net/qq_43475285/article/details/113007414