适用于XDUTS的常见示例/代码片段 #40
Replies: 32 comments 113 replies
-
使用 \documentclass{xdupgthesis}
\usepackage{subcaption}
\begin{document}
\chapter{子图}
\begin{figure}
\centering
\subcaptionbox{a1\label{a1}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{a2\label{a2}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{a3\label{a3}}{\includegraphics[width=.3\linewidth]{example-image}}
\caption{aaa}
\label{aaa}
\end{figure}
\figurename~\ref{a1}
\figurename~\ref{a2}
\figurename~\ref{a3}
\figurename~\ref{aaa}
\begin{figure}
\centering
\subcaptionbox{b1\label{b1}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b2\label{b2}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b3\label{b3}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b4\label{b4}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b5\label{b5}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b6\label{b6}}{\includegraphics[width=.3\linewidth]{example-image}}
\caption{bbb}
\label{bbb}
\end{figure}
\figurename~\ref{b1}
\figurename~\ref{b2}
\figurename~\ref{b3}
\figurename~\ref{b4}
\figurename~\ref{b5}
\figurename~\ref{b6}
\figurename~\ref{bbb}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
利用 @proceedings{xxx,
editor = {牛志明 and 斯温兰德 and 雷光春},
title = {综合湿地管理国际研讨会论文集},
address = {北京},
publisher = {海洋出版社},
year = {2012},
}
@book{yyy,
author = {Fan, Xuetong and Sommers, Christopher H.},
title = {Food Irradiation Research and Technology},
edition = {2},
address = {Ames, Iowa},
publisher = {Blackwell Publishing},
year = {2013},
pages = {25--26},
} \documentclass{xdupgthesis}
\xdusetup{info/bib-resource=reference.bib}
\AtBeginDocument{
\DeclareNameFormat{firstauthor}{\namepartfamily}
\DeclareCiteCommand{\firstauthor}{}{\printnames[firstauthor]{labelname}}{}{}
\NewDocumentCommand{\facite}{m}{\firstauthor{#1}等人\cite{#1}}}
\begin{document}
\chapter{参考文献作者引用}
\section{仅引用第一作者}
\firstauthor{xxx}\par\firstauthor{yyy}
\section{引用第一作者和序号}
\facite{xxx}提出\par\facite{yyy}提出
\end{document} |
Beta Was this translation helpful? Give feedback.
-
使用 \documentclass{xdupgthesis}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\chapter{跨页表格}
我们发现\tablename~\ref{ltab} 是一个很长的表格。
\begin{longtblr}
[
caption = {一个很长的表格},
label = {ltab}
]
{
colspec = {Q[c,m]X[l,m]},
hline{1,Z} = {wd=.08em},
hline{2} = {wd=.05em},
row{even[2-Z]} = {bg=gray9!50},
row{1} = {font=\bfseries},
rowhead = 1,
}
Lorem ipsum dolor sit amet & consectetur adipisicing elit sed do eiusmod \\
tempor incididunt & ut labore et dolore magna aliqua Ut enim ad minim veniam \\
quis nostrud & exercitation ullamco laboris nisi ut aliquip ex ea commodo aute irure dolor in reprehenderit in voluptate velit esse \\
consequat Duis & aute irure dolor in reprehenderit in voluptate velit esse \\
cillum dolore eu & fugiat nulla pariatur Excepteur sint occaecat cupidatat non \\
proident sunt & in culpa qui officia deserunt mollit anim id est laborum \\
tempor incididunt & ut labore et dolore magna aliqua Ut enim ad minim veniam \\
quis nostrud & exercitation ullamco laboris nisi ut aliquip ex ea commodo aute irure dolor in reprehenderit in voluptate velit esse \\
consequat Duis & aute irure dolor in reprehenderit in voluptate velit esse \\
cillum dolore eu & fugiat nulla pariatur Excepteur sint occaecat cupidatat non \\
proident sunt & in culpa qui officia deserunt mollit anim id est laborum \\
tempor incididunt & ut labore et dolore magna aliqua Ut enim ad minim veniam \\
quis nostrud & exercitation ullamco laboris nisi ut aliquip ex ea commodo aute irure dolor in reprehenderit in voluptate velit esse \\
consequat Duis & aute irure dolor in reprehenderit in voluptate velit esse \\
cillum dolore eu & fugiat nulla pariatur Excepteur sint occaecat cupidatat non \\
proident sunt & in culpa qui officia deserunt mollit anim id est laborum \\
tempor incididunt & ut labore et dolore magna aliqua Ut enim ad minim veniam \\
quis nostrud & exercitation ullamco laboris nisi ut aliquip ex ea commodo aute irure dolor in reprehenderit in voluptate velit esse \\
consequat Duis & aute irure dolor in reprehenderit in voluptate velit esse \\
cillum dolore eu & fugiat nulla pariatur Excepteur sint occaecat cupidatat non \\
proident sunt & in culpa qui officia deserunt mollit anim id est laborum \\
tempor incididunt & ut labore et dolore magna aliqua Ut enim ad minim veniam \\
quis nostrud & exercitation ullamco laboris nisi ut aliquip ex ea commodo aute irure dolor in reprehenderit in voluptate velit esse \\
consequat Duis & aute irure dolor in reprehenderit in voluptate velit esse \\
cillum dolore eu & fugiat nulla pariatur Excepteur sint occaecat cupidatat non \\
proident sunt & in culpa qui officia deserunt mollit anim id est laborum \\
tempor incididunt & ut labore et dolore magna aliqua Ut enim ad minim veniam \\
quis nostrud & exercitation ullamco laboris nisi ut aliquip ex ea commodo aute irure dolor in reprehenderit in voluptate velit esse \\
consequat Duis & aute irure dolor in reprehenderit in voluptate velit esse \\
cillum dolore eu & fugiat nulla pariatur Excepteur sint occaecat cupidatat non \\
proident sunt & in culpa qui officia deserunt mollit anim id est laborum \\
\end{longtblr}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
使用 \documentclass{xdupgthesis}
\begin{document}
\chapter{多图并列(非子图)}
\begin{figure}[h]
\centering
\captionbox{a1\label{a1}}[.5\linewidth]{\includegraphics[width=.8\linewidth]{example-image}}%
\captionbox{a2\label{a2}}[.5\linewidth]{\includegraphics[width=.8\linewidth]{example-image}}
\end{figure}
\begin{figure}[h]
\centering
\captionbox{a3\label{a3}}[.33\linewidth]{\includegraphics[width=.8\linewidth]{example-image}}%
\captionbox{a4\label{a4}}[.33\linewidth]{\includegraphics[width=.8\linewidth]{example-image}}%
\captionbox{a5\label{a5}}[.33\linewidth]{\includegraphics[width=.8\linewidth]{example-image}}
\end{figure}
\figurename~\ref{a1}
\figurename~\ref{a2}
\figurename~\ref{a3}
\figurename~\ref{a4}
\figurename~\ref{a5}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
你好,我想将4张图片排成一列作为一个子图,一共排版这样5列,我写了如下代码,但是排版效果却与预期不同,是哪里出现问题了呢 \begin{figure}
\centering
\subcaptionbox[width=.15\textheight]{场景1\label{pic3_22_a}}{
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_2gt.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_6gt.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_10gt.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_14gt.png}
\newline
}
\hfill
\subcaptionbox[height=.15\textheight]{场景2\label{pic3_22_b}}{
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_2chazhi.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_6chazhi.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_10chazhi.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_14chazhi.png}
\newline
}\hfill
\subcaptionbox[height=.15\textheight]{场景3\label{pic3_22_c}}{
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_2net1.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_6net1.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_10net1.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_14net1.png}
\newline
}\hfill
\subcaptionbox[height=.15\textheight]{场景4\label{pic3_22_d}}{
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_2net2.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_6net2.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_10net2.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_14net2.png}
\newline
}\hfill
\subcaptionbox[height=.15\textheight]{场景5\label{pic3_22_e}}{
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_2maan.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_6maan.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_10maan.png}
\newline
\includegraphics[width=0.15\textwidth]{./photos/ch3/ch3errormap1_14maan.png}
\newline
}
\end{figure}
下面是编译后生成的pdf的预览效果 |
Beta Was this translation helpful? Give feedback.
-
使用 \documentclass{xdupgthesis}
\usepackage{subcaption}
\begin{document}
\chapter{title}
\begin{figure}
\centering
\subcaptionbox{a1\label{a1}}{%
\begin{minipage}{.2\linewidth}%
\setlength{\lineskip}{0pt}%
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}
\end{minipage}%
}\hfill%
\subcaptionbox{a2\label{a2}}{%
\begin{minipage}{.2\linewidth}%
\setlength{\lineskip}{0pt}%
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}
\end{minipage}%
}\hfill%
\subcaptionbox{a3\label{a3}}{%
\begin{minipage}{.2\linewidth}%
\setlength{\lineskip}{0pt}%
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}
\end{minipage}%
}\hfill%
\subcaptionbox{a4\label{a4}}{%
\begin{minipage}{.2\linewidth}%
\setlength{\lineskip}{0pt}%
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}
\end{minipage}%
}\hfill%
\subcaptionbox{a5\label{a5}}{%
\begin{minipage}{.2\linewidth}%
\setlength{\lineskip}{0pt}%
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}\\
\includegraphics[width=\linewidth]{example-image}
\end{minipage}%
}
\caption{title}
\end{figure}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
你好,我想在论文中加入定义和定理,但是按照正常的方法出来的效果无法改变字体和内容的样式,用\theorembodyfont和theoremheaderfont修改后没有变化。 |
Beta Was this translation helpful? Give feedback.
-
您好,可以提供一份算法伪代码的模板吗 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
使用 \documentclass{xdupgthesis}
\xdusetup{style/add-alg-rule-vspace=true}
\usepackage{algorithm}
\usepackage[commentColor=black,beginComment=//~,beginLComment=//~,endLComment=]{algpseudocodex}
\tikzset{algpxIndentLine/.style={draw=black}}
\algrenewcommand{\algorithmicrequire}{\textbf{输入:}}
\algrenewcommand{\algorithmicensure}{\textbf{输出:}}
\begin{document}
\chapter{算法环境}
\begin{algorithm}
\caption{这是一个算法}
\begin{algorithmic}[1]
\Require $x \in \{0,1\}$
\Ensure $y \in \{1,2\}$
\State $y \gets x+1$
\State \Return $y$
\While{condition}
\State body
\EndWhile
\For{$n = 1, \dots, 10$}
\State body
\EndFor
\If{condition}
\State body
\ElsIf{condition}
\State body
\Else
\State body
\EndIf
\State $x \gets y^2$
\LComment{The next two lines
increment both $x$ and $y$.}
\State $x \gets x + 1$
\Comment{Increment $x$.}
\State $y \gets y + 1$
\Comment{Increment $y$.}
\end{algorithmic}
\end{algorithm}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
在 \documentclass{xdupgthesis}
\usepackage{algpseudocodex}
\NewDocumentEnvironment{algframe}{+b}{\setlength{\fboxsep}{3pt}\setlength{\fboxrule}{.4pt}\fbox{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{#1}}}{}
\begin{document}
\chapter{figure浮动体与算法}
\begin{figure}
\begin{algframe}
\begin{algorithmic}[1]
\Require $x \in \{0,1\}$
\Ensure $y \in \{1,2\}$
\State $y \gets x+1$
\State \Return $y$
\end{algorithmic}
\end{algframe}
\caption{这是一个算法}
\end{figure}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
通过对照表列格式设置接口,可以自定义对照表列格式以及增加列间距。 % los.tex
XXX & XXX \\
XXX & XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX \\
XXX XXX & XXX \\ % loa.tex
XXX & XXX & XXX XXX XXX XXX XXX XXX XXX XXX XXX \\
XXX XXX & XXX & XXX \\
XXX & XXX XXX XXX & XXX \\ \documentclass{xdupgthesis}
\xdusetup{
style / customize-los = false,
style / customize-loa = false,
style / colspec-los = {>{\hskip1cm}Q[l,h]<{\hskip2cm}X[l,h]},
style / colspec-loa = {>{\hskip1cm}Q[l,h]<{\hskip1cm}X[-1,l,h]X[-1,l,h]},
info / los = los.tex,
info / loa = loa.tex,
}
\begin{document}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
推荐使用Times风格数学字体,例如 除了Computer Modern字体外,其他字体均使用 \documentclass{xdupgthesis}
\xdusetup{style/math-font=xits}
\begin{document}
\chapter{unicode-math下数学符号加粗}
意大利体英文字符\textit{x}, \textit{A}, \textit{α}, \textit{G}。\par
不加粗数学符号$x,A,\alpha,G$。\par
加粗数学符号$\symbfit{x},\symbfit{A},\symbfit{\alpha},\symbfit{G}$。
\end{document} \documentclass{xdupgthesis}
\xdusetup{style/math-font=cm}
\usepackage{bm}
\begin{document}
\chapter{传统数学下数学符号加粗}
意大利体英文字符\textit{x}, \textit{A}, \textit{α}, \textit{G}。\par
不加粗数学符号$x,A,\alpha,G$。\par
加粗数学符号$\bm{x},\bm{A},\bm{\alpha},\bm{G}$。
\end{document} |
Beta Was this translation helpful? Give feedback.
-
在使用 \documentclass{xdupgthesis}
\xdusetup{style/math-font=xits}
\begin{document}
\begin{equation}
\sum_{i=1}^\alpha a^i+b+\symcal{C}+\symcal{K}
\end{equation}
\end{document} \documentclass{xdupgthesis}
\xdusetup{style/math-font=xits}
\AtBeginDocument{\setmathfont{latinmodern-math.otf}[range={\sum,\symcal}]}
\begin{document}
\begin{equation}
\sum_{i=1}^\alpha a^i+b+\symcal{C}+\symcal{K}
\end{equation}
\end{document} \documentclass{xdupgthesis}
\xdusetup{style/math-font=xits}
\AtBeginDocument{\setmathfont{latinmodern-math.otf}[range={\sum,\symcal,\symbb}]}
\AtBeginDocument{\setmathfont{texgyrepagella-math.otf}[range={\symbb}]}
\begin{document}
\begin{equation}
\sum_{i=1}^\alpha a^i+b+\symcal{C}+\symcal{K}+\symbb{C}+\symbb{K}+\symbb{E}
\end{equation}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
下面给出一些 \documentclass{xdupgthesis}
\xdusetup{style/latin-font=tcc,style/math-font=xits}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\chapter{tabularray示例}
以下表格内容均来自马建峰的博士学位论文《速率兼容LDPC码及其在H-ARQ系统中的应用》、崔海森的硕士学位论文《Repetier-Host源码分析与二次开发》和丁洁琼的硕士学位论文《基于RGB-D的SLAM算法研究》。数据内容没有修改,仅对个别样式进行了美化。
\section{设置单元格模式}
\begin{table}
\centering
\caption{$R=\frac{1}{2}$的校验矩阵}
\begin{tblr}{colspec={*{24}{X[c,m]}},cells={mode=math},columns={colsep=0pt},hlines,vlines}
-1 & 94 & 73 & -1 & -1 & -1 & -1 & -1 & 55 & 83 & -1 & -1 & 7 & 0 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\
-1 & 27 & -1 & -1 & -1 & 22 & 79 & 9 & -1 & -1 & -1 & 12 & -1 & 0 & 0 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\
-1 & -1 & -1 & 24 & 22 & 81 & -1 & 33 & -1 & -1 & -1 & 0 & -1 & -1 & 0 & 0 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\
61 & -1 & 47 & -1 & -1 & -1 & -1 & -1 & 65 & 25 & -1 & -1 & -1 & -1 & -1 & 0 & 0 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\
-1 & -1 & 39 & -1 & -1 & -1 & 84 & -1 & -1 & 41 & 72 & -1 & -1 & -1 & -1 & -1 & 0 & 0 & -1 & -1 & -1 & -1 & -1 & -1 \\
-1 & -1 & -1 & -1 & 46 & 40 & -1 & 82 & -1 & -1 & -1 & 79 & 0 & -1 & -1 & -1 & -1 & 0 & 0 & -1 & -1 & -1 & -1 & -1 \\
-1 & -1 & 95 & 53 & -1 & -1 & -1 & -1 & -1 & 14 & 18 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & 0 & 0 & -1 & -1 & -1 & -1 \\
-1 & 11 & 73 & -1 & -1 & -1 & 2 & -1 & -1 & 47 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & 0 & 0 & -1 & -1 & -1 \\
12 & -1 & -1 & -1 & 83 & 24 & -1 & 43 & -1 & -1 & -1 & 51 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & 0 & 0 & -1 & -1 \\
-1 & -1 & -1 & -1 & -1 & 94 & -1 & 59 & -1 & -1 & 70 & 72 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & 0 & 0 & -1 \\
-1 & -1 & 7 & 65 & -1 & -1 & -1 & -1 & 39 & 49 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & 0 & 0 \\
43 & -1 & -1 & -1 & -1 & 66 & -1 & 41 & -1 & -1 & -1 & 26 & 7 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & 0 \\
\end{tblr}
\end{table}
\section{三线表}
\begin{table}
\centering
\caption{不同码率$R$的码属性}
\begin{tblr}{colspec={X[2,c,m]*{3}{X[c,m]}},hline{1,Z}={wd=.08em},hline{2}={wd=.05em},cell{1-2}{2-Z}={mode=math}}
Code rate & \frac{1}{2} & \frac{2}{3} & \frac{3}{4} \\
Model matrix size & 12*24 & 8*24 & 6*24 \\
Information portion & Irregular & Irregular & Regular \\
\end{tblr}
\end{table}
\section{合并单元格}
\begin{table}
\centering
\caption{Complexity Comparison: Puncturing and Extending}
\begin{tblr}{colspec={*{3}{Q[c,m]}},cell{3,4,7,8}{2,3}={mode=math},hlines,vlines,cell{1,5}{1}={c=3}{}}
Encoding & & \\
& puncturing & extending \\
XOR & (k^2-k)(\frac{1}{R_0}-1) & (k^2-k)(\frac{1}{R_i}-1) \\
OR & k^2(\frac{1}{R_0}-1) & k^2(\frac{1}{R_i}-1) \\
Decoding (per iteration) & & \\
& puncturing & extending \\
addition & \frac{3tk}{R_0} & \frac{3tk}{R_i} \\
table-lookup & \frac{2tk}{R_0} & \frac{2tk}{R_i} \\
\end{tblr}
\end{table}
\begin{table}
\centering
\caption{Complexity Comparison: Puncturing and Extending (重制版)}
\begin{tblr}{colspec={*{4}{Q[c,m]}},cell{2,3,5,6}{3,4}={mode=math},hlines,vlines,cell{1,4}{1}={r=3}{}}
Encoding & & puncturing & extending \\
& XOR & (k^2-k)(\frac{1}{R_0}-1) & (k^2-k)(\frac{1}{R_i}-1) \\
& OR & k^2(\frac{1}{R_0}-1) & k^2(\frac{1}{R_i}-1) \\
Decoding (per iteration) & & puncturing & extending \\
& addition & \frac{3tk}{R_0} & \frac{3tk}{R_i} \\
& table-lookup & \frac{2tk}{R_0} & \frac{2tk}{R_i} \\
\end{tblr}
\end{table}
\section{手动换行与X列自动换行}
\begin{table}
\centering
\caption{OBJ文件中的常见关键字}
\begin{tblr}{colspec={Q[c,m]X[c,m]},hlines,vlines,cell{2-Z}{1}={mode=math},row{1}={font=\bfseries},cell{2-Z}{2}={halign=l}}
关键字 & 说明 \\
v & 表示本行指定一个顶点。此前缀后跟3个单精度浮点数,分别表示该顶点的X、Y、Z坐标值。 \\
vt & 表示本行指定一个纹理坐标。此前缀后跟两个单精度浮点数。分别表示此纹理坐标的U、V值。 \\
vn & 表示本行指定一个法线向量。此前缀后跟3个单精度浮点数,分别表示该法向量的X、Y、Z坐标值。 \\
vp & 参数空间顶点 \\
p & 点 \\
l & 线 \\
f & {表示本行指定一个面(Face)。\\一个面实际上就是一个三角形图元。} \\
curv & 曲线 \\
curv2 & 2D曲线 \\
surf & 曲面 \\
\end{tblr}
\end{table}
\section{字体切换}
\begin{table}
\centering
\caption{注册表的五个分支}
\begin{tblr}{colspec={Q[l,m]X[l,m]},hlines,vlines,cell{2-Z}{1}={font=\ttfamily},row{1}={cmd=\bfseries,halign=c}}
名称 & 作用 \\
HKEY\_CLASSES\_ROOT & 有关文件关联和COM的设置信息,这是\texttt{HKLM\textbackslash SOFTWARE\textbackslash Classes}和\texttt{HKCU\textbackslash SOFTWARE\textbackslash Classes}两棵子树合并后的一个视图 \\
HKEY\_CURRENT\_USER & 有关当前用户的信息,这是一个符号链接,指HKU中对应于当前用户的子键 \\
HKEY\_LOCAL\_MACHINE & 有关当前系统的信息 \\
HKEY\_USERS & 有关该机器上所有用户账户的信息 \\
HKEY\_CURRENT\_CONFIG & 有关当前硬件配置的信息,这是一个符号链接,指向\texttt{HKLM\textbackslash SYSTEM\textbackslash CurrentControlSet\textbackslash Hardware Profiles\textbackslash Current} \\
\end{tblr}
\end{table}
\section{颜色}
\begin{table}
\centering
\caption{X80传感器分布图}
\begin{tblr}{colspec={X[c,m]X[c,m]},hlines,vlines}
传感器模块 & 位置 \\
红外传感器\#1 & A 左前方 \\
红外传感器\#2 & B 前方中间 \\
红外传感器\#3 & C 前方中间 \\
红外传感器\#4 & D 右前方 \\
红外传感器\#5 & E 右边 \\
红外传感器\#6 & F 尾部 \\
红外传感器\#7 & G 左边 \\
超声波传感器\#1 & H 左前方 \\
超声波传感器\#2 & I 前方中间 \\
超声波传感器\#3 & J 右前方 \\
人体移动感知传感器\#1 & K 左边 \\
人体移动感知传感器\#2 & L 右边 \\
正交编码器\#1 & M 左边,使用通道 1 \\
正交编码器\#2 & N 右边,使用通道 2 \\
\end{tblr}
\end{table}
\begin{table}
\centering
\caption{X80传感器分布图 (重置版本)}
\begin{tblr}{colspec={X[c,m]X[c,m]},hline{1,Z}={wd=.08em},hline{2}={wd=.05em},row{even[2-Z]}={bg=gray9!40},row{1}={font=\bfseries}}
传感器模块 & 位置 \\
红外传感器\#1 & A 左前方 \\
红外传感器\#2 & B 前方中间 \\
红外传感器\#3 & C 前方中间 \\
红外传感器\#4 & D 右前方 \\
红外传感器\#5 & E 右边 \\
红外传感器\#6 & F 尾部 \\
红外传感器\#7 & G 左边 \\
超声波传感器\#1 & H 左前方 \\
超声波传感器\#2 & I 前方中间 \\
超声波传感器\#3 & J 右前方 \\
人体移动感知传感器\#1 & K 左边 \\
人体移动感知传感器\#2 & L 右边 \\
正交编码器\#1 & M 左边,使用通道 1 \\
正交编码器\#2 & N 右边,使用通道 2 \\
\end{tblr}
\end{table}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
分享一下截至2023年2月27日XDUTS用到的字体。 Windows用户在安装字体时需右键字体文件选择为所有用户安装。最好在安装后管理员权限打开 链接:https://pan.quark.cn/s/9d1685c83c11 提取码:G4Fq 下面是每个字体文件对应的md5值:
|
Beta Was this translation helpful? Give feedback.
-
\documentclass{xdupgthesis}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{siunitx}
\begin{document}
\begin{table}
\caption{小数点对齐}
\begin{tblr}
{
colspec = {X[-1,c,m]X[-1,si={table-format=2.3},c,m]X[-1,si={table-format=4.3},c,m]X[-1,si={table-format=2.3},c,m]X[-1,si={table-format=3.3},c,m]},
cell{1}{2,4} = {c=2}{},
cell{1}{1} = {r=2}{},
hline{1,Z} = {wd=.08em},
hline{2} = {2-3}{wd=.05em,leftpos=-1,rightpos=-1,endpos=true},
hline{2} = {4-5}{wd=.05em,leftpos=-1,rightpos=-1,endpos=true},
hline{3} = {wd=.05em},
row{odd[3-Z]} = {bg=gray9!50},
row{1-2} = {guard,font=\bfseries},
}
Random AST depth & Static schedule evaluation & & Demand evaluation ET in sec. & \\
& ET in sec. & Memory in MB & ET in sec. & Memory in MB \\
1 & 0.009 & 2.971 & 0.091 & 5.536 \\
2 & 0.03 & 2.921 & 0.09 & 3.178 \\
3 & 230.005 & 3.646 & 0.09 & 4.037 \\
4 & 0.19 & 7.872 & 0.0 & 9.548 \\
5 & 0.097 & 13.091 & 0.123 & 21.288 \\
6 & 0.4 & 46.32 & 0.05 & 86.75 \\
7 & 0.064 & 57.778 & 0.122 & 0.154 \\
8 & 120.1 & 155 & 0.761 & 453.930 \\
9 & 4.029 & 198.215 & 2.276 & 866.845 \\
10 & 7.439 & 1346.09 & 9.757 & 12.442 \\
11 & 30.57 & 1368.750 & 43.098 & 115.167 \\
\end{tblr}
\end{table}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
子图跨页,更多设置可以阅读 \documentclass{xdupgthesis}
\usepackage{subcaption}
\usepackage{zhlipsum}
\begin{document}
\chapter{子图跨页}
\zhlipsum[1-2]
\begin{figure}
\centering
\includegraphics[width=.3\linewidth]{example-image}
\caption{a1}
\end{figure}
\begin{figure}
\centering
\subcaptionbox{b01\label{b01}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b02\label{b02}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b03\label{b03}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b04\label{b04}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b05\label{b05}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b06\label{b06}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b07\label{b07}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b08\label{b08}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b09\label{b09}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b10\label{b10}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b11\label{b11}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b12\label{b12}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b13\label{b13}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b14\label{b14}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b15\label{b15}}{\includegraphics[width=.3\linewidth]{example-image}}
\end{figure}
\begin{figure}\ContinuedFloat
\centering
\subcaptionbox{b16\label{b16}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b17\label{b17}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b18\label{b18}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b19\label{b19}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b20\label{b20}}{\includegraphics[width=.3\linewidth]{example-image}}\hfill
\subcaptionbox{b21\label{b21}}{\includegraphics[width=.3\linewidth]{example-image}}
\caption{bbb}
\label{bbb}
\end{figure}
\zhlipsum[1-3]
\begin{figure}
\centering
\includegraphics[width=.3\linewidth]{example-image}
\caption{a2}
\end{figure}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
有些导师的需求有点特殊,故此开发了一个三框的算法环境,借用了 \documentclass{xdupgthesis}
\usepackage{algpseudocodex}
\newcounter{alg}[chapter]
\NewDocumentEnvironment{algorithm}{o}{\IfNoValueTF{#1}{\begin{figure}}{\begin{figure}[#1]}\setlength{\lineskip}{-.4pt}\setlength{\parindent}{0pt}\setlength{\fboxsep}{3pt}\setlength{\fboxrule}{.4pt}}{\end{figure}}
\NewDocumentEnvironment{algframe}{+b}{\fbox{\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{#1}}}{}
\NewDocumentCommand{\algcaption}{m}{\begin{algframe}\textbf{算法\space\stepcounter{alg}\arabic{chapter}.\thealg: #1}\end{algframe}}
\begin{document}
\chapter{三框算法}
\begin{algorithm}[h]
\algcaption{ACCD}
\begin{algframe}
\textbf{输入:} 测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试 \\
\textbf{参数:} 测试测试测试测试测试测试测试测试 \\
\textbf{输出:} 测试测试测试测试测试测试测试测试试测试试测试试测试试测试
\end{algframe}
\begin{algframe}
\begin{algorithmic}[1]
\State $y \gets x+1$
\State \Return $y$
\end{algorithmic}
\end{algframe}
\end{algorithm}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
为了方便绘图,可通过如下代码获取版心宽度和高度。 \documentclass{xdupgthesis}
\begin{document}
\typeout{\the\textwidth}
\typeout{\the\textheight}
\end{document} 可以在终端中看到输出为:
或者直接输出在PDF中: \documentclass{xdupgthesis}
\begin{document}
\the\textwidth\space\the\textheight
\end{document} |
Beta Was this translation helpful? Give feedback.
-
关于交叉引用时,手动插入空格的问题,可以参考 CTeX-org/ctex-kit#392 。 这里我给出几个自定义的宏,简单来说,默认在交叉引用处前后加空格,采用这样的默认设置的原因是本人主观上认为交叉引用后紧跟着非标点的情况远大于紧跟着标点的情况。如果遇到交叉引用后紧跟着标点的情况,可以设置可选参数为空,具体用法请看如下示例,在下面的示例中,给出了手动插入空格和使用自定义宏来交叉引用的对比,效果是一致的。 \documentclass{xdupgthesis}
\usepackage{algorithm}
\usepackage{graphicx}
\usepackage{amsmath}
\NewDocumentCommand{\eqrefx}{mO{\space}}{式\space\eqref{#1}#2}
\NewDocumentCommand{\figrefx}{mO{\space}}{图\space\ref{#1}#2}
\NewDocumentCommand{\tabrefx}{mO{\space}}{表\space\ref{#1}#2}
\NewDocumentCommand{\algrefx}{mO{\space}}{算法\space\ref{#1}#2}
\begin{document}
\chapter{交叉引用}
\begin{equation}
\label{eq:key}
\end{equation}
\begin{figure}
\caption{title}
\label{fig:key}
\end{figure}
\begin{table}
\caption{title}
\label{tab:key}
\end{table}
\begin{algorithm}
\caption{title}
\label{alg:key}
\end{algorithm}
错误:
如式\eqref{eq:key}所示
如图\ref{fig:key}所示
如表\ref{tab:key}所示
如算法\ref{alg:key}所示
手动:
如式 \eqref{eq:key} 所示
如图 \ref{fig:key} 所示
如表 \ref{tab:key} 所示
如算法 \ref{alg:key} 所示
自动:
如\eqrefx{eq:key}所示
如\figrefx{fig:key}所示
如\tabrefx{tab:key}所示
如\algrefx{alg:key}所示
错误:
见式\eqref{eq:key},
见图\ref{fig:key},
见表\ref{tab:key},
见算法\ref{alg:key},
手动:
见式 \eqref{eq:key},
见图 \ref{fig:key},
见表 \ref{tab:key},
见算法 \ref{alg:key},
自动:
见\eqrefx{eq:key}[],
见\figrefx{fig:key}[],
见\tabrefx{tab:key}[],
见\algrefx{alg:key}[],
\end{document} |
Beta Was this translation helpful? Give feedback.
-
单位相关的排版,请使用 \documentclass{xdupgthesis}
\usepackage{siunitx}
\begin{document}
\chapter{单位}
\qty{100000}{\meter\squared}
\num{100000000000}
\qty{100000}{\meter\per\second}
\qty[per-mode=symbol]{100000}{\meter\per\second}
\qtyproduct{10x30x45}{\metre}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
下面给出一些关于相似性检测的信息,以下信息仅供参考,有任何后果概不负责。 在关于知网学位论文检测系统的说明及修改指导意见和关于知网学位论文检测系统的说明及修改指导意见中均有如下表述:
在关于2023年夏季硕士研究生申请学位工作的通知[中矿大京研学位字(2023)4号]-中国矿业大学(北京)研究生院中的附件7 学术不端行为检测常见问题解答.docx有如下表述:
|
Beta Was this translation helpful? Give feedback.
-
您好!请问xduts生成的pdf上交查重后,查重系统将equation格式的公式都转成了多个字符(查重系统显示检测到了0个公式):不仅显示的排版比较混乱,也导致检测出的总字数增加了很多,我理解的是查重系统会将pdf转成word再进行检测,就导致了所有的公式都被当成字符处理,那么这种现象是正常的吗? |
Beta Was this translation helpful? Give feedback.
-
你好 我想实现如图所示的子图排布,结构是一张大图和多张小图为一组,每组小图分两行,第一行小图的上边界与左边大图的上边界对齐,第二行小图的下边界与左边大图的下边界大致对齐,请问用 |
Beta Was this translation helpful? Give feedback.
-
可以利用 \documentclass{xdupgthesis}
\usepackage{tabularray}
\usepackage[export]{adjustbox}
\newlength{\SmallImgHeight}
\setlength{\SmallImgHeight}{40pt}
\newlength{\SubCaptionHeight}
\setlength{\SubCaptionHeight}{25pt}
\newlength{\BigImgHeight}
\setlength{\BigImgHeight}{\SubCaptionHeight}
\addtolength{\BigImgHeight}{\the\SmallImgHeight}
\addtolength{\BigImgHeight}{\the\SmallImgHeight}
\NewDocumentCommand{\InsSmallImg}{m}{\includegraphics[width=\linewidth,height=\SmallImgHeight,valign=c]{#1}}
\NewDocumentCommand{\InsBigImg}{m}{\includegraphics[width=\linewidth,height=\BigImgHeight,valign=c]{#1}}
\ExplSyntaxOn
\NewChildSelector{everyfour}[1][]{\int_step_inline:nnnn{1}{4}{\l_tblr_childs_total_tl}{\clist_put_right:Nn\l_tblr_childs_clist{##1}}}
\ExplSyntaxOff
\begin{document}
\chapter{title}
\begin{figure}
\begin{tblr}
{
colspec = {X[1.5,c,m]X[c,m]X[c,m]X[c,m]X[c,m]X[c,m]},
cell{everyfour[1-Z]}{1} = {r=3}{},
columns = {colsep=3pt},
column{1} = {leftsep=0pt},
column{Z} = {rightsep=0pt},
stretch = 0,
rows = {rowsep=0pt},
row{even[1-Z]} = {cmd={\small\setlength{\baselineskip}{10pt}}},
row{even[1-Z]} = {ht=\SubCaptionHeight},
cell{everyfour[1-Z]}{1} = {cmd=\InsBigImg},
cell{odd[1-Z]}{2-Z} = {cmd=\InsSmallImg},
}
example-image-a.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
& Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
& example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
example-image-a.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
& Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
& example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
example-image-a.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
& Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
& example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
example-image-a.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
& Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
& example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
example-image-a.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
& Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
& example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf & example-image-b.pdf \\
Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg & Teg Teg Teg Teg Teg Teg \\
\end{tblr}
\caption{title}
\end{figure}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
使用 \documentclass{xdupgthesis}
\begin{document}
\chapter{图表并列}
\begingroup
\setlength{\parindent}{0pt}
\begin{minipage}{.5\linewidth}
\centering
\includegraphics[width=.9\linewidth]{example-image}
\captionof{figure}{title}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\captionof{table}{title}
\centering
\begin{tabular}{|c|c|c|c|}
\hline
test & test & test & test \\
\hline
test & test & test & test \\
\hline
test & test & test & test \\
\hline
test & test & test & test \\
\hline
test & test & test & test \\
\hline
test & test & test & test \\
\hline
\end{tabular}
\end{minipage}
\endgroup
\end{document} |
Beta Was this translation helpful? Give feedback.
-
开发者你好,请问硕士论文中可以使用“有序列表”和“无序列表”吗? 如果可以,应该如何正确使用 enumerate 和 itemize 环境,自己使用后感觉间距不太对,应该如何调整呢?麻烦解答一下,谢谢! |
Beta Was this translation helpful? Give feedback.
-
使用 # draw.py
import matplotlib
import matplotlib.pyplot as plt
if __name__ == '__main__':
matplotlib.rcParams['font.family'] = 'serif'
matplotlib.rcParams['font.size'] = '10'
matplotlib.rcParams['pgf.texsystem'] = 'xelatex'
matplotlib.rcParams['pgf.preamble'] = r'\usepackage{XeCJK}'
matplotlib.rcParams['legend.frameon'] = 'True'
fig, main_ax = plt.subplots(constrained_layout=True)
fig_size = (220, 100)
fig.set_figwidth(fig_size[0] / 72.27)
fig.set_figheight(fig_size[1] / 72.27)
main_ax.plot([1, 2, 3, 4, 5], [1, 2, 3, 4, 9], label='第一条line')
main_ax.plot([1, 2, 3, 4, 5], [1, 3, 3, 7, 3], label='第二条line')
main_ax.legend()
pfg_file = 'fig.pgf'
plt.savefig(pfg_file, transparent=True)
plt.close() % main.tex
\documentclass{xdupgthesis}
\usepackage{pgf}
\begin{document}
\begin{figure}
\centering
\input{fig.pgf}
\caption{Matplotlib+PGF示例}
\end{figure}
\end{document} |
Beta Was this translation helpful? Give feedback.
-
使用去除页面命令时,保留索引和对照表,中英文摘要和正文,出现缩略语对照表未加空百页,单独一页后面紧跟第一章。 |
Beta Was this translation helpful? Give feedback.
-
在此处,用户可以提出仅限于实际文章撰写中的需求,例如,子图子表如何编写。
不应在此处讨论XDUTS的bug或者功能建议。简单来讲,此处所交流的内容实际上与XDUTS无关,仅仅为了帮助部分对LaTeX不熟悉的用户能够实现更好的排版效果。
此处内容较多,用户可使用
Ctrl+F
来查找相关内容。Beta Was this translation helpful? Give feedback.
All reactions