TransWikia.com

text to the right of an equation

TeX - LaTeX Asked by Alessandro Lin on June 6, 2021

I would like to do something like this in my document.
enter image description here
enter image description here

The red line can have different type like –[
___|–

2 Answers

It is possible to use the enviroment align* for example. Here I have not used the geometry package and I have not put others & to increase the distance of the text or the formulas.

documentclass[12pt]{article}
usepackage{amssymb,amsmath}

begin{document}
begin{align*}
&int sinh(x)  dx=cosh(x)+c &&& text{right text}
&int cosh(x)  dx=-sinh(x)+c &&& text{another right text}
end{align*}

end{document}

enter image description here

Here there is another example:

documentclass[12pt,a4paper]{article}
usepackage{amssymb,amsmath}

begin{document}
begin{align*}
&int sinh(x)  dx=cosh(x)+c &&& int sinh(x)  dx=cosh(x)+c
&int cosh(x)  dx=-sinh(x)+c &&& int sinh(x)  dx=cosh(x)+c
end{align*}

end{document}

enter image description here

With geometry package and others &.

documentclass[12pt,a4paper]{article}
usepackage{amssymb,amsmath}
usepackage[margin=1cm]{geometry}
begin{document}
begin{align*}
&int sinh(x)  dx=cosh(x)+c &&&text{since}& int sinh(x)  dx=cosh(x)+c
&int cosh(x)  dx=-sinh(x)+c &&&text{since}& int sinh(x)  dx=cosh(x)+c
end{align*}

end{document}

enter image description here

Addendum:

A simple trick could be to put the bullet command. It is more simple I should to change the whole code)...otherwise you can ask a new question.

documentclass[12pt,a4paper]{article}
usepackage{amssymb,amsmath}
usepackage[margin=1cm]{geometry}
begin{document}
begin{align*}
bullet,&int sinh(x)  dx=cosh(x)+c &&&text{since}& int sinh(x)  dx=cosh(x)+c
bullet,&int cosh(x)  dx=-sinh(x)+c &&&text{since}& int sinh(x)  dx=cosh(x)+c
end{align*}

end{document}

enter image description here

Correct answer by Sebastiano on June 6, 2021

You can also use the alignat environment in order to not have quite that much whitespace:

documentclass{article}
usepackage{amsmath}
makeatletter
newcommand*arsinh{mathop{operator@font arsinh}nolimits}
newcommand*arcosh{mathop{operator@font arcosh}nolimits}
makeatother
begin{document}
begin{alignat*}{4}
int sinh x , dx & = cosh x + c & qquad & text{since} & quad & frac d{dx} (cosh x) && = sinh x 
int cosh x , dx & = sinh x + c && text{since} && frac d{dx} (sinh x) && = cosh x 
int frac1{ sqrt{ 1 + x^2 }} , dx & = arsinh x + c && text{since} && frac d{dx} (arsinh x) && = frac1{ sqrt{1 + x^2 }} 
int frac1{ sqrt{ x^2 - 1 }} , dx & = arcosh x + c, x > 1 && text{since} && frac d{dx} (arcosh x) && = frac1{ sqrt{x^2 - 1 }}, x > 1
end{alignat*}
end{document}

enter image description here

You can add bullets manually, as Sebastiano suggested in the amendment to his answer; I'm not sure whether itemize and aligning (parts of) equations otherwise works.

Answered by chsk on June 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP