latex图片排版问题如何将两幅tikzpicture图片并列居中排版

发布于 2025-02-23 22:11:58
\documentclass{book}
\usepackage{amsfonts}
\usepackage{ctex}%使用此包可输入中文
\usepackage{amsmath,amsthm,amssymb,amscd}
\usepackage{latexsym}
\usepackage{hyperref}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{hypernat}
\usepackage{latexsym}
\usepackage{tikz}
\usepackage{color}
\usepackage{refcheck}%检查包
\usetikzlibrary{patterns}%条纹
\usepackage{makecell,booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\allowdisplaybreaks

\newtheorem{theorem}{\indent 定理}[section]
\newtheorem{corollary}[theorem]{\indent 推论}
\newtheorem{lemma}[theorem]{\indent 引理}
\newtheorem{proposition}[theorem]{\indent 命题}
\newtheorem{nature}[theorem]{\indent 性质}
\newtheorem{definition}[theorem]{\indent 定义}
\newtheorem{remark}[theorem]{\indent 注记}
\newtheorem{example}[theorem]{\indent 例}
%%%%%%%%%%%%%%%%
\makeatletter
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother
%%%%%%%%%%%%%%%%%%%罗马数字


\theoremstyle{definition}

\newcommand{\al}{\alpha}
\newcommand{\be}{\beta}
\newcommand{\va}{\varepsilon}
\newcommand{\Om}{\Omega}
\newcommand{\om}{\omega}
\newcommand{\Ga}{\Gamma}
\newcommand{\ga}{\gamma}
\newcommand{\la}{\lambda}
\newcommand{\La}{\Lambda}
\newcommand{\ro}{\rho}
\newcommand{\ri}{\rightarrow}%右箭头
\newcommand{\lri}{\longrightarrow}%右长箭头
\renewcommand{\ni}{\noindent}
\newcommand{\pa}{\partial}%偏导
\newcommand{\na }{\nabla }
\newcommand{\var}{\varphi}%\phi
\newcommand*{\dif}{\,\mathrm{d}}%微分dx
\newcommand{\sik}{\sum_{i=1}^k}
\newcommand{\siN}{\sum_{i=1}^N}


\newcommand{\vs}{\vspace}
%\newcommand{\h}{\hspace}
\newcommand{\bsy}{\boldsymbol}
\newcommand{\intrn}{\int_{\r^N}}%\r^N上的积分
%\newcommand{\H}{H^{1}(\r^N)} %H^1(\r^N) 空间

\def\r{\mathbb{R}}%实数域
\def\n{\mathbb{N}}%非负整数(自然数)
\def\z{\mathbb{Z}}%整数
\def\Q{\mathbb{Q}}%有理数域
\begin{document}
    \begin{remark}
        在情形 \Rmnum{1} 下, $O$ 能够视为 $\mathbb{R}^{2}$ 中的一个带状区域, 仅在 $\vec{v}$ 的方向上无界 (参见图 \ref{tu1}).
        \begin{figure}[h]
            \centering
            \label{tu1}
            \begin{tikzpicture}
            \draw [very thick,-]  (-2.8,3.5) -- (5.8,3.5);
            \draw [very thick,-]  (-2.8,-1.5) -- (5.8,-1.5);
            \path [draw, very thick, ->] node at (-.2,-.2) {$o$} (0,0) -- (2.5,0) node at (2.7,0.2) {$\vec{v}$};
            \path [draw, very thick, ->](0,0) -- (0,1.7)  node[right]  {$\vec{u}$};
            \path [draw, very thick, color=blue, ->] (0,0) -- (2,1.5)
            node at (2.2,1.2) {$x$};
            \node  at (6.5,2.5) {$\mathbb{R}^{2}$};
            \node  at (-1.5,1.5) {{\color{red}$O$}};
            %贝塞尔曲线
            %    \draw (-2,-1) .. controls (-1,0) .. (1,-1);
            %    \draw  (1,-1) .. controls (1,0) .. (2,-1);
            %    \draw(-2,-2) .. controls(-1,0) .. (1,-1);
            \draw [very thick, color=red,dashed,-] (-2.5,-1) .. controls (-1,-1.5) and (1.5,1)..(5.5,-1.2);
            \draw [very thick, color=red,dashed,-] (-2.5,2) .. controls (-1,1.5) and (1.5,3)..(5.5,2.2);
            \end{tikzpicture}
            \caption{$\mathbb{R}^{2}$ 上带状示意图}
        \end{figure}
    
        如果记 $S=\left\lbrace y\in \Lambda:\, V(y)\geq c_{link}\right\rbrace$, 那么集对 $(B_{0}, B)$ 与集合 $S$ 在 $\Lambda$ 中形成环绕结构 (参见图 \ref{tu2}).
        \begin{figure}[h]
            \centering
            \label{tu2}
            \begin{tikzpicture}
            \path [draw, very thick, ->] node at (-.2,-.2) {$O$} (-0.5,0) -- (8,0) node[anchor=north] {$x$};
            \path [draw,very thick, ->](0,-0.5) -- (0,6.1)  node[anchor=east]  {$y$};
            \node  at (7.5,5.5) {$\mathbb{R}^{2}$};
            \draw[very thick,blue,dashed,-] (0.5,0.5) -- (6.5,0.5) -- (6.5,5) --(0.5,5)--(0.5,0.5);
            \draw[pattern=north west lines] (3,3) circle (1.5);
            \draw [color=red]  (3,3) circle (1.5);
            \node [fill=white,rounded corners,below of=3] at (2.5,4) {$B$};
            \node at (2,1.3) {$ {\color{red}\partial B=B_{0}}$};
            \draw (5,3) circle (1.2);
            \node at (6.2,1) {$\Lambda$};
            \node at (5.5,3) {$S$};
            \end{tikzpicture}
            \caption{$\mathbb{R}^{2}$ 上环绕示意图}
            %\label{环绕示意图}
        \end{figure}
    \end{remark}
    
\end{document}

查看更多

关注者
0
被浏览
112
2 个回答
远方不远
远方不远 22小时前
这家伙很懒,什么也没写!

大哥,你的需求是什么,没写啊

Sagittarius Rover
Sagittarius Rover 22小时前
我要成为Typst糕手/(ㄒoㄒ)/~~

图书馆要闭馆惹(逃了逃了)...略微匆忙地用resizebox给了一种缩放&对齐的方法...

\documentclass{book}
\usepackage{amsfonts}
\usepackage{amsmath,amsthm,amssymb,amscd}
\usepackage{graphicx}
\usepackage{ctex}%使用此包可输入中文
\usepackage{tikz}
\usetikzlibrary{patterns}%条纹
\allowdisplaybreaks
\newtheorem{theorem}{\indent 定理}[section]
\newtheorem{remark}[theorem]{\indent 注记}
\makeatletter
\newcommand{\rmnum}[1]{\romannumeral #1}
\newcommand{\Rmnum}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother
\begin{document}

\begin{figure}[htbp]
    \begin{minipage}{.49\textwidth}
        \centering
        \label{tu1}
        \resizebox{\textwidth}{4cm}{%
            \begin{tikzpicture}
            \draw [very thick,-]  (-2.8,3.5) -- (5.8,3.5);
            \draw [very thick,-]  (-2.8,-1.5) -- (5.8,-1.5);
            \path [draw, very thick, ->] node at (-.2,-.2) {$o$} (0,0) -- (2.5,0) node at (2.7,0.2) {$\vec{v}$};
            \path [draw, very thick, ->](0,0) -- (0,1.7)  node[right]  {$\vec{u}$};
            \path [draw, very thick, color=blue, ->] (0,0) -- (2,1.5)
            node at (2.2,1.2) {$x$};
            \node  at (6.5,2.5) {$\mathbb{R}^{2}$};
            \node  at (-1.5,1.5) {{\color{red}$O$}};
            \draw [very thick, color=red,dashed,-] (-2.5,-1) .. controls (-1,-1.5) and (1.5,1)..(5.5,-1.2);
            \draw [very thick, color=red,dashed,-] (-2.5,2) .. controls (-1,1.5) and (1.5,3)..(5.5,2.2);
            \end{tikzpicture}%
        }
        \caption{$\mathbb{R}^{2}$ 上带状示意图}
    \end{minipage}\qquad
    \begin{minipage}{.49\textwidth}
        \centering
        \label{tu2}
        \resizebox{\textwidth}{4cm}{%
        \begin{tikzpicture}
            \path [draw, very thick, ->] node at (-.2,-.2) {$O$} (-0.5,0) -- (8,0) node[anchor=north] {$x$};
            \path [draw,very thick, ->](0,-0.5) -- (0,6.1)  node[anchor=east]  {$y$};
            \node  at (7.5,5.5) {$\mathbb{R}^{2}$};
            \draw[very thick,blue,dashed,-] (0.5,0.5) -- (6.5,0.5) -- (6.5,5) --(0.5,5)--(0.5,0.5);
            \draw[pattern=north west lines] (3,3) circle (1.5);
            \draw [color=red]  (3,3) circle (1.5);
            \node [fill=white,rounded corners,below of=3] at (2.5,4) {$B$};
            \node at (2,1.3) {$ {\color{red}\partial B=B_{0}}$};
            \draw (5,3) circle (1.2);
            \node at (6.2,1) {$\Lambda$};
            \node at (5.5,3) {$S$};
        \end{tikzpicture}
        }
        \caption{$\mathbb{R}^{2}$ 上环绕示意图}
    \end{minipage}
\end{figure}

\end{document}

image.png

另外...你的MWE太长,导言区还是有大量无关信息...

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览