:-) With the following preamble how can I reposition where the chapters start? Meaning each section is defined to start at almost the 2/3 of the page. There is a small space and then goes the "Section 1: blah blah". Can I start each section at the beginning of the page like the other pages?  \documentclass[a4paper,12pt]{book} \setcounter{secnumdepth}{-2}  \titleformat{\chapter}[display]{\normalfont\huge\bfseries}{}{20pt}{\Huge}  \let\cleardoublepage\clearpage \usepackage[english,greek]{babel} \usepackage[utf8x]{inputenc} \usepackage{blindtext} \usepackage[pdftex]{graphicx} \usepackage[skip=2pt, font=small, labelformat = empty]{caption}  \newcommand{\gr}{\selectlanguage{greek}} \newcommand{\en}{\selectlanguage{english}} \usepackage{wrapfig} \usepackage[paperwidth=17cm, paperheight=24cm]{geometry} \usepackage[onehalfspacing]{setspace} \usepackage{textcomp} \useshorthands{;} \defineshorthand{;}{?} \usepackage{fancyhdr} \fancyhf{} \fancyhead[LE]{\nouppercase{\leftmark}} \fancyhead[RO]{\nouppercase{\rightmark}} \fancyfoot[LE,RO]{\thepage} \pagestyle{fancy}  \renewcommand{\chaptermark}[1]{ \markboth{#1}{} } \renewcommand{\sectionmark}[1]{ \markright{#1}{} }
92582
How could I adjust the size and placement of chapter heading in my custom class? I am using report class as my base. When I used titlesec package inside my custom class, it threw error     ! Package titlesec Error: Not allowed in `easy'   settings.
109118
I am trying to establish one geometry for my first page (not a title page), and use another for the rest of the document. However, because I am trying to make a template, and thus do not want to rely on a user to put in \newgeometry or \restoregeometry in the text of the document, I would like to establish these geometries in the preamble. Is there any way to do this?  A minimum working example  \documentclass{article} \usepackage{lecturenotes}  \usepackage{afterpage}  \thispagestyle{plain}   \begin{lecture}{01}{Sample Lecture Notes}{John Sam}{01/01/2000}{Mark John}{PHYSICS 124: Physics of Energy}  \afterpage{\newgeometry{top=2cm, bottom=2.5cm, outer=5.5cm, inner=2cm, heightrounded, marginparwidth=3.5cm, marginparsep=0.4cm, includeheadfoot}}   \end{lecture} \theend   The style 'lecturenotes'      \def\fileversion{1.0} \def\filedate{2014/02/05} \NeedsTeXFormat{LaTeX2e}   \usepackage{graphicx} \usepackage{amsmath,amssymb,amsthm,amsfonts} \usepackage[top=0.5cm, bottom=2.5cm, outer=5.5cm, inner=2cm, heightrounded, marginparwidth=3.5cm, marginparsep=0.4cm, includeheadfoot]{geometry} \usepackage{fancyhdr} \pagestyle{fancy}  \newcommand{\handout}{    \noindent    \begin{center}    \framebox{ \vbox{ \hbox to 13.5cm { {\bf {\course}} \hfill {Lecture \lecturenum\ -- \lecturedate} }        \vspace{4mm}        \hbox to 13.5cm { {\Large \hfill {\lecturetitle}  \hfill} }        \vspace{2mm}        \hbox to 13.5cm { {\it {Lecturer: \lecturer} \hfill {Notes by: \lecturescribe}} }      }    }    \end{center}    \vspace*{4mm} }  \newenvironment{lecture}[6]{     \begin{document}     \global \def \lecturenum {#1}     \global \def \lecturetitle {#2}     \global \def \lecturescribe {#3}     \global \def \lecturedate {#4}     \global \def \lecturer {#5}     \global \def \course {#6}     \handout }   \lhead{\lecturedate} \chead{\lecturetitle} \rhead{Lecture \lecturenum} \lfoot{} \cfoot{\thepage} \rfoot{}  \newcommand{\theend}{\end{document}}
22259
Is it fair to assume that if an \include command does not add a blank page both before and after, it is because the chapter starts on a page with an odd page number ?  EDIT: I thought I was having trouble with \include. I had the impression from for example  that \include would add a page both before and after. I had one \include statement in my document and there was indeed a blank page both before and after the chapter. When I added more \include statements I didn't see the same behavior and thought something was wrong until I noticed chapters start on odd page numbers which lead to my assumption above.
13960
I am looking for an automated mechanism to change the effective \textwidth at the first pagebreak of a letter in scrpage2. I've tried \afterpage and \nextpage (ideally they would be set within \firsthead), both without success. I do not want to use the geometry package because firstly, IMO scrlttr2 should work with a change of KOMAoptions and friends and secondly, it does not seem to work anyways if used within scrlttr2 and the KOMA layout. Ideas and suggestions are very welcome.   Here's a MNWE. Page 2 and following should have a wider text block than the first page &mdash; but doesn't.  \documentclass{scrlttr2}% \usepackage[english]{babel} \usepackage{lipsum,afterpage}% \setlength{\textwidth}{125mm}% \nexthead{%   \global\areaset{170mm}{\textheight}%   \global\KOMAoptions{DIV=areaset}%   \global\recalctypearea% } \afterpage{%   \global\areaset{170mm}{\textheight}%   \global\KOMAoptions{DIV=areaset}%   \global\recalctypearea% } \begin{document} \begin{letter}{Receipient}   \opening{Dear receipient,}   \lipsum[1-6]   \closing{Yours} \end{letter} \end{document}   And BTW, I genuinely think that this is not covered by  and related questions and instead somehow relates to the internals of the KOMA classes.
85577
I work with documentclass report and use fancyhdr package for chapters in this way:  \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \fancyhf{} \fancyhead[LO]{\bfseries\nouppercase\rightmark} \fancyhead[RE]{\bfseries\nouppercase\leftmark} \fancyhead[RO]{\bfseries\nouppercase\thepage}  \renewcommand{\headrulewidth}{0.5pt} \renewcommand{\footrulewidth}{0pt} \addtolength{\headheight}{0.5pt} \fancypagestyle{plain}{ \fancyhead{}  \renewcommand{\headrulewidth}{0pt}  }   I would like to change space between the line and the following text. Can anyone help me?
118994
I just have a little question. Is there a possible way to write two chapters on the same page? Thank you for your help! : )  \documentclass[a4paper, 12pt, oneside, titlepage]{scrbook}  \begin{document}  \addcontentsline{toc}{chapter}{Abbildungsverzeichnis} \listoffigures\vfill \pagebreak \addcontentsline{toc}{chapter}{Tabellenverzeichnis} \listoftables\vfill  \end{document}
40690
HI   How can I start the caption where table starts or figure starts?   \captionsetup{justification=justified, singlelinecheck=false}   does not work for me because it places the caption at the beginning of the paragraph not the beginning of the table.  Thanks!!
7598
I'm posting today because I would like to reduce white space in a document I'm writing. The content is two-columns but I have floating tables that span across both columns (table*).   At some point, the text ends in the beginning of the first column of a new page. I would like to include my table on this page since it has a lot of free space below the text, but when I insert the table* right after the text, it goes to the top of the next page instead:    Do you know a way of obtaining the desired behavior?  Minimal working example :  \documentclass{article} \usepackage{lipsum}  \begin{document} \twocolumn  \paragraph{} \lipsum[1]  \begin{table*} \centering \begin{tabular}{|c|c|c|c|} \hline Column 1 &amp; Column 2 &amp; Column 3 &amp; Column 4 \\ \hline Column 1 &amp; Column 2 &amp; Column 3 &amp; Column 4 \\ \hline \end{tabular} \end{table*}%   \end{document}
77423
I saw recepts from answers on  , and can I do this without titlesec, only with KOMA tools, f.e. via   \RedeclareSectionCommand[afterskip=&lt;amount&gt;,beforeskip=&lt;amount&gt;]{section} ? titlesec is fine, but it redefine some KOMA's features.    My MWE:  \documentclass{scrbook}  \usepackage{blindtext} \usepackage{atbegshi,picture,xcolor} %\usepackage{gridset}  % baseline grid \newcommand{\printbaselines}{%     \AtBeginShipout{%         \AtBeginShipoutUpperLeft{%             \color{red}%             \put(\dimexpr 1in+\oddsidemargin,             -\dimexpr 1in+\topmargin+\headheight+\headsep+\topskip)%             {%                 \vtop to\dimexpr\vsize+\baselineskip{                     \hrule                     \leaders\vbox to\baselineskip{\hrule width\hsize\vfill}\vfill                 }%             }%         }%     }% }%  \printbaselines  \begin{document}  \chapter{First} \section{Lorem I} \Blindtext[1] \section{Lorem II} \Blindtext[1] \section{Lorem III} \Blindtext[1]  \end{document}   I try set     \RedeclareSectionCommand[     beforeskip=-2\baselineskip,     afterskip=1\baselineskip]{section}       but it work only for first paragraph (and without \chapter), - on second paragraph syncing is lost.     I try use \vskipnextgrid from gridset after  \section but it not work with \chapter on some page with \section.     It is possible? (pdflatex)
117365
I am using the exam document class and have a few questions about customising the layout. Firstly I want to move the question number to the left so it is in line with the left header, and I want more horizontal space between the question number and the actual text of the question. I'd like to do the same with the question part numbers too, having it aligned with the left part of text of the question above, and left justified instead of right justified.  My explanation was a bit rubbish, so here's a pic to illustrate something like what I am after (I want the left, instead of the right):    MWE:  \documentclass[a4paper]{exam} \renewcommand{\thepartno}{\roman{partno}}  \begin{document} \firstpageheader{\large\textbf{Pure Mathematics: Number theory}}{}{\thepage} \runningheader{}{}{\thepage} \vspace*{0cm}  \begin{questions}  \question For positive integers $a$, $b$ and $c$ \ldots   \begin{parts}  \part For positive integers $a$, $b$ and $c$ \ldots   \part For positive integers $\alpha$, $\beta$ and $\gamma$ \ldots   \end{parts}  \end{questions}  \end{document}
102224
I have found that for only one page (so far) the spacing between the header and content is different from the spacing on all the other pages. You can see this behavior in the images below (from pages 2 and 3 of the document):     My .tex file contents are shown below.  \documentclass[a4paper]{report} \usepackage{fullpage} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \setlength{\headsep}{0.5cm}  \begin{document} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}} \fancyhead[L]{\bfseries \leftmark} \fancyhead[R]{\bfseries \rightmark}  \chapter{Version Control} \lipsum \lipsum \lipsum \lipsum  \end{document}
27538
I have a document with some tabulars one after the other.  I want the tabulars begin on a new page if there is very little room left on the actual page, like 1/4th.  Otherwise, there should not be a pagebreak.  So I need some kind of conditional \pagebreak, how can I do this?
61857
Basically, here's my MWE, and I need to include "Chapter" before every section title in the ToC (without changing anything else).      \documentclass[12pt]{article} \usepackage[utf8]{inputenc}  \usepackage[english]{babel} \usepackage[titles]{tocloft} \usepackage{titlesec} \usepackage{titletoc}  \addto\captionsenglish{ \renewcommand*\contentsname{\centerline{TABLE OF CONTENTS}}}  %\renewcommand{\thesection}{CHAPTER} %\renewcommand{\cftsecpresnum}{Chapter \thesection} \titleformat{\section}[display]% {\null\vskip1em\sffamily\bfseries\filcenter}{Chapter \thesection}{0em}{}[] \titlespacing*{\section}{0em}{1em}{1em}  \titlecontents{section} [1.5em] % ie, 1.5em (chapter) + 2.3em {} {\contentslabel{1em}} {\hspace*{-1.5em}} {\titlerule*[0.5pc]{.}\contentspage}  \begin{document} \newpage \tableofcontents \newpage  \section{Section One} \section{Section Two} Content \end{document}   The commented out code is what I've already tried. The first one just changes the number to "CHAPTER" and doesn't move the text in the ToC (so it just overlays on top of the name of the section), and if I include "\thesection" after "CHAPTER" it creates an infinite loop definition error. The second one causes no differences, and the code still compiles.  Thanks!
17643
I'm writing a book using memoir, and I'd like each chapter's text to begin on a new page after the chapter headings (so each chapter heading stands on a page by itself).  Is there a way to make this automatic, so I don't have to add the \newpage command after each instance of \chapter{}?  I tried \renewcommand{\chapter{}}{\chapter{} \newpage}, but it doesn't seem to work...  Here is my MWE as it stands with my current chapter header customizations:  \documentclass{memoir} \usepackage[american]{babel}  % Chapter headers customize \setsecnumdepth{none} \setlength\beforechapskip{6\baselineskip} \renewcommand*{\chaptitlefont}{\sffamily \HUGE \bfseries}  \begin{document} \chapter{Chapter 1} My text. \end{document}
110041
The first few pages of my document (introductory material)  should be numbered using roman numerals. Starting with a specific chapter, the remaining pages should be numbered arabic, starting from one (1) again.   How can i achieve this? Are there any pitfalls i need to look after?
49260
Objective  How to change the heading of landscaped pages from    to    ?  Minimal Code  \documentclass{book} \usepackage[a5paper,hmargin=3cm,vmargin=5cm]{geometry} \usepackage{lscape,lipsum}  \begin{document} \chapter{One} \lipsum[1]  \section{One One} \lipsum[2]  \newgeometry{hmargin=5cm,vmargin=3cm}  \begin{landscape} \lipsum[3-5] \end{landscape}  \restoregeometry \lipsum[6]  \end{document}   Edit 1 (my real scenario layout)  In my real scenario, the left-right margins should not be occupied by headings.
4424
This one has me kind of stumped. I want to make the first word of all the paragraphs in my #content div at 14pt instead of the default for the paragraphs (12pt). Is there a way to do this in straight CSS or am I left wrapping the first word in a span to accomplish this?