Comment Box for Substitution Method of Integrals
I want to make a comment box like the image below that adjusts in size as I write up different examples. My MWE is not much
documentclass{article}
usepackage{amsmath, mathtools,tikz}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} \
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
This outputs:
I am trying to recreate with a black box drawn around the orange shaded area.
tikz-pgf
add a comment |
I want to make a comment box like the image below that adjusts in size as I write up different examples. My MWE is not much
documentclass{article}
usepackage{amsmath, mathtools,tikz}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} \
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
This outputs:
I am trying to recreate with a black box drawn around the orange shaded area.
tikz-pgf
add a comment |
I want to make a comment box like the image below that adjusts in size as I write up different examples. My MWE is not much
documentclass{article}
usepackage{amsmath, mathtools,tikz}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} \
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
This outputs:
I am trying to recreate with a black box drawn around the orange shaded area.
tikz-pgf
I want to make a comment box like the image below that adjusts in size as I write up different examples. My MWE is not much
documentclass{article}
usepackage{amsmath, mathtools,tikz}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} \
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
This outputs:
I am trying to recreate with a black box drawn around the orange shaded area.
tikz-pgf
tikz-pgf
asked 2 days ago
MathScholarMathScholar
1,09529
1,09529
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Using tikzmark
, it is not so difficult:
documentclass{article}
usepackage{amsmath, mathtools,tikz}
usetikzlibrary{tikzmark,calc}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red} {x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} tikzmark{eqt}\
&=int textcolor{red}{u}^{10}textcolor{blue}{du}
end{align*}
begin{tikzpicture}[overlay, remember picture]
coordinate (x) at ($(pic cs:eqt)+(1,0)$);
draw (x)--($(x)+(3,0)$);
draw[red] (x) node[above right] {Substitution};
draw ($(x)+(3,0)$) node[right,draw,fill=orange!50] {%
% Remove `draw' option if you don't want the box
$begin{aligned}
u&=x^3+1,\
du&=3x^2dx
end{aligned}$};
end{tikzpicture}
end{document}
This very nice and creative solution is by @marmot:
documentclass[fleqn]{article}
usepackage{amsmath,tikz}
usetikzlibrary{tikzmark}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10},mathrm{d}x
&tikzmarknode{eq1}{=}int (textcolor{red} {x^{3}+1})^{10}
textcolor{blue}{3x^{2}, mathrm{d}x} \
&tikzmarknode{eq2}{=}int textcolor{red}{u}^{10},textcolor{blue}{mathrm{d}u}
end{align*}
begin{tikzpicture}[overlay, remember picture]
path (eq1) -- (eq2) coordinate[midway] (aux);
draw[latex-] (eq2) -- (aux) -- ++ (5,0) node[above left] {substitute}
node[right,fill=orange!30] {%
$begin{aligned}
u&=x^3+1\
mathrm{d}u&=3x^2,mathrm{d}x
end{aligned}$};
end{tikzpicture}
end{document}
add a comment |
Without tikz, I define an extensible xmathline
, centred on the math axis, which accepts writing above and below it, like xrightarrow
, and add a simple colorbox
:
documentclass[svgnames]{article}
usepackage{amsmath, mathtools,tikz}
usepackage{xcolor}
usepackage{bigstrut}
newcommand{xmathline}[2]{%
ext@arrow 0099xmathlinefill@{#1}{#2}}%
newcommand{xmathlinefill@}{%
arrowfill@{relbarbigstrut}relbarrelbar}
makeatother
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx}
quadxmathline{text{color{Crimson}substitutionquad}}colorbox{NavajoWhite! 60}{$begin{aligned} u & = x^3 + 1 \ du & =3x^2,dx end{aligned} $} \%
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479930%2fcomment-box-for-substitution-method-of-integrals%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Using tikzmark
, it is not so difficult:
documentclass{article}
usepackage{amsmath, mathtools,tikz}
usetikzlibrary{tikzmark,calc}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red} {x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} tikzmark{eqt}\
&=int textcolor{red}{u}^{10}textcolor{blue}{du}
end{align*}
begin{tikzpicture}[overlay, remember picture]
coordinate (x) at ($(pic cs:eqt)+(1,0)$);
draw (x)--($(x)+(3,0)$);
draw[red] (x) node[above right] {Substitution};
draw ($(x)+(3,0)$) node[right,draw,fill=orange!50] {%
% Remove `draw' option if you don't want the box
$begin{aligned}
u&=x^3+1,\
du&=3x^2dx
end{aligned}$};
end{tikzpicture}
end{document}
This very nice and creative solution is by @marmot:
documentclass[fleqn]{article}
usepackage{amsmath,tikz}
usetikzlibrary{tikzmark}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10},mathrm{d}x
&tikzmarknode{eq1}{=}int (textcolor{red} {x^{3}+1})^{10}
textcolor{blue}{3x^{2}, mathrm{d}x} \
&tikzmarknode{eq2}{=}int textcolor{red}{u}^{10},textcolor{blue}{mathrm{d}u}
end{align*}
begin{tikzpicture}[overlay, remember picture]
path (eq1) -- (eq2) coordinate[midway] (aux);
draw[latex-] (eq2) -- (aux) -- ++ (5,0) node[above left] {substitute}
node[right,fill=orange!30] {%
$begin{aligned}
u&=x^3+1\
mathrm{d}u&=3x^2,mathrm{d}x
end{aligned}$};
end{tikzpicture}
end{document}
add a comment |
Using tikzmark
, it is not so difficult:
documentclass{article}
usepackage{amsmath, mathtools,tikz}
usetikzlibrary{tikzmark,calc}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red} {x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} tikzmark{eqt}\
&=int textcolor{red}{u}^{10}textcolor{blue}{du}
end{align*}
begin{tikzpicture}[overlay, remember picture]
coordinate (x) at ($(pic cs:eqt)+(1,0)$);
draw (x)--($(x)+(3,0)$);
draw[red] (x) node[above right] {Substitution};
draw ($(x)+(3,0)$) node[right,draw,fill=orange!50] {%
% Remove `draw' option if you don't want the box
$begin{aligned}
u&=x^3+1,\
du&=3x^2dx
end{aligned}$};
end{tikzpicture}
end{document}
This very nice and creative solution is by @marmot:
documentclass[fleqn]{article}
usepackage{amsmath,tikz}
usetikzlibrary{tikzmark}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10},mathrm{d}x
&tikzmarknode{eq1}{=}int (textcolor{red} {x^{3}+1})^{10}
textcolor{blue}{3x^{2}, mathrm{d}x} \
&tikzmarknode{eq2}{=}int textcolor{red}{u}^{10},textcolor{blue}{mathrm{d}u}
end{align*}
begin{tikzpicture}[overlay, remember picture]
path (eq1) -- (eq2) coordinate[midway] (aux);
draw[latex-] (eq2) -- (aux) -- ++ (5,0) node[above left] {substitute}
node[right,fill=orange!30] {%
$begin{aligned}
u&=x^3+1\
mathrm{d}u&=3x^2,mathrm{d}x
end{aligned}$};
end{tikzpicture}
end{document}
add a comment |
Using tikzmark
, it is not so difficult:
documentclass{article}
usepackage{amsmath, mathtools,tikz}
usetikzlibrary{tikzmark,calc}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red} {x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} tikzmark{eqt}\
&=int textcolor{red}{u}^{10}textcolor{blue}{du}
end{align*}
begin{tikzpicture}[overlay, remember picture]
coordinate (x) at ($(pic cs:eqt)+(1,0)$);
draw (x)--($(x)+(3,0)$);
draw[red] (x) node[above right] {Substitution};
draw ($(x)+(3,0)$) node[right,draw,fill=orange!50] {%
% Remove `draw' option if you don't want the box
$begin{aligned}
u&=x^3+1,\
du&=3x^2dx
end{aligned}$};
end{tikzpicture}
end{document}
This very nice and creative solution is by @marmot:
documentclass[fleqn]{article}
usepackage{amsmath,tikz}
usetikzlibrary{tikzmark}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10},mathrm{d}x
&tikzmarknode{eq1}{=}int (textcolor{red} {x^{3}+1})^{10}
textcolor{blue}{3x^{2}, mathrm{d}x} \
&tikzmarknode{eq2}{=}int textcolor{red}{u}^{10},textcolor{blue}{mathrm{d}u}
end{align*}
begin{tikzpicture}[overlay, remember picture]
path (eq1) -- (eq2) coordinate[midway] (aux);
draw[latex-] (eq2) -- (aux) -- ++ (5,0) node[above left] {substitute}
node[right,fill=orange!30] {%
$begin{aligned}
u&=x^3+1\
mathrm{d}u&=3x^2,mathrm{d}x
end{aligned}$};
end{tikzpicture}
end{document}
Using tikzmark
, it is not so difficult:
documentclass{article}
usepackage{amsmath, mathtools,tikz}
usetikzlibrary{tikzmark,calc}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red} {x^{3}+1})^{10} textcolor{blue}{3x^{2} dx} tikzmark{eqt}\
&=int textcolor{red}{u}^{10}textcolor{blue}{du}
end{align*}
begin{tikzpicture}[overlay, remember picture]
coordinate (x) at ($(pic cs:eqt)+(1,0)$);
draw (x)--($(x)+(3,0)$);
draw[red] (x) node[above right] {Substitution};
draw ($(x)+(3,0)$) node[right,draw,fill=orange!50] {%
% Remove `draw' option if you don't want the box
$begin{aligned}
u&=x^3+1,\
du&=3x^2dx
end{aligned}$};
end{tikzpicture}
end{document}
This very nice and creative solution is by @marmot:
documentclass[fleqn]{article}
usepackage{amsmath,tikz}
usetikzlibrary{tikzmark}
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10},mathrm{d}x
&tikzmarknode{eq1}{=}int (textcolor{red} {x^{3}+1})^{10}
textcolor{blue}{3x^{2}, mathrm{d}x} \
&tikzmarknode{eq2}{=}int textcolor{red}{u}^{10},textcolor{blue}{mathrm{d}u}
end{align*}
begin{tikzpicture}[overlay, remember picture]
path (eq1) -- (eq2) coordinate[midway] (aux);
draw[latex-] (eq2) -- (aux) -- ++ (5,0) node[above left] {substitute}
node[right,fill=orange!30] {%
$begin{aligned}
u&=x^3+1\
mathrm{d}u&=3x^2,mathrm{d}x
end{aligned}$};
end{tikzpicture}
end{document}
edited 2 days ago
answered 2 days ago
JouleVJouleV
6,68521951
6,68521951
add a comment |
add a comment |
Without tikz, I define an extensible xmathline
, centred on the math axis, which accepts writing above and below it, like xrightarrow
, and add a simple colorbox
:
documentclass[svgnames]{article}
usepackage{amsmath, mathtools,tikz}
usepackage{xcolor}
usepackage{bigstrut}
newcommand{xmathline}[2]{%
ext@arrow 0099xmathlinefill@{#1}{#2}}%
newcommand{xmathlinefill@}{%
arrowfill@{relbarbigstrut}relbarrelbar}
makeatother
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx}
quadxmathline{text{color{Crimson}substitutionquad}}colorbox{NavajoWhite! 60}{$begin{aligned} u & = x^3 + 1 \ du & =3x^2,dx end{aligned} $} \%
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
add a comment |
Without tikz, I define an extensible xmathline
, centred on the math axis, which accepts writing above and below it, like xrightarrow
, and add a simple colorbox
:
documentclass[svgnames]{article}
usepackage{amsmath, mathtools,tikz}
usepackage{xcolor}
usepackage{bigstrut}
newcommand{xmathline}[2]{%
ext@arrow 0099xmathlinefill@{#1}{#2}}%
newcommand{xmathlinefill@}{%
arrowfill@{relbarbigstrut}relbarrelbar}
makeatother
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx}
quadxmathline{text{color{Crimson}substitutionquad}}colorbox{NavajoWhite! 60}{$begin{aligned} u & = x^3 + 1 \ du & =3x^2,dx end{aligned} $} \%
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
add a comment |
Without tikz, I define an extensible xmathline
, centred on the math axis, which accepts writing above and below it, like xrightarrow
, and add a simple colorbox
:
documentclass[svgnames]{article}
usepackage{amsmath, mathtools,tikz}
usepackage{xcolor}
usepackage{bigstrut}
newcommand{xmathline}[2]{%
ext@arrow 0099xmathlinefill@{#1}{#2}}%
newcommand{xmathlinefill@}{%
arrowfill@{relbarbigstrut}relbarrelbar}
makeatother
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx}
quadxmathline{text{color{Crimson}substitutionquad}}colorbox{NavajoWhite! 60}{$begin{aligned} u & = x^3 + 1 \ du & =3x^2,dx end{aligned} $} \%
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
Without tikz, I define an extensible xmathline
, centred on the math axis, which accepts writing above and below it, like xrightarrow
, and add a simple colorbox
:
documentclass[svgnames]{article}
usepackage{amsmath, mathtools,tikz}
usepackage{xcolor}
usepackage{bigstrut}
newcommand{xmathline}[2]{%
ext@arrow 0099xmathlinefill@{#1}{#2}}%
newcommand{xmathlinefill@}{%
arrowfill@{relbarbigstrut}relbarrelbar}
makeatother
begin{document}
begin{align*}
displaystyleint 3x^{2}(x^{3}+1)^{10} dx &=int (textcolor{red}
{x^{3}+1})^{10} textcolor{blue}{3x^{2} dx}
quadxmathline{text{color{Crimson}substitutionquad}}colorbox{NavajoWhite! 60}{$begin{aligned} u & = x^3 + 1 \ du & =3x^2,dx end{aligned} $} \%
&=int textcolor{red}{u}^{10}
textcolor{blue}{du}
end{align*}
end{document}
edited 2 days ago
answered 2 days ago
BernardBernard
173k776205
173k776205
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479930%2fcomment-box-for-substitution-method-of-integrals%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown