LaTeXStudio.net 问答 RSS 最新问答 https://ask.latexstudio.net/addons/ask/rss/index Mon, 05 Oct 2026 21:48:50 +0800 这里画交线时,怎么画比较优雅? 我是用scale调整红色交线a,b长度的,然后标签交线a,b都是在直线上取点的,有没有更好的方法只画alpha和beta面内的交线,我想可能是裁剪吧,或者计算交线在面内的两个端点. 另外直线的点法式local l={M(0,1,1),vecK}中,每次画直线都是以该点为中心画直线的.很像表示平面的矩形是以该点为中心画一个矩形 文文.png

\documentclass{standalone}
\usepackage[3d]{luadraw}
\usepackage[svgnames]{xcolor}
\usepackage{fourier-otf}
\begin{document}
    \begin{luadraw}{name=intersected_surface_Dscene}
    local ld = luadraw
    local pt3d, cpx = ld.pt3d, ld.cpx
    local M, Mc, Ms = pt3d.M, pt3d.Mc, pt3d.Ms
    local Origin, vecI, vecJ, vecK = pt3d.Origin, pt3d.vecI, pt3d.vecJ, pt3d.vecK
    local g = ld.graph3d:new{
        window3d = {-5,5,-5,5,-5,5},
        window = {-5,5,-5,5},
        viewdir = {"yz",0.75,40},
        bbox=false
    }
    local P1={M(0,0,1.5),vecK}--平面\alpha
    local P2={Origin,vecK}--平面\beta
    local m=ld.rotate3d(vecK,-45,{Origin,vecI})--平面gamma的法向量
    local P3={M(0,0,0.75),m}

    local O1,u1,v1=ld.orthoframe(P1)--alpha的正交基
    local O2,u2,v2=ld.orthoframe(P2)--beta的正交基 
    local O3,u3,v3=ld.orthoframe(P3)--gamma的正交基
    local a = ld.interPP(P1, P3)--计算交线
    --g:Dline3d(a, "Navy, very thick")--画交线
    local b = ld.interPP(P2, P3)--计算交线
    --g:Dline3d(b, "Navy, very thick")--画交线
    ld.Hiddenlines = true; ld.Hiddenlinestyle="dashed"
    g:Dscene3d(
        g:addPlane(P1,{contrast=0,rectangle={u1,4,2},edge=true,edgecolor="cyan"}),
        g:addPlane(P2,{contrast=0,rectangle={u2,4,2},edge=true,edgecolor="DarkBlue"}),
        g:addPlane(P3,{contrast=0,rectangle={u3,4,2},edge=true,edgecolor="black"}),
        g:addLine(a,{color="red",scale=0.2}),
        g:addLine(b,{color="red",scale=0.2})

    ) 
    g:Dlabel3d(
            "$\\alpha$",-2*u1-v1+O1,{pos="NE",node_options="cyan,xshift=0.3cm"},
            "$\\beta$",-2*u2-v2,{pos="NE",node_options="text=blue,xshift=0.4cm",dist=0},
            "$\\gamma$",2*u3-v3+O3,{pos="NE",node_options="xshift=-0.1cm"}
        )
    local A= a[1]+1.3*a[2]--直线上取个点,l[1]为直线上的点,l[2]为直线D的方向向量. 
    local C= b[1]+1.3*b[2]
    --g:Ddots3d({A,C}, "cyan,scale=2")
    g:Dlabel3d(
        "$a$",A,{pos="W",node_options="red"},
        "$b$",C,{pos="W",node_options="red"}
    )
    --g:Dpolyline3d({{Origin,3*vecI},{Origin,3*vecJ},{Origin,3*vecK}}, "thick,-Stealth")--辅助坐标轴简约代码
    g:Show()
    \end{luadraw}
\end{document}
]]>
https://ask.latexstudio.net/ask/question/18084.html Sun, 04 Oct 2026 21:11:36 +0800
如何绘制棱柱的外接球? 如图,如何绘制棱柱的外接球:

image.png

]]>
https://ask.latexstudio.net/ask/question/18081.html Wed, 23 Sep 2026 23:03:16 +0800
如何绘制圆柱的外接球? 如何绘制圆柱的外接球:

image.png

]]>
https://ask.latexstudio.net/ask/question/18080.html Wed, 23 Sep 2026 22:59:28 +0800
MacOS的Texworks设置中添加TeX及相关程序路径后,无法保存 iMac「版本MacOS 10.15.8」上的TeXworks,版本0.6.11 ("github") [r.7951fd8],在添加texlive2026相关程序路径后,可以正常的编译tex文件。但当退出texworks重新打开后,相应的设置修改无法保存,仍然需要再次手动添加路径。请问各位大佬有没有遇到类似问题,如何解决?

我添加的是 makeglossaries的路径:/usr/local/texlive/2026/texmf-dist/scripts/glossaries/,以及 tex命令路径:/usr/local/texlive/2026/bin/x86_64-darwinlegacy

有意思的是,我添加的makeglossaries工具配置却可以保存,退出后不会丢失。

添加路径如下图: 0c9c24a68ab9c73ff7fd79da733e5dda.png

添加工具配置如下图: e70118a9c1d818720eea90732b2e3fed.png

]]>
https://ask.latexstudio.net/ask/question/18077.html Tue, 22 Sep 2026 20:46:56 +0800
如何绘制正四棱锥的外接球? 如题,希望绘制如下的正四棱锥的外接球:

image.png

]]>
https://ask.latexstudio.net/ask/question/18076.html Tue, 22 Sep 2026 13:34:42 +0800
如何绘制长方体的外接球? 如题,如何绘制长方体的外接球:

image.png

]]>
https://ask.latexstudio.net/ask/question/18075.html Tue, 22 Sep 2026 01:42:29 +0800
如何绘制球的内接圆锥? 如题,希望绘制这个球的内接圆锥:

image.png

]]>
https://ask.latexstudio.net/ask/question/18074.html Tue, 22 Sep 2026 01:37:53 +0800
如何绘制正方体的棱切球? 如题,希望绘制下面的3D图像:

image.png

]]>
https://ask.latexstudio.net/ask/question/18072.html Mon, 21 Sep 2026 16:56:25 +0800
如何绘制棱台的外接球? 如题,希望绘制这幅图:

image.png

]]>
https://ask.latexstudio.net/ask/question/18071.html Mon, 21 Sep 2026 01:24:30 +0800
如何绘制面面垂直模型的外接球? 如题,希望绘制如下的图片:

image.png

]]>
https://ask.latexstudio.net/ask/question/18070.html Mon, 21 Sep 2026 00:09:53 +0800
绘制二面角模型的外接球? 如题,希望复刻下面这幅图:

image.png

]]>
https://ask.latexstudio.net/ask/question/18069.html Sun, 20 Sep 2026 21:03:27 +0800
绘制共斜边模型的外接球? 如题,希望绘制下面这幅图:

image.png

]]>
https://ask.latexstudio.net/ask/question/18068.html Sun, 20 Sep 2026 18:02:14 +0800
并排的两个minipage的基线问题? 考虑如下的模板文件mathatlas.sty以及MWE:

\documentclass[12pt]{book}
\usepackage{mathatlas}
\usepackage{lipsum}
\presetAnswer
\begin{document}

\begin{exercise}[S]
\res{2026·四川巴中期末}\par
在三棱柱$A_1B_1C_1-ABC$中,$D$是$BC_1$的中点,且
$\overrightarrow{AA_1} = \vec{a}, \overrightarrow{AB} = \vec{b}, \overrightarrow{AC} = \vec{c}$,则$\overrightarrow{A_1D}=$
\begin{choices}
\item $\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $-\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $\frac{1}{2}\vec{a} - \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} - \frac{1}{2}\vec{c}$
\end{choices}
\end{exercise}

\begin{exercise}[S]
\res{2026·四川巴中期末}\par
在三棱柱$A_1B_1C_1-ABC$中,$D$是$BC_1$的中点,且
$\overrightarrow{AA_1} = \vec{a}, \overrightarrow{AB} = \vec{b}, \overrightarrow{AC} = \vec{c}$,则$\overrightarrow{A_1D}=$

\noindent\begin{minipage}[t]{.78\linewidth}
\begin{choices}
\item $\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $-\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $\frac{1}{2}\vec{a} - \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} - \frac{1}{2}\vec{c}$
\end{choices}
\end{minipage}\hfill%
\begin{minipage}[t]{.2\linewidth}
\lipsum[2][1-2]
\end{minipage}
\end{exercise}

\begin{exercise}[S]
\res{2026·四川巴中期末}\par
在三棱柱$A_1B_1C_1-ABC$中,$D$是$BC_1$的中点,且
$\overrightarrow{AA_1} = \vec{a}, \overrightarrow{AB} = \vec{b}, \overrightarrow{AC} = \vec{c}$,则$\overrightarrow{A_1D}=$

\noindent\begin{minipage}[t]{.78\linewidth}
\begin{choices}
\item $\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $-\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $\frac{1}{2}\vec{a} - \frac{1}{2}\vec{b} + \frac{1}{2}\vec{c}$
\item $\frac{1}{2}\vec{a} + \frac{1}{2}\vec{b} - \frac{1}{2}\vec{c}$
\end{choices}
\end{minipage}\hfill%
\begin{minipage}[t]{.2\linewidth}
\includegraphics[width=\linewidth,height=3cm]{example-image-duck}
\end{minipage}
\end{exercise}

\end{document}

image.png

为何这里的对齐方式不是 \begin{minipage}[t]{.2\linewidth} 所显示的「Top」?如何优雅地让他们在顶部对齐?

]]>
https://ask.latexstudio.net/ask/question/18064.html Thu, 10 Sep 2026 09:39:55 +0800
公式编号受插图影响的问题 \documentclass[10pt, twoside]{ctexbook} \usepackage[paperwidth=185mm, paperheight=260mm, left=18.5mm, right=18.5mm, top=25.5mm, bottom=25.5mm]{geometry} \usepackage{amsmath} \usepackage{caption} \usepackage{graphicx} \usepackage{wrapstuff} \begin{document} \begin{wrapstuff}[r,top=2] \parbox{0.3\linewidth}{ \centering \includegraphics[width=\linewidth]{example-image} \captionof{figure}{什么原因} \label{fig:4-3-2} } \end{wrapstuff} 如图 \ref{fig:4-3-2} 所示,在图片的左侧,公式的编号是不连续的,不知道什么原因呢: \begin{equation} 1 +1 = 2 \label{eq:1} \end{equation} 上面是第一个公式编号是 $1$。 我隐身了吗? \begin{equation} 2 +2 =4 \label{eq:} \end{equation} 我也隐身了呢 \begin{equation} 3 + 3= 6 \label{eq:3} \end{equation} 下面的公式怎么回事呢,上面的内容都没了呢 \begin{equation} 4 + 4 = 8 \label{eq:4} \end{equation} 怎么跳跃这么大呢。 \end{document}

编译结果: image.png 预期结果: 希望公式编号正常, 内容正常。

]]>
https://ask.latexstudio.net/ask/question/18063.html Fri, 28 Aug 2026 11:02:43 +0800
受 capiton 影响的缩进问题 \documentclass[10pt, twoside]{ctexbook} \usepackage[paperwidth=185mm, paperheight=260mm, left=18.5mm, right=18.5mm, top=25.5mm, bottom=25.5mm]{geometry} \usepackage{caption} \usepackage{tabularray} \NewTblrTheme{notag}{ \DefTblrTemplate{caption-tag}{default}{} \DefTblrTemplate{caption-sep}{default}{} \addtocounter{table}{-1} } \usepackage{zhlipsum} \begin{document} \zhlipsum[1] \captionof{table}{我的表哥} \hfill 单位\underline{\hspace{4\ccwd}}m\phantom{单位}\\[-25pt] \begin{longtblr}[ theme = notag, ]{colspec = {*{6}{X[c]}}, rowspec = {|Q[m]|*{3}{Q[m]|}}, hline{1,Z} = {1pt}, row{1-Z} = {font = \footnotesize}, } 记录 & & & & & & \\ 数量 & & & & & & \end{longtblr} \zhlipsum[1-2] \end{document}

预览状态:

image.png

问题描述: 表格之间的段落缩进不收影响, 之后的段落缩进收到影响, 这是什么原因导致的呢?

尝试:

  1. 自然空行不起作用;
  2. \\ 不起作用;
  3. \par 也不起作用;
  4. \null\par 也不起作用。
]]>
https://ask.latexstudio.net/ask/question/18062.html Wed, 26 Aug 2026 16:36:45 +0800
KaoNotes|多语言宽边注释学术 LaTeX 笔记模板 试用 KaoNotes|多语言宽边注释学术 LaTeX 笔记模板 采用XeLatex 编译,出现如下错误

! LaTeX Error: Command \c@proposition already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.160     \declaretheorem
                         [
? 

Process has been terminated ...

是 kaotheorems.sty 这个文件中的定义 字体配制在 kao.sty 文件的 1020 行

模版下载链接 https://www.latexstudio.net/index/details/index/mid/5064.html 或者 https://github.com/AlexandraSloan3/kaonotes

]]>
https://ask.latexstudio.net/ask/question/18060.html Sun, 23 Aug 2026 21:50:47 +0800
在VScode中预览 请问在VScode里,latex的常用插件安装了,在设置里也配置了。但是,每次想要预览一下PDF文档时,直接编译的PDF仿佛一直在加载中,需要单独去把文件夹中的pdf文档点一下才能出来预览结果。

205176ca2d3898a8b87aa16f6780580b.png

2点击.png

]]>
https://ask.latexstudio.net/ask/question/18058.html Fri, 14 Aug 2026 22:13:41 +0800
为何感觉TeXstudio 4.9.6 (git 4.9.6),好像不怎么稳定 问题 1.报PDF不合法、损坏或正在生成,但不指出具体错误 2.同样的文档,两个都装的TeXstudio 4.9.6 (git 4.9.6)电脑,跑出来俩结果。 3.使用4.9.5运行顺利运行并显示的文档,跑4.9.6就提示不合法、损坏或正在生成

]]>
https://ask.latexstudio.net/ask/question/18057.html Sun, 02 Aug 2026 21:38:38 +0800
让unicode-math的range参数兼容yhmath提供的「圆括号」? 本问题是这个问题的 follow-up:

\documentclass{article}
% \usepackage{yhmath}%<---被覆盖,不起作用
\usepackage[no-math]{fontspec}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
\setmathfont[
    range={
        up/{num,latin,Latin,greek,Greek},
        it/{latin,Latin,greek,Greek},
        bfup/{num,latin,Latin,greek,Greek},
        bfit/{latin,Latin,greek,Greek},
        "0021,"002C,"002E,"003B,"003F
        }
]{texgyretermes-math.otf}
\usepackage{yhmath}%<---报错
\begin{document}

123abcABC,.;?! +-*/

$123abcABC,.;?!\alpha\beta\Gamma\Delta$ 

\[
\iint_S \vec{F}\cdot d\vec{S},
\oint_C \vec{B}\cdot d\vec{l},
\sum_{i=1}^{N}a_i,
\prod_{k=1}^{n}(x-x_k)
\]

\[
\begin{bmatrix}
    \dfrac{\partial^2 f}{\partial x^2} &
    \dfrac{\partial^2 f}
    {\partial x \partial y} \\
    \dfrac{\partial^2 f}
    {\partial x \partial y} &
    \dfrac{\partial^2 f}{\partial y^2}
\end{bmatrix} 
=
\begin{pmatrix}
            a_{11} & a_{12} & \cdots & a_{1n} \\
            a_{21} & a_{22} & \cdots & a_{2n} \\
            \vdots & \vdots & \ddots & \vdots \\
            a_{n1} & a_{n2} & \cdots & a_{nn}
\end{pmatrix}
\]    

\end{document}

这会报错:

! LaTeX Error: Command `\arrowvert' already defined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.57 ...athord}{symbols}{"6A}{yhlargesymbols}{"3C}

? 

如何在保留unicode-math的拼字体功能的前提下,继续使用yhmath提供的“圆括号”呢?

]]>
https://ask.latexstudio.net/ask/question/18055.html Mon, 27 Jul 2026 00:46:04 +0800
如何替换公式中数字、字母、希腊字母、标点符号为罗马体不影响其他数学符号字体? 排版数学公式时,想把数学公式中的数字、字母、希腊字母、sin、cos、lim等排版成times字体,积分号、sum、[]、{}、()保留原有的美观性,采取何种方法完美解决?以下是我的代码

\documentclass[
a4paper,
twoside,
titlepage,
openright,
no-math,
]{ctexbook}

\RequirePackage{amsmath,datatool,amsthm,bm} 
%\RequirePackage 是“内核级强制加载”,\usepackage 是“文档级正常加载”。
\RequirePackage{
    amssymb,
    latexsym,
    textcomp,
    mathrsfs,
    euscript,
    yhmath
}
\usepackage{mathtools}       % AMS 数学增强
\usepackage{upgreek}         % 直立希腊字母(单位、常数)
\usepackage{siunitx}         % 单位、千分号、摄氏度等
\sisetup{
    per-mode = symbol,  %分数形式的“每”用符号 /表示,而不是分式,如:m/s
    inter-unit-product = \ensuremath{{}\cdot{}}, %复合单位之间用“点乘 ·”连接,如:\SI{10}{N.m},输出10 N·m
    group-separator = {,},  %数字千分位分隔符使用英文逗号,如:\num{1234567.89},输出1,234,567.89。
    detect-all, 
    %让 siunitx自动检测当前字体/字号/粗细,跟随周围文本的:字体族(Roman / Sans)、
    %字号(\large, \small)、粗体 / 斜体;单位、数字不会“跳出”正文风格
    exponent-product = \times,    % 科学计数法用 ×
    output-decimal-marker = {.},  % 小数点用 .
}

%保护数学公式不被拉伸,正文\setstretch{1.5}会污染数学公式行距,导致带括号()的公式、矩阵丑陋。
\AtBeginDocument{
    \everymath{\linespread{1}\selectfont}
    \everydisplay{\linespread{1}\selectfont}
}

% ---------- 数学排版习惯 ----------
\allowdisplaybreaks        % 允许公式跨页
\setlength{\jot}{6pt}       % 公式行距
\everymath{\displaystyle}  % 正文公式也用 display 风格(可选)
% ---------- 自定义数学算子 ----------
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\argh}{argh}
\DeclareMathOperator*{\nut}{Nut}
% ---------- 微分 d 正体 ----------
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
\newcommand{\Diff}{\mathop{}\!\mathrm{D}}
% ---------- 定理环境 ----------
\newtheorem{theorem}{定理}
\newtheorem{lemma}[theorem]{引理}
\newtheorem{corollary}[theorem]{推论}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{定义}

% ---------- 数学排版习惯 ----------
\allowdisplaybreaks        % 允许公式跨页
\setlength{\jot}{6pt}       % 公式行距
%\everymath{\displaystyle}  % 正文公式也用 display 风格(可选)

\begin{document}
    \chapter{数学公式排版}

    In text:
    $\lim_{n \to \infty}
    \sum_{k=1}^n \frac{1}{k^2}
    = \frac{\pi^2}{6}$.
    In display:
    \[
    \lim_{n \to \infty}
    \sum_{k=1}^n \frac{1}{k^2}
    = \frac{\pi^2}{6}
    \]

    % ---------- 1. 拉丁字母 ----------
    \[
    a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
    \]
    \[
    A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
    \]

    % ---------- 2. 希腊字母 ----------
    \[
    \alpha,\beta,\gamma,\delta,\epsilon,\zeta,\eta,\theta,
    \iota,\kappa,\lambda,\mu,\nu,\xi,\pi,\rho,\sigma,\tau,
    \upsilon,\phi,\chi,\psi,\omega
    \]
    \[
    \Gamma,\Delta,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega
    \]

    % ---------- 5. 黑板粗体(数域) ----------
    \[
    \mathbb{R},\mathbb{C},\mathbb{H},\mathbb{Q},\mathbb{Z},\mathbb{N}
    \]

    % ---------- 6. 花体 / 手写体 ----------
    \[
    \mathcal{A},\mathcal{B},\mathcal{H},\mathcal{L},\mathcal{F}
    \]
    \[
    \mathscr{A},\mathscr{B},\mathscr{G}
    \]

    % ---------- 7. 哥特体(群、代数) ----------
    \[
    \mathfrak{g},\mathfrak{h},\mathfrak{su}(2),\mathfrak{so}(3)
    \]

    % ---------- 8. 数学算符 ----------
    \[
    \sin x,\cos x,\tan x,\log x,\ln x,\exp x
    \]
    \[
    \lim_{x\to0},\sum_{n=1}^{\infty},\prod_{k=1}^{N}
    \]
    \[
    \int_{0}^{\infty}e^{-x^2}\,dx
    \]

    % ---------- 9. 微分与导数 ----------
    \[
    \frac{d f}{d t},
    \frac{\partial u}{\partial t},
    \nabla f,\nabla\cdot\vec{E},\nabla\times\vec{B}
    \]
    \[
    \phi,\vec{E},\vec{B}
    \]

    % ---------- 10. 物理常量与单位 ----------
    \[
    c = \SI{2.998e8}{m/s},\quad
    h = \SI{6.626e-34}{J.s},\quad
    k_B = \SI{1.381e-23}{J/K}
    \]

    % ---------- 11. 关系符与箭头 ----------
    \[
    =,\neq,\approx,\sim,\propto,\equiv,
    \leq,\geq,\ll,\gg
    \]

    \begin{equation}
        \displaystyle
        \mathbf{A} =
        \begin{pmatrix}
            a_{11} & a_{12} & \cdots & a_{1n} \\
            a_{21} & a_{22} & \cdots & a_{2n} \\
            \vdots & \vdots & \ddots & \vdots \\
            a_{n1} & a_{n2} & \cdots & a_{nn}
        \end{pmatrix}
    \end{equation}

    Pascal's rule is
    \[
    \binom{n}{k} =\binom{n-1}{k}
    + \binom{n-1}{k-1}
    \]  
    In text:
    $\sum_{i=1}^n \quad
    \int_0^{\frac{\pi}{2}} \quad
    \oint_0^{\frac{\pi}{2}} \quad
    \prod_\epsilon $ \\
    In display:
    \[\sum_{i=1}^n \quad
    \int_0^{\frac{\pi}{2}} \quad
    \oint_0^{\frac{\pi}{2}} \quad
    \prod_\epsilon \]
    $\Bigl((x+1)(x-1)\Bigr)^{2}$\\
    $\bigl( \Bigl( \biggl( \Biggl( \quad
    \bigr\} \Bigr\} \biggr\} \Biggr\} \quad
    \big\| \Big\| \bigg\| \Bigg\| \quad
    \big\Downarrow \Big\Downarrow
    \bigg\Downarrow \Bigg\Downarrow$

    \[ \mathbf{X} = \left(
    \begin{array}{cccc}
        x_{11} & x_{12} & \ldots & x_{1n}\\
        x_{21} & x_{22} & \ldots & x_{2n}\\
        \vdots & \vdots & \ddots & \vdots\\
        x_{n1} & x_{n2} & \ldots & x_{nn}\\
    \end{array} \right) \]  
    \[
    \begin{pmatrix}
        a_{11}&a_{12}&\ldots&a_{1n}\\
        a_{21}&a_{22}&\ldots&a_{2n}\\
        \hdotsfor{4}\\
        a_{n1}&a_{n2}&\ldots&a_{nn}\\
    \end{pmatrix}
    \]
    和
    \[\begin{pmatrix}
        a_{11}&a_{12}&\ldots&a_{1n}\\
        a_{21}&a_{22}&\ldots&a_{2n}\\
        \vdots &\vdots & &\vdots\\
        a_{n1}&a_{n2}&\ldots&a_{nn}\\
    \end{pmatrix}\]
    \[
    \to,\rightarrow,\leftarrow,\leftrightarrow,
    \Rightarrow,\Leftarrow,\Leftrightarrow
    \]  
    % ---------- 12. 集合与逻辑 ----------
    \[
    \in,\notin,\subset,\supset,\cup,\cap,\emptyset
    \]
    \[
    \wedge,\vee,\neg,\forall,\exists
    \]

    % ---------- 13. 特殊物理符号 ----------
    \[
    \hbar,\ell,\wp,\aleph,\beth
    \]

    \[
    \begin{bmatrix}
        x_{11} & x_{12} & \ldots & x_{1n}\\
        x_{21} & x_{22} & \ldots & x_{2n}\\
        \vdots & \vdots & \ddots & \vdots\\
        x_{n1} & x_{n2} & \ldots & x_{nn}\\
    \end{bmatrix}
    \]

    \[
    \mathbf{H}=
    \begin{bmatrix}
        \dfrac{\partial^2 f}{\partial x^2} &
        \dfrac{\partial^2 f}
        {\partial x \partial y} \\[8pt]
        \dfrac{\partial^2 f}
        {\partial x \partial y} &
        \dfrac{\partial^2 f}{\partial y^2}
    \end{bmatrix}
    \]  
    \[
    r = \frac
    {\sum_{i=1}^n (x_i- x)(y_i- y)}
    {\displaystyle \left[
        \sum_{i=1}^n (x_i-x)^2
        \sum_{i=1}^n (y_i-y)^2
        \right]^{1/2} }
    \]  
    \[ |x| =
    \begin{cases}
        -x & \text{if } x < 0,\\
        0 & \text{if } x = 0,\\
        x & \text{if } x > 0.
    \end{cases} \]  
    % ---------- 15. 交换子与对易关系 ----------
    \[
    [A,B]=AB-BA,\quad
    [\hat{x},\hat{p}] = i\hbar
    \]
    % ---------- 16. 大运算符 ----------
    \[
    \int\!\!\int_S \vec{F}\cdot d\vec{S},
    \oint_C \vec{B}\cdot d\vec{l},
    \sum_{i=1}^{N}a_i,
    \prod_{k=1}^{n}(x-x_k)
    \]

    \[
    \mathbf{H}=
    \begin{bmatrix}
        \dfrac{\partial^2 f}{\partial x^2} &
        \dfrac{\partial^2 f}
        {\partial x \partial y} \\[8pt]
        \dfrac{\partial^2 f}
        {\partial x \partial y} &
        \dfrac{\partial^2 f}{\partial y^2}
    \end{bmatrix}
    \]  
    \begin{gather*}
        \int\int f(x)g(y)
        \diff x \diff y \\
        \int\!\!\!\int
        f(x)g(y) \diff x \diff y \\
        \iint f(x)g(y) \diff x \diff y \\
        \iint\quad \iiint\quad \idotsint
    \end{gather*}   
    % ---------- 17. 矩阵 ----------
    \[\left(\begin{array}{cccc}
        a_{11} & a_{12} & \cdots & a_{1n} \\
        &a_{22} & \cdots &a_{2n} \\
        & & \ddots & \vdots \\
        \multicolumn{2}{c}{\raisebox{1.3ex}[0pt]{\Huge0}}
        & &a_{nn}
    \end{array}\right)
    \]
    \[\begin{pmatrix}
        a_{11} & a_{12} & \cdots & a_{1n} \\
        &a_{22} & \cdots &a_{2n} \\
        & & \ddots & \vdots \\
        \multicolumn{2}{c}{\raisebox{1.3ex}[0pt]{\Huge0}}
        & &a_{nn}
    \end{pmatrix}
    \]  
    % ---------- 18. 分段函数 ----------
    \[
    f(x)=
    \begin{cases}
        x^2,&x\ge0\\
        -x,&x<0
    \end{cases}
    \]  
    $$\left(\dfrac{\dfrac{3}{5}}{8+x+\dfrac{6a}{2B}}+6=14\right)$$
\end{document}

使用unicode-math包加载外置字体,基本实现,但是矩阵的括号()压扁变丑、运算符\sum变窄难看;使用``` \usepackage[no-math]{fontspec}


![ScreenShot_2026-07-26_182649_262.png](https://pics.latexstudio.net/uploads/20260726/c590da12ab5db39c87ddb283b37afb38.png)
]]>
https://ask.latexstudio.net/ask/question/18054.html Sun, 26 Jul 2026 18:29:57 +0800