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

注册于 3年前

回答
307
文章
0
关注者
12

感谢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

提问需要注意以下几点:

  1. 代码务必使用围栏代码块包裹以实现高亮,不然让人怎么复制??
  2. 上传文件请务必等其上传到服务器之后再点击提交,对于包含大量文件的MWE,请将其压缩为.zip格式,并且图示具体说明你想调的是哪部分字体

image.png

3.提问要逻辑清晰指代准确。“一开始会报错,要把这个tex文件和发的东西放一起”是想表达什么(?)
4.本论坛有"修改问题"和"预览问题"的功能,这都是你要用的

image.png

image.png

5.一个优秀的tag,应该是能准确的描述和概括该问题的,我严重怀疑zitie是你乱打的...

P.S.你是否看过lshort-zh-cn的这部分内容(?)

image.png

此外,想要修改模板,请你指出相应的规范要求,应该严格按照规范要求来进行你的排版。在模板使用中,你觉得“这个字体太小”等想法是不严谨的,模板制作者一定按照的是美赛的规范来编写的模板。

为什么不看lshort-zh-cn?

image.png


A practice is here:
https://tex.stackexchange.com/questions/678477/documentclass14ptextarticle-i-cannot-have-more-that-14pt

总的来说,你可以通过如下设置随意调整尺寸

\RequirePackage{fix-cm}
\usepackage[fontsize=14pt]{fontsize}

但可能导致一些不良后果,但这是模板实现方式的问题,例如:
image.png

不禁又要问:为什么你一定要调整字体大小呢?是有什么规范让你必须(MUST)这么做吗?如果没有,不建议修改。

另附:压缩包密码为 zstar !!!!!

@u134436 关于填空题,可以使用\parbox内嵌于\phantom

\documentclass[fontset=ubuntu]{ctexart}
\usepackage{xeCJKfntef}
\usepackage[a4paper]{geometry}
\usepackage{xcolor}
\usepackage{tagging}
\usepackage{zhlipsum}
% \usetag{ans}% 注释掉该行语句不显示答案
\newcommand{\answer}[1]{
    \par\vspace*{.5ex}
    \iftagged{ans}{\parbox[s]{.94\textwidth}{#1}}{\phantom{\parbox[s]{.94\textwidth}{#1}}}
    \par\vspace*{.5ex}
}

\begin{document}
\begin{enumerate}
\item 这是第一题的题干第一题的题干第一题的题干第一题的题干第一题的题干
\answer{这是答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案圆是到定点的距离等于定长的点的集合.}

\item 这是第二题的题干这是第二题的题干这是第二题的题干这是第二题的题干这是第二题的题干
\answer{答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案圆是到定点的距离等于定长的点的集合到定点的距离等于定长的点的集合到定点的距离等于定长的点的集合.}

\item 这是第三题的题干题干题干这是第三题的题干题干题干这是第三题的题干题干题干这是第三题的题干题干题干这是第三题的题干题干题干
\answer{答案答案答案答案答案答案答案答案答案答案答案答案是到定点的距离等于定长的点的集合到定点的距离等于定长的点的集合.}

\end{enumerate}

\end{document}

image.png

Thanks to deepseek(AI论坛秀了属于是),我在他给的答案基础上修改了一下,应该可以满足需求:

\documentclass[fontset=ubuntu]{ctexart}
\usepackage[margin=1in]{geometry}
\usepackage{lipsum,zhlipsum}
\usepackage{atbegshi}
\newif\ifinsertblankpage
\insertblankpagefalse

\let\oldabstract\abstract
\let\endoldabstract\endabstract
% 定义英文摘要环境
\newenvironment{enabstract}{%
  \renewcommand\abstractname{Abstract}
  \oldabstract
}{%
  \endoldabstract \newpage
}
% 定义中文摘要环境,并启用插入空白页
\newenvironment{cnabstract}{%
  \renewcommand\abstractname{摘要}
  \insertblankpagetrue % 启用插入空白页
  \oldabstract
}{%
  \endoldabstract \newpage
  \insertblankpagefalse % 关闭插入空白页
}
% 页面输出钩子:在中文摘要的每一页后插入空白页
\AtBeginShipout{%
  \ifinsertblankpage
    \AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox % 输出当前页
    \AtBeginShipoutOriginalShipout\null % 输出空白页
  \fi
}

\begin{document}

% 中文摘要部分:每一页后自动插入空白页
\begin{cnabstract}
\zhlipsum[1-8] % 生成多页中文摘要
\end{cnabstract}

% 英文摘要及其往后部分:正常双面打印
\begin{enabstract}
\lipsum[1-12] % 生成多页英文摘要
\end{enabstract}

\end{document}

上述代码的效果是:
image.png

不过上面的代码会报一个警告:

LaTeX: Ignoring void shipout box.
               The shipout box was voided by hook code.

应该是\AtBeginShipoutOriginalShipout\null导致的,不过你原问题中atbegshi宏包作者Heiko Oberdiek都用了类似的实现,想来不是什么问题。

上面代码报错的原因是缺少int(\i+45)

\documentclass[tikz,border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}
    \draw (0,0) circle(2);
    \foreach \i in {0,45,...,315}{
        \coordinate (A\i) at (\i:2); % 定义点的位置
        \draw[fill] (A\i) circle (2pt); % 画点
    }
    \foreach \i in {0,45,...,315} {
        \pgfmathsetmacro{\next}{int(\i+45)}
        \ifnum \next=360\relax 
            \pgfmathsetmacro{\next}{0} 
        \fi
        \draw[->] (A\i) -- (A\next); 
    }
\end{tikzpicture}
\end{document}

image.png

我很想知道这种图的来源,包括它的所在学科,英文名称以及大致含义。

同时你这个图可拓展性较差,下面的实现也很不优雅,我没有兴趣封装成接口。

另外为了论坛问题的neat,请你删除这一无效问题,想要修改问题可以使用补充问题功能,而不是重新开一个新的问题。

image.png

下面是en画的实现过程...

\documentclass[tikz,border=8pt]{standalone}
\usetikzlibrary{arrows.meta,decorations.markings}
\begin{document}
\begin{tikzpicture}[cap = round]
    % \draw (0,0) circle(2);
    \foreach \i in {30,60,...,150,240,270,300}{
        \node[circle,draw,inner sep=1pt,outer sep=0pt,minimum size=2pt] (A\i) at (\i:2) {}; % 画点
    }
    \foreach \i in {30,60,...,120,240,270} {
        \pgfmathsetmacro{\next}{int(\i+30)}
        \path[->] (A\i) edge[bend right=8] (A\next);
    }
    \foreach \angle/\txt in {30/2,60/1,90/0,120/n-1,150/n-2}{
        \node[label={[anchor=\angle+180,outer sep=1pt,inner sep=1.5pt,]\scriptsize$\txt$}] at (\angle:2) {};
    }
    \foreach \i in {180,210,330,0}{
        \node[circle,inner sep=0pt,outer sep=0pt,minimum size=0pt] (A\i) at (\i:2) {}; % 画点
    }
    \foreach \i in {150,210,300,0} {
        \pgfmathsetmacro{\next}{int(\i+30)}
        \ifnum \next=360 \pgfmathsetmacro{\next}{0} \fi
        \path[->] (A\i) edge[bend right=10] (A\next);
    }
    \path[dotted] (A180) edge[bend right=10] (A210) 
                  (A330) edge[bend right=10] (A0);
\end{tikzpicture}
\end{document}

image.png

其实要想优雅一点,可以用rotate把整个路径划分为:

  • 上半段node
  • 左侧无node虚线段
  • 下半段node
  • 左侧无node虚线段

不过个人觉得意义不是很大。

发布
问题