Sagittarius Rover
Sagittarius Rover
我要成为Typst糕手/(ㄒoㄒ)/~~

注册于 3年前

回答
307
文章
0
关注者
12

如果我们用的是同一个"华文楷体"的话,楷体是没有粗体的。

image.png

如果一定要对楷体加粗,一个不那么好的办法是使用伪粗体

image.png

\documentclass{article}
\usepackage{ctex}
\setCJKfamilyfont{KaiTi}[AutoFakeBold,AutoFakeSlant]{华文楷体.TTF}
\newcommand{\KaiTi}{\CJKfamily{KaiTi}}
\begin{document}
\section{Introduction}

{\KaiTi 水电费} <-这是楷体

\textbf{水电费} <-这是粗体

{\KaiTi \textbf{水电费}} <-这是(伪)加粗的楷体

{\KaiTi \bfseries 水电费} <-这也是(伪)加粗的楷体

{\KaiTi \textit{水电费}} <-这也是(伪)倾斜的楷体

{\KaiTi \itshape 水电费} <-这也是(伪)倾斜的楷体

{\KaiTi \itshape \bfseries 水电费} <-这也是(伪)倾斜与(伪)加粗的楷体

\end{document}

image.png

另外,下次提问最好补充提供华文楷体.TTF文件(在没有版权问题的前提下)。

考古偶有所得


补充评论中的内容,来测试下(并非)开源的天珩字库

除了天珩标准字库外,还提供了以下的字体。

image.png

安装字体后,使用xeCJK文档中提到的方法,在powershell中输入:

image.png

fc-list -f "%{family}\n" :lang=zh > zhfont.txt

或者(需要安装typst,感觉字体族名管理比fc-list好)

typst fonts

可以得到有关的字体名如下:

TH-Feon
TH-Hak
TH-Joeng-H
TH-Joeng-J
TH-Khaai-PP0
TH-Khaai-PP2
TH-Khaai-TP0
TH-Khaai-TP16
TH-Khaai-TP2
TH-Ming-HP0
TH-Ming-JP0
TH-Ming-P2
TH-Sung-KP0
TH-Sung-KP2
TH-Sung-PP0
TH-Sung-PP2
TH-Sung-TP0
TH-Sung-TP2
TH-Sy-P0
TH-Sy-P16
TH-Sy-P2
TH-Times
TH-Times_cyrl
TH-Times_grek
TH-Times_telex
TH-Tshyn-P0
TH-Tshyn-P1
TH-Tshyn-P16
TH-Tshyn-P2

下面测试基于"楷体"和"黑体"字形测试

  • 天珩字库-正楷(TH-Khaai-T;最新版4.0.0)——TH-Khaai-T
  • 天珩字库-黑体(TH-Hak;最新版4.0.0)——TH-Hak

对于天珩正楷

  • TH-Khaai-TP0支持扩展H区字体"𱠧"
  • TH-Khaai-TP2支持扩展B区字体"𤝽"
\documentclass{ctexbook}
\xeCJKsetup{AutoFallBack=true}
\xeCJKDeclareCharClass{CJK}{"2EBF0->"2EE5F, "31350->"323AF} 
\setCJKmainfont{KaiTi}
\setCJKfallbackfamilyfont{\CJKrmdefault}{%
  {[AutoFakeBold,AutoFakeSlant]{TH-Khaai-TP2}},
  {[AutoFakeBold,AutoFakeSlant]{TH-Khaai-TP0}},
}
\begin{document}

扩展B区: “𤝽”.

扩展H区: “𱠧”.

\end{document}

image.png

对于天珩正黑TH-Hak

目前似乎仍然不支持“黑体”的扩展H区字符"𱠧"

\documentclass{ctexbook}
\xeCJKsetup{AutoFallBack=true}
\xeCJKDeclareCharClass{CJK}{"2EBF0->"2EE5F, "31350->"323AF} 
\setCJKmainfont{SimHei}
\setCJKfallbackfamilyfont{\CJKrmdefault}{%
  {[AutoFakeBold,AutoFakeSlant]{TH-Hak}},
}
\begin{document}

扩展B区: “𤝽”.

扩展H区: “𱠧”.

\end{document}

image.png

还需另寻他法,但是缺的也只是支持的字体,而不是xeCJK调用的方法(逃)。


20250206补充,尝试黑体开源方案遍黑体,同时测试MiSans L3字体

\documentclass{ctexbook}
\xeCJKsetup{AutoFallBack=true}
\xeCJKDeclareCharClass{CJK}{"2EBF0->"2EE5F, "31350->"323AF} % Ext-I, Ext-H
\setCJKmainfont{MiSans-Regular.ttf}
\setCJKfallbackfamilyfont{\CJKrmdefault}{
    {[AutoFakeBold,AutoFakeSlant]{PlangothicP1-Regular.otf}},
    {[AutoFakeBold,AutoFakeSlant]{PlangothicP2-Regular.otf}},
    {[AutoFakeBold,AutoFakeSlant]{MiSans L3.ttf}},
}
\parindent=0pt
\begin{document}

Hello, World! 你好,世界!

\Huge 

扩展B区: “𠳹”、“𤠠”、“𬬺”、“𤝽”

扩展H区: “𱠧”

𰻞、昶、辵、疋、玍

\end{document}

image.png

上面的字体来自:

image.png

也许可以试试这样...抛砖引玉吧, 但是要在parbox内部使用footnote需要使用footnotemarkmorefootnotetext, 但这种做法不是很优雅, 同时个人觉得这样的效果并不好看...是否有什么书籍的诗句排版实现了这样的两端对齐(justify)让你一定要这么做呢?

\documentclass[b5paper,twoside,openany,UTF8]{ctexbook}
\usepackage[left=2.54cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} %页边距设置
\newenvironment{shi}{\begin{center}\kaishu\vskip -5pt}{\end{center}\vskip -5pt} % 总是建议不要用拼音命名...
\NewDocumentEnvironment{mypoem}{ O{\linewidth} +b}{%
    % #1: \parbox宽度 #2 环境内容
    \vskip -5pt%
    \begin{center}\parbox[s]{#1}{%
        \setlength\parfillskip{0pt}%
        \kaishu\noindent #2
        }
    \end{center}\vskip -5pt
}{}

% https://tex.stackexchange.com/questions/349929/two-footnotemarks-in-a-tcolorbox-yield-footnotes-with-the-same-label/349938#349938
\usepackage{xassoccnt}
\usepackage{refcount}
\newcounter{totalfootnotes}
\newcounter{totalfootnotetexts}
\DeclareAssociatedCounters{footnote}{totalfootnotes}% Count all footnotes
\usepackage{xpatch}
\xpatchcmd{\footnotemark}{\stepcounter}{\refstepcounter}{}{}
\xapptocmd{\footnotemark}{\label{fnmark-\number\value{totalfootnotes}}}{}{}
\xpretocmd{\footnote}{\stepcounter{totalfootnotetexts}}{}{}% Explicitly step!
\NewDocumentCommand{\morefootnotetext}{o+m}{%
  \IfValueTF{#1}{%
    \footnotetext[#1]{#2}%
  }{%
    \stepcounter{totalfootnotetexts}%
    \footnotetext[\getrefnumber{fnmark-\number\value{totalfootnotetexts}}]{#2}
  }%
}

\begin{document}
    \begin{shi}%
        山中狐兔潜踪迹,涧内獐猿惊且慌。\\
        卞庄\footnote{卞庄——即卞庄子,春秋时鲁国大夫。有勇力,尝刺双虎。}见后魂魄散,存孝\footnote{存孝——即李存孝,五代后唐名将,原名安敬思,后为李克用义子,赐李姓,猿臂善射。元杂剧有《存孝打虎》剧目。}遇时心胆亡。\\
        清河壮士\footnote{注释}酒未醒,忽在岗头偶相迎。\\
        上下寻人虎饥渴,撞著狰狞\footnote{注释}来扑人。\\
        虎来扑人似山倒,人去迎虎如岩倾。\\
    \end{shi}

    \begin{center}\vskip -5pt
    \parbox[s]{20\ccwd}{%
        \setlength\parfillskip{0pt}%
        \kaishu\noindent
        虎来扑人似山倒,人去迎虎如岩倾。\linebreak
        上下寻人虎饥渴,撞著狰狞\footnotemark 来扑人。\linebreak
        上下寻人\footnotemark 虎饥渴,上下寻人\footnotemark 虎饥渴。\linebreak
        上下\footnotemark 寻人\footnotemark 虎饥渴,上下寻人虎饥渴。

        上\footnotemark 下寻人\footnotemark 虎饥\footnotemark 渴,上下\footnotemark 寻人\footnotemark 虎饥渴。%永远不要在文本中用‘\\’
    }\vskip -5pt
    \end{center}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}

    \begin{mypoem}[20\ccwd]%
        虎来扑人似山倒,人去迎虎如岩倾。

        上下寻人虎饥渴,撞著狰狞\footnotemark 来扑人。

        上下寻人\footnotemark 虎饥渴,上下寻人\footnotemark 虎饥渴。

        上下\footnotemark 寻人\footnotemark 虎饥渴,上下寻人虎饥渴。

        上\footnotemark 下\footnotemark 寻人虎饥\footnotemark 渴,上下\footnotemark 寻人\footnotemark 虎饥渴。
    \end{mypoem}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
    \morefootnotetext{注释}
\end{document}

image.png

你的代码并不完整\sanhao,\sihao\timesnewroman在标准文档类book以及ctex中并没有定义。我无法复现你所说的:

其中sectionsubsection里面的beforeskipafterskip,无论调成多少都没有产生变化

有可能是你文档中其他的设置影响了这一弹性长度,因此你需要提供最小工作示例

\documentclass{book}
\RequirePackage[heading=true]{ctex}
% \setcounter{secnumdepth}{3}
\ctexset{
    % chapter={
    %     % format={\centering\sanhao\heiti\timesnewroman},
    %     aftername=\hspace{\ccwd},
    %     beforeskip={26bp},
    %     afterskip={18bp},
    %     name={第, 章},
    %     fixskip = true, % 添加配置
    %     number=\arabic{chapter},
    %     indent=0bp
    % },
    section={
        % format={\raggedright\heiti\sihao\timesnewroman},
        aftername=\hspace{\ccwd},
        beforeskip={24bp},
        afterskip={60bp},
        fixskip=true,
        number={\thechapter.\arabic{section}}
    },
    subsection={
        % format={\raggedright\banxiaosi\heiti\timesnewroman},
        aftername=\hspace{\ccwd},
        beforeskip={12bp},
        afterskip={60bp},
        fixskip = true,
        number = {\thechapter.\arabic{section}.\arabic{subsection}}
    }
}
\usepackage{zhlipsum}
\begin{document}
    \chapter{00}
    \section{sec000}
        我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。
        \subsection{subsec000}
        我能吞下玻璃而不伤身体。我能吞下玻璃而不伤身体。
\end{document}

image.png

请你提供最小工作示例(使用"补充问题"功能修改你的问题),同时建议再次仔细研究ctex宏包的文档.

image.png

image.png

非常感谢@u101077 老师在交流群提供的建议和帮助。

参考链接1:雾月老师的回答,其中提供了一些开源的生僻字方案。

参考链接2:xeCJK的文档中关于FallBack的介绍

参考链接3:关于windows电脑中微软提供的宋体SimSun以及其拓展字形SimSun-ExtB的说明

image.png

总的来说,在宋体字形下,本问题的一个实践也许是:

\documentclass{ctexbook}
%\usepackage{xeCJK} %在ctexbook文档类内部已经调用了xeCJK宏包
\xeCJKsetup{AutoFallBack=true}
\setCJKmainfont[FallBack=SimSun-ExtB]{SimSun}
\parindent=0pt
\begin{document}
一个比较简单的方法是使用SimSun-ExtB作为FallBack字体.

如:“𠳹”、“𤠠”、“𬬺”。
\end{document}

image.png

另外关于下面的开源方案:

能否实现该需求,希望有人接着探索(星星眼)。

此外,你的工作示例中仍然有一些与本问题无关的宏包,同时请区分好:

  • 一个反引号对应的是行内代码块例如ctex 不可换行!!!
  • 三个反引号对应的是行间代码块例如下面这些都是mwe中无关的内容
\xeCJKsetup{CheckSingle=true}
\usepackage[left=2.54cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry} %页边距设置
\usepackage[colorlinks,linkcolor=black]{hyperref}
\usepackage{subfig,epsfig,graphicx}
\usepackage{color,xcolor}
\usepackage{titlesec}

请善用“补充问题”和“预览”功能。

BTW. 本问题也许可以更好地被拓展为:

ctex下,输入“宋体”,“黑体”,“楷体”等字体的生僻字的推荐做法和推荐字体。

你应该提供你的完整代码(最小工作示例)。

image.png

如果仅仅只是想“使ctexart类型的“参考文献”四个字居左对齐”的话...你可以试试这个。

thebibliographyarticle.cls的定义为:

\newenvironment{thebibliography}[1]
     {\section*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}

可见所谓的"参考文献"实际上就是\section*{},其理应与\section保持相同的样式。

下面的例子会同步修改section的样式左对齐。

\documentclass{ctexart}
\ctexset{section/format+=\raggedright}
\usepackage{tocbibind}
\begin{document}

\tableofcontents\clearpage

\section{章节}
\section{章节}
\section{章节}
\section{章节}

这是一个简单的引用示例1234546\cite{article-minimal}。

\bibliographystyle{plain} % 设置参考文献样式
\bibliography{xampl} % 引用参考文献数据库

\end{document}

image.png

我又微调了一下:

  • \footnoterule调整水平线的位置,长度等信息
  • \@makefnmark调整在正文中上标的脚注样式,其中\@thefnmark为脚注数字(也许查一下latex.ltx可以找到原始定义,我也不是非常熟悉...)
  • \@makefntext#1调整在脚注位置的编号距离等信息,其中#1为脚注命令\foornote{}吞下的token内容
  • 下面的部分内容可能需要你texdoc circledtext查看文档

(泪目,我从你昨天的代码里借鉴了一些内容...,可惜,下面这小段对我来说还是有障碍,我只大概知道它设置了一些dim,下文的注释有我微调的四处距离,因此这段如果有问题可不要怪我(bushi))

% latex2e老大难啊
\@setpar{\@@par\@tempdima \hsize\advance\@tempdima-\@footindent
        \parshape \@ne \@footindent \@tempdima}\par
\documentclass[11pt,b5paper,twoside,UTF8]{ctexbook}
% \usepackage{inputenc} 
% \usepackage[T1]{fontenc}
% 使用xelatex好像不需要这些 encoding 相关的(?)
\usepackage[left=2.54cm, right=2.54cm, top=2.54cm, bottom=2.54cm]{geometry}
% \usepackage{CJKnumb} % 这个包我不认识...感觉是个obselete的
\AtBeginDocument{\linespread{1.5}}
\usepackage[colorlinks,linkcolor=black]{hyperref}
\usepackage{circledtext} % 为了字符压缩,使用了cirlcedtext宏包
% \usepackage{tikz}
% \newcommand*\circled[1]{\tikz[baseline=(char.base)]{\node[circle, draw, inner sep=0pt, minimum size = 1.25em] (char) {\scriptsize{#1}};}}

\makeatletter
\renewcommand\footnoterule{\kern-3\p@ \hrule width 0.4\columnwidth \kern 2.6\p@\vskip2ex}% 微调第一处..\vskip2ex调整\footnoterule与脚注的垂直间距
\def\@makefnmark{\hspace{.2em}\hbox{\@textsuperscript{\normalfont\circledtext[charf=\tiny]{\@thefnmark}}}}
%微调第二处,增加了`\hspace{.2em}`微调距离,并使用\circledtext的charf=\tiny选项调整25%大小(?)
\newskip\@footindent
\@footindent=4em %微调第三处`\@footindent`
\long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize\advance\@tempdima-\@footindent
        \parshape \@ne \@footindent \@tempdima}\par
    \noindent \hbox to \z@{\hss\normalfont\circledtext[charf=\footnotesize]{\@thefnmark}\hspace{1.5em}}#1}%微调第四处,设置charf=\footnotesize以实现下方脚注的字体一样大
\makeatother

\begin{document}

\ExplSyntaxOn
\int_step_inline:nn {15}{
    脚注大小测试\footnote{如何使得脚注序号与脚注文字一样大、高度平齐}\par
}
\ExplSyntaxOff
    
\end{document}

image.png


补充关于CJKnumbzhnumber宏包的信息

image.png


关于补充评论的对比图...(我也不知道有没有效)
上一个图点快了...抱歉...

image.png

打个比赛是真折腾啊..可以再试试看看这个链接,给minipage注册一个figure同款环境。

\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{tabularray}
\usepackage[table]{xcolor} % 用于设置表格颜色
\usepackage{lipsum}
\captionsetup[subfigure]{labelformat = parens, labelsep = space, font = small}
\begin{document}
\lipsum[2]

\noindent\begin{minipage}{.6\textwidth}
\captionsetup{type=figure} % -- This line added
\centering
\subcaptionbox{the first label \label{labelaaa}}
    {\includegraphics[width=.78\textwidth]{example-image-a}}
\subcaptionbox{the second label \label{labelbbb}}
    {\includegraphics[width=.78\textwidth]{example-image-b}}
\caption{A whole-total caption}
\end{minipage}
\begin{minipage}{.35\textwidth}
    \centering
    \begin{tblr}{
            hlines, vlines,
            cells={c},
            row{4,5,7,14}={bg=gray!30}, % 将第4,5,7,14行背景设置为灰色
            colspec={Q[c,m]Q[c,m]},
            rowsep=5pt, colsep=5pt % 设置行间距和列间距
        }
        Header 1 & Header 2 \\
        Row 1, Col 1 & Row 1, Col 2 \\
        Row 2, Col 1 & Row 2, Col 2 \\
        Row 3, Col 1 & Row 3, Col 2 \\
        Row 4, Col 1 & Row 4, Col 2 \\
        Row 5, Col 1 & Row 5, Col 2 \\
        Row 6, Col 1 & Row 6, Col 2 \\
        Row 7, Col 1 & Row 7, Col 2 \\
        Row 8, Col 1 & Row 8, Col 2 \\
        Row 9, Col 1 & Row 9, Col 2 \\
        Row 10, Col 1 & Row 10, Col 2 \\
        Row 11, Col 1 & Row 11, Col 2 \\
        Row 12, Col 1 & Row 12, Col 2 \\
        Row 13, Col 1 & Row 13, Col 2 \\
        Row 14, Col 1 & Row 14, Col 2 \\
    \end{tblr}\label{a table}
    \captionof{table}{tall-tblr}
\end{minipage}

\lipsum[2]

\end{document}

image.png


关于你提供的导言区宏包,在TeXLive2024下,与上述MWE并无冲突,你需要自行二分注释你的宏包,看看究竟是哪两个宏包产生了冲突。

另外本问题注重于 图表混排和caption的排版处理。如果涉及宏包和版本冲突,需要提供新的mwe开新的问题。

如何实现下面这种一个图片在左边,一个表格(14行2列,4,5,7,14行做成灰色)在右边排版呀?图表都不用编号

然后我就问AI帮我写,然后AI倒是写出来了一个东西,就他把那个图和表倒是排一块儿了,但是图和表是上下排的,我怎么问他都排不出左右的

而且我希望图和表中间有一点空白间距,但是他那个也是拼在一块儿没有间距。我看了一下,他的意思就是把图作为表的第一栏插进去。

我这个环境跟subcaption有冲突不好调,要不左边改成一张图好了

上面几句都不是完全看懂,你指的跟subcaption有冲突是跟什么有冲突,请给体现冲突的mwe...

不知道是不是完全符合你的需求,try this:

\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx} % 用于插入图片
\usepackage[table]{xcolor} % 用于设置表格颜色
% \usepackage{array} % 提供更多的表格控制选项
\usepackage{lipsum}
\begin{document}

\lipsum[2]

\noindent
\begin{minipage}{.58\textwidth}
    \centering
    \includegraphics[width=.8\textwidth]{example-image} 
\end{minipage}
\begin{minipage}{.2\textwidth}
\begin{center}
    \begin{tabular}{|c|c|}
        \hline
        \rowcolor{lightgray} % 第3行
        \textbf{Header 1} & {\textbf{Header 2}} \\
        \hline
        \rowcolor{lightgray} % 第4行
        Row 3, Col 1 & Row 3, Col 2 \\
        \hline
        Row 4, Col 1 & Row 4, Col 2 \\
        \hline
        \rowcolor{lightgray} % 第7行
        Row 6, Col 1 & Row 6, Col 2 \\
        \hline
        Row 7, Col 1 & Row 7, Col 2 \\
        \hline
        Row 8, Col 1 & Row 8, Col 2 \\
        \hline
        Row 9, Col 1 & Row 9, Col 2 \\
        \hline
        Row 10, Col 1 & Row 10, Col 2 \\
        \hline
        Row 11, Col 1 & Row 11, Col 2 \\
        \hline
        Row 12, Col 1 & Row 12, Col 2 \\
        \hline
        \rowcolor{lightgray} % 第13行
        Row 13, Col 1 & Row 13, Col 2 \\
        \hline
        Row 14, Col 1 & Row 14, Col 2 \\
        \hline
        \end{tabular}
\end{center}

\end{minipage}

\lipsum[2]

\end{document}

效果如下:
image.png

请看@u19850 鱼老师的推文

\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{\node[circle, draw, inner sep=0pt, minimum size = 1.2em] (char) {{#1}};}}
\makeatletter
\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\circled{\@thefnmark}}}}  
\makeatother      
\begin{document}
\ExplSyntaxOn
\int_step_inline:nn {25}{
    I~can~eat~the~class~with\footnote{footnote~footnote}~glass.\par
}
\ExplSyntaxOff
\end{document}

下面是一个相对简单的例子,可以自行调节TikZ绘图参数...

image.png

你这段圈圈有点难懂啊...

\long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize
        \advance\@tempdima-\@footindent
        \parshape \@ne \@footindent \@tempdima}\par
    \noindent \hbox to \z@{\hss\@thefnmark\hspace{0.2em}}#1}
\def\@makefnmark{\hbox{\textsuperscript{\@thefnmark}}}

我的mwe的参考链接来自这里,可能你还需要微调一下。

个人看法,不要在行内公式中用\dfrac...

即使是如下调整间距,从整个文章的间距结构来看,全篇行距不一致,也并不好看。

\documentclass{ctexart}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{zhlipsum}
\usepackage{setspace}
\begin{document}

\zhlipsum[2]

\begin{spacing}{2}
其中 \((p - p_{float})\) 反映乘客的徒步下楼成本和乘客的排队成本等量后的总影响,且 \((p - p_{float}) \in [-1, 1]\)。其中 \(\dfrac{1}{c}\), \(c \in (1, +\infty)\) 是一个反映总影响对一般情况 \(N_n\) 的影响大小的常数。这使 \(\left(1 + \dfrac{p - p_{float}}{c}\right)\) 被控制在 \(\left[1 - \dfrac{1}{c}, 1 + \dfrac{1}{c}\right]\) 范围内。这是因为我们希望 \(G_n\) 接近于 \(N_n\),在向上向下波动的同时进行微调。也就是说,乘梯意愿对乘客原本的下楼模式有影响,但变化不应太大,应该控制在 \(\left[N_n \times \left(1 - \dfrac{1}{c}\right), N_n \times \left(1 + \dfrac{1}{c}\right)\right]\) 范围内。我们基于统计学数据的分析,对上述比例系数 \(c\) 值进行优化调整,并观察函数的变化趋势。为了使模型更好地反映综合成本对日常行为的影响,通过参数敏感性分析,发现取 \(c = 4\),即 \(\dfrac{1}{c} = 0.25\) 时,模型输出结果与实际情况呈现出最佳的拟合度。
\end{spacing}

\zhlipsum[2]

\end{document}

image.png

self comment...

其实差距就是 \centerline{\normalfont\Large\bfseries\sffamily\contentsname

[editted here]所谓的tocloft设置“比较困难”也并没有多困难,如下代码:

\documentclass{mcmthesis}
\mcmsetup{tstyle=\color{black}\bfseries,
        tcn = 1234567, problem = S, sheet = true, 
        titleinsheet = true, keywordsinsheet = true,
        titlepage = false, abstract = true}
\setlength{\headheight}{13.6pt}
\usepackage{lastpage}
\usepackage{tocloft}
\tocloftpagestyle{main}
\renewcommand{\cfttoctitlefont}{\hfill\Large\bfseries\sffamily}
\renewcommand{\cftaftertoctitle}{\hfill}
\setlength{\cftbeforesecskip}{10pt}
\setlength{\cftbeforesubsecskip}{5pt}
\begin{document}

\tableofcontents
\clearpage

\section{Fisrt}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}
\section{Second}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}
\section{Third}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}
\section{Four}
\subsection{Fisrt}
\subsection{Second}
\subsection{Third}
\subsection{Four}
\subsection{Five}

\end{document}

这便与图一(几乎)一模一样了...

image.png

但是这一实现是很不优雅的,相当于如下的情景:

一位优秀的面点师制作了一个优雅的🍰,但是为了把樱桃换成草莓,我们不得已调用了tocloft,这导致奶油氧化了,我们又模仿那位面点师的手法糊了一层奶油上去。

这一过程令人很不舒服,从代码整体实现逻辑上看更合理的工作流是在更底层实现,让那位优秀的面点师直接换成草莓。

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{graphicx}
\begin{document}
    \begin{figure}[htbp]
        \centering
        \begin{minipage}{0.2\textwidth}
            \centering
                \begin{tabular}{|p{.05\textwidth}|p{.05\textwidth}|}
                    \hline
                    C o l u m n 1 2  & Column 2 3  \\
                    \hline
                    D a t a 1 2  & Data 2 3 \\
                    \hline
                \end{tabular}
            %\caption{Table caption}
        \end{minipage}\hfill % 添加水平填充
        \begin{minipage}{.7\textwidth}
            \centering
            \includegraphics[width=\textwidth]{example-image}
            %\caption{Image caption}
        \end{minipage}
        \caption{A mixed table and image}
    \end{figure}

    balabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabalabala

\end{document}

在单词内部并没有一个glue(粘连),或者单词column中各个字母(c,o,l,u,m,n)之间并没有弹性。可以看上面的例子,为什么balabala没有换行(当然并不存在那么长的单词)

既然你是表格,如果列宽连表头的单词都容纳不进去,那这表格也太不美观了...

image.png

感谢switwu @u42963 老师 提供的介绍

image.png

其中 `<command>` 的语法为命令替换,仅在macOS以及*nix系统下可用,windowsPowershell不支持该语法,但git bash支持。

image.png

感谢Eureka老师的补充,powershell$(<command>)syntax有效:

otfinfo -i $(kpsewhich lmroman10-regular.otf)
Family:              LM Roman 10
Subfamily:           Regular
Full name:           LMRoman10-Regular
PostScript name:     LMRoman10-Regular
Preferred family:    Latin Modern Roman
Preferred subfamily: 10 Regular
Mac font menu name:  LM Roman 10 Regular
Version:             Version 2.004;PS 2.004;hotconv 1.0.49;makeotf.lib2.0.14853
Unique ID:           2.004;UKWN;LMRoman10-Regular
Trademark:           Please refer to the Copyright section for the font trademark attribution notices.
Copyright:           Copyright 2003, 2009 B. Jackowski and J. M. Nowacki (on behalf of TeX users groups). This work is released under the GUST Font License --  see http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt for details.
Vendor ID:           UKWN
Permissions:         Unknown (12)

如非缺少某个符号,不应该组合数学字体!!!!!

mtpro2字体属于lagacy math font,这与unicode-math并不相容!!

没有办法实现不要总想着到处组合字体,对某字体不满意你就换一个字体,更详细得信息可见这个comment.

发布
问题