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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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

