Underline inside of enumerate and align
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
MAIN QUESTION! This is my first question on here so bear with me. I would like to underline my last line of code where it says underline. I have tried to do so as you can see below, but I keep getting an error. I have looked at other posts, but they do not work for my situation as the users are not inside of enumerate or aligned.
For a bonus, I would also like to do the following
1 Align all numbers, operators, variables, andd insert blank spaces for variables not displayed. As shown in the second image below.
2 I would like to have the word solution and the following equations closer to the left because they appear too far to the right.
3 I would like to have a column for each question and/or answer similar to the format shown in the second image below.
4 I would also like to know how I can bring the word solution down without needing to put so many backslashes as shown below.
5 I cannot get the hyphen to appear where it shows exercises 1-4 when I compile my code.
Please note that I am a code minimalist as you can see, aha! So, if it is possible to code in the desired format using a small amount of code that would be much appreciated.
CODE FOR MAIN QUESTION
begindocument
beginenumerate
item
$
beginaligned[t]
x_1+5x_2&= 7 \
-2x_1-7x_2&=-5 \
endaligned \\\
textbfSolution: \\
beginaligned[t]
x_1+5x_2&=7 \
-2x_1-7x_2&=-5 \\
2(x_1 +5x_2&=7) & textReplacement Eq. 2\
underline+-2x_1-7x_2&=-5
endaligned
$
endenumerate
enddocument
math-mode equations enumerate syntax underline
add a comment |Â
up vote
2
down vote
favorite
MAIN QUESTION! This is my first question on here so bear with me. I would like to underline my last line of code where it says underline. I have tried to do so as you can see below, but I keep getting an error. I have looked at other posts, but they do not work for my situation as the users are not inside of enumerate or aligned.
For a bonus, I would also like to do the following
1 Align all numbers, operators, variables, andd insert blank spaces for variables not displayed. As shown in the second image below.
2 I would like to have the word solution and the following equations closer to the left because they appear too far to the right.
3 I would like to have a column for each question and/or answer similar to the format shown in the second image below.
4 I would also like to know how I can bring the word solution down without needing to put so many backslashes as shown below.
5 I cannot get the hyphen to appear where it shows exercises 1-4 when I compile my code.
Please note that I am a code minimalist as you can see, aha! So, if it is possible to code in the desired format using a small amount of code that would be much appreciated.
CODE FOR MAIN QUESTION
begindocument
beginenumerate
item
$
beginaligned[t]
x_1+5x_2&= 7 \
-2x_1-7x_2&=-5 \
endaligned \\\
textbfSolution: \\
beginaligned[t]
x_1+5x_2&=7 \
-2x_1-7x_2&=-5 \\
2(x_1 +5x_2&=7) & textReplacement Eq. 2\
underline+-2x_1-7x_2&=-5
endaligned
$
endenumerate
enddocument
math-mode equations enumerate syntax underline
2
Welcome to TeX.SE! The issue is not enumerate, nor aligned, but the fact that you want to underline some piece that contains an&
. You can solve this issue by sayingunderline+-2x_1-7x_2&underline=-5vphantomx_1
. Thevphantom
is just there to make sure that the underline is on the same level on both sides of the&
.
â marmot
Aug 18 at 3:52
2
Welcome! 1) Follow the suggestions of the marmot, and 2) I like the red-black style :).
â manooooh
Aug 18 at 4:06
@Bernard Thanks for correcting my silly misspellings. Didn't know people could do that.
â I. King
Aug 18 at 19:09
1
@manooooh thanks! I use overleaf v1 night style. v2 does not havev this style.
â I. King
Aug 18 at 19:09
As Zarko answered, one problem per question works best on this site. The-
disappears because you copy and pasted an en-dash from somewhere else instead of typing-
on your keyboard.
â Teepeemm
Aug 18 at 23:36
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
MAIN QUESTION! This is my first question on here so bear with me. I would like to underline my last line of code where it says underline. I have tried to do so as you can see below, but I keep getting an error. I have looked at other posts, but they do not work for my situation as the users are not inside of enumerate or aligned.
For a bonus, I would also like to do the following
1 Align all numbers, operators, variables, andd insert blank spaces for variables not displayed. As shown in the second image below.
2 I would like to have the word solution and the following equations closer to the left because they appear too far to the right.
3 I would like to have a column for each question and/or answer similar to the format shown in the second image below.
4 I would also like to know how I can bring the word solution down without needing to put so many backslashes as shown below.
5 I cannot get the hyphen to appear where it shows exercises 1-4 when I compile my code.
Please note that I am a code minimalist as you can see, aha! So, if it is possible to code in the desired format using a small amount of code that would be much appreciated.
CODE FOR MAIN QUESTION
begindocument
beginenumerate
item
$
beginaligned[t]
x_1+5x_2&= 7 \
-2x_1-7x_2&=-5 \
endaligned \\\
textbfSolution: \\
beginaligned[t]
x_1+5x_2&=7 \
-2x_1-7x_2&=-5 \\
2(x_1 +5x_2&=7) & textReplacement Eq. 2\
underline+-2x_1-7x_2&=-5
endaligned
$
endenumerate
enddocument
math-mode equations enumerate syntax underline
MAIN QUESTION! This is my first question on here so bear with me. I would like to underline my last line of code where it says underline. I have tried to do so as you can see below, but I keep getting an error. I have looked at other posts, but they do not work for my situation as the users are not inside of enumerate or aligned.
For a bonus, I would also like to do the following
1 Align all numbers, operators, variables, andd insert blank spaces for variables not displayed. As shown in the second image below.
2 I would like to have the word solution and the following equations closer to the left because they appear too far to the right.
3 I would like to have a column for each question and/or answer similar to the format shown in the second image below.
4 I would also like to know how I can bring the word solution down without needing to put so many backslashes as shown below.
5 I cannot get the hyphen to appear where it shows exercises 1-4 when I compile my code.
Please note that I am a code minimalist as you can see, aha! So, if it is possible to code in the desired format using a small amount of code that would be much appreciated.
CODE FOR MAIN QUESTION
begindocument
beginenumerate
item
$
beginaligned[t]
x_1+5x_2&= 7 \
-2x_1-7x_2&=-5 \
endaligned \\\
textbfSolution: \\
beginaligned[t]
x_1+5x_2&=7 \
-2x_1-7x_2&=-5 \\
2(x_1 +5x_2&=7) & textReplacement Eq. 2\
underline+-2x_1-7x_2&=-5
endaligned
$
endenumerate
enddocument
math-mode equations enumerate syntax underline
edited Aug 18 at 8:41
Bernard
155k762188
155k762188
asked Aug 18 at 3:22
I. King
204
204
2
Welcome to TeX.SE! The issue is not enumerate, nor aligned, but the fact that you want to underline some piece that contains an&
. You can solve this issue by sayingunderline+-2x_1-7x_2&underline=-5vphantomx_1
. Thevphantom
is just there to make sure that the underline is on the same level on both sides of the&
.
â marmot
Aug 18 at 3:52
2
Welcome! 1) Follow the suggestions of the marmot, and 2) I like the red-black style :).
â manooooh
Aug 18 at 4:06
@Bernard Thanks for correcting my silly misspellings. Didn't know people could do that.
â I. King
Aug 18 at 19:09
1
@manooooh thanks! I use overleaf v1 night style. v2 does not havev this style.
â I. King
Aug 18 at 19:09
As Zarko answered, one problem per question works best on this site. The-
disappears because you copy and pasted an en-dash from somewhere else instead of typing-
on your keyboard.
â Teepeemm
Aug 18 at 23:36
add a comment |Â
2
Welcome to TeX.SE! The issue is not enumerate, nor aligned, but the fact that you want to underline some piece that contains an&
. You can solve this issue by sayingunderline+-2x_1-7x_2&underline=-5vphantomx_1
. Thevphantom
is just there to make sure that the underline is on the same level on both sides of the&
.
â marmot
Aug 18 at 3:52
2
Welcome! 1) Follow the suggestions of the marmot, and 2) I like the red-black style :).
â manooooh
Aug 18 at 4:06
@Bernard Thanks for correcting my silly misspellings. Didn't know people could do that.
â I. King
Aug 18 at 19:09
1
@manooooh thanks! I use overleaf v1 night style. v2 does not havev this style.
â I. King
Aug 18 at 19:09
As Zarko answered, one problem per question works best on this site. The-
disappears because you copy and pasted an en-dash from somewhere else instead of typing-
on your keyboard.
â Teepeemm
Aug 18 at 23:36
2
2
Welcome to TeX.SE! The issue is not enumerate, nor aligned, but the fact that you want to underline some piece that contains an
&
. You can solve this issue by saying underline+-2x_1-7x_2&underline=-5vphantomx_1
. The vphantom
is just there to make sure that the underline is on the same level on both sides of the &
.â marmot
Aug 18 at 3:52
Welcome to TeX.SE! The issue is not enumerate, nor aligned, but the fact that you want to underline some piece that contains an
&
. You can solve this issue by saying underline+-2x_1-7x_2&underline=-5vphantomx_1
. The vphantom
is just there to make sure that the underline is on the same level on both sides of the &
.â marmot
Aug 18 at 3:52
2
2
Welcome! 1) Follow the suggestions of the marmot, and 2) I like the red-black style :).
â manooooh
Aug 18 at 4:06
Welcome! 1) Follow the suggestions of the marmot, and 2) I like the red-black style :).
â manooooh
Aug 18 at 4:06
@Bernard Thanks for correcting my silly misspellings. Didn't know people could do that.
â I. King
Aug 18 at 19:09
@Bernard Thanks for correcting my silly misspellings. Didn't know people could do that.
â I. King
Aug 18 at 19:09
1
1
@manooooh thanks! I use overleaf v1 night style. v2 does not havev this style.
â I. King
Aug 18 at 19:09
@manooooh thanks! I use overleaf v1 night style. v2 does not havev this style.
â I. King
Aug 18 at 19:09
As Zarko answered, one problem per question works best on this site. The
-
disappears because you copy and pasted an en-dash from somewhere else instead of typing -
on your keyboard.â Teepeemm
Aug 18 at 23:36
As Zarko answered, one problem per question works best on this site. The
-
disappears because you copy and pasted an en-dash from somewhere else instead of typing -
on your keyboard.â Teepeemm
Aug 18 at 23:36
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
- please one problem per question ...
- your mwe is not complete and it produce different result from your illustration of problem
- main problem can be solved by use of
array
instead of thealigned
math environment
documentclassarticle
usepackageamsmath
setlengtharraycolsep1pt
begindocument
beginenumerate
item
$
beginarray[t]rl
x_1+5x_2&= 7 \ hline
-2x_1-7x_2&=-5 \ hline
endarray
$
bigskip
textbfSolution:
$
beginarray[t]rll
x_1+5x_2 &=7 & \
-2x_1-7x_2 &=-5 & \
2(x_1 +5x_2 &=7) & qquadtextReplacement Eq. 2\
pm 2x_1-7x_2&=-5 & \ cline1-2
endarray
$
endenumerate
enddocument
edit:
- array option
[t]
align array first row with text row where array is placed(without option the vertical center of array is aligned and with option[b]
is aligne bottom array row - `cline1-2ÃÂdraw line from start of first column to end of the second column
- command
pm
(plus minus) write symbol+
over-
- i suggest you to read some introductory texts about latex, for example The Not so short Introduction to LaTeX2e or for tables in math as are LaTeX/Tables and LaTeX/Mathematics
Thanks for the quick reply and nice tips for using stack exchange! Since I am fairly new to LaTeX, some of what you have done I did not understand. What is cline, connect line? Also, what is pm? Also, I found [t] online but I do not know what that means. Can you explain it? Thanks again @Zarko
â I. King
Aug 18 at 19:21
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
- please one problem per question ...
- your mwe is not complete and it produce different result from your illustration of problem
- main problem can be solved by use of
array
instead of thealigned
math environment
documentclassarticle
usepackageamsmath
setlengtharraycolsep1pt
begindocument
beginenumerate
item
$
beginarray[t]rl
x_1+5x_2&= 7 \ hline
-2x_1-7x_2&=-5 \ hline
endarray
$
bigskip
textbfSolution:
$
beginarray[t]rll
x_1+5x_2 &=7 & \
-2x_1-7x_2 &=-5 & \
2(x_1 +5x_2 &=7) & qquadtextReplacement Eq. 2\
pm 2x_1-7x_2&=-5 & \ cline1-2
endarray
$
endenumerate
enddocument
edit:
- array option
[t]
align array first row with text row where array is placed(without option the vertical center of array is aligned and with option[b]
is aligne bottom array row - `cline1-2ÃÂdraw line from start of first column to end of the second column
- command
pm
(plus minus) write symbol+
over-
- i suggest you to read some introductory texts about latex, for example The Not so short Introduction to LaTeX2e or for tables in math as are LaTeX/Tables and LaTeX/Mathematics
Thanks for the quick reply and nice tips for using stack exchange! Since I am fairly new to LaTeX, some of what you have done I did not understand. What is cline, connect line? Also, what is pm? Also, I found [t] online but I do not know what that means. Can you explain it? Thanks again @Zarko
â I. King
Aug 18 at 19:21
add a comment |Â
up vote
5
down vote
accepted
- please one problem per question ...
- your mwe is not complete and it produce different result from your illustration of problem
- main problem can be solved by use of
array
instead of thealigned
math environment
documentclassarticle
usepackageamsmath
setlengtharraycolsep1pt
begindocument
beginenumerate
item
$
beginarray[t]rl
x_1+5x_2&= 7 \ hline
-2x_1-7x_2&=-5 \ hline
endarray
$
bigskip
textbfSolution:
$
beginarray[t]rll
x_1+5x_2 &=7 & \
-2x_1-7x_2 &=-5 & \
2(x_1 +5x_2 &=7) & qquadtextReplacement Eq. 2\
pm 2x_1-7x_2&=-5 & \ cline1-2
endarray
$
endenumerate
enddocument
edit:
- array option
[t]
align array first row with text row where array is placed(without option the vertical center of array is aligned and with option[b]
is aligne bottom array row - `cline1-2ÃÂdraw line from start of first column to end of the second column
- command
pm
(plus minus) write symbol+
over-
- i suggest you to read some introductory texts about latex, for example The Not so short Introduction to LaTeX2e or for tables in math as are LaTeX/Tables and LaTeX/Mathematics
Thanks for the quick reply and nice tips for using stack exchange! Since I am fairly new to LaTeX, some of what you have done I did not understand. What is cline, connect line? Also, what is pm? Also, I found [t] online but I do not know what that means. Can you explain it? Thanks again @Zarko
â I. King
Aug 18 at 19:21
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
- please one problem per question ...
- your mwe is not complete and it produce different result from your illustration of problem
- main problem can be solved by use of
array
instead of thealigned
math environment
documentclassarticle
usepackageamsmath
setlengtharraycolsep1pt
begindocument
beginenumerate
item
$
beginarray[t]rl
x_1+5x_2&= 7 \ hline
-2x_1-7x_2&=-5 \ hline
endarray
$
bigskip
textbfSolution:
$
beginarray[t]rll
x_1+5x_2 &=7 & \
-2x_1-7x_2 &=-5 & \
2(x_1 +5x_2 &=7) & qquadtextReplacement Eq. 2\
pm 2x_1-7x_2&=-5 & \ cline1-2
endarray
$
endenumerate
enddocument
edit:
- array option
[t]
align array first row with text row where array is placed(without option the vertical center of array is aligned and with option[b]
is aligne bottom array row - `cline1-2ÃÂdraw line from start of first column to end of the second column
- command
pm
(plus minus) write symbol+
over-
- i suggest you to read some introductory texts about latex, for example The Not so short Introduction to LaTeX2e or for tables in math as are LaTeX/Tables and LaTeX/Mathematics
- please one problem per question ...
- your mwe is not complete and it produce different result from your illustration of problem
- main problem can be solved by use of
array
instead of thealigned
math environment
documentclassarticle
usepackageamsmath
setlengtharraycolsep1pt
begindocument
beginenumerate
item
$
beginarray[t]rl
x_1+5x_2&= 7 \ hline
-2x_1-7x_2&=-5 \ hline
endarray
$
bigskip
textbfSolution:
$
beginarray[t]rll
x_1+5x_2 &=7 & \
-2x_1-7x_2 &=-5 & \
2(x_1 +5x_2 &=7) & qquadtextReplacement Eq. 2\
pm 2x_1-7x_2&=-5 & \ cline1-2
endarray
$
endenumerate
enddocument
edit:
- array option
[t]
align array first row with text row where array is placed(without option the vertical center of array is aligned and with option[b]
is aligne bottom array row - `cline1-2ÃÂdraw line from start of first column to end of the second column
- command
pm
(plus minus) write symbol+
over-
- i suggest you to read some introductory texts about latex, for example The Not so short Introduction to LaTeX2e or for tables in math as are LaTeX/Tables and LaTeX/Mathematics
edited Aug 18 at 19:40
answered Aug 18 at 4:13
Zarko
111k861148
111k861148
Thanks for the quick reply and nice tips for using stack exchange! Since I am fairly new to LaTeX, some of what you have done I did not understand. What is cline, connect line? Also, what is pm? Also, I found [t] online but I do not know what that means. Can you explain it? Thanks again @Zarko
â I. King
Aug 18 at 19:21
add a comment |Â
Thanks for the quick reply and nice tips for using stack exchange! Since I am fairly new to LaTeX, some of what you have done I did not understand. What is cline, connect line? Also, what is pm? Also, I found [t] online but I do not know what that means. Can you explain it? Thanks again @Zarko
â I. King
Aug 18 at 19:21
Thanks for the quick reply and nice tips for using stack exchange! Since I am fairly new to LaTeX, some of what you have done I did not understand. What is cline, connect line? Also, what is pm? Also, I found [t] online but I do not know what that means. Can you explain it? Thanks again @Zarko
â I. King
Aug 18 at 19:21
Thanks for the quick reply and nice tips for using stack exchange! Since I am fairly new to LaTeX, some of what you have done I did not understand. What is cline, connect line? Also, what is pm? Also, I found [t] online but I do not know what that means. Can you explain it? Thanks again @Zarko
â I. King
Aug 18 at 19:21
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446519%2funderline-inside-of-enumerate-and-align%23new-answer', 'question_page');
);
Post as a guest
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
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
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
2
Welcome to TeX.SE! The issue is not enumerate, nor aligned, but the fact that you want to underline some piece that contains an
&
. You can solve this issue by sayingunderline+-2x_1-7x_2&underline=-5vphantomx_1
. Thevphantom
is just there to make sure that the underline is on the same level on both sides of the&
.â marmot
Aug 18 at 3:52
2
Welcome! 1) Follow the suggestions of the marmot, and 2) I like the red-black style :).
â manooooh
Aug 18 at 4:06
@Bernard Thanks for correcting my silly misspellings. Didn't know people could do that.
â I. King
Aug 18 at 19:09
1
@manooooh thanks! I use overleaf v1 night style. v2 does not havev this style.
â I. King
Aug 18 at 19:09
As Zarko answered, one problem per question works best on this site. The
-
disappears because you copy and pasted an en-dash from somewhere else instead of typing-
on your keyboard.â Teepeemm
Aug 18 at 23:36