using def in newcommandWhat is the difference between def and newcommand?Different spacing caused by...

Why are the books in the Game of Thrones citadel library shelved spine inwards?

Definition of "atomic object"

Nuance between philia and mania?

Can I announce prefix 161.117.25.0/24 even though I don't have all of /24 IPs

How to politely refuse in-office gym instructor for steroids and protein

Building an exterior wall within an exterior wall for insulation

systemd service won't start nodejs

Why does magnet wire need to be insulated?

Count repetitions of an array

How to deal with possible delayed baggage?

What happened to my GE option?

Why do neural networks need so many training examples to perform?

Is there a verb that means to inject with poison?

Citing paid articles from illegal web sharing

Is there a lava-breathing lizard creature (that could be worshipped by a cult) in 5e?

Why did Democrats in the Senate oppose the Born-Alive Abortion Survivors Protection Act?

Square Root Distance from Integers

Why is there a prohibition of gevinat aku"m?

Removing whitespace between consecutive numbers

Plausible reason for gold-digging ant

What essential properties make us human?

Utilizing a Right and Left Outer Joins in same SELECT

Most demanding German Newspapers

Why don't key signatures indicate the tonic?



using def in newcommand


What is the difference between def and newcommand?Different spacing caused by newcommand and defChanging from def to newcommand*Why are some LaTeX macros defined using newcommand and some using def?newcommand vs. def (LaTeX/XeLaTeX/LuaLaTeX)TeX4HT Equation unchanged with newcommand or def commandUsing newcommand with arguments inside of newcommandhow to simple begin{array} using def?Problem using newcommandWhat's the purpose of nesting a def within a newcommand?













0















Consider this example:



documentclass{report}
defstartnewpart{FALSE}
makeatletter
renewcommandchapter{if@openrightcleardoublepageelseclearpagefi
% defstartnewpart{FALSE}
thispagestyle{plain}%
global@topnumz@
@afterindentfalse
secdef@chapter@schapter
% defstartnewpart{FALSE}
}
makeatother
begin{document}
tableofcontents
chapter{Methods}
Some text
end{document}


If in renewcommandchapter I uncomment the first defstartnewpart{FALSE} the document compiles fine.



If instead I uncomment the second defstartnewpart{FALSE} I get an error:



Chapter 1.
! Missing { inserted.
@makechapterhead ...1par nobreak vskip 40p@ }

l.21 tableofcontents


Where is the difference?



In this example I am exploring how to use a control variable startnewpart to control the execution of chapter. defstartnewpart{FALSE} is meant to reset the value of startnewpart.









share























  • @chapter and @schapter look ahead to collect arguments, so they have to be last in the definition.

    – Henri Menke
    3 mins ago











  • @HenriMenke, is that the purpuse of using @?

    – Viesturs
    2 mins ago
















0















Consider this example:



documentclass{report}
defstartnewpart{FALSE}
makeatletter
renewcommandchapter{if@openrightcleardoublepageelseclearpagefi
% defstartnewpart{FALSE}
thispagestyle{plain}%
global@topnumz@
@afterindentfalse
secdef@chapter@schapter
% defstartnewpart{FALSE}
}
makeatother
begin{document}
tableofcontents
chapter{Methods}
Some text
end{document}


If in renewcommandchapter I uncomment the first defstartnewpart{FALSE} the document compiles fine.



If instead I uncomment the second defstartnewpart{FALSE} I get an error:



Chapter 1.
! Missing { inserted.
@makechapterhead ...1par nobreak vskip 40p@ }

l.21 tableofcontents


Where is the difference?



In this example I am exploring how to use a control variable startnewpart to control the execution of chapter. defstartnewpart{FALSE} is meant to reset the value of startnewpart.









share























  • @chapter and @schapter look ahead to collect arguments, so they have to be last in the definition.

    – Henri Menke
    3 mins ago











  • @HenriMenke, is that the purpuse of using @?

    – Viesturs
    2 mins ago














0












0








0








Consider this example:



documentclass{report}
defstartnewpart{FALSE}
makeatletter
renewcommandchapter{if@openrightcleardoublepageelseclearpagefi
% defstartnewpart{FALSE}
thispagestyle{plain}%
global@topnumz@
@afterindentfalse
secdef@chapter@schapter
% defstartnewpart{FALSE}
}
makeatother
begin{document}
tableofcontents
chapter{Methods}
Some text
end{document}


If in renewcommandchapter I uncomment the first defstartnewpart{FALSE} the document compiles fine.



If instead I uncomment the second defstartnewpart{FALSE} I get an error:



Chapter 1.
! Missing { inserted.
@makechapterhead ...1par nobreak vskip 40p@ }

l.21 tableofcontents


Where is the difference?



In this example I am exploring how to use a control variable startnewpart to control the execution of chapter. defstartnewpart{FALSE} is meant to reset the value of startnewpart.









share














Consider this example:



documentclass{report}
defstartnewpart{FALSE}
makeatletter
renewcommandchapter{if@openrightcleardoublepageelseclearpagefi
% defstartnewpart{FALSE}
thispagestyle{plain}%
global@topnumz@
@afterindentfalse
secdef@chapter@schapter
% defstartnewpart{FALSE}
}
makeatother
begin{document}
tableofcontents
chapter{Methods}
Some text
end{document}


If in renewcommandchapter I uncomment the first defstartnewpart{FALSE} the document compiles fine.



If instead I uncomment the second defstartnewpart{FALSE} I get an error:



Chapter 1.
! Missing { inserted.
@makechapterhead ...1par nobreak vskip 40p@ }

l.21 tableofcontents


Where is the difference?



In this example I am exploring how to use a control variable startnewpart to control the execution of chapter. defstartnewpart{FALSE} is meant to reset the value of startnewpart.







macros





share












share










share



share










asked 5 mins ago









ViestursViesturs

1,75731124




1,75731124













  • @chapter and @schapter look ahead to collect arguments, so they have to be last in the definition.

    – Henri Menke
    3 mins ago











  • @HenriMenke, is that the purpuse of using @?

    – Viesturs
    2 mins ago



















  • @chapter and @schapter look ahead to collect arguments, so they have to be last in the definition.

    – Henri Menke
    3 mins ago











  • @HenriMenke, is that the purpuse of using @?

    – Viesturs
    2 mins ago

















@chapter and @schapter look ahead to collect arguments, so they have to be last in the definition.

– Henri Menke
3 mins ago





@chapter and @schapter look ahead to collect arguments, so they have to be last in the definition.

– Henri Menke
3 mins ago













@HenriMenke, is that the purpuse of using @?

– Viesturs
2 mins ago





@HenriMenke, is that the purpuse of using @?

– Viesturs
2 mins ago










0






active

oldest

votes











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476836%2fusing-def-in-newcommand%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476836%2fusing-def-in-newcommand%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...