Re: Unable to change the page style using Memoir
On Fri, Jun 1, 2012 at 7:22 PM, Fabio Sobral wrote: > I tried using the command \pagestyle in the preamble and it didn't work. > Using the page layout in Document > Settings didn't work either. > > I even tried removing everything else from the preamble, but it always use > the plain style (header is empty and footer contains only the page number, > which is shown only on the first page of every part or chapter) This is strange. I use memoir all the time and \pagestyle works as expected. Can you post a minimal example exhibiting the behavior you're describing? Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Unable to change the page style using Memoir
I tried using the command \pagestyle in the preamble and it didn't work. Using the page layout in Document > Settings didn't work either. I even tried removing everything else from the preamble, but it always use the plain style (header is empty and footer contains only the page number, which is shown only on the first page of every part or chapter) Cheers, Fabio. On Thu, May 31, 2012 at 6:47 PM, stefano franchi wrote: > Hi Fabio, > > On Thu, May 31, 2012 at 5:53 PM, Fabio Sobral wrote: > > Hello, > > > > I'm new to LyX and TeX and while searching for resources about document > > styling I came across several tutorials. One of them explained how to use > > fancyhdr, which worked perfectly using the book document class. > > Later I came across these blog posts: > > http://hstuart.dk/2007/05/21/styling-the-chapter/ > > http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/ > > > > So I started using the document class to "book (Memoir)" to style the > > chapters as described in the fist blog spot, but for some reason I can't > > style the page header. > > Changing the page layout using Document > Settings > Page layout doesn't > > work either, it always end up using the "plain" header style. > > > > I tried using fancyhdr again, but it doesn't work. Apparently the memoir > > document class already includes an implementation of it or something like > > that. > > Exactly, memoir implements its own version of the fancyhdr package, so > you should use memoir facilities (in the preamble, or in a separate > config file you would load in your preamble). You may want to take a > look at section 7.2 of the memoir manual for a detailed discussion of > "pagestyles." > A few pagestyle are predefined, and you can just load them with the > command \pagestyle. For instance, \pagestyle{headings} implements the > "headings" page style which does the following: > > The footer is empty. The header contains the folio at the outer side > of the page; > on verso pages the chapter name, number and title, in slanted > uppercase is set at the > spine margin and on recto pages the section number and uppercase title > is set by the > spine margin. > > If none of the predefined style does what you want, you may define > your own (with the \makepagestyle command) and then load it with the > \pagestyle command. Section 7.3 of the manual provides a detailed > discussion of the \makepagestyle command. > > Cheers, > > Stefano > > > -- > __ > Stefano Franchi > Associate Research Professor > Department of Hispanic StudiesPh: +1 (979) 845-2125 > Texas A&M University Fax: +1 (979) 845-6421 > College Station, Texas, USA > > stef...@tamu.edu > http://stefano.cleinias.org >
Re: Unable to change the page style using Memoir
Hi Fabio, On Thu, May 31, 2012 at 5:53 PM, Fabio Sobral wrote: > Hello, > > I'm new to LyX and TeX and while searching for resources about document > styling I came across several tutorials. One of them explained how to use > fancyhdr, which worked perfectly using the book document class. > Later I came across these blog posts: > http://hstuart.dk/2007/05/21/styling-the-chapter/ > http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/ > > So I started using the document class to "book (Memoir)" to style the > chapters as described in the fist blog spot, but for some reason I can't > style the page header. > Changing the page layout using Document > Settings > Page layout doesn't > work either, it always end up using the "plain" header style. > > I tried using fancyhdr again, but it doesn't work. Apparently the memoir > document class already includes an implementation of it or something like > that. Exactly, memoir implements its own version of the fancyhdr package, so you should use memoir facilities (in the preamble, or in a separate config file you would load in your preamble). You may want to take a look at section 7.2 of the memoir manual for a detailed discussion of "pagestyles." A few pagestyle are predefined, and you can just load them with the command \pagestyle. For instance, \pagestyle{headings} implements the "headings" page style which does the following: The footer is empty. The header contains the folio at the outer side of the page; on verso pages the chapter name, number and title, in slanted uppercase is set at the spine margin and on recto pages the section number and uppercase title is set by the spine margin. If none of the predefined style does what you want, you may define your own (with the \makepagestyle command) and then load it with the \pagestyle command. Section 7.3 of the manual provides a detailed discussion of the \makepagestyle command. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Unable to change the page style using Memoir
Hello, I'm new to LyX and TeX and while searching for resources about document styling I came across several tutorials. One of them explained how to use fancyhdr, which worked perfectly using the book document class. Later I came across these blog posts: http://hstuart.dk/2007/05/21/styling-the-chapter/ http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/ So I started using the document class to "book (Memoir)" to style the chapters as described in the fist blog spot, but for some reason I can't style the page header. Changing the page layout using Document > Settings > Page layout doesn't work either, it always end up using the "plain" header style. I tried using fancyhdr again, but it doesn't work. Apparently the memoir document class already includes an implementation of it or something like that. I'm using Windows XP SP3 and LyX 2.0.3. This is my local layout: Style Chapterstar Copystyle Chapter LatexName chapterstar LabelType Top_Environment LabelString "Unnumbered chapter" LabelFont Series Bold Size LARGE EndFont End This is my preamble: %used by the cover \usepackage{graphicx} % T1 Helvetica scaled \usepackage[T1]{fontenc} \usepackage[scaled]{helvet} \renewcommand*{\familydefault}{\sfdefault} % Chapter style \usepackage{xcolor,calc} \makechapterstyle{combined}{ \setlength{\beforechapskip}{30pt} \setlength{\midchapskip}{-60pt} \setlength{\afterchapskip}{60pt} \renewcommand*{\printchaptername}{} \renewcommand*{\chapnumfont}{\normalfont\sffamily\bfseries\fontsize{80}{0}\selectfont} \renewcommand*{\printchapternum}{\flushright\chapnumfont\textcolor[rgb]{.64,.79,.87}{\thechapter}} \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries} \renewcommand*{\printchaptertitle}[1]{% \raggedright\chaptitlefont\parbox[t]{\textwidth-3cm}{\raggedright##1}} } \chapterstyle{combined} % Code listing \usepackage{listings,color} \definecolor{dkgreen}{RGB}{63,127,95} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{light-gray}{rgb}{0.925,0.925,0.925} \definecolor{mauve}{RGB}{127,0,85} \lstset{ language=Java, backgroundcolor=\color{light-gray}, basicstyle=\footnotesize\ttfamily, numbers=left, numberstyle=\tiny, numbersep=5pt, tabsize=2, extendedchars=true, breaklines=true, keywordstyle=\color{mauve}\textbf, frame=b, commentstyle=\color{dkgreen}, stringstyle=\color{blue}, showspaces=false, showtabs=false, xleftmargin=17pt, framexleftmargin=17pt, framexrightmargin=5pt, framexbottommargin=4pt, showstringspaces=false } \lstloadlanguages{ %[Visual]Basic %Pascal %C %C++ %XML %HTML Java } %\DeclareCaptionFont{blue}{\color{blue}} %\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue}, textfont={blue}} \usepackage{caption} \DeclareCaptionFont{white}{\color{white}} \DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35, 0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}} \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}} % New style chapter star, so we can have unumbered chapters to show in ToC \newcommand{\tocchap}[1]{\addcontentsline{toc}{chapter}{\protect\numberline {}#1}\markboth{\textsc{#1}}{\textsc{#1}}\thispagestyle{plain}} \newcommand{\chapterstar}[1]{\chapter*{#1}\tocchap{#1}} % Sections are not numbered \setcounter{secnumdepth}{0} % Vertical gap between paragraphs \setlength{\parskip}{\medskipamount} Thanks in advance, Fabio.