TeX - LaTeX Asked by Josh Pilipovsky on January 16, 2021
I am creating a presentation on beamer and want to create a slide similar to this.
I know that for the two sets of equations, I can use a Tcolorbox and align to get the equations inside the boxes.
Additionally, I can use the columns environment to get the two boxes on the left and right sides.
However, I’m not sure how to link the two boxes together with the arrow, as shown in the picture below.
If anyone can guide me through a way to do this in beamer or reproduce an example of the picture below, I’d really appreciate it!
You not provide any code what you tray so far, so, we can only guess and eventually retype your equations. Usually such service is not provided here, so the following proposition not directly addresses all your problems.
In case that you like to have tcolorbox
es, the following may be a solution:
usepackage[most]{tcolorbox}
tcbset{on line,
boxsep=0pt,
colframe=gray,colback=white,
highlight math style={enhanced} % <---
}
begin{document}
[
tcbhighmath{begin{aligned} a=b c=dend{aligned}}
longrightarrow
tcbhighmath{K=begin{bmatrix} a b end{bmatrix}}
]
end{document}
Note: contents of tcolorbox
es you can organize by use all math environments defined in amsmath.
Another way is use of TikZ picture:
documentclass{article}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{arrows.meta,
positioning}
begin{document}
Some text
begin{tikzpicture}[
every node/.style = {draw=gray, rounded corners, very thick}
]
node (left) {$begin{aligned} a=b c=dend{aligned}$};
node (right) [right=of left]
{$begin{gathered} X = [text{some equation}]
K_1=begin{bmatrix} a b end{bmatrix}
quad
K_2=begin{bmatrix} c d end{bmatrix}
end{gathered}$};
draw[-Straight Barb] (left) -- (right);
end{tikzpicture}
end{document}
Addendum: you can also combine the both above solutions:
documentclass{article}
usepackage{amsmath}
usepackage[most]{tcolorbox}
usetikzlibrary{arrows.meta,
positioning}
tcbset{on line, % borrowed from https://tex.stackexchange.com/questions/568880/
boxsep=0pt, % left=1pt,right=1pt,top=1pt,bottom=1pt,
colframe=gray,colback=white, % or some other color of box background
highlight math style={enhanced} % <---
}
begin{document}
begin{tikzpicture}[
every node/.style = {inner sep=0pt}
]
node (left) {tcbhighmath{begin{aligned} a=b c=dend{aligned}}};
node (right) [right=of left]
{tcbhighmath{begin{gathered} X = [text{some equation}]
K_1=begin{bmatrix} a b end{bmatrix}
quad
K_2=begin{bmatrix} c d end{bmatrix}
end{gathered}}};
draw[-Straight Barb] (left) -- (right);
end{tikzpicture}
end{document}
Result is similar as the second solution:
Answered by Zarko on January 16, 2021
This is a mix between Zarko's Addendum and my answer to Add arrow between two tcolorboxes
The example is built into a beamer
document. As overlay
and remember picture
are used, the arrow between boxes will appear after second compilation.
documentclass{beamer}
usepackage{amsmath}
usepackage[most]{tcolorbox}
usetikzlibrary{arrows.meta,
positioning}
tcbset{on line, % borrowed from https://tex.stackexchange.com/questions/568880/
boxsep=0pt, % left=1pt,right=1pt,top=1pt,bottom=1pt,
colframe=gray,colback=white, % or some other color of box background
highlight math style={enhanced} % <---
}
begin{document}
begin{frame}{With tcolorbox}
tcbhighmath[remember as=left]{begin{aligned} a=b c=dend{aligned}}hspace{1cm}
tcbhighmath[remember as=right]{begin{gathered} X = [text{some equation}]
K_1=begin{bmatrix} a b end{bmatrix}
quad
K_2=begin{bmatrix} c d end{bmatrix}
end{gathered}}
tikz[overlay, remember picture] draw[-Straight Barb] (left) -- (right);
end{frame}
end{document}
Answered by Ignasi on January 16, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP