Hello people, so I am writing my thesis in overleaf & what I want to do is put a summery of the whole chapter on top of the chapter right after I write the Title of the chapter. Now, I have already checked internet & found one solution using \lipsum. Here is the code:
\documentclass[a4paper,11pt]{report}
\usepackage{times,lipsum}
\usepackage[margin=1in]{geometry}
\usepackage[onehalfspacing]{setspace}
\newcommand{\chapabstract}[1]{
\begin{quote}\singlespacing\small \rule{14cm}{1pt}#1\vskip-4mm\rule{14cm}{1pt}\end{quote}
}
\begin{document}
\chapter{An Abstract at the Start of Each Chapter}
\chapabstract{\lipsum[2]}
\lipsum[2-3]
\chapter{Introduction}
\chapabstract{\lipsum[1]}
\lipsum[1]
\end{document}
Problem is I am not understanding lipsum function properly. Where do I actually put the text that I want to write in the code? Every time I run this code, it just creates a dummy text in spanish. How do I remove this spanish text & put my won text? Can someone please give me a proper example!
Thank you everyone in advance.
General ⇒ overleaf Lorem ipsum trouble
NEW: TikZ book now 40% off at Amazon.com for a short time.

overleaf Lorem ipsum trouble

\lipsum
is do add such dummy text. See the linked manual for more information.The abstract in the example is made by the new command
\chapabstract
. So changing the argument of this command would change the abstract shown. However, I would suggest to use a slightly improvement of the definition:
Code: Select all
\documentclass[a4paper,11pt]{report}
\usepackage{times}% This package is obsolete → https://ctan.org/pkg/times
\usepackage[margin=1in]{geometry}
\usepackage[onehalfspacing]{setspace}
%\usepackage{showframe}% Can be used to visualize the text area and other page elements.
\newcommand{\chapabstract}[1]{%
\begin{quote}\singlespacing\small
\rule{14cm}{1pt}\par#1\par\vskip-\ht\strutbox\rule{14cm}{1pt}\end{quote}%
\par% needed to make the two following lines work as expected.
\csname @afterindentfalse\endcsname% Do not indent the first paragraph after
% the abstract.
\csname @afterheading\endcsname% Handle the chapter abstract like a heading.
}
\begin{document}
\chapter{An Abstract at the Start of Each Chapter}
\chapabstract{This is my abstract text. As you can see, you do not need
package \textsf{lipsum} to use it. You need only the definition of
environment \texttt{chapabstract}.}
Some dummy text.
\chapter{Introduction}
\chapabstract{One more example of an abstract.}
Some more dummy text.
\end{document}

BTW: Please always mark code blocks as code (see my signature for more information).
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.
overleaf Lorem ipsum trouble
Thank you so much Mjk. It worked perfectly


