我建议你找个大语言模型帮你,事半功倍。这并不是LaTeX应该提供的功能。
我建议你找个大语言模型帮你,事半功倍。这并不是LaTeX应该提供的功能。
在ctex宏包文档的源文件ctex.dtx中,有如下一段代码:
% Line 924~977
\begin{table}[htbp]
\centering
\begin{threeparttable}
\caption{\CTeX{} 宏集自动配置字体策略}
\label{tab:default-font-select}
\begin{tabular}{*{5}{c}}
\toprule
& macOS Old\tnote{1}
& macOS New\tnote{2}
& Windows\tnote{3}
& 其他 \\
\midrule
\XeLaTeX & \makecell{\pkg{xeCJK}\\华文字库}
& \makecell{\pkg{xeCJK}\\华文字库 + 苹方}
& \makecell{\pkg{xeCJK}\\中易字库 + 微软雅黑}
& \makecell{\pkg{xeCJK}\\Fandol 字库\tnote{4}} \\
\cmidrule(lr){1-5}
\LuaLaTeX\tnote{5}
& \makecell{\pkg{LuaTeX-ja}\\华文字库}
& \makecell{\pkg{LuaTeX-ja}\\华文字库 + 苹方}
& \makecell{\pkg{LuaTeX-ja}\\中易字库 + 微软雅黑}
& \makecell{\pkg{LuaTeX-ja}\\Fandol 字库} \\
\cmidrule(lr){1-5}
\pdfLaTeX
& 不可用
& 不可用
& \makecell{\pkg{CJK} + \pkg{zhmetrics}\\中易字库 + 微软雅黑\tnote{6}}
& 不可用 \\
\cmidrule(lr){1-5}
\makecell{\LaTeX{} + \\\dvipdfmx}
& 不可用
& \makecell{\pkg{CJK} + \pkg{zhmetrics}\\华文字库 + 苹方}
& \makecell{\pkg{CJK} + \pkg{zhmetrics}\\中易字库 + 微软雅黑\tnote{6}}
& \makecell{\pkg{CJK} + \pkg{zhmetrics}\\Fandol 字库} \\
\cmidrule(lr){1-5}
\makecell{\upLaTeX{} + \\\dvipdfmx}
& 不可用
& \makecell{\pkg{zhmetrics-uptex}\\华文字库 + 苹方}
& \makecell{\pkg{zhmetrics-uptex}\\中易字库 + 微软雅黑}
& \makecell{\pkg{zhmetrics-uptex}\\Fandol 字库} \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item [1] Yosemite (10.10) 及以前的 macOS 系统。
\item [2] El Capitan (10.11) 及以后的 macOS 系统。
\item [3] 仅支持 Windows Vista 及以后的 Windows 操作系统。
\item [4] 由马起园、苏杰、黄晨成等人开发的开源中文字体,
参见:\url{https://www.ctan.org/pkg/fandol}。
\item [5] \LuaLaTeX{} 编译时使用 \pkg{LuaTeX-ja} 宏包。对此,
第 \ref{sec:lualatex-chinese}~节有特别说明。
\item [6] 微软雅黑字体并不总是有效,这和选项 \opt{zhmap} 的取值有关。
\end{tablenotes}
\end{threeparttable}
\end{table}但实际上这还不够...因为索引和超链接仍未定义,经过一番逆向工程,我们不难在ctxdoc.cls中找到如下定义的代码,下面的大致重定义了tnote环境,同时利用hypertarget设置了索引,抄就完了...
%% line 136~151
%% 重新定义 threeparttable 包的 tablenotes 环境
\renewlist{tablenotes}{description}{1}
\setlist[tablenotes]{%
format=\normalfont\tnote@item,align=right,listparindent=\parindent,
labelindent=\tabcolsep,leftmargin=*,rightmargin=\tabcolsep,
after=\@noparlisttrue}
\AtBeginEnvironment{tablenotes}{%
\setlength\parindent{2\ccwd}%
\normalfont\footnotesize}
\AtBeginEnvironment{threeparttable}{%
\stepcounter{tpt@id}%
\edef\curr@tpt@id{tpt@\arabic{tpt@id}}}
\newcounter{tpt@id}
\def\tnote@item#1{%
\Hy@raisedlink{\hyper@anchor{\curr@tpt@id-#1}}#1}
\def\TPTtagStyle#1{\hyperlink{\curr@tpt@id-#1}{#1}}那么我们实际上就可以实现如下的效果...
\documentclass[11pt,a4paper,english]{ctexart}
\usepackage{tikz}
\usetikzlibrary{ducks}
\usepackage{enumitem}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{threeparttable}
\usepackage{booktabs}
% \usepackage[colorlinks,linkcolor=red,anchorcolor=blue,citecolor=green]{hyperref}
\usepackage[colorlinks]{hyperref}
\makeatletter
%% copy from ctxdoc.cls
%% Line 136~151
%% 重新定义 threeparttable 包的 tablenotes 环境
\renewlist{tablenotes}{description}{1}
\setlist[tablenotes]{%
format=\normalfont\tnote@item,align=right,listparindent=\parindent,
labelindent=\tabcolsep,leftmargin=*,rightmargin=\tabcolsep,
after=\@noparlisttrue}
\AtBeginEnvironment{tablenotes}{%
\setlength\parindent{2\ccwd}%
\normalfont\footnotesize}
\AtBeginEnvironment{threeparttable}{%
\stepcounter{tpt@id}%
\edef\curr@tpt@id{tpt@\arabic{tpt@id}}}
\newcounter{tpt@id}
\def\tnote@item#1{%
%\Hy@raisedlink{\hyper@anchor{\curr@tpt@id-#1}}{#1}
%\Hy@raisedlink{\hyper@anchor{\curr@tpt@id-#1}}{\color{red}\textsuperscript{#1}}}
% modify the \textsuperscript{#1} here and change your ideal font style freely...
\Hy@raisedlink{\hyper@anchor{\curr@tpt@id-#1}}{\begin{tikzpicture}[scale=.5] \duck[signpost=#1] \end{tikzpicture}}} % 你甚至可以在这里画一只鸭子...
\def\TPTtagStyle#1{\hyperlink{\curr@tpt@id-#1}{#1}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{table}[htbp]
\caption{A table with notes}\label{tab:tablenotes}
\centering
\begin{threeparttable}
\begin{tabular}{*4{c}}\toprule
Table head\tnote{1} & Table head\tnote{1} & Table head\tnote{2} & Table head\tnote{2} \\ \midrule
Some values & Some values & Some values & Some values \\
Some values & Some values & Some values & Some values \\
Some values & Some values & Some values & Some values \\
Some values & Some values & Some values & Some values \\ \bottomrule
\end{tabular}
\begin{tablenotes}
\footnotesize
\item[1] The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item[2] The quick brown fox jumps over the lazy dog.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
请首先使用围栏代码块语法(你需要三个`)让你的代码正确高亮,否则缺少\让人怎么帮你debug...
\documentclass[12pt]{article}
\usepackage{ctex}
\usepackage[a4paper]{geometry}%
% \usepackage{setspace} % 设置文档的行距
% \usepackage{caption} % 处理表格和图形的标题
% 表格相关
\usepackage{booktabs} % 三线表
% \usepackage{makecell} % 表格内换行
% \usepackage{float}
% \usepackage{array}
% \usepackage{tabularx} % 设置表格的宽度
% \usepackage{longtable} % 表格跨页
\usepackage{tabularray}
% \usepackage{microtype} % 改善对齐
\DefTblrTemplate{contfoot-text}{default}{textit{Continued on next page}} % 续表
\NewTblrTheme{no-caption}{
\SetTblrTemplate{head}{empty}
\SetTblrTemplate{caption}{empty}
}
\begin{document}
% Panel B
\begin{flushleft}
\textbf{Table B4 (cont.)} \\
Using an Alternative Measure of Social Interaction
\end{flushleft}
\vskip -1cm \vskip 0pt
\begin{longtblr}[
entry=none,
label=none,
]{
width = \linewidth,
rowhead = 3,
colspec = {X[c,4.5cm]X[c,2cm]X[c,2cm]X[c,2cm]X[c,2cm]X[c,2cm]X[c,2cm]},
colsep = 0cm,
cells = {c,m},
stretch = 0.43,
% rowsep = 0pt, %感觉行距大点会更好...
cell{1}{1} = {c=7, r=1}{l},
cell{2}{1} = {c=1, r=2}{c},
hline{1,2,Z} = {0.06em},
hline{3,4} = {0.04em},
row{2,4-Z} = {ht=0.4cm, font=\small},
column{1} = {font=\itshape\small},
row{1} = {ht=0.5cm, font=\normalsize},
row{3} = {ht=1.2cm},%修改行高我感觉观感就可以了...
}
{Panel B: OLS regression} & & & & & & \\
& (1) & (2) & (3) & (4) & (5) & (6) \\
& {Rel\_Rec} & {CAR\\[-1ex]{}[$-1$, $+1$]} & {CAR\\[-1ex]{}[$-2$, $+2$]} & {CAR\\[-1ex]{}[$-3$, $+3$]} & {CAR\\[-1ex]{}[$-5$, $+5$]} & {BHAR\\[-1ex]{}[$+2$, $+30$]} \\
% attention here {CAR\\{}[...]}
% {}不能缺,具体原理我也不确定,似乎会被识别成\[ \]..导致报错
Social Interaction & 0.086*** & 0.546** & 0.740** & 0.659* & 0.807* & 1.270*** \\
& (6.32) & (2.39) & (2.53) & (1.95) & (1.86) & (2.62) \\
\end{longtblr}
金融学..累计超额收益率...挺不错的...
% 下一页
\newpage
\end{document}关于行距,我没找到tabularray比较方便的接口...略作修改如上...

可以使用lscape宏包提供的landscape环境实现
\documentclass[fontset=ubuntu]{ctexart}
\usepackage{lscape}
\usepackage{graphicx}
\usepackage{zhlipsum}
\begin{document}
\zhlipsum[1-2]
\begin{landscape}
\begin{figure}
\centering
\includegraphics[width=.95\linewidth]{figure.png}
\caption{装修结构平面图}
\end{figure}
\end{landscape}
\zhlipsum[1-2]
\end{document}
不是很优雅...
\documentclass[UTF8]{ctexart}
\usepackage{array,tabularray,geometry,xcolor}
\NewColumnType{W}[1]{>{\centering\arraybackslash}Q[m,wd={#1}]}
\geometry{margin=2pt,papersize={8cm,8cm}}
\pagestyle{empty}
\begin{document}
\vspace*{\fill}\begin{center}
\begin{tblr}{
colspec={W{4\ccwd}m{4\ccwd}W{4.5\ccwd}W{3\ccwd}},
hlines,vlines,
colsep=0pt,
% stretch=0,
cell{1}{3}={red},
}
所想即为所得 & 所想即所得 & {\makebox[4.51\ccwd]{所想} \\即所得}&所想即所得\\
& & 所想即所得 & \\
\end{tblr}
\end{center}\vspace*{\fill}
\end{document}
\exp本来就应该是正体,我的看法是接受他,你既然选择了mtpro2,那么就应该接受它优点和缺点。
或者你应该具体描述你想达到什么效果?
对pgfplots不是太了解,follow reference link,尝试给出一个解答:
\documentclass[11pt, border=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
colormap/jet,% change colormap style here
scatter,
scatter src=x,
only marks,
clip mode=individual,
scatter/@pre marker code/.append code={
\pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}
\pgfmathsetmacro\negheight{-\pgfplotspointmeta}
\fill [draw=black] (axis direction cs:0,0.3) rectangle (axis direction cs:\negheight,-0.3);\pgfplotsset{mark=none}
},
width=12cm,
height=8cm,
grid=both,
ytick=data,
xmin=0,xmax=100,
xlabel={Percentage (\%)},
ylabel={Categories},
% symbolic y coords={A, B, C, D, E},
yticklabels={A, B, C, D, E},
ytick style={draw=none},
%nodes near coords,
enlarge y limits=.2,
xtick={0, 20, 40, 60, 80, 100},
xticklabel=\pgfmathprintnumber{\tick}\%,
]
\addplot coordinates {(23,1) (45,2) (56,3) (78,4) (89,5)};
\end{axis}
\end{tikzpicture}
\end{document}
等宽字体缺少字体├─和─所致。可以考虑使用\setmonofont{Consolas}修改。

我感觉你确实应该补充一下你的具体需求(比如一个完整的审稿回复应该是什么样子,你已经实现的是什么样子),我看不出这里的Reviewer为什么是一个计数器Counter,同时在你的聊天记录中似乎也有\ref的需求,但在你上述的代码中并未体现。
你上面出现结果为为Null,是因为你在调用\Rref{o4m35}时仍未经过\setStringCounter{Reviewer}{o4m35},于是为\setStringCounter{Reviewer}{NULL}定义的默认值。
事实上你把这两句放到\RTR{o4m35}之后即可。我不知道是不是能回答你的问题。而且你的代码中\setStringCounter和\getStringCounter给我的感觉就是把你所谓的"字符串"装进宏里面然后再拿出来,个人觉的目的不是很明确。

首先我有点好奇,是什么需求让你必须调节不同字体横线的粗细。此外,我认为这个问题必须提供截图的预期的粗细效果,并提供两份代码,不要让别人猜测的stix字体是如何调用的...
我目前只知道关于分数线的粗细控制...
另外根号是有左侧部分的,你的描述中只提及了横线,那左侧部分线的粗细呢?
在terminal中运行latexdef \frac可得:
\frac :
\long macro:#1#2->{\begingroup #1\endgroup \over #2}TeX命令\frac实际上是一个带编组的\over命令
In The TeXBook(Page 143), we know that there exist command \above[dim] to control the dim of the fraction bar:

除此之外,对于分数,amsmath宏包的\genfrac命令也提供了thickness用于控制粗细

关于\sqrt符号,其形状(应该)由对应的字符\radical "270370控制,是和字体强关联的。
但你也可以用盒子自己画一个(我是不会画的,因此自然是copy的):
\documentclass{article}
\def\radicando#1{%
\leavevmode
\hbox{%
\vtop{%
\vbox{%
\hrule height1.5pt \kern -1.2pt
\hbox{%
\kern 1pt \strut#1\kern 0pt
}%
}%
\kern -3pt
}%
}
}
\def\radice#1{\surd\kern-.25pt\radicando{\lower1.5pt\hbox{\mathstrut$#1$}}}
\begin{document}
$\frac{1}{2}$ ${123\above2pt 456}$
$\radice{aeiou}$ $\radice{16}$
\end{document}
也许有帮助。
是真的很小吗(?)那你结合图片描述一下预期的大小。
BTW,为什么要调用两次unicode-math,同时在这个mwe中ctex也和fontspec也完全没有必要调用,可删去。

应该是图书馆提供的『研究生学位论文Latex参考模板.zip』配置上有一些问题
更建议使用这个开源仓库 但使用的时候必须仔细研究其文档和学校有关规范。
改正xetex thuthesis.ins编译得到的是thuthesis.cls文件

如果你不介意重复绘制的话,下面也许是可行的...
\documentclass[landscape]{article}
\usepackage[margin=1in,a3paper]{geometry}
\usepackage{tkz-graph}
\begin{document}
\ExplSyntaxOn
\cs_new_protected:Npn \draw_dot_diagram:n #1
{
\pgfmathtruncatemacro{\NN}{0}
\str_set:Nn \l_tmpa_str { #1 }
\seq_clear:N \l_tmpa_seq
\begin{tikzpicture}[
line~join=round,line~cap=round,
VertexStyle/.style = {
shape=circle,draw,fill,
minimum~size=5pt,
inner~sep=0pt,
outer~sep=0pt,
}]
\SetGraphUnit{2}
\SetVertexNoLabel
\Vertex{P\NN}
\str_map_inline:Nn \l_tmpa_str
{
\pgfmathtruncatemacro{\tmp}{\NN+1}
\str_case:nn { ##1 }
{
{U} {\NO(P\NN){P\tmp}}
{D} {\SO(P\NN){P\tmp}}
{L} {\WE(P\NN){P\tmp}}
{R} {\EA(P\NN){P\tmp}}
}
\Edge(P\NN)(P\tmp)
\pgfmathtruncatemacro{\NN}{\tmp}
}
\end{tikzpicture}
\par \vspace*{3cm}
}
\draw_dot_diagram:n {RRUDRUDRR}
\draw_dot_diagram:n {RRRUDRUDRUDRR}
\draw_dot_diagram:n {RRRURUDLUUDLRDDDRRLDRURRUUDR}
\ExplSyntaxOff
\end{document}其实重复绘制的问题应该是有优化空间的,但我下午还有课...

你的代码太长了,你希望在互联网上找人帮你看长达349行的代码?
你应该使用二分注释等方法找到真正让你"卡死"的那些部分
实际上出问题的有以下两部分:
%Line265~282
\begin{tikzpicture}
\begin{pie}[
color={blue!20, red!20, orange!20, green!20, yellow!20},
text=legend,
sum=auto,
explode=0.1,
radius=3,
]
\pie[
text=legend]{
10/民族舞,
35/英文剧场,
10/无人机,
10/数学建模,
35/辩论
}
\end{pie}
\end{tikzpicture}是谁教你的\begin{pie}嵌套\pie命令的(?)告诉我,是谁?你是否看过pgf-pie的文档?

需要修改成以下,只使用\pie创建饼图
\begin{tikzpicture}
\pie[
color={blue!20, red!20, orange!20, green!20, yellow!20},
text=legend,
sum=auto,
explode=0.1,
radius=3,
]{
10/民族舞,
35/英文剧场,
10/无人机,
10/数学建模,
35/辩论
}
\end{tikzpicture}第二个问题出现在enumerate的嵌套问题上:
%Line318~347
\begin{enumerate}
本节包含总体取值规律的估计,总体百分位数的估计,总体集中趋势估计,总体离散程度估计等内容,下面先把涉及到的一些基础知识进行梳理。
\textbf{频率分布直方图}: 每个小矩形的面积表示数据落在该组的频率, 各小矩形的面积之和为 1.
\textbf{百分位数}: 一组数据的第 \( p \) 百分位数是这样一个值, 它使得这组数据中至少有 \( p\% \) 的数据小于或等于这个值,且至少有 \( (100-p)\% \) 的数据大于或等于这个值,其计算步骤为:
\begin{enumerate}
\item 按从小到大排列原始数据;
\item 计算 \( i=n \times p\% \), 其中 \( n \) 为样本量;
\item 若 \( i \) 不是整数, 而大于 \( i \) 的比邻整数为 \( j \), 则第 \( p \) 百分位数为第 \( j \) 项数据; 若 \( i \) 是整数, 则第 \( p \) 百分位数为第 \( i \) 项和第 \( i+1 \) 项数据的平均数.
\end{enumerate}
\item \textbf{平均数}: 可反映数据的集中趋势.
\begin{enumerate}
\item 一组数据 \( x_1, x_2, \cdots, x_a \) 的平均数 \( \overline{x} = \frac{x_1+x_2+\cdots+x_a}{n} \).
\item 由频率分布直方图估计样本平均数, 常用每组区间中点值代表落在该区间的数据, 若设各组区间中点为 \( x_1, x_2, \cdots, x_n \), 对应各组的频率为 \( f_1, f_2, \cdots, f_n \), 则可估计样本平均数 \( \bar{x} = \sum_{i=1}^n x_i f_i \).
\end{enumerate}
\item \textbf{中位数}: 可反映数据的集中趋势.
\begin{enumerate}
\item 对于从小到大排列的一组数据, 若数据个数为奇数, 则中位数为最中间的一个数据; 若数据个数为偶数,则中位数为中间两个数据的平均数.
\item 由频率分布直方图估计样本中位数, 应在横轴上找到一个数, 使其左右两侧频率各占 0.5.
\end{enumerate}
\item \textbf{众数}: 可反映数据的集中趋势.
\begin{enumerate}
\item 一组数据中出现次数最多的数据即为该组数据的众数, 若有几个数据出现次数一样多, 且都比其它数据多,则它们都是众数.
\item 由频率分布直方图估计样本众数, 取最高的小矩形区间中点即可.
\end{enumerate}
\item \textbf{极差}: 一组数据的最大值与最小值之差, 它可以一定程度反映数据的离散程度.
\item \textbf{方差、标准差}: 刻画数据的离散程度. 方差、标准差越大, 数据越分散, 反之越集中.
\begin{enumerate}
\item 一组数据 \( x_1, x_2, \cdots, x_n \) 的方差 \( s^2 = \frac{1}{n} \sum_{i=1}^n (x_i - \bar{x})^2 = \frac{1}{n} \sum_{i=1}^n x_i^2 - \bar{x}^2 \), 方差公式的两种形式都需掌握, 计算或证明时都可能用到. 方差的算数平方根 \( s \) 即为标准差. 若数据 \( x_1, x_2, \cdots, x_n \) 有重复, 设其不重复的值为 \( y_1, y_2, \cdots, y_k \), 对应的数据个数依次为 \( f_1, f_2, \cdots, f_k \), 则 \( s^2 = \frac{1}{n} \sum_{i=1}^{k} f_i (y_i - \bar{x})^2 \).
\end{enumerate}
\end{enumerate}你是否看过入门文档lshort-zh-cn(?) 在enumerate环境内必须使用\item....你这几行素在?(告诉我,为什么?)
本节包含总体取值规律的估计,总体百分位数的估计,总体集中趋势估计,总体离散程度估计等内容,下面先把涉及到的一些基础知识进行梳理。
textbf{频率分布直方图}: 每个小矩形的面积表示数据落在该组的频率, 各小矩形的面积之和为 1.
textbf{百分位数}: 一组数据的第 ( p ) 百分位数是这样一个值, 它使得这组数据中至少有 ( p% ) 的数据小于或等于这个值,且至少有 ( (100-p)% ) 的数据大于或等于这个值,其计算步骤为:

那几行前面必须加上\item
本节包含总体取值规律的估计,总体百分位数的估计,总体集中趋势估计,总体离散程度估计等内容,下面先把涉及到的一些基础知识进行梳理。
\begin{enumerate}%%%%%%你下面这两个`\textbf`前面为什么不用????告诉我,为什么??
\item \textbf{频率分布直方图}: 每个小矩形的面积表示数据落在该组的频率, 各小矩形的面积之和为 1.
\item \textbf{百分位数}: 一组数据的第 \( p \) 百分位数是这样一个值, 它使得这组数据中至少有 \( p\% \) 的数据小于或等于这个值,且至少有 \( (100-p)\% \) 的数据大于或等于这个值,其计算步骤为:
\begin{enumerate}
\item 按从小到大排列原始数据;
\item 计算 \( i=n \times p\% \), 其中 \( n \) 为样本量;
\item 若 \( i \) 不是整数, 而大于 \( i \) 的比邻整数为 \( j \), 则第 \( p \) 百分位数为第 \( j \) 项数据; 若 \( i \) 是整数, 则第 \( p \) 百分位数为第 \( i \) 项和第 \( i+1 \) 项数据的平均数.
\end{enumerate}
%% rest ...切忌“不懂原理的前提下四处搜罗代码”。 —— OsbertWang
效果如下:
另外你的最小工作示例还是不规范,你理应提供有问题的,让你报错的最小的那一段代码,不要期望每个人都有时间看你整篇几百行,甚至两千行文档。同时应注意内容的保密性(试卷直接发出来真的好吗...)
另附MWE定义,请仔细阅读并了解围栏代码块的用法。

不建议使用xkeyval宏包了,latex2e kernel setup (based on l3keys)已经足够支持键值对的选项。
从你的代码来说,只要删除testclass.cls中\ExecuteOptionsX{text={key1=12345, key2=abcde}}的命令即可,\ExecuteOptionsX用于声明默认选项,不应该放在\ProcessOptionsX之后。但即使如此做,虽然可以传递option,但仍会导致出现LaTeX Warning: Unused global option(s):[text={key1=67890}]的提示,这也是不推荐使用的原因。
问 LaTeX转置表格???