我们推荐大家学习 latexmk
的使用,比如模板的编译方式是 pdflatex
编译的时候可以用:
latexmk -pdf filename.tex
如果编译方式显示的是 xelatex
那么编译的时候就用:
latexmk -xelatex filename.tex
latexmk 会自动判断参考文献或者是索引,交叉引用的编译次数啥的,非常方便,最近也有新的是 arara, 有兴趣也可以了解下:https://www.ctan.org/pkg/arara
我们推荐大家学习 latexmk
的使用,比如模板的编译方式是 pdflatex
编译的时候可以用:
latexmk -pdf filename.tex
如果编译方式显示的是 xelatex
那么编译的时候就用:
latexmk -xelatex filename.tex
latexmk 会自动判断参考文献或者是索引,交叉引用的编译次数啥的,非常方便,最近也有新的是 arara, 有兴趣也可以了解下:https://www.ctan.org/pkg/arara
从代码看你要开启 twoside
模式:
\documentclass[twoside]{ctexart}
\begin{document}
\section{第一章}
\marginpar[\footnotesize 左边注。]{\footnotesize 右边注。}
\clearpage
\section{第二章}
\marginpar[\footnotesize 左边注。]{\footnotesize 右边注。}
\end{document}
很简单,你设置的方正字体没有粗体字重,可以看看思源的字体都是有字重的:
思源字体都是设计了不同的字重的。方正很多字体没有字重,你想加粗,可以看看 xeCJK 如何设置伪粗体。
代码如下:
\documentclass{article}
\usepackage{subfig}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\subfloat[caption fig (a).]{\parbox{\textwidth}{\centering\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\\
\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}}}
\subfloat[caption fig (b).]{\parbox{\textwidth}{\centering\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\\
\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}\hskip1cm\includegraphics[width=2cm]{example-image-a}}}
\caption{caption fig.}\label{fig:}
\end{figure}
\end{document}
效果图如下:
这是从一个站点挪来的代码,效果如下;
\documentclass{ctexart}
\usepackage{tcolorbox}
\tcbuselibrary{breakable,theorems,skins}
%\tcbuselibrary{breakable} %%を読み込んでいます。
\newcounter{reidaibangou} %%カウンタの定義
\newtcolorbox{reidai}[1][]{enhanced,boxrule=0.5mm,
top=2pt,left=44pt,right=4pt,bottom=2pt,arc=0mm,
colframe=blue!30!gray,
boxrule=1pt,
underlay={
\node[inner sep=1pt,blue!50!black,fill=blue!10!white]at ([xshift=22pt,yshift=-9pt]interior.north west) {\stepcounter{reidaibangou}\bfseries\sffamily 例題\thereidaibangou};},
segmentation code={%
\draw[dashed] (segmentation.west)--(segmentation.east);
\node[inner sep=1pt,blue!50!black,fill=blue!10!white] at ([xshift=22pt,yshift=-8pt]segmentation.south west) {\bfseries\sffamily 解};},
before upper={\setlength{\parindent}{1\ccwd}},
before lower={\setlength{\parindent}{1\ccwd}},
}
%%%%%ここまでがreidai環境の定義。例えば本文中に以下のように記述してみよう。
\begin{document}
\begin{reidai}
次の問題に答えなさい。
\begin{enumerate}
\item 8人を2つの組に分ける方法は何通りあるか。
\item 6人を3つの部屋A,B,Cに入れる方法は何通りあるか。 {ただし}各部屋に少なくとも1人は入るものとする。
\end{enumerate}
\tcblower
区別があるかどうかを正しく考えます。
\begin{enumerate}
\item なんだかんだで127通り
\item なんだかんだで540通り
\end{enumerate}
\end{reidai}
\end{document}
地址:https://marukunalufd0123.hatenablog.com/entry/2019/03/15/071717
这些定制模板,还是用原生的完整例子去使用,不要这样缩减下来使用。
看看下面的示例,自己研究下:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item 1
\item 2
\item 3
\end{enumerate}
some text
\begin{enumerate}[resume*]
\item 4
\end{enumerate}
\end{document}
你要把该填写的内容填写好,就好了,不要都是空着的。这个模板并没有给你示例。都空着的,自己填填好就可以了。
这就是 LaTeX 的基本宏包 caption 即可。https://ctan.org/pkg/caption
有个参数 labelsep
就是这个地方的符号:
举个我设置的思源字体的例子,建议多看看 xeCJK 说明:
\setCJKmainfont{Source Han Serif CN}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Regular,
BoldItalicFont = *-Bold
]
\setCJKsansfont{Noto Sans CJK SC}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Regular,
BoldItalicFont = *-Bold
]
\setCJKmonofont{Noto Sans Mono CJK SC}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
AutoFakeSlant = 0.2
]
\setCJKfamilyfont{zhsong}{Source Han Serif CN}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Regular,
BoldItalicFont = *-Bold
]
你们的模板加了字体设置了影响的,这个就是你们自己取舍了。\setmathfont{xits-math.otf}
注释掉之后的效果如下:
提问的时候,代码放在代码块里。
很简单,你的公式和正文段落分开就好了,否则会把文字带下去的。
一般修复方式:
\documentclass{article}
\usepackage{amsmath}
\usepackage[fontset=fandol,space]{ctex}
\setCJKmainfont{FandolSong}
\begin{document}
\[A\cap B=\{x\mid x\in A\text{ and }x\in B\}\]
\[A\cap B=\{x\mid x\in A\text{ \mbox{且} }x\in B\}\]
\end{document}
就可以了!
删掉那个文件即可,C:/CTEX/UserData/fonts/tfm/public/rsfsrsfs5.tfm
推荐更新用新版本的 texlive 了。
可以自己定义一个style替换掉之前的类型就好了。类似:
\fancypagestyle{myfancy}{
\fancyhf{}
\fancyfoot[C]{ \thepage}
\renewcommand{\headrulewidth}{0pt}
}
这个就去掉了页眉的部分了。
问 我下载了演示文稿模板压缩包,但是不会用,请问这些源代码怎么组合或者如何使用才能编译出模板样式?