LaTeXStudio.net 问答 RSS 最新问答 https://ask.latexstudio.net/addons/ask/rss/index Tue, 22 Jul 2025 14:34:23 +0800 请教大佬,如何在elsevier官方模板下将整个参考文献设置成可点击的超连接形式 b336dbcc1fac0d8f0929c15ed1747f1d.png

]]>
https://ask.latexstudio.net/ask/question/17847.html Tue, 22 Jul 2025 11:26:27 +0800
`cleveref` 引用名称不正确 操作系统:Windows 11

TeX 发行版:Tex Live 2025

描述问题: 使用 amsthm 定义和 thm 环境同计数器的 lem 环境,而后用 cleveref\cref 引用,发现在本地 TeX Live 2025 编译后,定理名称全显示 thm 名称。

最小工作示例(MWE)

\documentclass{article}
\usepackage{amsthm}
\usepackage{cleveref}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\crefname{lem}{lemma}{lemmas}
\Crefname{lem}{Lemma}{Lemmas}

\begin{document}
  \begin{thm}\label{thm}
    foo
  \end{thm}
  \begin{lem}\label{lem}
    foo
  \end{lem}
  \cref{lem}, \Cref{lem}
\end{document}

在 texpage 和 overleaf 上测试上述代码,\cref{lem} 均可显示名称为 lemma,然而在本地 texlive 2025 上测试上述代码,结果如图所示 b6a28aa5c6b0c2cc0c6b3cfef857d38e.png

]]>
https://ask.latexstudio.net/ask/question/17845.html Mon, 21 Jul 2025 16:29:17 +0800
给曲线加箭头,但是连接效果极差,寻找更优的解决方法 曲线上的箭头仍然是直的,并且连接效果极差,这里与线重叠了

有没有好的方法以实现曲线箭头,目的是想实现箭头和线一样宽的样式

image.png image.png

\documentclass[tikz,border=5pt]{standalone}
\usepackage[UTF8]{ctex} % 加载中文支持
\usepackage{pgfplots} % 核心绘图库
\usepackage{bm} % 或 
\usepackage{amsmath}
\usepackage{silence}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}

\definecolor{ccqqqq}{rgb}{0.8,0,0}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1}
% 定义 Times New Roman 字体命令


\WarningFilter{latexfont}{} % 过滤所有字体警告
\pgfplotsset{compat=1.18} % 版本兼容性设置
\usetikzlibrary{positioning,arrows.meta,angles,quotes,matrix,calc,fillbetween,patterns,patterns.meta}
\usetikzlibrary{decorations.markings,intersections,spath3}
\usepgfplotslibrary{fillbetween}

\usepackage{newtxtext, newtxmath}       % Times 风格字体
\usepackage{bm}                         % 加粗数学符号
\newcommand{\bt}[1]{\bm{\mathit{#1}}}   % 自定义加粗倾斜命令


\newcommand{\axisarrow}
{axis line style = {-{Triangle[length=8pt, width=3pt]}},}   % 修正箭头语法


\pgfplotsset{
    tick_empty/.style={
        xtick=\empty,
        ytick=\empty,
        tick style={draw=none},
        major tick length=0pt
    }
}


\tikzset{axisarrow1/.tip = {Triangle[length=8pt, width=3pt]}}

\begin{document}


\begin{tikzpicture}
\begin{axis}[
axis lines=middle,
xlabel =  $x$,  
ylabel =  $y$,
xlabel style={at={(ticklabel* cs:1)}, anchor=north, below=1pt},
ylabel style={at={(ticklabel* cs:1)}, anchor=east, left=1pt},
tick_empty,
xmin=-1,
xmax=20,
ymin=-1,
ymax=20,
x=1cm,
y=1cm,
\axisarrow
]
\draw[-Triangle Cap,line width=.2cm,blue](0,0)--(1.5,1);
% \draw[line width=2pt, smooth, samples=50, domain=2:8] plot(\x,{0.5*(\x - 5)^(2)});
\draw[-{Triangle Cap[green,width=.2cm]}, line width=.2cm, blue, domain=3:4] plot(\x,{0.5*(\x - 5)^(2)});
\node[below left] at (axis cs:0,0) {$\bt{O}$};%原点
\end{axis}

\end{tikzpicture}

\end{document}
]]>
https://ask.latexstudio.net/ask/question/17844.html Mon, 21 Jul 2025 11:10:35 +0800
如何实现章节标题后根据是否直接接正文自动插入额外垂直间距? 在使用 ctexbook 文档类编写中文文档时,我希望实现如下逻辑:当某级标题(如 \chapter、\section、\subsection)后紧跟的是下一级标题,则正常渲染,不插入额外间距;但若标题后直接接正文内容(普通段落),则在标题和正文之间自动插入一段自定义的垂直距离(如\vspace{2em})。这个需求不能通过简单设置 afterskip 解决,因为它会作用于所有情况,无法区分是否有子标题。请问如何优雅地实现该自动判断逻辑,并与 \CTEXsetup 设定的章节样式兼容?

附上最小可复现示例代码:

\documentclass[UTF8,oneside,a4paper,12pt]{ctexbook}
\usepackage{ctex}
\CTEXsetup[
    name={},
    break = ,
    number={\arabic{chapter}}, % 章节编号设置为阿拉伯数字格式
    format+={\zihao{-2}\heiti},
    aftername={\,\,\,},
    beforeskip={-1.5em},
    afterskip={1.3em}
]{chapter}

\CTEXsetup[
    format={\zihao{4}\heiti},
    nameformat+={\zihao{4}\heiti},
    aftername={\,\,\,},
    titleformat={\zihao{4}\heiti},
    beforeskip={0.3em},
    afterskip={0.1em}
]{section}

\CTEXsetup[
    format={\zihao{-4}\heiti},
    nameformat+={\zihao{-4}\heiti},
    aftername={\,\,\,},
    titleformat={\zihao{-4}\heiti},
    beforeskip={0em},
    afterskip={0.62em}
]{subsection}

\CTEXsetup[
    format={\zihao{-4}\heiti},
    nameformat+={\zihao{-4}\heiti},
    aftername={\,\,\,},
    titleformat={\zihao{-4}\heiti},
    beforeskip={0ex},
    afterskip={0ex}
]{subsubsection}

\setcounter{secnumdepth}{3}

\begin{document}

\chapter{这是章标题这是章标题这是章标题}
\section{SECTION-SECTION-SECTION-SECTION}
\subsection{SUBSECTION-SUBSECTION-SUBSECTION-SUBSECTION}
\subsubsection{SUBSUBSECTION-SUBSUBSECTION-SUBSECTION-SUBSECTION}

\vspace{3em}

\chapter{这是章标题这是章标题这是章标题}
正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文
\section{SECTION-SECTION-SECTION-SECTION}
正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文
\subsection{SUBSECTION-SUBSECTION-SUBSECTION-SUBSECTION}
正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文
\subsubsection{SUBSUBSECTION-SUBSUBSECTION-SUBSECTION-SUBSECTION}
正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文
\end{document}
]]>
https://ask.latexstudio.net/ask/question/17843.html Sun, 20 Jul 2025 16:44:41 +0800
图片中等号上下的字母大小不一样 图片中等号上面的字母如何调整到与等号下面的相当?

image.png

]]>
https://ask.latexstudio.net/ask/question/17842.html Sat, 19 Jul 2025 22:50:32 +0800
如何绘制并调整好带斜向省略号的连分数? 1.png

这是一个连分数,目前网络上能够找到的,包括几种ai给出的方案都不能够实现图中的效果.

主要问题在于,如何让其中的斜省略号跨越多行.下面是可能有用的latex代码:

\documentclass{article}
\usepackage{amsmath,amsfonts}
\begin{document}
    \begin{align*}
        q_{0} + \cfrac{1}{q_{1} + \cfrac{1}{q_{2} + \ddots + \cfrac{1}{q_{n}}}} 
    \end{align*}
\end{document}
]]>
https://ask.latexstudio.net/ask/question/17841.html Fri, 18 Jul 2025 20:36:18 +0800
如何绘制斜截的圆柱,要求倾斜的椭圆截面与圆柱的母线精确相切? fde60a29402b5546531917771d9103fe.png

使用下面类似的代码,关键的问题在于:斜截椭圆的「长轴端点不好确定」,很难保持其与椭圆的母线相切。

\draw (0,2.3) circle [x radius=1.3199, y radius=0.4,rotate=45];

这里的x radiusy radius怎么调都调不好...

完整代码如下:

\documentclass[tikz,border=5pt]{standalone}
\begin{document}
\begin{tikzpicture}
    % 圆柱参数
    \def\radius{1}
    \def\height{4} 

    \draw[dashed] (1,0) arc (0:180: 1 and {1/3});
    \draw (-1,0) arc (180:360: 1 and {1/3});

    \draw (\radius,0) -- (\radius,3.1); % 右侧直线
    \draw (-\radius,0) -- (-\radius,1.5); % 左侧直线

    \draw (0,2.3) circle [x radius=1.3199, y radius=0.4,rotate=45];
\end{tikzpicture}
\end{document}

image.png

]]>
https://ask.latexstudio.net/ask/question/17840.html Fri, 18 Jul 2025 09:32:48 +0800
使用elegantbook模板如何设置「示例类环境」example的计数器为「按章、节两级标题」计数? 行列式.pdf 这是我作品

Edited by Sagittarius Rover

原问题的MWE如下

\documentclass[lang=cn,11pt,twoside,openany]{elegantbook}
\geometry{paperheight=10cm}
\begin{document}%

\chapter{test}
\section{sec}

\begin{example}
test test test test
\end{example}

\begin{example}
    test test test test
\end{example}

\section{sec}

\begin{example}
    test test test test
\end{example}

\chapter{test}
\section{sec}

\begin{example}
    test test test test
    \end{example}

    \begin{example}
        test test test test
    \end{example}

    \section{sec}

    \begin{example}
        test test test test
    \end{example}
\end{document}  

image.png

这样得到的「example」按照文档所述是「按chapter」编号

image.png

如何修改为「按章、节两层计数器」编号呢?

]]>
https://ask.latexstudio.net/ask/question/17839.html Thu, 17 Jul 2025 23:42:56 +0800
使用pdfpages如何实现插入PDF实现保持「原有PDF页面大小不变」? \documentclass{article} \usepackage{pgffor} \usepackage{graphicx} \usepackage{expl3} \ExplSyntaxOn \newcommand{\safeloop}[1]{ \pdfximage{#1} \int_set:Nn \g_tmp_int {\pdflastximagepages} \int_step_i_nline:nn {\g_tmp_int} { \includegraphics[page=##1]{#1} } } \ExplSyntaxOff \begin{document} \safeloop{picture/huatu1.pdf} \end{document} ]]> https://ask.latexstudio.net/ask/question/17838.html Wed, 16 Jul 2025 20:24:52 +0800 如何解决标题汉字和英文数字基线不对齐的问题? 766b67861b8b310f560523e5974e8272.png

这里的汉字我用的设置是:

format={\zihao{-2}\songti\bfseries},
beforeskip={1.5ex plus 0.2ex minus 0.1ex},
afterskip={1.0ex plus 0.2ex}
]{section}

以及

\CTEXsetup[number={\arabic{section}. \hspace{-1.3em}}]{section}

然后有一个主字体是 time new roman。这样就导致了这个问题

]]>
https://ask.latexstudio.net/ask/question/17836.html Tue, 15 Jul 2025 21:23:48 +0800
如何进一步调整下面nicematrix代码的「行高和行宽」以及「大括号的长度和位置」使其匀称美观? 如题,下面的MWE:

Claim: \Hbrace\Vbrace只能在v7.1以上的nicematrix下运行,理论上需要TL25.

\documentclass{article}
\usepackage[OT1]{fontenc}
\usepackage{eulervm}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\usepackage{nicematrix}
\setlength{\extrarowheight}{1mm}
\begin{document}

\[ 
\begin{pNiceMatrix}[
    first-row,
    last-col=5,
    cell-space-limits=5pt,
    xdots/horizontal-labels
]
    \Hbrace{1}{n_1} & 
    \Hbrace{1}{n_2} & 
    \cdots          & 
    \Hbrace{1}{n_s} & \\
    A_{11} & A_{12} & \cdots & A_{1s} & \Vbrace{1}{m_1}\\
    A_{21} & A_{22} & \cdots & A_{2s} & \Vbrace{1}{m_2} \\
    \vdots & \vdots & {}     & \vdots & \vdots \\
    A_{r1} & A_{r2} & \cdots & A_{rs} & \Vbrace{1}{m_r} \\
\end{pNiceMatrix}
\]

\end{document}

image.png

大致还有如下问题:

  • 整个矩阵如何合理控制「宽度高度」让其「匀称、方正」
  • 如何保证每个「大括号的长度相同」,且其「高度、水平位置相同」
]]>
https://ask.latexstudio.net/ask/question/17833.html Mon, 14 Jul 2025 21:14:30 +0800
tcolorbox宏包overlay绘图透明度问题 \documentclass{article} \usepackage[UTF8]{ctex} \usepackage[most]{tcolorbox} \usetikzlibrary{patterns} \usepackage{zhlipsum} \begin{document} \tcbset{ frogbox/.style={ enhanced, colback=green!10, colframe=green!65!black, enlarge top by=5.5mm, overlay={ \foreach \x in {2cm, 3.5cm} { \begin{scope}[shift={([xshift=\x]frame.north west)}] \path[draw=green!65!black, fill=green!10, line width=1mm] (0,0) arc (0:180:5mm); \path[fill=black] (-0.2,0) arc (0:180:1mm); \end{scope} } } }, ribbon/.style={ overlay app={ \path[ fill=blue!75!white, draw=blue, double=white!85!blue, preaction={fill=blue!75!white}, line width=0.1mm, double distance=0.2mm, pattern=fivepointed stars, pattern color=white!75!blue ] ([xshift=-1cm, yshift=-2cm]frame.north east) -- ++(-1,1) -- ++(-0.5,0) -- ++(1.5,-1.5) -- cycle; } } } \begin{tcolorbox}[frogbox, title=My title] This is a \textbf{tcolorbox}. \end{tcolorbox} \begin{tcolorbox}[frogbox, ribbon, title=My title] \zhlipsum[1-3] \end{tcolorbox} \end{document}

C5065BFC64AE4F75EA799597F41563D9.png

请教老师们,如何完全遮住文字?

]]>
https://ask.latexstudio.net/ask/question/17830.html Mon, 14 Jul 2025 15:56:42 +0800
关于 LaTeX 的「要」与「不要」的问题? 大家在使用 LaTeX 时,肯定为功能相似的命令或平时习惯所困扰过,大多数问题在于「什么是最佳实施方法?」这点上,于是我列举一些问题,希望得到充分的回答。当然回答者可以自己(或联系我)补充更多没考虑到的问题。

另外,在回答问题时候,希望明确指出回答的是第几点问题(你不必回答所有的问题!),希望能在第一句给出结论,后面再进行具体的分析。

下面是问题:

  1. 数学模式里,为什么要 $...$ 而不要 \(...\)
  2. 数学模式里,为什么要 \[...\] 而不要 $$...$$?如果加上 equation* 环境最佳选择又是什么?
  3. 数学模式里,为什么要 align 环境而不要 eqnarray 环境?
  4. 数学模式里,为什么要 matrix,bmatrix,pmatrix,vmatrix,Vmatrix 等环境而不要 array 环境去实现矩阵?
  5. 数学模式里,为什么要 \bigl,\bigm,\bigr 等命令处理定界符而尽量不要 \left,\right
  6. 数学模式里,箭头是使用 \to,\gets 还是 \rightarrow,\leftarrow
  7. 数学模式里,a/b,\frac,\tfrac,\dfrac,\cfrac 的区别和用法?
  8. 数学模式里,f^a_nf_n^a 的区别?如果带上撇号(')又应该怎么输入最佳?
  9. \bf,\bfseries,\mathbf,\boldmath,\unboldmath,\bm,\boldsymbol 等这几个命令的区别和用法?
  10. \par,\\,\noindent,\newline,\linebreak 和空行等这几个命令的区别和用法?
  11. 行距/行间距/段间距的区别是什么?
  12. 调整行距时,为什么推荐设定 \linespread 而非修改 \baselineskip
  13. 关于行间距的 \lineskip\lineskiplimit 两个命令的区别是什么?调整行间距的方法中使用 \setlength 还是 \openup 命令?
]]>
https://ask.latexstudio.net/ask/question/17827.html Sun, 13 Jul 2025 03:29:26 +0800
三阶行列式计算图解如何画? sanjie.jpg

]]>
https://ask.latexstudio.net/ask/question/17826.html Sat, 12 Jul 2025 20:38:51 +0800
使用addpot绘制双曲函数时,修改表达式出现报错? 同样的方法画双曲线函数,左边的由于定义域包含渐近线的零点而报错,意外给画了一条x=b,右边的定义域同样包含却正常编译,如何修改。

编译结果 image.png

        \addplot[                % 函数f(x)=1/(x-1) + 1
            domain = 1:7,        % 定义域[1,7]
            samples = 300,       % 采样点密度(值越高曲线越平滑)
            smooth,              % 平滑曲线
            % thick,             % 粗线宽
            line width = 0.5pt,  % 设置为0.5磅线宽
            blue                 % 颜色
        ] {-1/(x-7) + 1};     

以上是左侧图像

        \addplot[                % 函数f(x)=1/(x-1) + 1
            domain = 1:7,        % 定义域[1,7]
            samples = 300,       % 采样点密度(值越高曲线越平滑)
            smooth,              % 平滑曲线
            % thick,             % 粗线宽
            line width = 0.5pt,  % 设置为0.5磅线宽
            blue                 % 颜色
        ] {1/(x-1) + 1};      

以上是右侧图像

画图.tex

完整代码如下(同上文件)

\documentclass[tikz,border=5pt]{standalone}
\usepackage[UTF8]{ctex} % 加载中文支持
\usepackage{pgfplots} % 核心绘图库
\usepackage{bm} % 或 
\usepackage{amsmath}
\usepackage{silence}
\WarningFilter{latexfont}{} % 过滤所有字体警告
\pgfplotsset{compat=1.18} % 版本兼容性设置
\usetikzlibrary{positioning}
\usetikzlibrary{arrows.meta}



\begin{document}

\begin{tikzpicture}[
    node distance=1cm, % 节点间距
]

% 左侧图像节点
\node (left) {
    \begin{tikzpicture}
        \begin{axis}[
            axis lines = middle,
            %——xOy
            xlabel = $x$,  
            ylabel = $y$,
            x=0.5cm, % x轴每单位长度0.8cm
            y=0.5cm, % y轴每单位长度0.8cm
            width=11 * 0.5cm, % 根据x轴范围计算宽度
            height=6 * 0.5cm, % 根据y轴范围计算高度
            %将标签定位在x轴的​​最末端​​(刻度坐标系中,1表示100%位置)
            xlabel style={at={(ticklabel* cs:1)}, anchor=north, below=1pt},
            ylabel style={at={(ticklabel* cs:1)}, anchor=east, left=1pt},
            %
            xmin = -1, xmax = 9,
            ymin = -1, ymax = 5,
            axis line style = {-{Triangle[scale=1]}},  % 修正箭头语法
            %
            %——刻度和刻度线
            xtick = {1, 7},             %x标点
            xticklabels = {$a$, $b$},   %x自定义
            ytick = \empty,             % 隐藏y轴刻度
            tick style={draw=none},     % 隐藏所有刻度线
            title={\large $\bm{f'(x) \leq 0}$},
            title style={
                at={(0.5,0)},      % 相对位置 (x,y) ∈ [0,1]
                anchor=north,      % 锚点方向
                yshift=5pt         % 垂直偏移
            }
            ]

        %图像
        \node[below left] at (axis cs:0,0) {$O$};%原点 

        \addplot[                % 函数f(x)=1/(x-1) + 1
            domain = 1:7,        % 定义域[1,7]
            samples = 300,       % 采样点密度(值越高曲线越平滑)
            smooth,              % 平滑曲线
            % thick,             % 粗线宽
            line width = 0.5pt,  % 设置为0.5磅线宽
            blue                 % 颜色
        ] {-1/(x-7) + 1};         % 函数表达式(deg()将弧度转角度)

        \draw[dash pattern=on 1pt off 1pt, lightgray] (axis cs:7,0) -- (axis cs:7,5); % 从x=a处画垂直线
        \draw[dash pattern=on 1pt off 1pt, lightgray] (axis cs:1,0) -- (axis cs:1,1/6+1); % 从x=b处画垂直线


        % x=3 处切线
        \addplot[domain=0.7:7.3, smooth, red, line width= 0.5pt]{(1/16)*x + (17/16)};
        % x=4 处切线
        \addplot[domain=0.7:7.3, smooth, red, line width=0.5pt]{(1/9)*x + 8/9}; 


        % 在右上角添加解析式
        \node[anchor=north west, align=left, xshift=-5pt, yshift=-10pt] 
            at (axis cs:3,4) % 定位
            {\large $y=f(x)$};
        \end{axis}

    \end{tikzpicture}
};

% 右侧图像节点
\node[right=of left] (right) {
    \begin{tikzpicture}
        \begin{axis}[
            axis lines = middle,
            %——xOy
            xlabel = $x$,  
            ylabel = $y$,
            x=0.5cm, % x轴每单位长度0.8cm
            y=0.5cm, % y轴每单位长度0.8cm
            width=11 * 0.5cm, % 根据x轴范围计算宽度
            height=6 * 0.5cm, % 根据y轴范围计算高度
            %将标签定位在x轴的​​最末端​​(刻度坐标系中,1表示100%位置)
            xlabel style={at={(ticklabel* cs:1)}, anchor=north, below=1pt},
            ylabel style={at={(ticklabel* cs:1)}, anchor=east, left=1pt},
            %
            xmin = -1, xmax = 9,
            ymin = -1, ymax = 5,
            axis line style = {-{Triangle[scale=1]}},  % 修正箭头语法
            %
            %——刻度和刻度线
            xtick = {1, 7},             %x标点
            xticklabels = {$a$, $b$},   %x自定义
            ytick = \empty,             % 隐藏y轴刻度
            tick style={draw=none},     % 隐藏所有刻度线
            title={$\bm{f'(x) \geq 0}$},
            title style={
                at={(0.5,0)},      % 相对位置 (x,y) ∈ [0,1]
                anchor=north,      % 锚点方向
                yshift=5pt         % 垂直偏移
            }
            ]

        %图像
        \node[below left] at (axis cs:0,0) {$O$};%原点 

        \addplot[                % 函数f(x)=1/(x-1) + 1
            domain = 1:7,        % 定义域[1,7]
            samples = 300,       % 采样点密度(值越高曲线越平滑)
            smooth,              % 平滑曲线
            % thick,             % 粗线宽
            line width = 0.5pt,  % 设置为0.5磅线宽
            blue                 % 颜色
        ] {1/(x-1) + 1};         % 函数表达式(deg()将弧度转角度)

        \draw[dash pattern=on 1pt off 1pt, lightgray] (axis cs:1,0) -- (axis cs:1,5); % 从x=a处画垂直线
        \draw[dash pattern=on 1pt off 1pt, lightgray] (axis cs:7,0) -- (axis cs:7,1/6+1); % 从x=b处画垂直线


        % x=3 处切线
        \addplot[domain=0.7:7.3, smooth, red, line width= 0.5pt]{-0.25*x + 2.25};
        % x=4 处切线
        \addplot[domain=0.7:7.3, smooth, red, line width=0.5pt]{-1/9*x + 16/9}; 


        % 在右上角添加解析式
        \node[anchor=north west, align=left, xshift=-5pt, yshift=-10pt] 
            at (axis cs:3,4) % 定位
            {\large $y=f(x)$};
        \end{axis}

    \end{tikzpicture}

};
% 在整体图形下方添加标题节点
\node[below=10pt of current bounding box.south, 
      anchor=north]{图 \\ 3.3};

\title{123}
\end{tikzpicture}

\end{document}
]]>
https://ask.latexstudio.net/ask/question/17825.html Sat, 12 Jul 2025 13:28:01 +0800
请问这种图怎么画出来 Snipaste_2025-07-02_19-17-08.png

]]>
https://ask.latexstudio.net/ask/question/17817.html Wed, 02 Jul 2025 19:20:46 +0800
subequations环境实现含有子编号公式的对齐 我希望实现这样一种公式效果,主要是子编号和按等号对齐(下面两个等号应该像aligned环境一样可以对齐,不过好像在网页上用 不好弄出来):

    A = B + C         (1a)
D + E = F + G + H + I (1b)

我可以用

\begin{subequations}
    \begin{equation}
        A = B + C
    \end{equation}
    \begin{equation}
        D + E = F + G + H + I
    \end{equation}
\end{subequations}

来完成子编号,但这样好像不能实现对齐不同equation环境里的等式,请问有什么好的方法吗?

]]>
https://ask.latexstudio.net/ask/question/17815.html Wed, 25 Jun 2025 23:20:10 +0800
如何定制一个抄录内容超过1页时自动添加“续上页”标识的环境? 想要的效果: image.png 代码:

\documentclass{article}
\usepackage
    [papersize={10.5cm,14.85cm},
     centering,
     scale=.85,
    ]
    {geometry}
\usepackage{lipsum}
\usepackage{fancyvrb}
\pagestyle{empty}
\begin{document}
\begin{SaveVerbatim}{myverbatim}
\documentclass{article}
\usepackage
    [papersize={10.5cm,14.85cm},
     centering,
     scale=.85,
    ]
    {geometry}
\usepackage{lipsum}
\usepackage{fancyvrb}
\pagestyle{empty}
\begin{document}
\begin{Verbatim}
\title{title}
\author{author}
\date{date}
\maketitle
\section{section}
\lipsum[1]
\section{section}
\lipsum[1]
\end{document}
\end{Verbatim}
\end{SaveVerbatim}
\UseVerbatim{myverbatim}
\end{document}

额外的问题:上述抄录环境中如何将特定LaTeX代码\lipsum[1]先展开后抄录?

]]>
https://ask.latexstudio.net/ask/question/17813.html Mon, 23 Jun 2025 17:39:57 +0800
输出的PDF文档页面用「Adobe Acrobat」查看显示文字深浅不一,整体看有一坨坨的黑斑...... CTEXxeCJK宏包,以XeLaTeX编译的PDF文档,发现文档页面显示文字深浅不一,整体看有一坨坨的黑斑,如图所示。不知问题在哪?请大家指点,谢谢!

附中文字体设置:

\setCJKmainfont{NSimSun.ttf}[
    ItalicFont = simfang.ttf,
    BoldFont = FZXKTK.TTF,
    BoldItalicFont = STZHONGS.TTF,
    FallBack = simsunb.ttf
    ]

1.png

]]>
https://ask.latexstudio.net/ask/question/17810.html Sat, 21 Jun 2025 13:04:01 +0800
使用 LaTeX 的 cleveref 或相关宏包时,出现问题: \cref@override@label@type 使用不匹配 \documentclass[review,hidelinks,onefignum,onetabnum]{siamart220329} \usepackage{lipsum} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{algorithmic} \usepackage{enumitem} \usepackage{booktabs} \usepackage{multirow} \usepackage{amsopn} \usepackage{bm} \ifpdf \DeclareGraphicsExtensions{.eps,.pdf,.png,.jpg} \else \DeclareGraphicsExtensions{.eps} \fi % Add a serial/Oxford comma by default. \newcommand{\creflastconjunction}{, and~} % Used for creating new theorem and remark environments \newsiamremark{remark}{Remark} \newsiamthm{exper}{Experiment} \newsiamremark{hypothesis}{Hypothesis} \crefname{hypothesis}{Hypothesis}{Hypotheses} \newsiamthm{claim}{Claim} ...

报错行

*
\begin{theorem}\label{thm1}
...
\end{theorem} 

后面接着的\begin{proof}也报错

上述两行报错提示为:

错误: 168: Use of \cref@override@label@type doesn't match its definition. \begin{theorem}
错误: 192: Use of \cref@override@label@type doesn't match its definition. \begin{proof}

但是编译出的pdf没有任何问题,就是一直报错?

求大神指点

]]>
https://ask.latexstudio.net/ask/question/17809.html Fri, 20 Jun 2025 11:45:51 +0800