Hi all:
Please consider this file:
\documentclass{memoir}
\newcommand*{\capauthor}{}
\newcommand*{\captit}{}
\makechapterstyle{up}{%
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\renewcommand*{\chaptitlefont}{\huge\sffamily}
\renewcommand*{\printchapternum}{}
\renewcommand*{\afterchapternum}{}
}
\chapterstyle{up}
\makepagestyle{up}
\makeevenhead{up}{\textsf{\captit}}{}{}
\makeoddhead{up}{}{}{\textsf{\capauthor}}
\makeevenfoot{up}{\textsf{\thepage}}{}{}
\makeoddfoot{up}{}{}{\textsf{\thepage}}
\pagestyle{up}
\renewcommand*{\cftchapterfont}{\sffamily\large}
\renewcommand*{\chapternumberline}[1]{}
\renewcommand*{\cftchapterpagefont}{\sffamily\large}
\newcommand*{\mychapter}[2]{\renewcommand*{\captit}{#1}%
\renewcommand*{\capauthor}{#2}%
\chapter[{#1\\[1ex]\textit{#2}}][#1]{#1\\[1em]\Large\textit{#2}}}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\mychapter{The doctor}{Dr.\ Jeckyll}
Some text.\newpage Some more text.\newpage Some more text.\newpage
\mychapter{The monster}{Mr.\ Hyde}
Some text.\newpage Some more text.\newpage Some more text.
\end{document}
Here's what I wanted to achieve with this (among other things):
1) The chapter numbers do not appear (both at table of contents and at
the first page of each chapter).
2) For each chapter, both at the first page of the chapter and at the
table of contents, we get both the title and the author (in one line
for each).
3) Everything, except the body of the text, is typeset in a sans serif
font.
Well, I got all this. But I also got two unwanted side effects at the
table of contents:
1) There is a space before the the name of the author;
2) The number of the first page of the chapter appears at the same line
as the name of the author; it should appear, of course, at the same line
as the chapter title.
Can anyone tell me how to correct this?
Best regards,
Jose Carlos Santos
|
|
0
|
|
|
|
Reply
|
jcsantos (1099)
|
3/11/2010 11:38:07 PM |
|
Jos� Carlos Santos wrote:
> Hi all:
>
> Please consider this file:
>
> \documentclass{memoir}
> \newcommand*{\capauthor}{}
> \newcommand*{\captit}{}
> \makechapterstyle{up}{%
> \renewcommand*{\printchaptername}{}
> \renewcommand*{\chapternamenum}{}
> \renewcommand*{\chaptitlefont}{\huge\sffamily}
> \renewcommand*{\printchapternum}{}
> \renewcommand*{\afterchapternum}{}
> }
> \chapterstyle{up}
> \makepagestyle{up}
> \makeevenhead{up}{\textsf{\captit}}{}{}
> \makeoddhead{up}{}{}{\textsf{\capauthor}}
> \makeevenfoot{up}{\textsf{\thepage}}{}{}
> \makeoddfoot{up}{}{}{\textsf{\thepage}}
> \pagestyle{up}
> \renewcommand*{\cftchapterfont}{\sffamily\large}
> \renewcommand*{\chapternumberline}[1]{}
> \renewcommand*{\cftchapterpagefont}{\sffamily\large}
> \newcommand*{\mychapter}[2]{\renewcommand*{\captit}{#1}%
> \renewcommand*{\capauthor}{#2}%
> \chapter[{#1\\[1ex]\textit{#2}}][#1]{#1\\[1em]\Large\textit{#2}}}
> \begin{document}
> \frontmatter
> \tableofcontents
> \mainmatter
> \mychapter{The doctor}{Dr.\ Jeckyll}
> Some text.\newpage Some more text.\newpage Some more text.\newpage
>
> \mychapter{The monster}{Mr.\ Hyde}
> Some text.\newpage Some more text.\newpage Some more text.
> \end{document}
>
> Here's what I wanted to achieve with this (among other things):
>
> 1) The chapter numbers do not appear (both at table of contents and at
> the first page of each chapter).
>
> 2) For each chapter, both at the first page of the chapter and at the
> table of contents, we get both the title and the author (in one line
> for each).
>
> 3) Everything, except the body of the text, is typeset in a sans serif
> font.
>
> Well, I got all this. But I also got two unwanted side effects at the
> table of contents:
>
> 1) There is a space before the the name of the author;
>
> 2) The number of the first page of the chapter appears at the same line
> as the name of the author; it should appear, of course, at the same line
> as the chapter title.
>
> Can anyone tell me how to correct this?
>
> Best regards,
>
> Jose Carlos Santos
use the tools memoir provides you with
\documentclass{memoir}
\makechapterstyle{up}{%
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\renewcommand*{\chaptitlefont}{\huge\sffamily}
\renewcommand*{\printchapternum}{}
\renewcommand*{\afterchapternum}{}
}
\chapterstyle{up}
\makepagestyle{up}
\makeevenhead{up}{\textsf{\rightmark}}{}{}
\makeoddhead{up}{}{}{\textsf{\leftmark}}
\makeevenfoot{up}{\textsf{\thepage}}{}{}
\makeoddfoot{up}{}{}{\textsf{\thepage}}
\pagestyle{up}
\renewcommand*{\cftchapterfont}{\sffamily\large}
\renewcommand*{\chapternumberline}[1]{}
\renewcommand*{\cftchapterpagefont}{\sffamily\large}
\newcommand*{\mychapter}[2]{%
\chapter*{#1}%
\addcontentsline{toc}{chapter}{#1}%
\chapterprecishere{#2}%
\chapterprecistoc{#1}%
\markboth{#1}{#2}%
}
\makeatletter
\DeclareRobustCommand{\precistoctext}[1]{%
{%
\nopagebreak\noindent\memRTLleftskip0pt\relax
\memRTLrightskip \@tocrmarg\relax
\precistocfont #1\par}}
\makeatother
\renewcommand*{\precisfont}{\normalfont\Large\itshape\sffamily}
\setlength\prechapterprecisshift{-\afterchapskip}
\addtolength\prechapterprecisshift{1em}
\renewcommand{\prechapterprecis}{%
\vspace*{\prechapterprecisshift}%
\begin{adjustwidth}{0em}{0em}\precisfont}
\renewcommand*{\postchapterprecis}{\end{adjustwidth}\vskip\afterchapskip}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\mychapter{The doctor}{Dr.\ Jeckyll}
Some text.\newpage Some more text.\newpage Some more text.\newpage
\mychapter{The monster}{Mr.\ Hyde}
Some text.\newpage Some more text.\newpage Some more text.
\end{document}
|
|
0
|
|
|
|
Reply
|
Lars
|
3/12/2010 12:05:13 AM
|
|
On 12-03-2010 0:05, Lars Madsen wrote:
>> Please consider this file:
>>
>> \documentclass{memoir}
>> \newcommand*{\capauthor}{}
>> \newcommand*{\captit}{}
>> \makechapterstyle{up}{%
>> \renewcommand*{\printchaptername}{}
>> \renewcommand*{\chapternamenum}{}
>> \renewcommand*{\chaptitlefont}{\huge\sffamily}
>> \renewcommand*{\printchapternum}{}
>> \renewcommand*{\afterchapternum}{}
>> }
>> \chapterstyle{up}
>> \makepagestyle{up}
>> \makeevenhead{up}{\textsf{\captit}}{}{}
>> \makeoddhead{up}{}{}{\textsf{\capauthor}}
>> \makeevenfoot{up}{\textsf{\thepage}}{}{}
>> \makeoddfoot{up}{}{}{\textsf{\thepage}}
>> \pagestyle{up}
>> \renewcommand*{\cftchapterfont}{\sffamily\large}
>> \renewcommand*{\chapternumberline}[1]{}
>> \renewcommand*{\cftchapterpagefont}{\sffamily\large}
>> \newcommand*{\mychapter}[2]{\renewcommand*{\captit}{#1}%
>> \renewcommand*{\capauthor}{#2}%
>> \chapter[{#1\\[1ex]\textit{#2}}][#1]{#1\\[1em]\Large\textit{#2}}}
>> \begin{document}
>> \frontmatter
>> \tableofcontents
>> \mainmatter
>> \mychapter{The doctor}{Dr.\ Jeckyll}
>> Some text.\newpage Some more text.\newpage Some more text.\newpage
>>
>> \mychapter{The monster}{Mr.\ Hyde}
>> Some text.\newpage Some more text.\newpage Some more text.
>> \end{document}
>>
>> Here's what I wanted to achieve with this (among other things):
>>
>> 1) The chapter numbers do not appear (both at table of contents and at
>> the first page of each chapter).
>>
>> 2) For each chapter, both at the first page of the chapter and at the
>> table of contents, we get both the title and the author (in one line
>> for each).
>>
>> 3) Everything, except the body of the text, is typeset in a sans serif
>> font.
>>
>> Well, I got all this. But I also got two unwanted side effects at the
>> table of contents:
>>
>> 1) There is a space before the the name of the author;
>>
>> 2) The number of the first page of the chapter appears at the same line
>> as the name of the author; it should appear, of course, at the same line
>> as the chapter title.
>>
>> Can anyone tell me how to correct this?
>>
>> Best regards,
>>
>> Jose Carlos Santos
>
> use the tools memoir provides you with
>
> \documentclass{memoir}
> \makechapterstyle{up}{%
> \renewcommand*{\printchaptername}{}
> \renewcommand*{\chapternamenum}{}
> \renewcommand*{\chaptitlefont}{\huge\sffamily}
> \renewcommand*{\printchapternum}{}
> \renewcommand*{\afterchapternum}{}
> }
> \chapterstyle{up}
> \makepagestyle{up}
> \makeevenhead{up}{\textsf{\rightmark}}{}{}
> \makeoddhead{up}{}{}{\textsf{\leftmark}}
> \makeevenfoot{up}{\textsf{\thepage}}{}{}
> \makeoddfoot{up}{}{}{\textsf{\thepage}}
> \pagestyle{up}
> \renewcommand*{\cftchapterfont}{\sffamily\large}
> \renewcommand*{\chapternumberline}[1]{}
> \renewcommand*{\cftchapterpagefont}{\sffamily\large}
> \newcommand*{\mychapter}[2]{%
> \chapter*{#1}%
> \addcontentsline{toc}{chapter}{#1}%
> \chapterprecishere{#2}%
> \chapterprecistoc{#1}%
> \markboth{#1}{#2}%
> }
> \makeatletter
> \DeclareRobustCommand{\precistoctext}[1]{%
> {%
> \nopagebreak\noindent\memRTLleftskip0pt\relax
> \memRTLrightskip \@tocrmarg\relax
> \precistocfont #1\par}}
>
>
>
> \makeatother
> \renewcommand*{\precisfont}{\normalfont\Large\itshape\sffamily}
> \setlength\prechapterprecisshift{-\afterchapskip}
> \addtolength\prechapterprecisshift{1em}
> \renewcommand{\prechapterprecis}{%
> \vspace*{\prechapterprecisshift}%
> \begin{adjustwidth}{0em}{0em}\precisfont}
> \renewcommand*{\postchapterprecis}{\end{adjustwidth}\vskip\afterchapskip}
>
>
> \begin{document}
> \frontmatter
> \tableofcontents
> \mainmatter
> \mychapter{The doctor}{Dr.\ Jeckyll}
> Some text.\newpage Some more text.\newpage Some more text.\newpage
>
> \mychapter{The monster}{Mr.\ Hyde}
> Some text.\newpage Some more text.\newpage Some more text.
> \end{document}
Well, this almost did what I wanted. I replaced
\chapterprecistoc{#1}
by
\chapterprecistoc{#2}
and it was better. However, the font used for the author's name was a
serifed one, in spite of your definition of \precisfont. I had to add
\renewcommand*{\precistocfont}{\normalfont\sffamily\itshape}
Thanks a lot... again! :-)
Best regards,
Jose Carlos Santos
|
|
0
|
|
|
|
Reply
|
ISO
|
3/12/2010 12:34:23 AM
|
|
>
> Well, this almost did what I wanted. I replaced
>
> \chapterprecistoc{#1}
>
> by
>
> \chapterprecistoc{#2}
>
> and it was better. However, the font used for the author's name was a
> serifed one, in spite of your definition of \precisfont. I had to add
>
> \renewcommand*{\precistocfont}{\normalfont\sffamily\itshape}
>
> Thanks a lot... again! :-)
>
> Best regards,
>
> Jose Carlos Santos
I only provide the building blocks, the details is up to you ;-)
that way you learn a bit more.
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html
|
|
0
|
|
|
|
Reply
|
Lars
|
3/12/2010 9:16:39 AM
|
|
|
3 Replies
181 Views
(page loaded in 0.121 seconds)
Similiar Articles: Copying cross references between Word documents ?? - comp.os.ms ...I'm working on a large word document together with several co- authors. Each author works on a copy of the document with the identical table of contents. LaTeX and ebooks, revisited - comp.text.texThanks to hyperref the table of contents is displayed in several layers so that the screen is not cluttered, navigating is easy. With these settings, things work like ... Find text position in PDF using iText - comp.text.pdfiText, FOP and Table of contents - comp.text.pdf Find text position in PDF using iText ... iText - PdfRead - get Title, Author, Keywords,... - comp.text.pdf ... Find text ... Add ToC/bookmarks to an existing PDF document? - comp.text.pdf ...... text No. 1) /OUT pdfmark" ^ -c "[/Page 2 /View [/XYZ null null null] /Title ... bookmarks to an existing PDF document? - comp.text.pdf ... iText, FOP and Table of contents ... Verilog tutorial by John Sanguinetti - comp.arch.fpga... is also accessible, and requires no registration, but when you go to the table of contents ... processing in vhdl/verilog - comp.lang.vhdl Any examples and tutorial books on ... equi-join VS JOIN or INNER JOIN - comp.databases.mysqlAUTHOR id name BOOK id title author_id And want to get a listing of all books and ... 2008 Enterprise - Deny access to database for even ... INNER JOIN B.schema.TABLE ... Disable the God forsaken Firefox Adobe Acrobat PDF plugin (please ...... ISO-8859-1" http-equiv="Content-Type"> <title ... This means you can take a look at the PDF's table of contents ... e. "pdfopt.ps" for Ghostscript); - some PDF authors ... FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ...Author: Michael Averbuch (mikeaver@prairienet.org) Last changed: 03 Mar 2004 Return to the Table Of Contents ... Table of Contents > Part I > > 1 ... Bookmarks not working when coverting from Word to pdf - comp.text ...I have a Word documetn which has a Table of contents. Each entry points to a bookmark ... How can I ensure my bookmarks include both number and title when I convert from ... Can't export a pass through query... - comp.databases.ms-access ...You will read the contents of your passthrough query into a Recordset object and then populate a receiving table BY looping ... comp.databases.mysql | id | date | title ... Table of contents - Wikipedia, the free encyclopediaA table of contents, usually headed simply "Contents ... of automatically generating a table of contents if the author of the text uses specific styles for chapter titles ... Front Matter in Book Design - Desktop Publishing Tutorials and ...... front matter may be as simple as a single title page or table of contents or it ... Some books have a separate table of contents for the illustrations, photos, chartes, and ... 7/23/2012 10:43:54 AM
|