2

I am writing my first mathematical academic paper.

I am using document "article" class with "amsmaths" package. I want the word "Abstract" to actually appear centered in bold on a separate line, with one line extra spacing, above the paragraph containing the abstract itself. How can I do so? I am using \maketitle with \begin{abstract} and \end{abstract} and it works fine to produce the abstract text itself, but the word "abstract" doesn't show in the output pdf file in my current code.

My code:

\documentclass[10pt]{article}

\usepackage{graphicx}

\usepackage{authblk}

\usepackage{amsfonts}

\usepackage{mathtools, cuted}

\usepackage{lipsum, color}

\usepackage[margin=1.8cm]{geometry}

\usepackage{amsthm}

\author{Author}

\affil{Some university}

\affil{\textit {some email}}

\usepackage{appendix}

\renewcommand{\abstractname}{}

\addtolength{\baselineskip}{1.2}


\begin{document}

\title{Some title}

\maketitle

\

\begin{abstract}
Some text here
\end{abstract}
  • Maybe removing \renewcommand{\abstractname}{}? Avoid getting preambles from buddies without knowing what each bit does. Also \addtolength{\baselineskip}{1.2} is wrong. – egreg Sep 11 '16 at 12:57
  • Just tried that, does nothing at all. In fact adding text inside the parenthesis there also does nothing... @egreg – Alex Sep 11 '16 at 12:59
  • what is wrong with "\addtolength{\baselineskip}{1.2}" ? @egreg – Alex Sep 11 '16 at 13:07
  • @Alex: 1.2 is no length, you can't add that number to a skip value – user31729 Sep 11 '16 at 13:08
  • @Alex Isn't ! Illegal unit of measure (pt inserted). as an error message each time you run LaTeX sufficient to understand there's something wrong? ;-) Don't disregard compilation errors! – egreg Sep 11 '16 at 13:11
0

Avoid borrowing your buddy's preamble without knowing what every part of it does.

In this case the line

\renewcommand{\abstractname}{}

is the obvious culprit, because it says LaTeX you want no title above the abstract.

Here's a reorganized version of your preamble, with some error fixing.

\documentclass[10pt]{article}
\usepackage[margin=1.8cm]{geometry}

\usepackage{mathtools} % for math
\usepackage{amsfonts} % for \mathbb
\usepackage{amsthm} % for theorems

% general purpose
\usepackage{graphicx}
\usepackage{color}

% formatting
\usepackage{authblk}
\usepackage{cuted} % do I really need this?
\usepackage{appendix}

% misc packages
\usepackage{lipsum} % just for the example

% settings
\linespread{1.2} % increase distances between base lines
%\renewcommand{\abstractname}{} % no title above abstract

% personal commands
%\newcommand{\foo}{something} % just as a signpost

% metadata
\author{Author}
\affil{Some university \\ \textit {some email}}
\title{Some title}

\begin{document}

\maketitle

\begin{abstract}
\lipsum*[2]
\end{abstract}

\section{Introduction}

\lipsum

\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.