我不太精通 Ti钾Z. 我想做一些我认为非常基本的事情:6 个矩形,里面有公式,跨越 2 列文档中的 2 列。我想要这样的东西
经过几次尝试,我接受了在框外添加文字,我走到了这一步(不是太远)
使用此代码
\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{amsthm}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{adjustbox}
\usetikzlibrary{calc,positioning,mindmap,trees,decorations.pathreplacing}
\usepackage{dblfloatfix}
\usepackage{placeins}
\begin{document}
\begin {figure*}%[!hbtp]
\centering
\begin{adjustbox}{width=\textwidth}
\begin {tikzpicture}[-latex ,auto,node distance =1.8cm and 1.5cm ,on grid,semithick,
state/.style ={ circle ,top color =white , bottom color = processblue!20,
draw,processblue , text=blue , minimum width =1 cm}]
\node[rectangle,draw] (A)
{
$ I_{x}= \int_{x_1}^{x_2} \int_{x_3}^{x_4} f(|x-x^{\prime}|)~dx^{\prime}dx \,$
};
\node[rectangle,draw] (B) [below =of A] {$\begin{aligned}\label{eq:int_hatx}
I_{x} & =\int_{x_1}^{x_2} \int_{x - x_4} ^{x - x_3} f(\widehat{x})~ d\widehat{x}~dx \, .
\end{aligned}$};
\node[rectangle,draw] (C) [right =of A] {$\begin{aligned}\label{eq:int_p_single_case1a}
&\int_{x_1}^{x_2} \int_{x - x_4} ^{x - x_3}f(\widehat{x})~d\widehat{x}~dx = \\
& \int_{x_1 - x_4} ^{x_2 - x_4} f(\widehat{x}) (\widehat{x} + x_4 - x_1)~ d\widehat{x} \nonumber \\
&+(x_2 - x_1) \int_{x_2 - x_4} ^{x_1 - x_3} f(\widehat{x}) ~d\widehat{x} \nonumber \\
& + \int_{x_1 - x_3} ^{x_2 - x_3} f(\widehat{x})(x_2 - \widehat{x} - x_3)~d\widehat{x} \, \nonumber .
\end{aligned}$};
\node[rectangle,draw] (D) [below =of C] {$blablabla$};
\node[rectangle,draw] (E) [right =of C] {$blablabla$};
\node[rectangle,draw] (F) [below =of E] {$blablabla$};
\path (A) edge [] node {Change of variable $x^{\prime}\to\widehat{x} = x - x^{\prime}$} (B);
\path (B) edge [] node {Integrate directing with respect to $x$} (C);
{\tiny }
\end{tikzpicture}
\end{adjustbox}
\end{figure*}
\end{document}
如能提供一点帮助我将非常感激。
答案1
通过使用nccmath
(for \medsize
math)和mathtools
(for multlined
and \mathrclap
)包sk,用于节点定位positioning
Ti钾Z 库:
\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
\usepackage{nccmath, mathtools}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
positioning,
quotes}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}% For dummy text. Don't use in a real document
\begin{document}
\begin{figure*}
\centering
\begin{tikzpicture}[
node distance = 12mm and 12mm,
arr/.style = {draw, -Straight Barb, thick},
lbl/.style = {font=\footnotesize, align=left, pos=0.75, right},
N/.style = {draw, semithick, minimum size=22mm},
every edge/.style = {arr},
every edge quotes/.style = {auto, font=\footnotesize, align=left}
]
\node[N] (A)
{
$\medmath{I_{x} = \int_{x_1}^{x_2}
\mathrlap{\int_{x_3}^{x_4}}
\quad f(|x-x'|)~dx'~dx}
$
};
\node[N] (B) [below=of A]
{
$\medmath{I_{x} = \int_{x_1}^{x_2}
\mathrlap{\int_{x-x_4}^{x-x_3}}
\quad f(\hat{x})~ d\hat{x}~dx.}
$
};
\node[N] (C) [right=of A]
{
$\medmath{\begin{multlined}%\label{eq:int_p_single_case1a}
\int_{x_1}^{x_2}
\mathrlap{\int_{x-x_4}^{x-x_3}}
\quad f(\hat{x}) ~d\hat{x}~dx
= \mathrlap{\int_{x_1-x_4}^{x_2-x_4} }
\quad f(\hat{x}) (\hat{x} + x_4 - x_1)~ d\hat{x} \\
{} + (x_2 - x_1)
\mathrlap{\int_{x_2-x_4}^{x_1-x_3}}
\quad f(\hat{x}) ~d\hat{x} +
\mathrlap{\int_{x_1-x_3}^{x_2-x_3}}
\quad f(\hat{x})(x_2 - \hat{x} - x_3)~d\hat{x} .
\end{multlined}}
$
};
\node[N] (D) [below=of C] {$\medmath{blablabla}$};
\node[N] (E) [right=of C] {$\medmath{blablabla}$};
\node[N] (F) [below=of E] {$\medmath{blablabla}$};
%%%% arrows
\path (A) edge["Change\\ $x'\to\hat{x} = x - x'$"] (B)
(C) edge["???"] (D)
(E) edge["???"] (F);
\coordinate[left=8mm of C.west] (aux1);
\coordinate[left=8mm of E.west] (aux2);
\draw[arr] (B) -| (aux1) node[lbl] {Integrate directing\\
with respect to $x$}
-- (C);
\draw[arr] (D) -| (aux2)
|- (E);
\end{tikzpicture}
\end{figure*}
\end{document}