General ⇒ overleaf Lorem ipsum trouble
overleaf Lorem ipsum trouble
\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.
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
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).
overleaf Lorem ipsum trouble

