LyXMultiple abstracts

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
magali
Posts: 14
Joined: Sat Dec 04, 2010 12:41 am

Multiple abstracts

Post by magali »

Hello,
I need to write more than one abstract on my thesis, and each one should have a different heading.
Example

Abstract of the original project
Abstract of the results from the first year

and so forth.

I couldn't even change the abstract "title" even though I found a post about it, that said that when you're writing in another language (as in my case, Portuguese), the following command in the preamble should work

Code: Select all

\AtBeginDocument{%
\addto\captionsportuguese>{%
\renewcommand{\abstractname}{NEWTITLE FOR MY ABSTRACT}%
}}
This didn't work and I still have the other problem of making more abstracts, each with a different title.

Can anyone help?

Thanx.
Last edited by cgnieder on Thu Aug 06, 2015 9:44 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Multiple abstracts

Post by gmedina »

Hi

Here's an example of how to proceed in LaTeX: the new environment poliabstract that I defined allows you to write as many abstracts as you desire; simply use the argument of the environment to introduce the new name; my example also shows how to proceed in a multi-lingual situation (each abstract written in a different language):

Code: Select all

\documentclass{article}
\usepackage[english,spanish,portuguese]{babel} 

\newenvironment{poliabstract}[1]
  {\renewcommand{\abstractname}{#1}\begin{abstract}}
  {\end{abstract}}

\begin{document}

\selectlanguage{english}
\begin{poliabstract}{Abstract} 
  blah blah blah...
\end{poliabstract}

\selectlanguage{spanish}
\begin{poliabstract}{Resumen}
  blah blah blah...
\end{poliabstract}

\selectlanguage{portuguese}
\begin{poliabstract}{Resumo}
  blah blah blah...
\end{poliabstract}

\end{document}
I, however, don't use Lyx so I can't help you on the implementation of my solution in Lyx.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
magali
Posts: 14
Joined: Sat Dec 04, 2010 12:41 am

Multiple abstracts

Post by magali »

Thanx for your help. I know there is probably a way to use the information you sent for LaTeX on LyX, but I don't know it.
If anyone else has any ideas: I tried adding gmedina's suggestion to LyX's preamble, but it didn't work.
anaritam
Posts: 1
Joined: Thu Aug 06, 2015 4:00 pm

Re: Multiple abstracts

Post by anaritam »

Hi guys

I know this post was made a while ago but I'm using this for my report.
The problem is that all the abstracts have the same page number. How can I change that? I tried using \setcounter{page}{<pageNumber>} just before the \begin{poliabstract} but it didn't work. Can anyone help me with this?

Thanks
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Multiple abstracts

Post by Johannes_B »

I am not entirely sure that this reproduces your problem, showing a minimal working example is always a good idea.


When the titlepage option is given to the article class, abstracts are printed on their own page, using a titlepage environment. This is an old bug, sorr, feature, that was dragged for compatibility for 30 years now.

Is guess what you are looking for is patching the commands, have a look at the following. Hint: Click on open in writelatex and see what i see ;-)

Code: Select all

\documentclass[titlepage]{article}
\usepackage[english,spanish,portuguese]{babel}
\usepackage{etoolbox}
\usepackage{blindtext}

%\tracingpatches
\patchcmd{\abstract}{\titlepage}{\thispagestyle{empty}}{}{}
\patchcmd{\endabstract}{\endtitlepage}{\clearpage}{}{}
\newenvironment{poliabstract}[1]
{\renewcommand{\abstractname}{#1}\begin{abstract}}
	{\end{abstract}}

\begin{document}

\selectlanguage{english}
\begin{poliabstract}{Abstract}
	\blindtext
\Huge Show me the page number! \thepage
\end{poliabstract}

\selectlanguage{spanish}
\begin{poliabstract}{Resumen}
	\blindtext
\Huge Show me the page number! \thepage
\end{poliabstract}

\selectlanguage{portuguese}
\begin{poliabstract}{Resumo}
	\blindtext
\Huge Show me the page number! \thepage
\end{poliabstract}

\Huge Show me the page number! \thepage
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply