Head of a custom section
I am creating a new section called tsubsection
taking over code practically 1:1 from subsection
with the intention to introduce some modifications.
In this example
documentclass{report}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
the output is
Where does the extra "Methods" in the head of tsubsection
come from?
sectioning report
add a comment |
I am creating a new section called tsubsection
taking over code practically 1:1 from subsection
with the intention to introduce some modifications.
In this example
documentclass{report}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
the output is
Where does the extra "Methods" in the head of tsubsection
come from?
sectioning report
add a comment |
I am creating a new section called tsubsection
taking over code practically 1:1 from subsection
with the intention to introduce some modifications.
In this example
documentclass{report}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
the output is
Where does the extra "Methods" in the head of tsubsection
come from?
sectioning report
I am creating a new section called tsubsection
taking over code practically 1:1 from subsection
with the intention to introduce some modifications.
In this example
documentclass{report}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
the output is
Where does the extra "Methods" in the head of tsubsection
come from?
sectioning report
sectioning report
asked Mar 8 at 12:47
ViestursViesturs
1,85041126
1,85041126
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The extra Methods
shows up because you didn't define tsubsectionmark
, then the command:
csname tsubsectionmarkendcsname{Methods}
(which shows up somewhere deep in the definition of @startsection
) becomes:
relax{Methods}
which writes Methods
to the PDF.
You have to define the tsubsectionmark
to add some page marking (with markright
or markboth
) or to simply consume the argument:
newcommandtsubsectionmark[1]{}
Working code:
documentclass{report}
usepackage{trace}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
newcommandtsubsectionmark[1]{}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
Where is@startsection
defined? I don't see its definition in report.cls. Why don't I see the definition ofsubsectionmark
in report.cls?
– Viesturs
Mar 8 at 17:35
1
@startsection
is defined inlatex.ltx
(but actually thecsname tsubsectionmarkendcsname
thingy appears in@sect
, also defined inlatex.ltx
, which is called by@startsection
).subsectionmark
(and for other sectioning levels) are also inlatex.ltx
:letsubsectionmark@gobble
.
– Phelype Oleinik
Mar 8 at 17:40
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%2f478411%2fhead-of-a-custom-section%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The extra Methods
shows up because you didn't define tsubsectionmark
, then the command:
csname tsubsectionmarkendcsname{Methods}
(which shows up somewhere deep in the definition of @startsection
) becomes:
relax{Methods}
which writes Methods
to the PDF.
You have to define the tsubsectionmark
to add some page marking (with markright
or markboth
) or to simply consume the argument:
newcommandtsubsectionmark[1]{}
Working code:
documentclass{report}
usepackage{trace}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
newcommandtsubsectionmark[1]{}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
Where is@startsection
defined? I don't see its definition in report.cls. Why don't I see the definition ofsubsectionmark
in report.cls?
– Viesturs
Mar 8 at 17:35
1
@startsection
is defined inlatex.ltx
(but actually thecsname tsubsectionmarkendcsname
thingy appears in@sect
, also defined inlatex.ltx
, which is called by@startsection
).subsectionmark
(and for other sectioning levels) are also inlatex.ltx
:letsubsectionmark@gobble
.
– Phelype Oleinik
Mar 8 at 17:40
add a comment |
The extra Methods
shows up because you didn't define tsubsectionmark
, then the command:
csname tsubsectionmarkendcsname{Methods}
(which shows up somewhere deep in the definition of @startsection
) becomes:
relax{Methods}
which writes Methods
to the PDF.
You have to define the tsubsectionmark
to add some page marking (with markright
or markboth
) or to simply consume the argument:
newcommandtsubsectionmark[1]{}
Working code:
documentclass{report}
usepackage{trace}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
newcommandtsubsectionmark[1]{}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
Where is@startsection
defined? I don't see its definition in report.cls. Why don't I see the definition ofsubsectionmark
in report.cls?
– Viesturs
Mar 8 at 17:35
1
@startsection
is defined inlatex.ltx
(but actually thecsname tsubsectionmarkendcsname
thingy appears in@sect
, also defined inlatex.ltx
, which is called by@startsection
).subsectionmark
(and for other sectioning levels) are also inlatex.ltx
:letsubsectionmark@gobble
.
– Phelype Oleinik
Mar 8 at 17:40
add a comment |
The extra Methods
shows up because you didn't define tsubsectionmark
, then the command:
csname tsubsectionmarkendcsname{Methods}
(which shows up somewhere deep in the definition of @startsection
) becomes:
relax{Methods}
which writes Methods
to the PDF.
You have to define the tsubsectionmark
to add some page marking (with markright
or markboth
) or to simply consume the argument:
newcommandtsubsectionmark[1]{}
Working code:
documentclass{report}
usepackage{trace}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
newcommandtsubsectionmark[1]{}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
The extra Methods
shows up because you didn't define tsubsectionmark
, then the command:
csname tsubsectionmarkendcsname{Methods}
(which shows up somewhere deep in the definition of @startsection
) becomes:
relax{Methods}
which writes Methods
to the PDF.
You have to define the tsubsectionmark
to add some page marking (with markright
or markboth
) or to simply consume the argument:
newcommandtsubsectionmark[1]{}
Working code:
documentclass{report}
usepackage{trace}
makeatletter
newcounter{tsubsection}
%renewcommand{thetsubsection}{@Romanc@tsubsection}
newcommandtsubsection{@startsection{tsubsection}{2}{z@}%
{-3.25ex@plus -1ex @minus -.2ex}%
{1.5ex @plus .2ex}%
{normalfontlargebfseries}}
newcommandtsubsectionmark[1]{}
%newcommand*l@tsubsection{@dottedtocline{2}{3.8em}{3.2em}}
makeatother
begin{document}
tsubsection{Methods}
Some text
end{document}
answered Mar 8 at 13:07
Phelype OleinikPhelype Oleinik
24.2k54688
24.2k54688
Where is@startsection
defined? I don't see its definition in report.cls. Why don't I see the definition ofsubsectionmark
in report.cls?
– Viesturs
Mar 8 at 17:35
1
@startsection
is defined inlatex.ltx
(but actually thecsname tsubsectionmarkendcsname
thingy appears in@sect
, also defined inlatex.ltx
, which is called by@startsection
).subsectionmark
(and for other sectioning levels) are also inlatex.ltx
:letsubsectionmark@gobble
.
– Phelype Oleinik
Mar 8 at 17:40
add a comment |
Where is@startsection
defined? I don't see its definition in report.cls. Why don't I see the definition ofsubsectionmark
in report.cls?
– Viesturs
Mar 8 at 17:35
1
@startsection
is defined inlatex.ltx
(but actually thecsname tsubsectionmarkendcsname
thingy appears in@sect
, also defined inlatex.ltx
, which is called by@startsection
).subsectionmark
(and for other sectioning levels) are also inlatex.ltx
:letsubsectionmark@gobble
.
– Phelype Oleinik
Mar 8 at 17:40
Where is
@startsection
defined? I don't see its definition in report.cls. Why don't I see the definition of subsectionmark
in report.cls?– Viesturs
Mar 8 at 17:35
Where is
@startsection
defined? I don't see its definition in report.cls. Why don't I see the definition of subsectionmark
in report.cls?– Viesturs
Mar 8 at 17:35
1
1
@startsection
is defined in latex.ltx
(but actually the csname tsubsectionmarkendcsname
thingy appears in @sect
, also defined in latex.ltx
, which is called by @startsection
). subsectionmark
(and for other sectioning levels) are also in latex.ltx
: letsubsectionmark@gobble
.– Phelype Oleinik
Mar 8 at 17:40
@startsection
is defined in latex.ltx
(but actually the csname tsubsectionmarkendcsname
thingy appears in @sect
, also defined in latex.ltx
, which is called by @startsection
). subsectionmark
(and for other sectioning levels) are also in latex.ltx
: letsubsectionmark@gobble
.– Phelype Oleinik
Mar 8 at 17:40
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%2f478411%2fhead-of-a-custom-section%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