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

注册于 3年前

回答
34
文章
0
关注者
0

你不应该使用cases环境,cases实际上是两列的array环境,且两列中间是\quad。你只需要一列。

$
\left\lbrace
\begin{array}{@{}l@{}}
u=x+a\sqrt{y}\\
v=x+2\sqrt{y}
\end{array}
\right.
$

你应该阅读手册,C:\texlive\2023\texmf-dist\doc\latex\psnfss\psnfss2e.pdf

image.png

使用adjustbox提供的valign

关键代码是

\includegraphics[valign=c]{example-image}

简单讲就是调整图片的基线位置,调整为垂直中部即可。

\documentclass{ctexart}
\usepackage{tabularray}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\begin{document}
\begin{tblr}{hlines,vlines,cells={m,c}}
标题         & 情况一                                                   & 情况二                                                   & 情况三                                                   \\
{这是\\图像} & \includegraphics[width=0.13\paperwidth]{example-image-a} & \includegraphics[width=0.13\paperwidth]{example-image-b} & \includegraphics[width=0.13\paperwidth]{example-image-c} \\
测试         & 测试                                                     & 测试                                                     & 测试                                                     \\
\end{tblr}

\begin{tblr}{hlines,vlines,cells={m,c}}
标题         & 情况一                                                   & 情况二                                                   & 情况三                                                   \\
{这是\\图像} & \includegraphics[width=0.13\paperwidth,valign=c]{example-image-a} & \includegraphics[width=0.13\paperwidth,valign=c]{example-image-b} & \includegraphics[width=0.13\paperwidth,valign=c]{example-image-c} \\
测试         & 测试                                                     & 测试                                                     & 测试                                                     \\
\end{tblr}
\end{document}

image.png

natbib打补丁即可。

\usepackage{xpatch}
\makeatletter
\xapptocmd{\NAT@bibsetnum}{\setlength{\leftmargin}{0pt}\setlength{\itemindent}{\labelwidth}\addtolength{\itemindent}{\labelsep}}{}{}
\makeatother
\documentclass{article}
\usepackage{gbt7714}
\usepackage{xpatch}
\makeatletter
\xapptocmd{\NAT@bibsetnum}{\setlength{\leftmargin}{0pt}\setlength{\itemindent}{\labelwidth}\addtolength{\itemindent}{\labelsep}}{}{}
\makeatother
\begin{document}
\cite{angenendt}\cite{augustine}
\bibliographystyle{gbt7714-numerical}
\bibliography{biblatex-examples}
\end{document}

image.png

\documentclass{book}
\usepackage[margin=1cm]{geometry}
\usepackage{showframe}
\usepackage{amsmath}
\counterwithin{equation}{section}
\usepackage{tabularray}
\UseTblrLibrary{counter}
\begin{document}
\chapter{title}
\section{title}
\begin{equation*}
\begin{tblr}
{
colspec    = {X[c,m]Q[r,m]Q[l,m]X[r,m]},
columns    = {colsep=0pt},
column{Z}  = {mode=text},
row{5}     = {abovesep+=\abovedisplayskip},
cell{1}{Z} = {r=4}{preto=(\stepcounter{equation}\theequation)},
cell{5}{Z} = {r=7}{preto=(\stepcounter{equation}\theequation)},
column{3}  = {preto=\mbox{}}
}
& a+a+a+a+a+a+a+a+a+a & =b+b+b       & \\
&                     & =c+c         & \\
&                     & =c+c         & \\
&                     & =c+c         & \\
& a+a+a               & =b+b+b+b+b+b & \\
&                     & =c+c         & \\
&                     & =c+c         & \\
&                     & =c+c         & \\
&                     & =c+c         & \\
&                     & =c+c         & \\
&                     & =c+c         & \\
\end{tblr}
\end{equation*}
\end{document}

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{cases}
\dot{X}(t)=\operatorname{AX}(t)+\operatorname{Bw}(0,t), & t\in(0,T),           \\
w_t(x,t)-w_{xx}(x,t)=0,                                 & x\in[0,D],t\in(0,T), \\
\begin{aligned}
w(0,t)={} & \gamma(D)\operatorname{X}(t)                                                                      \\
          & +\int_{0}^{D}\Bigl(\int_{0}^{D-y}\gamma(\sigma)d\sigma\Bigr) \operatorname{Bu}(y,t)\,\mathrm{d}y, \\
\end{aligned}
                                                        & t\in(0,T),           \\
\end{cases}
\end{equation}
\end{document}

image.png

\documentclass{ctexbook}
\begin{document}
\chapter{正文1}
\chapter{正文2}
\appendix
\chapter{附录1}
\chapter{附录2}
\end{document}

\documentclass{article}
\usepackage{showframe}
\usepackage{tabularray}
\usepackage{amsmath}
\begin{document}
\begin{equation}
a+b=c
\end{equation}
\begin{equation*}
\stepcounter{equation}
\begin{tblr}{colspec={Q[c,m]X[c,m]Q[r,m]},columns={colsep=0pt},cell{1}{2}={r=2}{}}
                                         & a+b=c & (\theequation)                 \\
\phantom{(\text{diffusion coefficient})} &       & (\text{diffusion coefficient}) \\
\end{tblr}
\end{equation*}
\begin{equation}
a+b=c
\end{equation}
\end{document}

image.png

我更推荐你选择一个合适的文本编辑器来辅助你的输入,自己配置一个snippet。

例如在Sublime Text里,可以新建如下配置文件,即可输入dd后,按TAB按键,直接出来$$,而且光标也是在中间的。

<snippet>
    <content><![CDATA[
\$$1\$
]]></content>
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <tabTrigger>dd</tabTrigger>
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <scope>text.tex.latex</scope>
</snippet>

picins.sty是CTeX套装才有的,位于F:\CTEX\MiKTeX\tex\latex\picins\picins.sty

此外,你可以通过阅读J_Jmath_CN.log来了解更多信息,下面摘录部分:

This is TeX, Version 3.141592 (MiKTeX 2.3) (preloaded format=latex 2000.11.28)  11 APR 2012 09:26
(C:\CTeX\texmf\tex\latex\base\article.cls
(C:\CTeX\texmf\tex\latex\picins\picins.sty

\documentclass{article}
\usepackage{geometry}
\geometry{margin=1cm}
\usepackage{xcolor}
\usepackage{tabularray}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\begin{document}
\begin{figure}
\centering
\subcaptionbox{}{
\begin{tblr}{width=.3\textwidth,colspec={Q[l,t]X[l,t]},column{2}={font=\small},cell{Z}{1}={c=2}{c},row{Z}={gray7},columns={leftsep=0pt}}
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur             \\
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur adipisicing \\
consectetur adipisicing                                       &                                                     \\
\end{tblr}
}\hfill
\subcaptionbox{}{
\begin{tblr}{width=.3\textwidth,colspec={Q[l,t]X[l,t]},column{2}={font=\small},cell{Z}{1}={c=2}{c},row{Z}={gray7},columns={leftsep=0pt}}
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur             \\
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur adipisicing \\
consectetur adipisicing                                       &                                                     \\
\end{tblr}
}\hfill
\subcaptionbox{}{
\begin{tblr}{width=.3\textwidth,colspec={Q[l,t]X[l,t]},column{2}={font=\small},cell{Z}{1}={c=2}{c},row{Z}={gray7},columns={leftsep=0pt}}
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur             \\
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur adipisicing \\
consectetur adipisicing                                       &                                                     \\
\end{tblr}
}\hfill
\subcaptionbox{}{
\begin{tblr}{width=.3\textwidth,colspec={Q[l,t]X[l,t]},column{2}={font=\small},cell{Z}{1}={c=2}{c},row{Z}={gray7},columns={leftsep=0pt}}
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur             \\
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur adipisicing \\
consectetur adipisicing                                       &                                                     \\
\end{tblr}
}\hfill
\subcaptionbox{}{
\begin{tblr}{width=.3\textwidth,colspec={Q[l,t]X[l,t]},column{2}={font=\small},cell{Z}{1}={c=2}{c},row{Z}={gray7},columns={leftsep=0pt}}
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur             \\
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur adipisicing \\
consectetur adipisicing                                       &                                                     \\
\end{tblr}
}\hfill
\subcaptionbox{}{
\begin{tblr}{width=.3\textwidth,colspec={Q[l,t]X[l,t]},column{2}={font=\small},cell{Z}{1}={c=2}{c},row{Z}={gray7},columns={leftsep=0pt}}
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur             \\
\includegraphics[width=.15\textwidth,valign=t]{example-image} & Lorem ipsum dolor sit amet, consectetur adipisicing \\
consectetur adipisicing                                       &                                                     \\
\end{tblr}
}
\caption{bbb}
\end{figure}
\end{document}

image.png

通过表格实现对齐,如果你嫌麻烦,可以自行封装一个命令,用来排版每一个\subcaptionbox内的内容。

tabularray可能需要较新的LaTeX发行版才可以使用,推荐TeX Live 2022。

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{subequations}
\begin{align*}
\| S+T \|^{2}_{A} & = \omega ^{2}_{A}(S+T)                                                   \\
                  & \leq \sup_{\substack{\|x\|_{A}=1}}(|\langle (S+iT)x,x \rangle _{A} |^{2} \\
\shortintertext{\hfill(by Lemma)}
                  & \leq \sup_{\substack{\|x\|_{A}=1}}(|\langle (S+iT)x,x \rangle _{A} |^{2} \\
\end{align*}
\end{subequations}
\end{document}

image.png

使用graphicx包即可。

\documentclass{article}
\usepackage{CJK,multicol,multirow,graphicx,fancyhdr,epstopdf}
\usepackage[dvipsnames]{xcolor}
\usepackage{CPL-2022}
\begin{document}
\fl{1}\centerline{\includegraphics[width=.2\linewidth]{0399fig1}}
\end{document}

发布
问题