problem with cross-referencing in section titles / header
up vote
0
down vote
favorite
I am using the following as a section title in the main body:
documentclass[a4paper,openany]{book}
usepackage{etoolbox} %Patches the "chapter" page numbering
usepackage{fancyhdr}
pagestyle{fancy}
fancyhead[RE]{slshape rightmark}
fancyhead[LO]{slshape leftmark}
fancyhead[LO,RE]{thepage}
fancyheadoffset[L]{0pt} %justification of the headers
renewcommand{headrulewidth}{0pt}
renewcommand{footrulewidth}{0pt}
patchcmd{chapter}{thispagestyle{plain}}{thispagestyle{empty}}{}{}
cfoot{} % get rid of the page number
usepackage[a4paper, includehead, includefoot,
top=0.75in,
bottom=0.5in,
outer=1in,
inner=1in,
]{geometry}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
hypersetup{hidelinks} %Keep document hyperlinks but remove boarders
chapter{Chapter title text }label{chap:sd}
some text
clearpage
section{Section title text ref{chap:sd}}
end{document}
But in the heading, it just says "??".
How do I fix this?
EDIT: added more code
header-footer labels ref
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 2 more comments
up vote
0
down vote
favorite
I am using the following as a section title in the main body:
documentclass[a4paper,openany]{book}
usepackage{etoolbox} %Patches the "chapter" page numbering
usepackage{fancyhdr}
pagestyle{fancy}
fancyhead[RE]{slshape rightmark}
fancyhead[LO]{slshape leftmark}
fancyhead[LO,RE]{thepage}
fancyheadoffset[L]{0pt} %justification of the headers
renewcommand{headrulewidth}{0pt}
renewcommand{footrulewidth}{0pt}
patchcmd{chapter}{thispagestyle{plain}}{thispagestyle{empty}}{}{}
cfoot{} % get rid of the page number
usepackage[a4paper, includehead, includefoot,
top=0.75in,
bottom=0.5in,
outer=1in,
inner=1in,
]{geometry}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
hypersetup{hidelinks} %Keep document hyperlinks but remove boarders
chapter{Chapter title text }label{chap:sd}
some text
clearpage
section{Section title text ref{chap:sd}}
end{document}
But in the heading, it just says "??".
How do I fix this?
EDIT: added more code
header-footer labels ref
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
that refers to a (presumably missing)label{name1}
elsewhere in the docuemnt, did you mean to uselabel{name1}
here so that you could refer to this section?
– David Carlisle
Nov 5 at 0:09
2
@slew123 It would be easier to understand what you want if you provided a minimal example that shows what you want to happen instead of a single line of code and "it doesn't work". "TEXT HERE ??" is exactly what I would expect from your code, so it's not clear how you want it fixed. (David Carlisle has offered one interpretation, another is that you want the "??" to become some other section's number.)
– Teepeemm
Nov 5 at 2:11
Please show your MWE -- we can't know whether the??
is shown in the section or not.
– JouleV
Nov 5 at 7:22
Ok, I will do this, give me a few minutes.
– slew123
Nov 5 at 17:04
I added the extra code, (with packages related to headers and referencing remaining) it seems to be a problem with hyperref package, not sure why.
– slew123
Nov 5 at 17:11
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using the following as a section title in the main body:
documentclass[a4paper,openany]{book}
usepackage{etoolbox} %Patches the "chapter" page numbering
usepackage{fancyhdr}
pagestyle{fancy}
fancyhead[RE]{slshape rightmark}
fancyhead[LO]{slshape leftmark}
fancyhead[LO,RE]{thepage}
fancyheadoffset[L]{0pt} %justification of the headers
renewcommand{headrulewidth}{0pt}
renewcommand{footrulewidth}{0pt}
patchcmd{chapter}{thispagestyle{plain}}{thispagestyle{empty}}{}{}
cfoot{} % get rid of the page number
usepackage[a4paper, includehead, includefoot,
top=0.75in,
bottom=0.5in,
outer=1in,
inner=1in,
]{geometry}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
hypersetup{hidelinks} %Keep document hyperlinks but remove boarders
chapter{Chapter title text }label{chap:sd}
some text
clearpage
section{Section title text ref{chap:sd}}
end{document}
But in the heading, it just says "??".
How do I fix this?
EDIT: added more code
header-footer labels ref
I am using the following as a section title in the main body:
documentclass[a4paper,openany]{book}
usepackage{etoolbox} %Patches the "chapter" page numbering
usepackage{fancyhdr}
pagestyle{fancy}
fancyhead[RE]{slshape rightmark}
fancyhead[LO]{slshape leftmark}
fancyhead[LO,RE]{thepage}
fancyheadoffset[L]{0pt} %justification of the headers
renewcommand{headrulewidth}{0pt}
renewcommand{footrulewidth}{0pt}
patchcmd{chapter}{thispagestyle{plain}}{thispagestyle{empty}}{}{}
cfoot{} % get rid of the page number
usepackage[a4paper, includehead, includefoot,
top=0.75in,
bottom=0.5in,
outer=1in,
inner=1in,
]{geometry}
usepackage{hyperref}
usepackage{cleveref}
begin{document}
hypersetup{hidelinks} %Keep document hyperlinks but remove boarders
chapter{Chapter title text }label{chap:sd}
some text
clearpage
section{Section title text ref{chap:sd}}
end{document}
But in the heading, it just says "??".
How do I fix this?
EDIT: added more code
header-footer labels ref
header-footer labels ref
edited Nov 5 at 17:11
asked Nov 4 at 23:55
slew123
1168
1168
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
that refers to a (presumably missing)label{name1}
elsewhere in the docuemnt, did you mean to uselabel{name1}
here so that you could refer to this section?
– David Carlisle
Nov 5 at 0:09
2
@slew123 It would be easier to understand what you want if you provided a minimal example that shows what you want to happen instead of a single line of code and "it doesn't work". "TEXT HERE ??" is exactly what I would expect from your code, so it's not clear how you want it fixed. (David Carlisle has offered one interpretation, another is that you want the "??" to become some other section's number.)
– Teepeemm
Nov 5 at 2:11
Please show your MWE -- we can't know whether the??
is shown in the section or not.
– JouleV
Nov 5 at 7:22
Ok, I will do this, give me a few minutes.
– slew123
Nov 5 at 17:04
I added the extra code, (with packages related to headers and referencing remaining) it seems to be a problem with hyperref package, not sure why.
– slew123
Nov 5 at 17:11
|
show 2 more comments
1
that refers to a (presumably missing)label{name1}
elsewhere in the docuemnt, did you mean to uselabel{name1}
here so that you could refer to this section?
– David Carlisle
Nov 5 at 0:09
2
@slew123 It would be easier to understand what you want if you provided a minimal example that shows what you want to happen instead of a single line of code and "it doesn't work". "TEXT HERE ??" is exactly what I would expect from your code, so it's not clear how you want it fixed. (David Carlisle has offered one interpretation, another is that you want the "??" to become some other section's number.)
– Teepeemm
Nov 5 at 2:11
Please show your MWE -- we can't know whether the??
is shown in the section or not.
– JouleV
Nov 5 at 7:22
Ok, I will do this, give me a few minutes.
– slew123
Nov 5 at 17:04
I added the extra code, (with packages related to headers and referencing remaining) it seems to be a problem with hyperref package, not sure why.
– slew123
Nov 5 at 17:11
1
1
that refers to a (presumably missing)
label{name1}
elsewhere in the docuemnt, did you mean to use label{name1}
here so that you could refer to this section?– David Carlisle
Nov 5 at 0:09
that refers to a (presumably missing)
label{name1}
elsewhere in the docuemnt, did you mean to use label{name1}
here so that you could refer to this section?– David Carlisle
Nov 5 at 0:09
2
2
@slew123 It would be easier to understand what you want if you provided a minimal example that shows what you want to happen instead of a single line of code and "it doesn't work". "TEXT HERE ??" is exactly what I would expect from your code, so it's not clear how you want it fixed. (David Carlisle has offered one interpretation, another is that you want the "??" to become some other section's number.)
– Teepeemm
Nov 5 at 2:11
@slew123 It would be easier to understand what you want if you provided a minimal example that shows what you want to happen instead of a single line of code and "it doesn't work". "TEXT HERE ??" is exactly what I would expect from your code, so it's not clear how you want it fixed. (David Carlisle has offered one interpretation, another is that you want the "??" to become some other section's number.)
– Teepeemm
Nov 5 at 2:11
Please show your MWE -- we can't know whether the
??
is shown in the section or not.– JouleV
Nov 5 at 7:22
Please show your MWE -- we can't know whether the
??
is shown in the section or not.– JouleV
Nov 5 at 7:22
Ok, I will do this, give me a few minutes.
– slew123
Nov 5 at 17:04
Ok, I will do this, give me a few minutes.
– slew123
Nov 5 at 17:04
I added the extra code, (with packages related to headers and referencing remaining) it seems to be a problem with hyperref package, not sure why.
– slew123
Nov 5 at 17:11
I added the extra code, (with packages related to headers and referencing remaining) it seems to be a problem with hyperref package, not sure why.
– slew123
Nov 5 at 17:11
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
Since no one has been able to fix the issue, I decided to rename the section title without using a reference.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Since no one has been able to fix the issue, I decided to rename the section title without using a reference.
add a comment |
up vote
0
down vote
Since no one has been able to fix the issue, I decided to rename the section title without using a reference.
add a comment |
up vote
0
down vote
up vote
0
down vote
Since no one has been able to fix the issue, I decided to rename the section title without using a reference.
Since no one has been able to fix the issue, I decided to rename the section title without using a reference.
answered Nov 8 at 3:41
slew123
1168
1168
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f458415%2fproblem-with-cross-referencing-in-section-titles-header%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
1
that refers to a (presumably missing)
label{name1}
elsewhere in the docuemnt, did you mean to uselabel{name1}
here so that you could refer to this section?– David Carlisle
Nov 5 at 0:09
2
@slew123 It would be easier to understand what you want if you provided a minimal example that shows what you want to happen instead of a single line of code and "it doesn't work". "TEXT HERE ??" is exactly what I would expect from your code, so it's not clear how you want it fixed. (David Carlisle has offered one interpretation, another is that you want the "??" to become some other section's number.)
– Teepeemm
Nov 5 at 2:11
Please show your MWE -- we can't know whether the
??
is shown in the section or not.– JouleV
Nov 5 at 7:22
Ok, I will do this, give me a few minutes.
– slew123
Nov 5 at 17:04
I added the extra code, (with packages related to headers and referencing remaining) it seems to be a problem with hyperref package, not sure why.
– slew123
Nov 5 at 17:11