LaTeX users online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 4 guests

Page numbers beside headers (LyX)

LaTeX Forum: Page Layout

Add tags Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).

Postby dschneiderch on Thu Apr 21st, 2011

I will check out the top/bottom alignment but for horizontal alignment
Code: Select all  •  Open in online LaTeX editor
\fancyhead[R]{\leavevmode\rlap{\hspace{0.5in}\thepage}}
moves the page nmber LEFT and -0.5 is no different.

I guess the reqs are simply no more than 0.5".

ds
dschneiderch
 
Posts: 22
Joined: Thu Mar 31st, 2011

Postby nvx on Thu Apr 21st, 2011

Hmm, try "\hspace*{...}" (notice the asterisk), maybe it will do the trick. If not then I am afraid I will not be able to help you further with this matter. Sorry...

nvx
nvx
 
Posts: 25
Joined: Mon Dec 17th, 2007

Postby dschneiderch on Thu Apr 21st, 2011

No luck with that either. Thanks for the attempt though. Any other suggestions out there?
dschneiderch
 
Posts: 22
Joined: Thu Mar 31st, 2011

Postby localghost on Thu Apr 21st, 2011

Somehow I don't see the problem.
Code: Select all  •  Open in online LaTeX editor
\documentclass[11pt,a4paper,twoside,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel
}
\usepackage[%
  headheight=14pt,
  includeheadfoot,
  inner=3cm,
  outer=4cm,
  vmargin=3cm
]{geometry}
\usepackage{fancyhdr}
\usepackage{blindtext}

\fancyhf{}
\fancyhead[LE]{\leavevmode\llap{\thepage\hspace{0.5in}}\nouppercase{\leftmark}}
\fancyhead[RO]{\leavevmode\nouppercase{\rightmark}\rlap{\hspace{0.5in}\thepage}}
\pagestyle{fancy}

\begin{document}
  \blinddocument
\end{document
}

Please enlighten me by a complete minimal example which you didn't provide until now.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Postby dschneiderch on Thu Apr 21st, 2011

I'm trying to define the header (and footer) to ensure the page number is no more than 0.5 inches from any edge (so top right it should be 'square' and the bottom 0.5" from bottom edge). As it was, I was using \qquad\thispage to approx. align the page number so it "looks" right. The code posted with \hspace{0.5} causes the page number to shift 0.5" to the left instead of to the right.

I'm using LyX and am only beginning to the understand the Latex typesetting functions so I'm not sure what else I can provide other than the class file from http://sites.google.com/site/nathanandrewmiller/cuboulderthesisusinglyx
I'd be happy to post anything that could help though. Thanks for trying.
dschneiderch
 
Posts: 22
Joined: Thu Mar 31st, 2011

Postby localghost on Fri Apr 22nd, 2011

I must have missed the detail about LyX until the topic has been split. So I'm afraid I can't advise any further.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Postby meho_r on Sat Apr 23rd, 2011

dschneiderch wrote:I'm trying to define the header (and footer) to ensure the page number is no more than 0.5 inches from any edge (so top right it should be 'square' and the bottom 0.5" from bottom edge). As it was, I was using \qquad\thispage to approx. align the page number so it "looks" right. The code posted with \hspace{0.5} causes the page number to shift 0.5" to the left instead of to the right.

I'm using LyX and am only beginning to the understand the Latex typesetting functions so I'm not sure what else I can provide other than the class file from http://sites.google.com/site/nathanandrewmiller/cuboulderthesisusinglyx
I'd be happy to post anything that could help though. Thanks for trying.

Can you, please, create an example .lyx file, put it together with all additional necessary files in a ZIP archive and attach it here?
User avatar
meho_r
 
Posts: 823
Joined: Tue Aug 7th, 2007

Postby dschneiderch on Sat Apr 23rd, 2011

Here is a LyX file and a .tex file with appropriate .cls file. Thanks!
Attachments
LyX-example.zip
An Example.
(50.98 KiB) Downloaded 41 times
dschneiderch
 
Posts: 22
Joined: Thu Mar 31st, 2011

Postby meho_r on Sun Apr 24th, 2011

This is oneside document, so, for starters, let's try with something like this in the preamble:
Code: Select all  •  Open in online LaTeX editor
\usepackage{fancyhdr}

\fancyhf{
}  % Delete current setting for header and footer

\fancypagestyle{main}{% page style for normal pages
  \fancyhfoffset[R]{0.5in}
  \fancyhead[R]{\thepage}
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
}

\fancypagestyle{plain}{
  \fancyhfoffset[R]{-0.5in}
  \fancyhead{
}  % Get rid of headers and footers on plain pages...
  \fancyfoot[C]{\hspace*{0.75in}\thepage}
  \renewcommand{\headrulewidth}{0pt
}  % ...and of the lines
  \renewcommand{\footrulewidth}{0pt}
}

\fancypagestyle{empty}{
  \fancyhead{
}  % Get rid of headers and footers on empty pages...
  \fancyfoot{}
  \renewcommand{\headrulewidth}{0pt
}  % ...and of the lines
  \renewcommand{\footrulewidth}{0pt}
}

And at the beginning of your document, press Ctrl+L and type the following:
Code: Select all  •  Open in online LaTeX editor
\pagestyle{main}

Is this satisfactory to you or you had something different in mind?
User avatar
meho_r
 
Posts: 823
Joined: Tue Aug 7th, 2007

Postby dschneiderch on Mon Apr 25th, 2011

Yep that does it. I had read that fancyhfoffset wasn't good to use...not sure why but this works except not for the front matter. The front matter is somehow created in the class file I think. Any suggestions for this?


Edit by localghost: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.
Attachments
LyX-example.zip
A further example.
(178.73 KiB) Downloaded 50 times
dschneiderch
 
Posts: 22
Joined: Thu Mar 31st, 2011

PreviousNext

Return to Page Layout

LaTeX users online

Users browsing this forum: No registered users and 4 guests
http://latex-community.org/forum/viewtopic.php?f=47&t=12891&start=10
latex-community.org
crawl=CC-MAIN-2016-36
57045
application/http; msgtype=response
sha1:HJS3C2EVBKC5I6FVTZJAH4HJNKGAZBQY
<urn:uuid:f69669c3-bf61-440b-94f0-323b27c1c147>
2016-08-31T02:12:43Z
78.46.26.59
sha1:NPTCURNG6ROMISUY6PVHUXNWIFBSF45V
<urn:uuid:5228605c-b0fc-4f18-92fc-73318887019f>
http://latex-community.org/forum/viewtopic.php?f=47&t=12891&start=10
response
<urn:uuid:55c194a7-a3d4-474c-b915-9962c7022ac1>
robots: classic
hostname: ip-10-153-172-175.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2016-36
operator: CommonCrawl Admin
description: Wide crawl of the web for August 2016
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf