Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How to remove a blank page that gets added automatically after \part{} or \chapter{} in a book document class?
I need to add some short text describing the \part. Adding some text after the part command results in at least 3 pages with an empty page between the part heading and the text:
Part xx
(empty)
some text
How to get rid of that empty page?
P.S. Latex: How to remove blank pages coming between two chapters IN Appendix? is similar but it changes the behavior for the rest of the text while I need to remove the empty page for this one \part command only.
I think you can simply add the oneside option the book class?
i.e.
\documentclass[oneside]{book}
Although I didn't test it :)
It leaves blank pages so that a new part or chapter start on the right-hand side. You can fix this with the "openany" option for the document class. ;)
A solution that works:
Wrap the part of the document that needs this modified behavior with the code provided below. In my case the portion to wrap is a \part{} and some text following it.
\makeatletter\#openrightfalse
\part{Whatever}
Some text
\chapter{Foo}
\#openrighttrue\makeatother
The wrapped portion should also include the chapter at the beginning of which this behavior needs to stop. Otherwise LaTeX may generate an empty page before this chapter.
Source: folks at the #latex IRC channel on irc.freenode.net
You don't say what class you are using, but I'm guessing it is the standard book. In which case the page clearing is a feature of he class which you can override as Mica suggests, or solve by switching to another class. The standard report class is similar to book, or the memoir class is an improved book and is very flexible indeed.
Although I guess you do not need an answer any longer, I am giving the solution for those who will come to see this post.
Derived from book.cls
\def\#endpart{\vfil\newpage
\if#twoside
\null
\thispagestyle{empty}%
\newpage
\fi
\if#tempswa
\twocolumn
\fi}
It is "\newpage" at the first line of this fragment that adds a redundant blank page after the part header page. So you must redefine the command \#endpart. Add the following snippet to the beggining of your tex file.
\makeatletter
\renewcommand\#endpart{\vfil
\if#twoside
\null
\thispagestyle{empty}%
\newpage
\fi
\if#tempswa
\twocolumn
\fi}
\makeatother
I believe that in the book class all \part and \chapter are set to start on a recto page.
from book.cls:
\newcommand\part{%
\if#openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{plain}%
\if#twocolumn
\onecolumn
\#tempswatrue
\else
\#tempswafalse
\fi
\null\vfil
\secdef\#part\#spart}
you should be able to renew that command, and something similar for the \chapter.
I know it's a bit late, but I just came across this post and wanted to mention that I don't really see way everybody wants to do it in a difficult way...
The problem here is just that the book class takes twoside as default, so, as gromgull said, just pass oneside as argument and it's solved.
Related
I want to extract part of a long meta paragraph. It appears like this, but longer:
Full Bar Review item_meta: {u'Location': u'NYU PM (Live)', u'Law School': u'Albany Law School', u'1st-time-taking-a-bar-review-course': u'Yes, this is my first time'}
I simply want to output the value Albany Law School or one of 300 other options that may appear there.
This is where I need to add the code in Zapier: Zapier Action Screenshot
Thank you.
I actually just published a tutorial about this very problem.
You can see it at http://zapiertutorials.com/2016/03/17/extract-data-from-a-long-string-of-text-using-formatter-or-code-in-zapier/
I am already able to add a layer with text in it using CATextLayer. However I'm finding the way the text is presented pretty basic. I would like to write paragraphs with quotes, in bold sometimes, italic etc...
Is there a way to do it with CATextLayer?
If not, how could I manage it, especially if the text is pulled out of a database?
I would like to be able to write the following text this way for instance:
"The article was about employment. He leafed through it in an instant. His feeling of anxiety resurfaced and he closed the magazine.
-Hm…, he breathed.
-Have you been looking for work long?, asked the stranger at his side."
Thanks
You dont need rich text if all you want to do is line breaks. add a \n for a newline. So:
layer.text=#"The article was about employment. He leafed through it in an instant. His feeling of anxiety resurfaced and he closed the magazine.\n\n-Hm…, he breathed.\n\n-Have you been looking for work long?, asked the stranger at his side."
Real Rich Text isn't possible AFAIK
I use this LaTeX code to add a bibliography section:
\bibliographystyle{plain}
\bibliography{bp}
The first page looks fine. It contains the Bibliography title, no header and a list of citations. However on the next page is a header with the title of the previous section. Is there a way to remove this header?
alt text http://imagebin.ca/img/9u-wk68W.jpg
The first page is typeset with pagestyle plain. The following pages have the pagestyle of the rest of the document, which (apparently) you modified using fancyhdr.
In the documentation of fancyhdr, see the \markright and \markleft commands, which can modify the headers in your document. Probably a \markright{} can solve your problem.
I'm sorry, I've realized that the fact that the first page of a section is without the heading was explicitly defined in the style I was using. I thought it was \bibliography that was clearing the header on the first page.
I've solved it by adding this after the last section:
\clearpage
\pagestyle{plain}
(\clearpage was necessary, because otherwise it removed headers also from the last section)
I need to change the layout of my document to send my paper to a conference. My abstract is currenly on a separate page. The introduction should be straight after the abstract, not on the separate pages.
How can I have an abstract and an introduction on the same page?
The conference should provide with at least information on how to format your paper, and often they have LaTeX styles ready, for instance at IEEE, or at ACM (btw, the IEEEtran class is bundled in TeXlive).
They are pretty standard customizations of the basic article class from LaTeX and actually I never saw one format the abstract on a separate page.
This is a function of the document class, so it really depends.
Some info on the behavior of the standard classes (article, report, book,...) (PDF),
Good general advice: consider using the memoir class, which is vastly configurable. All the answers are in the docs (PDF).
You could try notitlepage option, i.e.:
\documentclass[notitlepage]{revtex4-1}
(Your conference is probably long due but maybe someone else can use this.)
You can put this before your abstract:
\def\abstract{
\vfil
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}}%
\end{center}
\quotation
}
\def\endabstract{\par
\endquotation
}
This way you can customize your abstract like you want it, without having it on a separate page.
Is there a way to remove blank pages appearing between two chapters, in Appendix?
Your problem is that all chapters, whether they're in the appendix or not, default to starting on an odd-numbered page when you're in two-sided layout mode. A few possible solutions:
The simplest solution is to use the openany option to your document class, which makes chapters start on the next page, irrespective of whether it's an odd or even numbered page. This is supported in the standard book documentclass, eg \documentclass[openany]{book}. (memoir also supports using this as a declaration \openany which can be used in the middle of a document to change the behavior for subsequent pages.)
Another option is to try the \let\cleardoublepage\clearpage command before your appendices to avoid the behavior.
Or, if you don't care using a two-sided layout, using the option oneside to your documentclass (eg \documentclass[oneside]{book}) will switch to using a one-sided layout.
it is very easy:
add \documentclass[oneside]{book}
and youre fine ;)
I tried Noah's suggestion which leads to the best solution up to now.
Just insert \let\cleardoublepage\clearpage before all the parts with the blank pages
Especially when you use \documentclass[12pt,a4paper]{book}
frederic snyers's advice \documentclass[oneside]{book} is also very good and solves the problem, but if we just want to use the book.cls or article.cls, the one would make a big difference presenting your particles.
Hence, Big support to \let\cleardoublepage\clearpage for the people who will ask the same question in the future.
If you specify the option 'openany' in the \documentclass declaration each chapter in the book (I'm guessing you're using the book class as chapters open on the next page in reports and articles don't have chapters) will open on a new page, not necessarily the next odd-numbered page.
Of course, that's not quite what you want. I think you want to set openany for chapters in the appendix. 'fraid I don't know how to do that, I suspect that you need to roll up your sleeves and wrestle with TeX itself
In my case, I still wanted the open on odd pages option but this would produce a blank page with the chapter name in the header. I didn't want the header. And so to avoid this I used this at the end of the chapter:
\clearpage
\thispagestyle{plain}
This let's you keep the blank page on the last even page of the chapter but without the header.
I put the \let\cleardoublepage\clearpage before \makeindex. Else, your content page will display page number based on the page number before you clear the blank page.
One thing I discovered is that using the \include command will often insert and extra blank page. Riffing on the previous trick with the \let command, I inserted \let\include\input near the beginning of the document, and that got rid of most of the excessive blank pages.
You can also use \openany, \openright and \openleft commands:
\documentclass{memoir}
\begin{document}
\openany
\appendix
\openright
\appendixpage
This is the appendix.
\end{document}