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

注册于 4年前

回答
465
文章
291
关注者
195

页眉的设置自动加了 \rightmark 可以使用 markboth 置空。

\titleformat{\part}
  {\normalfont\huge\filcenter}
  {}
  {20pt}
  {\markboth{}{}\begin{tikzpicture}[remember picture,overlay]
  \fill[outermarginbgcolor]
    ($(current page.north west)+(0,0)$) rectangle ($(current page.south east)+(0,0)$);%
  \node[
      rectangle,drop shadow={opacity=.3,color=black!40!white,shadow xshift=.05cm,shadow yshift=-.05cm},
      fill=outermarginfgcolor!90,
      text width=\paperwidth-2\outermarginwidth,
      rounded corners=5pt,
      text depth=15cm,
      anchor=center,
      inner sep=0pt] at (current page.north) (parttop)
    {\thepart};%
  \node[
      anchor=south east,
      inner sep=0pt,
      outer sep=0pt] (partnum) at ([xshift=-20pt]parttop.south)
    {\partnumfont\thepart};
  \node[
      anchor=south,
      inner sep=0pt] (partname) at ([yshift=2pt]partnum.south)
  {\partnamefont PART};
  \node[%
      anchor=north east,xshift=1.5\outermarginwidth,
      align=left,font=\Huge\scshape\color{outermarginfgcolor},
      inner xsep=0pt] at ([yshift=-0.5cm]partname.west|-partnum.south east)
  {\parbox[][.5\paperheight][t]{.5\textwidth}{\raggedright#1}};%
  \shade[%
      rectangle,drop shadow={opacity=.3,color=black!40!white,shadow xshift=.05cm,shadow yshift=-.05cm},
      top color=outermarginfgcolor!40,bottom color=outermarginbgcolor!20,
      rounded corners=5pt,
     ] ($(current page.south west)+(\outermarginwidth,1.2\footheight)$) rectangle ($(current page.south east)+(-\outermarginwidth,.3\paperheight+1.2\footheight)$);%
    \node[anchor=south,text=outermarginfgcolor,font=\large\sffamily\normalfont,] at ([yshift=1.25\footheight]current page.south) (partbottom) %
    {\parbox[][.3\paperheight][c]{\paperwidth-2\outermarginwidth-.5\footheight}{\partpage}};%
  \end{tikzpicture}%
  }

这样的情况 只能缩小文字,浮动体无法换页的。

举个例子,设置了 path 了,后面的就不需要再加了。例如

\setCJKmainfont[
Path = fonts/zh_CN-Adobe/,%设置字体的路径
Extension = .otf,%扩展名设置,省略扩展名
BoldFont=AdobeHeitiStd-Regular,
ItalicFont=AdobeKaitiStd-Regular,
SmallCapsFont=AdobeHeitiStd-Regular
]{AdobeSongStd-Light}

代码选自:https://www.wolai.com/mSB9hEcof3XrNvX1RFUePV

提醒下,提交问题学会用 md 语法。便于阅读。

使用命令行要切换到pdf所在的路径,这样命令行才能找到这个 PDF 文件。

没有细看说明书的问题,主要是 verb 命令引起的问题,看说明书这里:
image.png

代码改成这样:

\begin{table}
  \centering
  \caption{自定义命令}
  \begin{tblr}{verb,colspec={lc}}
  \hline\hline
  命令 & 结果 \\
  \hline
  \verb|\whiteding{8}|  & \whiteding{8}  \\
  \verb|\blackding{8}|  & \blackding{8}  \\
  \verb|\whitedingB{8}| & \whitedingB{8} \\
  \verb|\blackdingB{8}| & \blackdingB{8} \\
  \hline\hline
  \end{tblr}
\end{table}

image.png

这种用表格呗,上下居中对齐,时间这都是打印出来再签字扫描进去。

肯定你是加了什么字体宏包干扰了模板自带的字体效果了。自己删删代码。

多下标的场景,要注意用群组:

\begin{equation}
{C_m = D_{m_1}, D_{m_2}, ..., D_{m_{k_m}}}
\end{equation}

给个两个的样例,举一反三:

\documentclass{ctexart}
\usepackage{calc}
\usepackage{tikz} 
\begin{document}


\begin{tabular}{|c|c|p{30pt}|p{30pt}|p{30pt}|}
\hline
\multicolumn{2}{|c|}{%
$\vcenter{\hbox{%
\begin{tikzpicture}
\path[use as bounding box] (\tabcolsep,0) rectangle (4cm-\tabcolsep,1cm);
\draw (0,1cm) -- node[auto]{化验室} node[auto,swap]{} (4cm,0);
\draw (0,1cm) -- node[auto,swap]{} (1.5cm,0);
\end{tikzpicture}%
}}$%
} &\multicolumn{3}{|c|}{室一\quad\quad 室二\quad\quad 室三}\\
\hline
\makebox[1.5cm-2\tabcolsep][c]{aaa} & bbb & ccc &ddd &eee \\
\hline
\end{tabular}
 
\end{document}

image.png

这似乎不对头,Winedt 只是编辑器,tikz 的部分只要你安装了完整的 texlive 或者 MikTeX 都自带了的。

从图上看,图片太大了,如何居中?

具体错误是什么,这样写没有什么大问题的。

发布
问题