Sagittarius Rover
Sagittarius Rover
这家伙很懒,什么也没写!

注册于 4年前

回答
540
文章
0
关注者
21

可以尝试fancyhdr文档中的做法

image.png

\documentclass[11pt,a4paper,twoside]{article}
\usepackage{ctex}
\usepackage{fancyhdr}
\usepackage{lipsum}
\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{\marginparwidth}
\pagestyle{fancy}
\chead{页眉}   

\usepackage{marginnote}

\begin{document}

\lipsum[2] \marginnote{边栏文本}

\lipsum[3-7] \marginnote{另一段边栏文本}

\end{document}

image.png

Here below is the proposal of luadraw package:


\documentclass[multi=luadraw]{standalone}
\usepackage[svgnames]{xcolor}
\usepackage[3d]{luadraw}
\usepackage{fourier}
\begin{document}

\begin{luadraw}{name=AAA}
    local g = graph3d:new{
        window3d={-2,5,-2,5,-1,8}, 
        window={-1.5,3,-0.5,5},
        viewdir={-120,75}, size={5,5}
    }
    g:Linewidth(8)
    local v1, v2, v3 = M(3, 0, 0), M(0, 2, 0), M(0, 0, 4)
    local p = parallelep(Origin, v1, v2, v3)
    local ctr = (v1 + v2 + v3) / 2

    for _, pt in ipairs(p.vertices) do
        g:Dpolyline3d({ctr, pt}, "dashed")
    end

    g:Dpoly(p, {mode=mWireframe, hiddenstyle="solid"})

    g:Dpolyline3d(
        {{Origin, v1},{Origin, v2},{Origin, v3}}, "-latex, red, line width=1.2pt"
    )
    g:Dballdots3d(p.vertices, "blue", 0.6)
    g:Dballdots3d(ctr, "blue", 0.6)

    g:Dlabel3d(
        "$\\vec{a}_1$", v1, {pos="S", node_options="red"},
        "$\\vec{a}_2$", v2, {pos="W"},
        "$\\vec{a}_3$", v3, {pos="N"}
    )
    g:Show()
\end{luadraw}

\begin{luadraw}{name=BBB}
    local g = graph3d:new{
        window3d={-2,5,-2,5,-1,8}, 
        window={-1.5,3,-0.5,6.5},
        viewdir={-120,75}, size={5,5}
    }
    g:Linewidth(8)
    local v1, v2, v3 = M(3, 0, 0), M(0, 2, 0), M(0, 0, 5.5)
    local p = parallelep(Origin, v1, v2, v3)
    local ctr = (v1 + v2 + v3) / 2

    for _, pt in ipairs(p.vertices) do
        g:Dpolyline3d({ctr, pt}, "dashed")
    end

    g:Dpoly(p, {mode=mWireframe, hiddenstyle="solid"})

    g:Dpolyline3d(
        {{Origin, v1},{Origin, v2},{Origin, v3}}, "-latex, red, line width=1.2pt"
    )
    g:Dballdots3d(p.vertices, "blue", 0.6)
    g:Dballdots3d(ctr, "blue", 0.6)

    g:Dlabel3d(
        "$\\vec{a}_1$", v1, {pos="S", node_options="red"},
        "$\\vec{a}_2$", v2, {pos="W"},
        "$\\vec{a}_3$", v3, {pos="N"}
    )
    g:Show()
\end{luadraw}

\begin{luadraw}{name=CCC}
    local g = graph3d:new{
        window3d={-4,4,-4,4,-4,4}, 
        window={-2.5,4,-1,5.5},
        viewdir={-120,75}, size={5,5}
    }
    g:Linewidth(8)
    local v1, v2, v3 = M(4, 0, 0), M(0, 4, 0), M(0, 0, 4)
    local p = parallelep(Origin, v1, v2, v3)

    local centers = {}
    for idx, f in ipairs(getfacet(p)) do
        local c = isobar3d(f)
        table.insert(centers, c)
        for _, vertex in ipairs(f) do
            if idx % 2 == 0 then
                g:Dpolyline3d({c, vertex}, "densely dotted,line width=0.6pt")
            else
                g:Dpolyline3d({c, vertex}, "dashed")
            end
        end
    end

    g:Dpoly(p, {mode=mWireframe, hiddenstyle="solid"})

    g:Dpolyline3d(
        {{Origin, v1},{Origin, v2},{Origin, v3}}, "-latex, red, line width=1.2pt"
    )
    g:Dballdots3d(p.vertices, "blue", 0.6)
    g:Dballdots3d(centers, "blue", 0.6)

    g:Dlabel3d(
        "$\\vec{a}_1$", v1, {pos="S", node_options="red"},
        "$\\vec{a}_2$", v2, {pos="W"},
        "$\\vec{a}_3$", v3, {pos="N"}
    )
    g:Show()
\end{luadraw}

\begin{luadraw}{name=DDD}
    local g = graph3d:new{
        window3d={-6,6,-6,6,-6,6}, 
        window={-4,4,-1,6},
        viewdir={-50,75}, size={5,5}
    }
    local pi, cos, sin = math.pi, math.cos, math.sin
    g:Linewidth(8)
    
    local v1, v2, v3 = M(3, 0, 0), M(-3*cos(pi/3), 3*sin(pi/3), 0), M(0, 0, 5)
    
    local cell1 = parallelep(Origin, v1, v2, v3)
    local cell2 = rotate3d(cell1, 120, {Origin, vecK})
    local cell3 = rotate3d(cell1, -120, {Origin, vecK})
    local bg_opt = {mode=mWireframe, edgecolor="gray!50", hiddenstyle="dashed"}
    g:Dpoly(cell2, bg_opt)
    g:Dpoly(cell3, bg_opt)
    g:Dpoly(cell1, {mode=mWireframe, edgewidth=10, hiddenstyle="solid"})

    g:Dpolyline3d({{Origin, v1}, {Origin, v2}, {Origin, v3}}, "-latex, red, line width=1pt")

    g:Dballdots3d(cell2.vertices, "blue!50")
    g:Dballdots3d(cell3.vertices, "blue!50")
    g:Dballdots3d(cell1.vertices, "blue")
    g:Dlabel3d(
        "$\\vec{a}_1$", v1, {pos="S", node_options="red"},
        "$\\vec{a}_2$", v2, {pos="NE",dist=0},
        "$\\vec{a}_3$", v3, {pos="W"}
    )
    g:Show()
\end{luadraw}

\end{document}

I don't think what matters here is how to arrange the image into the tabular environment(you could have better control with tabualrray package), thus, the code above just show how to plot them in an elegant appraoch, and I only randomly choose and post four in your whole figure.

Noted that LLM is not sophisticated enough if you have high-quality requirement if the image(TikZ are always used to produced extremely high-quality ones), also, you only show what GPT gives you, you pay too less endeavour on it, from a hacker's view, I don't think you are deserved to get high-quality answer, only provide ugly and less-tweaked code. Please, pay enough time to plot the figure, if you really need high-qualitied ones.

对于在命令行使用fc-list没有看懂的问题,是因为cmd默认使用的是GBK编码,可以输入chcp命令查看当前编码,如果为936则会出现上述乱码的问题,可以通过chcp 65001更改为UTF-8编码,此后可以重新执行fc-list | findstr "FZShuSong-Z01"查看字体的中文名称.

此外,在不涉及版权问题的前提下,可否提供一下MWE以方便本地调试....

此外我印象中指定本地字体文件时似乎要加上后缀名.ttf(可以尝试尝试)

image.png

我懂你的痛苦,我也被fontspec狠狠折磨过

Edited 20251227:

这个问题似乎目前有一个PR,但是似乎功能上尚且有些欠缺:

https://gitee.com/xkwxdyy/exam-zh/pulls/9


是否应该提供一个MWE方便别人调试测试...

MMWWEE.jpg

诚如@u38442 的解释,我又尝试了一下,下面是测试的结果.

按我个人理解,minipage环境的作用是用来对齐文字环境内的「小页面」,因此默认是按照baseline居中对齐的,你想要实现和控制的是多个minipage之间的垂直对齐关系,而minipage会根据内容自动设置高度,例如下图,自动匹配的高度不统一导致了你的问题.

image.png

可以尝试指定可选的 [height] 参数来实现.
下面是一个MWE和效果.

image.png

\documentclass[aspectratio=169]{ctexbeamer}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\begin{frame}{给minipage加框并展示inner-pos参数的区别}
    \fbox{
        \begin{minipage}[c][5cm][t]{.28\textwidth}
            \centering
            \includegraphics[width=.6\textwidth]{example-image-a}
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c][5cm][c]{.28\textwidth}
            \centering
            \includegraphics[width=.6\textwidth]{example-image-b}
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c][5cm][b]{.28\textwidth}
            \centering
            \includegraphics[width=.6\textwidth]{example-image-c}
        \end{minipage}
    }
\end{frame}
%---------------------------------------------------------------------------------%
\begin{frame}{3个minipage都顶部对齐}
    \fbox{
        \begin{minipage}[c][.2\textheight][t]{.28\textwidth}
            \centering
            苹果.
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c][.2\textheight][t]{.28\textwidth}
            \centering
            \includegraphics[width=.6\textwidth]{example-image}
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c][.2\textheight][t]{.28\textwidth}
            \centering
            苹果.
        \end{minipage}
    }
\end{frame}
%---------------------------------------------------------------------------------%
\begin{frame}{3个minipage都居中对齐}
    \fbox{
        \begin{minipage}[c]{.28\textwidth}
            \centering
            苹果.
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c]{.28\textwidth}
            \centering
            \includegraphics[width=.6\textwidth]{example-image}
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c]{.28\textwidth}
            \centering
            橘子.
        \end{minipage}
    }
\end{frame}
%---------------------------------------------------------------------------------%
\begin{frame}{3个minipage都居底对齐}
    \fbox{
        \begin{minipage}[c][.2\textheight][b]{.28\textwidth}
            \centering
            苹果.
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c][.2\textheight][b]{.28\textwidth}
            \centering
            \includegraphics[width=.6\textwidth]{example-image}
        \end{minipage}
    }
    \fbox{
        \begin{minipage}[c][.2\textheight][b]{.28\textwidth}
            \centering
            苹果.
        \end{minipage}
    }
\end{frame}
\begin{frame}{演示minipage设置不同的高度}
    生活就像海洋,只有意志坚强的人才能到达彼岸.生活就像海洋,只有意志坚强的人才能到达彼岸.生活就像海洋,只有意志坚强的人才能到达彼岸.生活就像海洋,只有意志坚强的人才能到达彼岸.
    \fbox{
        \begin{minipage}{.2\textwidth}
            \centering
            这是一小段话.
        \end{minipage}
    }
    \fbox{
        \begin{minipage}{.15\textwidth}
            \centering
            \includegraphics[width=.6\textwidth]{example-image}
        \end{minipage}
    }
    \fbox{
        \begin{minipage}{.15\textwidth}
            \centering
            \includegraphics[width=.8\textwidth]{example-image}
        \end{minipage}
    }
\end{frame}
\end{document}

此外,关于markdown插入代码块的语法,需要如下图做围栏式代码块,markdown语法学习对你来说仍然任重而道远.
image.png
(p.s.上面的{ctexart}花括号打错了,但我懒得再截图...)

另:对于设置对齐方式这种较为精细化的需求,GPT等大模型不一定(往往不能)可以提供准确的解答,更好的办法(几乎也是唯一的办法)是阅读宏包的文档.可以搜索一下texdoc <package name>命令,当然如果你是在overleaf上使用的话,可以尝试检索CTAN+<package name>.但其实对于精细需求我个人是不建议使用大模型帮助的,"GPT不懂LaTeX".

祝好!

我不是很明白你是怎么每次复制MWE都复制成这样的(你只要把 documentclass 到end{document}之间的所有内容放到一个markdown代码块 ' ' ' '之间,就能把他们全都高亮框内)

此外,rule插入的并不是一个图片.建议使用mwe插入图片以构造mwe,同时我不是很确明白使用minipage给出的结果你有不满意吗,还是你正在学习beamer以遍历所以实现图文混排的方式,如果是后者,那非常不错!

image.png

经过测试,我发现只需要使用对齐选择 T 即可实现,具体细节可见texdoc beamer
image.png

下面是一个MWE和结果

\documentclass[aspectratio=169]{ctexbeamer}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{mwe}
\begin{document}
\begin{frame}{文图文}
    \lipsum[2]
    \begin{columns}[T]
        \begin{column}{.32\textwidth}
            \centering
            苹果\hfill
        \end{column}
        \begin{column}{.32\textwidth}
            \centering
            \includegraphics[width=\textwidth]{example-image}
        \end{column}
        \begin{column}{.32\textwidth}
            \centering
            香蕉
        \end{column}
    \end{columns}
\end{frame}
\end{document}

image.png

按照我对这个网站粗浅的理解....
我觉得你要区分好 提问(问答)以及文章投稿,前者时用于提问交流问题的,后者适用于发布分享你使用latex做了一些什么,或者有什么新的功能,以及自己的学习感悟之类的问题.查看你的主页,你似乎并未发布作品

  • 在提问板块,如果问题尚未采纳,可以通过以下补充问题按钮对问题正文进行修改。

image.png

  • 在提问板块后的评论区(comment),本网站似乎暂无修改的功能(tse上面是可以的),也许可以新增一个comment来修改或补充你的问题.
  • 在发布文章的板块,如果要修改的话,应该需要联系超管@u30 后台处理吧.

绘制正方体调整角度用的是什么宏包的什么命令呢?也许需要一个更具体的绘图框架。

文档其实写的很详细了
使用命令行编译后可以发现需要在当前目录下新建一个solutions文件夹,tbc会将solution写入该文件夹
这是由savelowerto命令指定的
image.png
你不能编译的一大原因是找不到solutions文件夹

你还有其他一些问题
例如没有引入amsmath,调用skins和xparse库的方式都不对等原因

目录结构应如下【注意应自己建一个solutions文件夹】
image.png

下面是实测可以运行的MWE

\documentclass{ctexart}
\usepackage[margin=1.5cm]{geometry}
\usepackage{amsmath}
\usepackage{tcolorbox}
\usepackage{xcolor}
\tcbuselibrary{skins,xparse}

\NewTColorBox[auto counter,number within=section]{exercise}{+!O{}}{%
    enhanced,colframe=green!20!black,colback=yellow!10!white,coltitle=green!40!black,
    fonttitle=\bfseries,
    underlay={\begin{tcbclipinterior}
    \shade[inner color=green!80!yellow,outer color=yellow!10!white]
    (interior.north west) circle (2cm);
    \draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}]
    (interior.south west) grid (interior.north east);
    \end{tcbclipinterior}},
    title={Exercise~\thetcbcounter:},
    label={exercise@\thetcbcounter},
    attach title to upper=\quad,
    after upper={\par\hfill\textcolor{green!40!black}%
    {\itshape Solution on page~\pageref{solution@\thetcbcounter}}},
    lowerbox=ignored,
    savelowerto=solutions/exercise-\thetcbcounter.tex,
    record={\string\solution{\thetcbcounter}{solutions/exercise-\thetcbcounter.tex}},
    #1
}
\NewTotalTColorBox{\solution}{mm}{%
enhanced,colframe=red!20!black,colback=yellow!10!white,coltitle=red!40!black,
fonttitle=\bfseries,
underlay={\begin{tcbclipinterior}
\shade[inner color=red!50!yellow,outer color=yellow!10!white]
(interior.north west) circle (2cm);
\draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
\end{tcbclipinterior}},
title={Solution of Exercise~\ref{exercise@#1} on page~\pageref{exercise@#1}:},
phantomlabel={solution@#1},
attach title to upper=\par,
}{\input{#2}}
\tcbset{no solution/.style={no recording,after upper=}}

\tcbstartrecording\relax
\begin{document}
\begin{exercise}
    Compute the derivative of the following function:
    \begin{equation*}
        f(x)=\sin((\sin x)^2)
    \end{equation*}
    \tcblower
    The derivative is:
    \begin{align*}
        f'(x) & = \left( \sin((\sin x)^2) \right)'
        =\cos((\sin x)^2) 2\sin x \cos x.
    \end{align*}
\end{exercise}
\begin{exercise}[no solution]
    It holds:
    \begin{equation*}
        \frac{d}{dx}\left(\ln|x|\right) = \frac{1}{x}.
    \end{equation*}
\end{exercise}
\begin{exercise}
    Compute the derivative of the following function:
    \begin{equation*}
        f(x)=(\sin(\sin x))^2
    \end{equation*}
    \tcblower
    The derivative is:
    \begin{align*}
        f'(x) & = \left( (\sin(\sin x))^2 \right)'
        =2\sin(\sin x)\cos(\sin x)\cos x.
    \end{align*}
\end{exercise}
\begin{exercise}
    Compute the derivative of the following function:
    \begin{equation*}
        f(x)=\sqrt{x^3-6x^2+2x}
    \end{equation*}
    \tcblower
    The derivative is:
    \begin{align*}
        f'(x) & = \left( \sqrt{x^3-6x^2+2x} \right)'
        = \frac{3x^2-12x+2}{2\sqrt{x^3-6x^2+2x}}.
    \end{align*}
\end{exercise}
\begin{exercise}
    Compute the derivative of the following function:
    \begin{equation*}
        f(x)=\left(\frac{2+3x}{1-2x}\right)^3
    \end{equation*}
    \tcblower
    The derivative is:
    \begin{align*}
        f'(x) & = \left( \left(\frac{2+3x}{1-2x}\right)^3 \right)'
        = 3 \left(\frac{2+3x}{1-2x}\right)^2 \frac{(1-2x)3-(2+3x)(-2)}{(1-2x)^2}
        = \frac{21(2+3x)^2}{(1-2x)^4}.
    \end{align*}
\end{exercise}
\begin{exercise}
    Compute the derivative of the following function:
    \begin{equation*}
        f(x)=\frac{\cos x}{(\tan 2x)^2}
    \end{equation*}
    \tcblower
    The derivative is:
    \begin{align*}
        f'(x) & = \left( \frac{\cos x}{(\tan 2x)^2} \right)'
        = \left( \frac{\cos x (\cos 2x)^2}{(\sin 2x)^2} \right)'                       \\
              & = \frac{(\sin 2x)^2 [(-\sin x)(\cos 2x)^2+(\cos x)4\cos 2x (-\sin 2x)]
        - \cos x (\cos 2x)^2 4\sin 2x \cos 2x}{(\sin 2x)^4}                            \\
              & = -\frac{\cos(2x) [\sin x \sin 2x \cos 2x+ 4\cos x(\sin 2x)^2
        + 4 \cos x (\cos 2x)^2]}{(\sin 2x)^3}                                          \\
              & = -\frac{\cos(2x) [\sin x \sin 2x \cos 2x+ 4\cos x]}{(\sin 2x)^3}.
        152
    \end{align*}
\end{exercise}
\begin{exercise}
    Compute the derivative of the following function:
    \begin{equation*}
        f(x)=\cos((2x^2+3)^3)
    \end{equation*}
    \tcblower
    The derivative is:
    \begin{align*}
        f'(x) & = \left( \cos((2x^2+3)^3) \right)'
        =-\sin((2x^2+3)^3) 3(2x^2+3)^2 2\cdot 2x   \\
              & =-12x(2x^2+3)^2\sin((2x^2+3)^3).
    \end{align*}
\end{exercise}
\begin{exercise}
    Compute the derivative of the following function:
    \begin{equation*}
        f(x)=(x^2+1)\sqrt{x^4+1}
    \end{equation*}
    \tcblower
    The derivative is:
    \begin{align*}
        f'(x) & = \left( (x^2+1)\sqrt{x^4+1} \right)'
        = 2x\sqrt{x^4+1} + \frac{2x^3(x^2+1)}{\sqrt{x^4+1}}.
    \end{align*}
\end{exercise}
\tcbstoprecording

\tcbinputrecords

\end{document}

多看看文档,多看看lshort,你给的MWE实际上还有一些自己乱添加的东西,注意MWE的定义
MWE.jpg

同时还要注意要得到page的索引还得至少进行两次xelatex的编译....
以及尽量避免 弄了半天还是不行 这种信息量很低的话,具体是哪里不行?命令行运行的报错是什么?你的期望效果是什么?
下面是压缩包文件,Happy Texing!

mmmwe.zip

不太清楚上述现象出现的原因:
但可以使用usepackage{ctex}其会默认设置行距为1.3倍可以解决你的问题;或者直接使用linespread{1.3}获得如下的效果。

image.png

\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\begin{document}
\linespread{1.3} %设置行距
\begin{table}[htbp]
    \begin{tblr}{*{5}{Q[c,m]}}
        \toprule
        \SetCell[r=2]{c} hASDFp
                & \SetCell[c=2]{m} {hZXCVp} &        &  & \SetCell[c=2]{m} {hIUYTp} &        \\
        \cmidrule{2-3} \cmidrule{5-6}
                & hOIUYTfp                  & hCVFRp &  & hSDEWp                    & PLOIKp \\
        \midrule
        hZXCVBp & 0.30                      & 0.64   &  & 0.25                      & 0.48   \\
        \bottomrule
    \end{tblr}
\end{table}%

\end{document}

建议使用tabularray宏包精细化排版表格
下面是一个MWE

\documentclass[12pt]{ctexart}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\begin{document}
\begin{table}[htbp]
    \begin{tblr}{Q[c,m]*{2}{Q[c,m,7em]}} % texdoc tabularray中的Q列格式设置
        \toprule
         & value1 & value2        \\
        \midrule
        {par par par par par      \\par text} & 114 &  514 \\
        {par par                  \\ par par par par text} & 114 &  514 \\
        {想在这里换行同时保持居中 \\ 文本} & 114 &  514 \\
        \bottomrule
    \end{tblr}
\end{table}
\end{document}

image.png

https://tex.stackexchange.com/questions/289539/how-does-thanks-work-in-latex-article-class


@u73169 上面的链接确实有点儿用,但不够多....

20250209更新

可以尝试下面的例子,虽然和你的还有点区别...要交换#1变为1#需要修改authblk的命令...(TBC,我再努力试试)

\documentclass{ctexart}
\usepackage{authblk}
\makeatletter
\def\@fnsymbol#1{%
  \ensuremath{%
    \ifcase#1\or {\#}\or *\or \dagger\or \ddagger\or
    \mathsection\or \mathparagraph\or \|\or {\#\#}\or **\or
    \dagger\dagger\or \ddagger\ddagger\else\@ctrerr\fi%
  }%
}%重新定义内部控制序列 \@fnsymbol 的次序
\makeatother
\newcommand\CoAuthorMark{\footnotemark[\arabic{footnote}]} 
\title{这是一个示例文档}
\author[1]{张三\thanks{共同一作}}
\author[2]{李四\protect\CoAuthorMark}
\author[3]{王五\thanks{这是本文的二作}}
\affil[1]{北京大学}
\affil[2]{清华大学}
\affil[3]{家里蹲大学}

\begin{document}

\maketitle

\section{引言}
这是一个使用 \texttt{authblk} 宏包的示例文档\footnote{这是正常的正文注释}。作者和机构信息已经按照要求格式化\footnote{这是正常的正文注释}。

\end{document}

BTW,lampart序列以*\dagger开始而不用#也许是因为#1TeX中表示第一个参数,建议还是遵循默认用lampart序列不要修改为好。


20250216更新

\documentclass{ctexart}
\usepackage{authblk}

\makeatletter
\def\@fnsymbol#1{%
  \ensuremath{%
    \ifcase#1\or {\#}\or *\or \dagger\or \ddagger\or
    \mathsection\or \mathparagraph\or \|\or {\#\#}\or **\or
    \dagger\dagger\or \ddagger\ddagger\else\@ctrerr\fi%
  }%
}
\RenewDocumentCommand{\author}{O{}mo}{% trailing optional argument is for thanks
      \ifnewaffil\addtocounter{affil}{1}%
       \edef\AB@thenote{\arabic{affil}}\fi
      \if\relax#1\relax\def\AB@note{\AB@thenote}\else\def\AB@note{#1}%
        \setcounter{Maxaffil}{0}\fi
      \ifnum\value{authors}>1\relax
      \@namedef{@sep\number\c@authors}{\Authsep}\fi
      \addtocounter{authors}{1}%
      \begingroup
          \let\protect\@unexpandable@protect \let\and\AB@pand
          \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}%
         \@temptokena=\expandafter{\AB@authors}%
         {\def\\{\protect\\[\@affilsep]\protect\Affilfont
              \protect\AB@resetsep}%
              \xdef\AB@author{\AB@blk@and#2}%
       \ifnewaffil\gdef\AB@las{}\gdef\AB@lasx{\protect\Authand}\gdef\AB@as{}%
           \xdef\AB@authors{\the\@temptokena\AB@blk@and}%
       \else
          \xdef\AB@authors{\the\@temptokena\AB@as\AB@au@str}%
          \global\let\AB@las\AB@lasx\gdef\AB@lasx{\protect\Authands}%
          \gdef\AB@as{\Authsep}%
       \fi
       \gdef\AB@au@str{#2}}%
         \@temptokena=\expandafter{\AB@authlist}%
         \let\\=\authorcr
         \xdef\AB@authlist{\the\@temptokena
           \protect\@nameuse{@sep\number\c@authors}%
           \protect\Authfont#2\AB@authnote{\AB@note}%
           \IfValueT{#3}{#3}%
      }%
      \endgroup
      \ifnum\value{authors}>2\relax
      \@namedef{@sep\number\c@authors}{\Authands}\fi
      \newaffilfalse
}
\makeatother

\NewDocumentCommand\CoAuthorMark{}{\footnotemark[\arabic{footnote}]} 

\title{这是一个示例文档}
\author[1]{张三}[\thanks{共同一作}]
\author[2]{李四}[\CoAuthorMark]
\author[3]{王五}[\thanks{这是本文的二作}]
\affil[1]{北京大学}
\affil[2]{清华大学}
\affil[3]{家里蹲大学}

\begin{document}

\maketitle

\end{document}

image.png

非常感谢鱼老师!
我有查询了一下ctex的文档,发现默认的中文字体的行距是1.3,在整篇行文中是只需要在使用longdivision时修改为linespread{1},但我觉得手动调整linespread{1.3}不够优雅(是因为如果忘记了,每次要调回默认都要查看文档)而我在ctex文档里没找到直接设置其为默认值1.3的命令,不知道是否有不用显式指定1.3这个值的方法?谢谢!
image.png

image.png

经过Eureka大神的提示,简单探索了两种可行的处理方式
肥肠感谢帮助!

\documentclass{article}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage[T1]{fontenc}
\begin{document}
xyzxyz\_abcabc@123.com
\renewcommand{\_}{{\fontfamily{ptm}\selectfont\textunderscore}}

xyzxyz\_abcabc@123.com
\renewcommand{\_}{\raisebox{.5pt}{\underline{\phantom{x}}}}

xyzxyz\_abcabc@123.com
\end{document}{}

image.png

发布
问题