correct way to set indent to zero in newcommand
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I define a new command that to number the problems in a chapter:
newcounterproblemNo %problem counter
setcounterproblemNo1 %start at one
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
This code has some indentation problems:
I also tried to use setlengthparindent0cm
but with no luck:
newcommandproblem[1]textbfProblem thechapter.arabicproblemNo
#1 parsmallskipstepcounterproblemNosetlengthparindent0cm
In fact, now the indent is zero everywhere.
Which is the right way for removing the indentation only after the problem
command?
Complete code:
documentclass[12pt,twoside]book
newcounterproblemNo
setcounterproblemNo1
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
begindocument
chapterProblems
problemSolve this problem:
Problem statement.\
problemSolve this problem too:
Problem statement.\
enddocument
spacing macros
add a comment |Â
up vote
1
down vote
favorite
I define a new command that to number the problems in a chapter:
newcounterproblemNo %problem counter
setcounterproblemNo1 %start at one
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
This code has some indentation problems:
I also tried to use setlengthparindent0cm
but with no luck:
newcommandproblem[1]textbfProblem thechapter.arabicproblemNo
#1 parsmallskipstepcounterproblemNosetlengthparindent0cm
In fact, now the indent is zero everywhere.
Which is the right way for removing the indentation only after the problem
command?
Complete code:
documentclass[12pt,twoside]book
newcounterproblemNo
setcounterproblemNo1
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
begindocument
chapterProblems
problemSolve this problem:
Problem statement.\
problemSolve this problem too:
Problem statement.\
enddocument
spacing macros
Why don't usenewtheoremproblemProblem[chapter]
? Loadamsthm
â Sigur
4 hours ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I define a new command that to number the problems in a chapter:
newcounterproblemNo %problem counter
setcounterproblemNo1 %start at one
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
This code has some indentation problems:
I also tried to use setlengthparindent0cm
but with no luck:
newcommandproblem[1]textbfProblem thechapter.arabicproblemNo
#1 parsmallskipstepcounterproblemNosetlengthparindent0cm
In fact, now the indent is zero everywhere.
Which is the right way for removing the indentation only after the problem
command?
Complete code:
documentclass[12pt,twoside]book
newcounterproblemNo
setcounterproblemNo1
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
begindocument
chapterProblems
problemSolve this problem:
Problem statement.\
problemSolve this problem too:
Problem statement.\
enddocument
spacing macros
I define a new command that to number the problems in a chapter:
newcounterproblemNo %problem counter
setcounterproblemNo1 %start at one
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
This code has some indentation problems:
I also tried to use setlengthparindent0cm
but with no luck:
newcommandproblem[1]textbfProblem thechapter.arabicproblemNo
#1 parsmallskipstepcounterproblemNosetlengthparindent0cm
In fact, now the indent is zero everywhere.
Which is the right way for removing the indentation only after the problem
command?
Complete code:
documentclass[12pt,twoside]book
newcounterproblemNo
setcounterproblemNo1
newcommandproblem[1]textbfProblem thechapter.
arabicproblemNo #1 parsmallskipstepcounterproblemNonoindent
begindocument
chapterProblems
problemSolve this problem:
Problem statement.\
problemSolve this problem too:
Problem statement.\
enddocument
spacing macros
spacing macros
asked 5 hours ago
shamalaia
19510
19510
Why don't usenewtheoremproblemProblem[chapter]
? Loadamsthm
â Sigur
4 hours ago
add a comment |Â
Why don't usenewtheoremproblemProblem[chapter]
? Loadamsthm
â Sigur
4 hours ago
Why don't use
newtheoremproblemProblem[chapter]
? Load amsthm
â Sigur
4 hours ago
Why don't use
newtheoremproblemProblem[chapter]
? Load amsthm
â Sigur
4 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Here is an option:
documentclassbook
newcounterproblemNo[chapter]
renewcommandtheproblemNothechapter.arabicproblemNo
newcommandproblem[1]%
par
addvspacebigskipamount
refstepcounterproblemNo%
noindenttextbfProblem theproblemNo
#1
parnobreak
smallskip
noindentignorespaces
begindocument
chapterProblems
problemSolve this problem:
Problem statement.
problemSolve this problem too:
Problem statement.
enddocument
What changed:
Proper definition of
problemNo
counter to reset with every[chapter]
and have a representation that includes the chapter number representation (thechapter
).A
problem
starts by adding some space up tobigskipamount
.The
problemNo
counter is stepped just before setting Problem X.Y; this allows for proper referencing if you uselabel
-ref
.After setting the problem statement, a
par
agraph break is initiated without a possibility for a page break (thanks tonobreak
). This avoids having Problem X.Y at the bottom of the page and the problem statement at the top of the following page.
Subsequent paragraphs of a problem statement will have a regular parindent
. If you want to avoid this altogether, add setlengthparindent0pt
to your preamble.
A completely different approach would be to define your problem
as an environment similar to that of a theorem. However, this would require a change in your input.
add a comment |Â
up vote
4
down vote
What about this one?
documentclass[12pt,twoside]book
usepackageamsthm
theoremstyledefinition
newtheoremproblemProblem[chapter]
begindocument
chapterProblems
beginproblem
Solve this problem:\ Problem statement.
endproblem
Text in middle.
beginproblem
Solve this problem:\ Problem statement.
endproblem
beginproblem
Solve this problem:\ Problem statement.
endproblem
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Here is an option:
documentclassbook
newcounterproblemNo[chapter]
renewcommandtheproblemNothechapter.arabicproblemNo
newcommandproblem[1]%
par
addvspacebigskipamount
refstepcounterproblemNo%
noindenttextbfProblem theproblemNo
#1
parnobreak
smallskip
noindentignorespaces
begindocument
chapterProblems
problemSolve this problem:
Problem statement.
problemSolve this problem too:
Problem statement.
enddocument
What changed:
Proper definition of
problemNo
counter to reset with every[chapter]
and have a representation that includes the chapter number representation (thechapter
).A
problem
starts by adding some space up tobigskipamount
.The
problemNo
counter is stepped just before setting Problem X.Y; this allows for proper referencing if you uselabel
-ref
.After setting the problem statement, a
par
agraph break is initiated without a possibility for a page break (thanks tonobreak
). This avoids having Problem X.Y at the bottom of the page and the problem statement at the top of the following page.
Subsequent paragraphs of a problem statement will have a regular parindent
. If you want to avoid this altogether, add setlengthparindent0pt
to your preamble.
A completely different approach would be to define your problem
as an environment similar to that of a theorem. However, this would require a change in your input.
add a comment |Â
up vote
1
down vote
accepted
Here is an option:
documentclassbook
newcounterproblemNo[chapter]
renewcommandtheproblemNothechapter.arabicproblemNo
newcommandproblem[1]%
par
addvspacebigskipamount
refstepcounterproblemNo%
noindenttextbfProblem theproblemNo
#1
parnobreak
smallskip
noindentignorespaces
begindocument
chapterProblems
problemSolve this problem:
Problem statement.
problemSolve this problem too:
Problem statement.
enddocument
What changed:
Proper definition of
problemNo
counter to reset with every[chapter]
and have a representation that includes the chapter number representation (thechapter
).A
problem
starts by adding some space up tobigskipamount
.The
problemNo
counter is stepped just before setting Problem X.Y; this allows for proper referencing if you uselabel
-ref
.After setting the problem statement, a
par
agraph break is initiated without a possibility for a page break (thanks tonobreak
). This avoids having Problem X.Y at the bottom of the page and the problem statement at the top of the following page.
Subsequent paragraphs of a problem statement will have a regular parindent
. If you want to avoid this altogether, add setlengthparindent0pt
to your preamble.
A completely different approach would be to define your problem
as an environment similar to that of a theorem. However, this would require a change in your input.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Here is an option:
documentclassbook
newcounterproblemNo[chapter]
renewcommandtheproblemNothechapter.arabicproblemNo
newcommandproblem[1]%
par
addvspacebigskipamount
refstepcounterproblemNo%
noindenttextbfProblem theproblemNo
#1
parnobreak
smallskip
noindentignorespaces
begindocument
chapterProblems
problemSolve this problem:
Problem statement.
problemSolve this problem too:
Problem statement.
enddocument
What changed:
Proper definition of
problemNo
counter to reset with every[chapter]
and have a representation that includes the chapter number representation (thechapter
).A
problem
starts by adding some space up tobigskipamount
.The
problemNo
counter is stepped just before setting Problem X.Y; this allows for proper referencing if you uselabel
-ref
.After setting the problem statement, a
par
agraph break is initiated without a possibility for a page break (thanks tonobreak
). This avoids having Problem X.Y at the bottom of the page and the problem statement at the top of the following page.
Subsequent paragraphs of a problem statement will have a regular parindent
. If you want to avoid this altogether, add setlengthparindent0pt
to your preamble.
A completely different approach would be to define your problem
as an environment similar to that of a theorem. However, this would require a change in your input.
Here is an option:
documentclassbook
newcounterproblemNo[chapter]
renewcommandtheproblemNothechapter.arabicproblemNo
newcommandproblem[1]%
par
addvspacebigskipamount
refstepcounterproblemNo%
noindenttextbfProblem theproblemNo
#1
parnobreak
smallskip
noindentignorespaces
begindocument
chapterProblems
problemSolve this problem:
Problem statement.
problemSolve this problem too:
Problem statement.
enddocument
What changed:
Proper definition of
problemNo
counter to reset with every[chapter]
and have a representation that includes the chapter number representation (thechapter
).A
problem
starts by adding some space up tobigskipamount
.The
problemNo
counter is stepped just before setting Problem X.Y; this allows for proper referencing if you uselabel
-ref
.After setting the problem statement, a
par
agraph break is initiated without a possibility for a page break (thanks tonobreak
). This avoids having Problem X.Y at the bottom of the page and the problem statement at the top of the following page.
Subsequent paragraphs of a problem statement will have a regular parindent
. If you want to avoid this altogether, add setlengthparindent0pt
to your preamble.
A completely different approach would be to define your problem
as an environment similar to that of a theorem. However, this would require a change in your input.
answered 4 hours ago
Werner
427k589371611
427k589371611
add a comment |Â
add a comment |Â
up vote
4
down vote
What about this one?
documentclass[12pt,twoside]book
usepackageamsthm
theoremstyledefinition
newtheoremproblemProblem[chapter]
begindocument
chapterProblems
beginproblem
Solve this problem:\ Problem statement.
endproblem
Text in middle.
beginproblem
Solve this problem:\ Problem statement.
endproblem
beginproblem
Solve this problem:\ Problem statement.
endproblem
enddocument
add a comment |Â
up vote
4
down vote
What about this one?
documentclass[12pt,twoside]book
usepackageamsthm
theoremstyledefinition
newtheoremproblemProblem[chapter]
begindocument
chapterProblems
beginproblem
Solve this problem:\ Problem statement.
endproblem
Text in middle.
beginproblem
Solve this problem:\ Problem statement.
endproblem
beginproblem
Solve this problem:\ Problem statement.
endproblem
enddocument
add a comment |Â
up vote
4
down vote
up vote
4
down vote
What about this one?
documentclass[12pt,twoside]book
usepackageamsthm
theoremstyledefinition
newtheoremproblemProblem[chapter]
begindocument
chapterProblems
beginproblem
Solve this problem:\ Problem statement.
endproblem
Text in middle.
beginproblem
Solve this problem:\ Problem statement.
endproblem
beginproblem
Solve this problem:\ Problem statement.
endproblem
enddocument
What about this one?
documentclass[12pt,twoside]book
usepackageamsthm
theoremstyledefinition
newtheoremproblemProblem[chapter]
begindocument
chapterProblems
beginproblem
Solve this problem:\ Problem statement.
endproblem
Text in middle.
beginproblem
Solve this problem:\ Problem statement.
endproblem
beginproblem
Solve this problem:\ Problem statement.
endproblem
enddocument
answered 4 hours ago
Sigur
22.5k352132
22.5k352132
add a comment |Â
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%2f457963%2fcorrect-way-to-set-indent-to-zero-in-newcommand%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
Why don't use
newtheoremproblemProblem[chapter]
? Loadamsthm
â Sigur
4 hours ago