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

注册于 2年前

回答
266
文章
0
关注者
11

既然已经花时间提问了,请对你的问题负责,尽可能整合有关的信息到此问题。

@u19850 鱼香肉丝老师给出过一个答案

\documentclass{article}
\usepackage{ctex}
\usepackage[margin = 2cm]{geometry}
\usepackage{tikz}
\usepackage{amsmath}



\newenvironment{qbox}{%
% \begin{qbox}
    \vspace*{.3cm}%
    \noindent\tikz\draw[overlay] (0,0) arc[start angle = 180, end angle = 90, radius = .3cm] --++ (\textwidth - .6cm, 0) arc[start angle = 90, end angle = 0, radius = .3cm]; \par
}{%
\par%
\noindent\tikz\draw[overlay] (0,0) arc[start angle = 180, end angle = 270, radius = .3cm] --++ (\textwidth - .6cm, 0) arc[start angle = 270, end angle = 360, radius = .3cm]; \par
\vspace*{.4cm}%
% \end{qbox}
}



\begin{document}


\begin{qbox}
此题中满足条件的矩阵 $B$ 显然不止一个. 比如在
\begin{align}
    A B=O
\end{align}
两边同时右乘某个初等矩阵, 则等式右边的 $O$ 不变, 而矩阵 $B$ 被进行列变换而发生了改变.


这也是为什么把 $B$ 设为
\begin{align}
    \begin{pmatrix}
        1 & 0 \\
        0 & 1 \\
        x_1 & x_2 \\
        x_3 & x_4
    \end{pmatrix},
\end{align}
而不需要设为
\begin{align}
    \begin{pmatrix}
        x_1 & x_2 \\
        x_3 & x_4 \\
        x_5 & x_6 \\
        x_7 & x_8
    \end{pmatrix}
\end{align}
的原因。


\end{qbox}


\end{document}

image.png

@u7751 你这个图的来源?请提供你的代码,如果你只是想要直立积分号,我相信你已经看过很多解决办法了?如有可能,把解决办法贴在这里以造福后来人。

和这两个链接的区别是?

https://ask.latexstudio.net/ask/question/17377.html

https://ask.latexstudio.net/ask/question/17060.html

另外你真的喜欢 各种 积分号和字体(😀😀😀)

你是想要 找到一种满足该样式的字体 还是 只想修改积分号的样式保持数学字体不变? 建议你把前面所有积分号的内容和处理方式总结一下吧,从你这次提问来看,我分辨不清你是修改了需求?还是之前的问题都没解决?


我不认识数学字体,你可以找找该链接中有无你认为符合的字体。


Updated 20250119
既然需求多,那就自己画...积分号是没有用esint后的,没有微调过两个\int间的距离,如果有其他需求请自行调整tikz的代码啊...

下面应该也有不少瑕疵...

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{cmupint}
% \usepackage{unicode-math} % No!
\usepackage{esint}
\usepackage{fixdif}
\usepackage{tikz}
\usetikzlibrary{shapes}
\usetikzlibrary{ext.shapes.rectangleroundedcorners}
\DeclareRobustCommand{\myoint}{%
  \mathop{}\!%
  \vcenter{\hbox{%
    \makebox[0pt][l]{%
      \sbox0{$\displaystyle\phantom{\int}$}%
      \makebox[\wd0]{%
        \begin{tikzpicture}
          \node[
            draw,circle,minimum size=1.5ex,
            line width=0.5pt,
            inner xsep=-0.15ex,
            inner ysep=-0.15ex,
          ] {\phantom{-\,}};
        \end{tikzpicture}%
      }%
    }%
  }}\!%
  \int\nolimits
}

\DeclareRobustCommand{\myoiint}{%
  \mathop{}\!%
  \vcenter{\hbox{%
    \makebox[0pt][l]{%
      \sbox0{$\displaystyle\phantom{\iint}$}%
      \makebox[\wd0]{%
        \begin{tikzpicture}
          \node[
            draw,
            shape=rectangle with rounded corners,
            rectangle with rounded corners radius=6pt,
            minimum width=2.7ex,minimum height=2.3ex,
            line width=0.5pt,
            inner xsep=-0.15ex,
            inner ysep=-0.15ex,
          ] {\phantom{+\,}};
        \end{tikzpicture}%
      }%
    }%
  }}\!%
  \iint
}

\begin{document}
    
    \[
    I=\myoint_{C} \frac{\cos (\mathbf{r}, \mathbf{n})}{r} \d s
    \]

    \[
    I=\myoiint_{\Sigma}\, (z+x) \d y \d z+(x+y) \d z \d x+(y+z) \d x \d y
    \]

\end{document}

image.png

目标:去掉页眉的收录信息。

经过一些逆向工程,我们可以在目录下的WileyNJDv5.cls下,逆向搜索关键词发现:

% Line5069
\def\received#1{\gdef\@received{Received #1;}}\gdef\@received{Added at production}%
\def\revised#1{\gdef\@revised{Revised #1;}}\gdef\@revised{Added at production}%
\def\accepted#1{\gdef\@accepted{Accepted #1}}\gdef\@accepted{Added at production}%
\def\published#1{\gdef\@published{Published #1}}\gdef\@published{Added at production}%

以及

% Line 5095
\def\@dummy@received{\textcolor{red}{Received:\history@kern{}\history@kern{}Added at production}}%
\def\@dummy@revised{\textcolor{red}{Revised:\history@kern{}\history@kern{}Added at production}}%
\def\@dummy@accepted{\textcolor{red}{Accepted:\history@kern{}\history@kern{}Added at production}}%
\def\@dummy@pubdate{\textcolor{red}{Published\history@kern{}on:\history@kern{}\history@kern{}Added at production}}%
\def\doiheadtext#1{\gdef\@DOI@text{#1}}\doiheadtext{DOI: xxx/xxxx\nobreakspace{}}%

下面只要进一步在WileyNJDv5.cls中反向检索何处使用了\@received\@dummy@received等宏即可,经过一些波折...最终我们可以较容易地找到实际上用于排版titlepage的用户接口代码位于:

%line 5130
\def\ps@titlepage{%
  \def\@oddfoot{\oddfoot@titlepage@info}%
  \def\@evenfoot{\evenfoot@titlepage@info}%
  \def\@oddhead{\oddhead@titlepage@info}%
  \def\@evenhead{\evenhead@titlepage@info}%
  \let\@mkboth\markboth%
}%

注释其中排版页眉的命令即可,效果如下:
image.png

另外,我很好奇,为什么需要注释模板的页眉(?)希望使用WileyNJDv5模板用于自己的其他论文? 以上。

感谢Eureka老师的帮助,似乎直接prehead的hook在此处不适合该需求。

怪我妹仔细看文档,文档中有inherit-style的选项,可以很方便地继承自某一样式。

image.png

如下例子:

\documentclass[fontset=ubuntu]{ctexart}
\usepackage{zhlipsum}
\usepackage{amsthm}
\usepackage{keytheorems}
\newkeytheoremstyle{IndentTheorem}{
    inherit-style=plain,
    headindent=2\ccwd
}
\newkeytheorem{theorem}[style=IndentTheorem,title=定理]
\begin{document}
\section{第一第一}
\section{第二第二}
\begin{theorem}
    这是一个定理\zhlipsum[2]
\end{theorem}
\end{document}

image.png

option ignore endpoint intersections is what you need.

image.png

第一版代码:

\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{knots}
\begin{document}
\begin{tikzpicture}
    \begin{knot}[
        consider self intersections,
        ignore endpoint intersections=false,
        draft mode=crossings,
    ]
        \strand[ultra thick] 
        (0,0) to[out=45,in=135] (0.707,0)
              arc(405:135:1) 
              to[out=45,in=135] (0,0)  
              to[out=-45,in=225] (0.707,0)
              arc(-45:225:1)
              to[out=-45,in=225] (0,0);
    \end{knot}
\end{tikzpicture}
\end{document}

但是问题出现在由于起点恰为knots点,似乎因为识别精度等问题出现了大量重合的交点,难以指定\flipcrossings的序号。和八省联考题还有差异。

image.png

第二版代码(权宜之计):经过近乎痛苦仔细地分辨,我们想要修改的左侧节点对应的的编号应为8,9,10,11,于是可以不优雅地加上\flipcrossings{8,9,10,11}

\documentclass[tikz,border=1cm]{standalone}
\usetikzlibrary{knots}
\begin{document}
\begin{tikzpicture}
    \begin{knot}[
        consider self intersections,
        ignore endpoint intersections=false,
    ]
        \strand[ultra thick] 
        (0,0) to[out=45,in=135] (0.707,0)
              arc(405:135:1) 
              to[out=45,in=135] (0,0)  
              to[out=-45,in=225] (0.707,0)
              arc(-45:225:1)
              to[out=-45,in=225] (0,0);
        \flipcrossings{8,9,10,11}%ugly here
    \end{knot}
\end{tikzpicture}
\end{document}

可以得到B选项...
image.png

另外你的八省联考卷pdf扫描质量堪忧,补图

image.png

Anyway...应该是有更优雅地无需指定是哪几个重叠intersections的方法,蹲一下论坛的其他朋友

请提供下载链接(或上传压缩包)并提供用于对比的示例文件。如有可能,提供IEEE关于标题的字体规范文件。

对比两份.cls文件,发现字号大小有细微调整

image.png

同时逆向检索\maketitle命令的行为我们可以发现,其内部命令\@maketitleIEEEtran.cls中定义如下:

% Line 4802 around
\def\@maketitle{\newpage
\bgroup\par\vskip\IEEEtitletopspace\vskip\IEEEtitletopspaceextra\centering%
\ifCLASSOPTIONtechnote% technotes, V1.8a abstract and index terms are not treated differently for compsoc technotes
   {\bfseries\large\@IEEEcompsoconly{\Large\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\large\sffamily}\@author
   \@IEEEspecialpapernotice\par}\relax
\else% not a technote
   \vskip0.2em{\Huge\ifCLASSOPTIONtransmag\bfseries\LARGE\fi\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip
   \bfseries\Large}\@IEEEcompsocnotconfonly{\vskip 0.75\@IEEEnormalsizeunitybaselineskip}\@title\par}\relax
   \@IEEEcompsocnotconfonly{\vskip 0.5\@IEEEnormalsizeunitybaselineskip}\vskip1.0em\par%
   % V1.6 handle \author differently if in conference mode
   \ifCLASSOPTIONconference%
      {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
       \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par}\relax
   \else% peerreviewca, peerreview or journal
      \ifCLASSOPTIONpeerreviewca
         % peerreviewca handles author names just like conference mode
         {\@IEEEcompsoconly{\sffamily}\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
          \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
          {\@IEEEcompsoconly{\vskip 1.5em\relax
           \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill
           \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
      \else% journal, peerreview or transmag
         \ifCLASSOPTIONtransmag
            % transmag also handles author names just like conference mode
            % it also uses \@IEEEtitleabstractindextex, but with one line less
            % space above, and one more below
           {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
            \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
           {\vspace{0.5\baselineskip}\relax\@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\vspace{-1\baselineskip}\par}}\relax
         \else% journal or peerreview
           {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par
           {\@IEEEcompsoconly{\vskip 1.5em\relax
            \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill
            \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
         \fi
      \fi
   \fi
\fi\par\addvspace{0.5\baselineskip}\egroup}

其中使用了\Large,\LARGE\Huge来设置\@title的字号。这也许是差异的来源(因为这一堆code我也看不懂)。

Happy IEEETran-TeXing!

使用Koodo Reader发现确实有这种现象

image.png

通过ctex文档可见beforeskipafterskipsection时为弹性长度(glue),同时ctex还有fixskip的行为.

image.png

image.png

我想雾月老师的前一个回答也许是这个意思:

\documentclass[12pt,fontset=ubuntu]{ctexbook}
\usepackage[showframe]{geometry}
\usepackage{zhlipsum}
\pagestyle{plain}
\ctexset{
    section/beforeskip = 3.5ex,
    section/afterskip = 2.3ex,
    chapter/fixskip = true,
    section/fixskip = true,
}
\renewcommand{\baselinestretch}{1.3}

\begin{document}
  \tableofcontents

  \chapter{章标题}
  \section{节标题}
  很短的正文内容

  \chapter{章标题}
  \section{节标题}
  \zhlipsum
  \zhlipsum
\end{document}

image.png

Welcome to LaTeX studio!
但是你的上面提供的代码有一些问题:

  • 代码没有用围栏式代码框包围起来,这样会损失很多的\符号。建议学会之后使用“补充问题”功能重新调整你上面的代码...
  • 代码图片没有给出,这样我需要一个个手动替换
  • 代码不完整,提问的代码应该包含你的导言区的有关信息
  • “每行中插入的图片与顶部hline平齐,怎样使图片可以居中”此句缺少图示,不一定能令人很好的理解

Anyway,我想下面的链接和例子可以解决你的问题。

\documentclass[fontset=ubuntu,landscape]{ctexart}
\usepackage{geometry}
\usepackage{array}
\usepackage{graphbox}
\begin{document}
    \begin{table}[h]
        \centering
        \caption{这是12个特征信息}
        \label{tab:features}
        \begin{tabular}{*{5}{p{2.5cm}<{\centering}}}
        \hline
        特征名称 & Metal & Thicken & Scarepair & Locpoint \\
        \hline
        特征图像 & \includegraphics[width=\linewidth,align=c,height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c,height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c,height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c,height=2cm]{example-image} \\
        \hline
        特征名称 & Flowerlinks & Abgirthweld & Abspiralweld &Vent \\
        \hline
        特征图像 & \includegraphics[width=\linewidth,align=c, height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c, height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c, height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c, height=2cm]{example-image} \\
        \hline
        \end{tabular}
    \end{table}
\end{document}

image.png


在你这个已有的代码框架下我暂时没什么更好的办法,用了一点不得体之术,如下:
区别在于用\phantom加上两行文字占了位:

\parbox{\linewidth}{\phantom{txt}\\\includegraphics[width=\linewidth,align=c,height=2cm]{example-image}\\\phantom{txt}}
\documentclass[fontset=ubuntu,landscape]{ctexart}
\usepackage{geometry}
\usepackage{array}
\usepackage{graphbox}
\begin{document}
    \begin{table}[h]
        \centering
        \caption{这是12个特征信息}
        \label{tab:features}
        \begin{tabular}{*{5}{p{2.5cm}<{\centering}}}
        \hline
        特征名称 & Metal & Thicken & Scarepair & Locpoint \\
        \hline
        特征图像 & \parbox{\linewidth}{\phantom{txt}\\\includegraphics[width=\linewidth,align=c,height=2cm]{example-image}\\\phantom{txt}} & \includegraphics[width=\linewidth,align=c,height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c,height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c,height=2cm]{example-image} \\
        \hline
        特征名称 & Flowerlinks & Abgirthweld & Abspiralweld &Vent \\
        \hline
        特征图像 & \parbox{\linewidth}{\phantom{txt}\\\includegraphics[width=\linewidth,align=c,height=2cm]{example-image}\\\phantom{txt}}  & \includegraphics[width=\linewidth,align=c, height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c, height=2cm]{example-image} & \includegraphics[width=\linewidth,align=c, height=2cm]{example-image} \\
        \hline
        \end{tabular}
    \end{table}
\end{document}

image.png

更简易参考上面TSE链接的方法试试好评如潮tabularray宏包,

Happy LaTeXing!

不同的算法实现宏包的syntax有些许差异,建议参考这个链接

浅浅修改了一下:

\documentclass{article}
\usepackage{algorithm,algpseudocode,float}
\usepackage{lipsum}
\usepackage{amsmath}
\usepackage{hyperref}
\makeatletter
\newenvironment{breakablealgorithm}
  {% \begin{breakablealgorithm}
   \begin{center}
     \refstepcounter{algorithm}% New algorithm
     \hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
     \renewcommand{\caption}[2][\relax]{% Make a new \caption
       {\raggedright\textbf{\ALG@name~\thealgorithm} ##2\par}%
       \ifx\relax##1\relax % #1 is \relax
         \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%
       \else % #1 is not \relax
         \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%
       \fi
       \kern2pt\hrule\kern2pt
     }
  }{% \end{breakablealgorithm}
     \kern2pt\hrule\relax% \@fs@post for \@fs@ruled
   \end{center}
  }
\makeatother

\begin{document}

\section{Some section}

\lipsum[1]

\begin{breakablealgorithm}
    \caption{Modeling ......}
    \label{alg:modeling}
    \begin{algorithmic}[1]
    \State Read the data file: 'Lorem Ipsum'
    \State I can eat glass, it does not hurt me
    \State I can eat glass, it does not hurt me
    \State I can eat glass, it does not hurt me
    \State I can eat glass, it does not hurt me
    \State I can eat glass, it does not hurt me
    \State I can eat glass, it does not hurt me
    \[
    \text{Lorem Ipsum:} \quad x A (1 - \frac{1}{1}) - \alpha \cdot \text{Glass} \cdot A
    \]
    where:
    \[
\text{Lorem Ipsum:} \quad x A (1 - \frac{1}{1}) - \alpha \cdot \text{Glass} \cdot A
\]
    \State I can eat glass, it does not hurt meI can eat glass, it does not hurt meI can eat glass, it does not hurt me
    \State I can eat glass, it does not hurt meI can eat glass, it does not hurt meI can eat glass, it does not hurt me
    \State I can eat glass, it does not hurt me
    
    \[
\text{Lorem Ipsum:} \quad x A (1 - \frac{1}{1}) - \alpha \cdot \text{Glass} \cdot A
\]
    \State I can eat glass, it does not hurt meI can eat glass, it does not hurt meI can eat glass, it does not hurt me
    \State Output ...........
    \State As dawn broke over the horizon:
    \State \quad The adventurers gathered their supplies — maps, lanterns, and charms.
    \State \quad Each carried a secret token (a silver coin, a feather, and a stone).
    \State \quad The forest stretched endlessly, veiled in morning mist.
    \State \quad Time felt frozen, yet fleeting.
    \State Their guide, an old sage:
    \State \quad Spoke of paths less traveled and shadows that whispered.
    \State \quad Warned of the river crossing at twilight.
    \State \quad And the moonlit grove where choices would bind their fate.
    \State With resolve, they stepped onto the mossy trail:
    \State \quad Their steps matched an unspoken rhythm.
    \State \quad Echoes of distant bells resonated in the air.
    \State A sudden breeze carried faint laughter:
    \State \quad Was it the forest itself or something hidden within?
    \State \quad The youngest adventurer clutched their charm tightly.
    \For{every mile deeper into the woods}
    \State Shadows grew longer and whispers louder.
    \State A riddle carved into an ancient oak appeared:
    \[ \textit{"To find the light, embrace the dark; to move ahead, step apart."} \]
    \State They chose their steps carefully, navigating roots and stones:
    \[ \textit{"One misstep could wake the slumbering earth."} \]
    \State Night fell as the group reached the silver brook:
    \[ \textit{"Here lies the mirror of truth and deceit."} \]
    \State They paused, letting the silence settle before crossing.
    \EndFor
    \State As dawn approached once again: The forest opened to a clearing bathed in gold.
    \State Their journey, though incomplete, had reshaped them forever.
\end{algorithmic}
\end{breakablealgorithm}

I can cite it \ref{alg:modeling} here.

\end{document}

image.png

注意!!!代码块的符号是反引号`,不是左引号'

请善用“补充问题”和“预览”功能,为了论坛其他用户的良好观感

请勿必修改原问题的代码块标识符!

下面应该不是一个好的practice...抛砖引玉吧...

可以试试把他们放到两个scope内...


\documentclass[border=8pt,tikz]{standalone}
\usepackage{tkz-euclide}
\begin{document}
   \begin{tikzpicture}[scale=2,line join=round,line cap=round]
    \tikzmath{\r=.02;}
    \begin{scope}[
        x={(-.4cm,-.4cm)},
        y={(1cm,0cm)},
        z={(0cm,1cm)},
    ]
        \coordinate[label=45:$D$](D)at(0,0,0);
        \coordinate[label=below:$A$](A)at(1,0,0);
        \coordinate[label=right:$C$](C)at(0,1,0);
        \coordinate[label=below:$B$](B)at(1,1,0);
        \coordinate[label=left:$A_1$](A1)at(1,0,1);
        \coordinate[label=right:$C_1$](C1)at(0,1,1);
        \coordinate[label=above:$B_1$](B1)at(1,1,1);
        \coordinate[label=above:$D_1$](D1)at(0,0,1);
        \coordinate[label=left:$E$](E)at($(D)!.5!(A)$);
        \coordinate[label=right:$F$](F)at($(B)!.5!(C)$);
        \draw(A1)--(B1)--(C1)--(D1)--cycle (A1)--(B1)--(B)--(A)--cycle (B1)--(C1)--(C)--(B)--cycle;
        \draw[dashed](D1)--(D)--(A) (C)--(D);
        \draw[cyan,dashed] (A1)--(E)--(F)--cycle ;
        \draw[cyan](B1)--(F);
        \draw[red,dashed](A1)--(C);
    \end{scope}
        % a bit ugly code here...
        \filldraw[cyan](.5,.5,.51)circle(\r) node[above] {$O$};
    \end{tikzpicture}
\end{document}

image.png

texdoc nicematrix

请根据上面命令呼出的文档自行补充...

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{nicematrix}
\begin{document}
\[
    \begin{bNiceArray}{*6c*6c}[columns-width=2mm,margin]
        \Block[borders={bottom,right,tikz=dashed}]{6-6}<\LARGE>{\mathbf{E}_{6m}}&&& & & &\Block[borders={bottom,right,tikz=dashed}]{2-4}<\Large>{\mathbf{O}} & & & & \Block[borders={bottom,tikz=dashed}]{2-2}<\Large>{\mathbf{E}_{2m}}& \\
        & &&&& & & & & & & \\
        & &&&& &\Block[borders={bottom,right,tikz=dashed}]{4-4}<\Large>{\mathbf{E}_{4m}} & & & &\Block[borders={bottom,tikz=dashed}]{4-2}<\Large>{\mathbf{O}} & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        & &&&& & & & & & & \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
        1&2 &3&4 &5&6 &7 &8 &9 &10 &11 &12 \\
    \end{bNiceArray}
\]
\end{document}

image.png

同时强烈建议掌握围栏代码块语法。

谢谢雾月老师的解释,但我还有几个小问题:

  1. 是否有简单的方法确定\node读取键时“真正”的展开情况
  2. 我之前一直以为这两者的差异是colorinner sep这两个key的性质不同导致的;而经过进一步测试发现上述例子是因为读取key时,对于那些允许省略键的选项不会出错,而不允许省略键的选项则会因为展开顺序的问题而报错;是什么造成了这一区别呢?
  3. unexpended命令和noexpand/\exp_not:n是否有区别(?)我通过latexdef发现后两者等价,而unexpendednoexpand均为Plain-TeX的原语。

根据报错信息猜测是编组被\newenvironment拆后和\fbox的定义出现了{}的错配,提供一种曲线救国(不优雅)的方案。

\documentclass[11pt,fontset=ubuntu]{ctexart}
\usepackage[margin=1in]{geometry}
\usepackage{zhlipsum}
\newcommand{\createenv}[1]{%
    \begin{center}% 开始居中环境
        \fbox{%
            \begin{minipage}{0.9\textwidth}
                {\small\itshape {#1}}
            \end{minipage}
        }%
    \end{center} % 
}
\NewDocumentEnvironment{mynote}{+b}{%
    \begingroup%
    \createenv{#1}%
}{\endgroup}%

\begin{document}

\begin{mynote}%
   \zhlipsum[1]
\end{mynote}%

\section{A Section}

\begin{center}%
    \fbox{%
        \begin{minipage}{0.9\textwidth}
            \small\itshape
            \zhlipsum[2]
        \end{minipage}
    }%
\end{center}%

\end{document}

另外,你的最小工作示例中还有很多和本问题无关的宏包;同时article文档类有且只有10pt(default),11pt,12pt这三个选项,你选择的10.5pt实际上为默认值10pt.

off-topic...只是好奇,在新华字典中“鉏”字并没有简化写法,为什么可以确定 你所造的字体与原字体是等价的?

image.png

发布
问题