给一个不太成功的尝试....
我在symbols
中找不到上面单一的符号....只好找了个类似的代替,上面的符号应该是一种中文书记排版系统里面的某个预定义排版样式,实在是不想,也不会自己画这一样式.
也许有一下两种思路:
pifont
宏包提供的\dingline
命令,缺点是只能使用pifont
宏包提供的符号,同时左右间距不可调tikz
的markings
实现路径的替换,可见下面的mwe和效果\documentclass[12pt]{ctexart}
\usepackage[margin=1.5in]{geometry}
\usepackage{lipsum}
\usepackage{tikz}
\usetikzlibrary{decorations,decorations.markings}
\usepackage{pifont}
\makeatletter
\newcommand{\part@title@box}[1]{
\stepcounter{part}
\begin{center}
{\Huge{\bfseries\kaishu 第\chinese{part}部分} \hspace{.5em} {\songti #1}}\par
\vspace{2em}
% \dingline{253} %使用pifont宏包提供的插入单行字符
\begin{tikzpicture}[
decoration={
markings,
mark=between positions 0 and 1 step 3mm with
{\node {\ding{248}};}%插入字符...但我实在找不到
}
]
\path [postaction={decorate}] (.05\textwidth,0) -- (.95\textwidth,0);
\end{tikzpicture}
\end{center}
}
\ctexset{
part = {
name = {},
numbering = false,
format = \part@title@box,
},
section = {
name = {第,章},
}
}
\makeatother
\begin{document}
\part{\LaTeX{}简介}
\lipsum[1]
\section{初见\LaTeX{}}
\lipsum[2]
\section{再见\LaTeX{}}
\lipsum[3]
\part{\LaTeX{}入坑}
\section{又见\LaTeX{}}
\lipsum[2-6]
\end{document}
希望各位提供更好的处理方式,共同交流学习!
贴一个在群里贴过的也许有帮助的链接.感觉要从字体层面复刻是蛮困难的事情.
https://ctan.org/tex-archive/macros/latex/contrib/psnfssx/mathtime在这个页面可以找到mathtime.dtx
,文件
不太明白你想问什么?
CTAN上的tkz-euclide宏包就是英文的,官方没有发布过任何版本的tkz-euclide中文文档.你想获取中文版文档只能尝试搜索是否有人翻译了该宏包.
想获得中文版宏包可以自己发起/参与一些翻译宏包的项目,例如中文版文档翻译项目.
可以尝试fancyhdr文档中的做法
\documentclass[11pt,a4paper,twoside]{article}
\usepackage{ctex}
\usepackage{fancyhdr}
\usepackage{lipsum}
\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{\marginparwidth}
\pagestyle{fancy}
\chead{页眉}
\usepackage{marginnote}
\begin{document}
\lipsum[2] \marginnote{边栏文本}
\lipsum[3-7] \marginnote{另一段边栏文本}
\end{document}
如果我是正在学习tikz-3d
可能是一个不错的final-exam...看上去聪明如GPT也不懂tikz...
多给点悬赏也许有空的时候可以试试
对于在命令行使用fc-list
没有看懂的问题,是因为cmd
默认使用的是GBK编码,可以输入chcp
命令查看当前编码,如果为936则会出现上述乱码的问题,可以通过chcp 65001
更改为UTF-8编码,此后可以重新执行fc-list | findstr "FZShuSong-Z01"
查看字体的中文名称.
此外,在不涉及版权问题的前提下,可否提供一下MWE以方便本地调试....
此外我印象中指定本地字体文件时似乎要加上后缀名.ttf
(可以尝试尝试)
我懂你的痛苦,我也被fontspec
狠狠折磨过
我在思考...是否应该提供一个MWE的压缩包方便别人调试测试...
诚如@u38442 的解释,我又尝试了一下,下面是测试的结果.
按我个人理解,minipage
环境的作用是用来对齐文字环境内的「小页面」,因此默认是按照baseline
居中对齐的,你想要实现和控制的是多个minipage
之间的垂直对齐关系,而minipage
会根据内容自动设置高度,例如下图,自动匹配的高度不统一导致了你的问题.
可以尝试指定可选的 [height]
参数来实现.
下面是一个MWE和效果.
\documentclass[aspectratio=169]{ctexbeamer}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\begin{frame}{给minipage加框并展示inner-pos参数的区别}
\fbox{
\begin{minipage}[c][5cm][t]{.28\textwidth}
\centering
\includegraphics[width=.6\textwidth]{example-image-a}
\end{minipage}
}
\fbox{
\begin{minipage}[c][5cm][c]{.28\textwidth}
\centering
\includegraphics[width=.6\textwidth]{example-image-b}
\end{minipage}
}
\fbox{
\begin{minipage}[c][5cm][b]{.28\textwidth}
\centering
\includegraphics[width=.6\textwidth]{example-image-c}
\end{minipage}
}
\end{frame}
%---------------------------------------------------------------------------------%
\begin{frame}{3个minipage都顶部对齐}
\fbox{
\begin{minipage}[c][.2\textheight][t]{.28\textwidth}
\centering
苹果.
\end{minipage}
}
\fbox{
\begin{minipage}[c][.2\textheight][t]{.28\textwidth}
\centering
\includegraphics[width=.6\textwidth]{example-image}
\end{minipage}
}
\fbox{
\begin{minipage}[c][.2\textheight][t]{.28\textwidth}
\centering
苹果.
\end{minipage}
}
\end{frame}
%---------------------------------------------------------------------------------%
\begin{frame}{3个minipage都居中对齐}
\fbox{
\begin{minipage}[c]{.28\textwidth}
\centering
苹果.
\end{minipage}
}
\fbox{
\begin{minipage}[c]{.28\textwidth}
\centering
\includegraphics[width=.6\textwidth]{example-image}
\end{minipage}
}
\fbox{
\begin{minipage}[c]{.28\textwidth}
\centering
橘子.
\end{minipage}
}
\end{frame}
%---------------------------------------------------------------------------------%
\begin{frame}{3个minipage都居底对齐}
\fbox{
\begin{minipage}[c][.2\textheight][b]{.28\textwidth}
\centering
苹果.
\end{minipage}
}
\fbox{
\begin{minipage}[c][.2\textheight][b]{.28\textwidth}
\centering
\includegraphics[width=.6\textwidth]{example-image}
\end{minipage}
}
\fbox{
\begin{minipage}[c][.2\textheight][b]{.28\textwidth}
\centering
苹果.
\end{minipage}
}
\end{frame}
\begin{frame}{演示minipage设置不同的高度}
生活就像海洋,只有意志坚强的人才能到达彼岸.生活就像海洋,只有意志坚强的人才能到达彼岸.生活就像海洋,只有意志坚强的人才能到达彼岸.生活就像海洋,只有意志坚强的人才能到达彼岸.
\fbox{
\begin{minipage}{.2\textwidth}
\centering
这是一小段话.
\end{minipage}
}
\fbox{
\begin{minipage}{.15\textwidth}
\centering
\includegraphics[width=.6\textwidth]{example-image}
\end{minipage}
}
\fbox{
\begin{minipage}{.15\textwidth}
\centering
\includegraphics[width=.8\textwidth]{example-image}
\end{minipage}
}
\end{frame}
\end{document}
此外,关于markdown插入代码块的语法,需要如下图做围栏式代码块,markdown语法学习对你来说仍然任重而道远.
(p.s.上面的{ctexart}花括号打错了,但我懒得再截图...)
另:对于设置对齐方式这种较为精细化的需求,GPT等大模型不一定(往往不能)可以提供准确的解答,更好的办法(几乎也是唯一的办法)是阅读宏包的文档.可以搜索一下texdoc <package name>
命令,当然如果你是在overleaf上使用的话,可以尝试检索CTAN+<package name>
.但其实对于精细需求我个人是不建议使用大模型帮助的,"GPT不懂LaTeX".
祝好!
我不是很明白你是怎么每次复制MWE都复制成这样的(你只要把 documentclass 到end{document}之间的所有内容放到一个markdown代码块 '
' '
'之间,就能把他们全都高亮框内)
此外,rule插入的并不是一个图片.建议使用mwe插入图片以构造mwe,同时我不是很确明白使用minipage
给出的结果你有不满意吗,还是你正在学习beamer以遍历所以实现图文混排的方式,如果是后者,那非常不错!
经过测试,我发现只需要使用对齐选择 T 即可实现,具体细节可见texdoc beamer
下面是一个MWE和结果
\documentclass[aspectratio=169]{ctexbeamer}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{mwe}
\begin{document}
\begin{frame}{文图文}
\lipsum[2]
\begin{columns}[T]
\begin{column}{.32\textwidth}
\centering
苹果\hfill
\end{column}
\begin{column}{.32\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image}
\end{column}
\begin{column}{.32\textwidth}
\centering
香蕉
\end{column}
\end{columns}
\end{frame}
\end{document}
按照我对这个网站粗浅的理解....
我觉得你要区分好 提问(问答)以及文章投稿,前者时用于提问交流问题的,后者适用于发布分享你使用latex做了一些什么,或者有什么新的功能,以及自己的学习感悟之类的问题.查看你的主页,你似乎并未发布作品。
补充问题
按钮对问题正文进行修改。绘制正方体调整角度用的是什么宏包的什么命令呢?也许需要一个更具体的绘图框架。
文档其实写的很详细了
使用命令行编译后可以发现需要在当前目录下新建一个solutions文件夹,tbc会将solution写入该文件夹
这是由savelowerto命令指定的
你不能编译的一大原因是找不到solutions文件夹
你还有其他一些问题
例如没有引入amsmath,调用skins和xparse库的方式都不对等原因
目录结构应如下【注意应自己建一个solutions文件夹】
下面是实测可以运行的MWE
\documentclass{ctexart}
\usepackage[margin=1.5cm]{geometry}
\usepackage{amsmath}
\usepackage{tcolorbox}
\usepackage{xcolor}
\tcbuselibrary{skins,xparse}
\NewTColorBox[auto counter,number within=section]{exercise}{+!O{}}{%
enhanced,colframe=green!20!black,colback=yellow!10!white,coltitle=green!40!black,
fonttitle=\bfseries,
underlay={\begin{tcbclipinterior}
\shade[inner color=green!80!yellow,outer color=yellow!10!white]
(interior.north west) circle (2cm);
\draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
\end{tcbclipinterior}},
title={Exercise~\thetcbcounter:},
label={exercise@\thetcbcounter},
attach title to upper=\quad,
after upper={\par\hfill\textcolor{green!40!black}%
{\itshape Solution on page~\pageref{solution@\thetcbcounter}}},
lowerbox=ignored,
savelowerto=solutions/exercise-\thetcbcounter.tex,
record={\string\solution{\thetcbcounter}{solutions/exercise-\thetcbcounter.tex}},
#1
}
\NewTotalTColorBox{\solution}{mm}{%
enhanced,colframe=red!20!black,colback=yellow!10!white,coltitle=red!40!black,
fonttitle=\bfseries,
underlay={\begin{tcbclipinterior}
\shade[inner color=red!50!yellow,outer color=yellow!10!white]
(interior.north west) circle (2cm);
\draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}]
(interior.south west) grid (interior.north east);
\end{tcbclipinterior}},
title={Solution of Exercise~\ref{exercise@#1} on page~\pageref{exercise@#1}:},
phantomlabel={solution@#1},
attach title to upper=\par,
}{\input{#2}}
\tcbset{no solution/.style={no recording,after upper=}}
\tcbstartrecording\relax
\begin{document}
\begin{exercise}
Compute the derivative of the following function:
\begin{equation*}
f(x)=\sin((\sin x)^2)
\end{equation*}
\tcblower
The derivative is:
\begin{align*}
f'(x) & = \left( \sin((\sin x)^2) \right)'
=\cos((\sin x)^2) 2\sin x \cos x.
\end{align*}
\end{exercise}
\begin{exercise}[no solution]
It holds:
\begin{equation*}
\frac{d}{dx}\left(\ln|x|\right) = \frac{1}{x}.
\end{equation*}
\end{exercise}
\begin{exercise}
Compute the derivative of the following function:
\begin{equation*}
f(x)=(\sin(\sin x))^2
\end{equation*}
\tcblower
The derivative is:
\begin{align*}
f'(x) & = \left( (\sin(\sin x))^2 \right)'
=2\sin(\sin x)\cos(\sin x)\cos x.
\end{align*}
\end{exercise}
\begin{exercise}
Compute the derivative of the following function:
\begin{equation*}
f(x)=\sqrt{x^3-6x^2+2x}
\end{equation*}
\tcblower
The derivative is:
\begin{align*}
f'(x) & = \left( \sqrt{x^3-6x^2+2x} \right)'
= \frac{3x^2-12x+2}{2\sqrt{x^3-6x^2+2x}}.
\end{align*}
\end{exercise}
\begin{exercise}
Compute the derivative of the following function:
\begin{equation*}
f(x)=\left(\frac{2+3x}{1-2x}\right)^3
\end{equation*}
\tcblower
The derivative is:
\begin{align*}
f'(x) & = \left( \left(\frac{2+3x}{1-2x}\right)^3 \right)'
= 3 \left(\frac{2+3x}{1-2x}\right)^2 \frac{(1-2x)3-(2+3x)(-2)}{(1-2x)^2}
= \frac{21(2+3x)^2}{(1-2x)^4}.
\end{align*}
\end{exercise}
\begin{exercise}
Compute the derivative of the following function:
\begin{equation*}
f(x)=\frac{\cos x}{(\tan 2x)^2}
\end{equation*}
\tcblower
The derivative is:
\begin{align*}
f'(x) & = \left( \frac{\cos x}{(\tan 2x)^2} \right)'
= \left( \frac{\cos x (\cos 2x)^2}{(\sin 2x)^2} \right)' \\
& = \frac{(\sin 2x)^2 [(-\sin x)(\cos 2x)^2+(\cos x)4\cos 2x (-\sin 2x)]
- \cos x (\cos 2x)^2 4\sin 2x \cos 2x}{(\sin 2x)^4} \\
& = -\frac{\cos(2x) [\sin x \sin 2x \cos 2x+ 4\cos x(\sin 2x)^2
+ 4 \cos x (\cos 2x)^2]}{(\sin 2x)^3} \\
& = -\frac{\cos(2x) [\sin x \sin 2x \cos 2x+ 4\cos x]}{(\sin 2x)^3}.
152
\end{align*}
\end{exercise}
\begin{exercise}
Compute the derivative of the following function:
\begin{equation*}
f(x)=\cos((2x^2+3)^3)
\end{equation*}
\tcblower
The derivative is:
\begin{align*}
f'(x) & = \left( \cos((2x^2+3)^3) \right)'
=-\sin((2x^2+3)^3) 3(2x^2+3)^2 2\cdot 2x \\
& =-12x(2x^2+3)^2\sin((2x^2+3)^3).
\end{align*}
\end{exercise}
\begin{exercise}
Compute the derivative of the following function:
\begin{equation*}
f(x)=(x^2+1)\sqrt{x^4+1}
\end{equation*}
\tcblower
The derivative is:
\begin{align*}
f'(x) & = \left( (x^2+1)\sqrt{x^4+1} \right)'
= 2x\sqrt{x^4+1} + \frac{2x^3(x^2+1)}{\sqrt{x^4+1}}.
\end{align*}
\end{exercise}
\tcbstoprecording
\tcbinputrecords
\end{document}
多看看文档,多看看lshort,你给的MWE实际上还有一些自己乱添加的东西,注意MWE的定义
同时还要注意要得到page的索引还得至少进行两次xelatex的编译....
以及尽量避免 弄了半天还是不行 这种信息量很低的话,具体是哪里不行?命令行运行的报错是什么?你的期望效果是什么?
下面是压缩包文件,Happy Texing!
不太清楚上述现象出现的原因:
但可以使用usepackage{ctex}其会默认设置行距为1.3倍可以解决你的问题;或者直接使用linespread{1.3}获得如下的效果。
\documentclass{article}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
\begin{document}
\linespread{1.3} %设置行距
\begin{table}[htbp]
\begin{tblr}{*{5}{Q[c,m]}}
\toprule
\SetCell[r=2]{c} hASDFp
& \SetCell[c=2]{m} {hZXCVp} & & & \SetCell[c=2]{m} {hIUYTp} & \\
\cmidrule{2-3} \cmidrule{5-6}
& hOIUYTfp & hCVFRp & & hSDEWp & PLOIKp \\
\midrule
hZXCVBp & 0.30 & 0.64 & & 0.25 & 0.48 \\
\bottomrule
\end{tblr}
\end{table}%
\end{document}
问 vscode中使用include命令组织文档