Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
krasnal1988
Posts: 8 Joined: Tue May 10, 2011 10:31 pm
Post
by krasnal1988 » Mon Jun 20, 2011 12:16 pm
Hi.
I want to put two abstracts on one page. How to do it? When I end first abstract, second one starts on new page.
Code: Select all
\begin{abstract}
Streszczenie
%{{\bf Słowa kluczowe} ???}
\end{abstract}
\selectlanguage{english}
\begin{abstract}
Here will be abstract in English.
\end{abstract}
Someone know how to do it? Thanks in advance.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Frits
Posts: 169 Joined: Wed Feb 02, 2011 6:02 pm
Post
by Frits » Mon Jun 20, 2011 3:28 pm
We'll need a Minimal Working Example for this one, since the way abstracts are printed are documentclass dependent.
krasnal1988
Posts: 8 Joined: Tue May 10, 2011 10:31 pm
Post
by krasnal1988 » Mon Jun 20, 2011 8:46 pm
Sorry.
Code: Select all
\documentclass[12pt,a4paper,titlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts,amssymb,amsthm,amsmath}
\usepackage[english,polish]{babel}
\usepackage[OT4]{fontenc}
\usepackage[plmath]{polski}
\usepackage[section]{algorithm}
\usepackage[labelsep=period,justification=justified,singlelinecheck=false]{caption}
\usepackage{algpseudocode}
\usepackage{indentfirst}
\begin{document}
\begin{abstract}
Streszczenie
%{{\bf Słowa kluczowe} ???}
\end{abstract}
\selectlanguage{english}
\begin{abstract}
Here will be abstract in English.
\end{abstract}
rest of article...
\end{document}
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Mon Jun 20, 2011 10:19 pm
If the
abstract package doesn't offer a solution, you can try this. It is based on a redefinition of the
abstract enviroment
Code: Select all
\documentclass[12pt,a4paper,titlepage]{article}
\usepackage[OT4]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,polish]{babel}
\usepackage[plmath]{polski}
\usepackage{blindtext}
\makeatletter
\if@titlepage
\renewenvironment{abstract}{%
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\bfseries \abstractname
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null}
\else
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\fi
\makeatother
\title{Two Abstracts on one Page}
\author{krasnal1988}
\begin{document}
\maketitle
\begin{abstract}
Streszczenie
\end{abstract}
\selectlanguage{english}
\begin{abstract}
Here will be abstract in English.
\end{abstract}
\newpage
\blinddocument
\end{document}
The
blindtext package is only for creating dummy text, thus not part of the solution.
Thorsten
krasnal1988
Posts: 8 Joined: Tue May 10, 2011 10:31 pm
Post
by krasnal1988 » Wed Jun 22, 2011 11:30 am
Thank you:) one more question - Normally page with abstract is without number. I want to have abstracts, next would be table of contents (this page should have number 1) . When I use your modification, page with abstracts is numbered. When I use \thispagestyle{empty} for abstracts page there's no number, but page with tables of contents have number 2. How to change it?
EDIT:
I just find the answer:) Before command \tableofcontents i put
Code: Select all
\setcounter{page}{1}
\pagenumbering{arabic}
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Wed Jun 22, 2011 4:53 pm
Replace the redefinition from my earlier reply with these lines.
Code: Select all
\makeatletter
\if@titlepage
\renewenvironment{abstract}{%
\thispagestyle{empty}
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\bfseries \abstractname
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null}
\else
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\fi
\makeatother
krasnal1988
Posts: 8 Joined: Tue May 10, 2011 10:31 pm
Post
by krasnal1988 » Wed Jun 22, 2011 6:25 pm
Your solution doesn't work like I want.
In yours, page with abstracts has number, but number is hide and next page has number 2. I want have number 1 on next page
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Wed Jun 22, 2011 6:31 pm
I just forgot a line. Next try.
Code: Select all
\makeatletter
\if@titlepage
\renewenvironment{abstract}{%
\thispagestyle{empty}
\setcounter{page}{0}
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\bfseries \abstractname
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null}
\else
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\fi
\makeatother