Text Formattingpdf doesn´t show my abstract, instead "content" in italics

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Franzi_LaTeX
Posts: 10
Joined: Sun Jun 24, 2018 1:24 am

pdf doesn´t show my abstract, instead "content" in italics

Post by Franzi_LaTeX »

Hi everyone! At the moment I am writing my first paper with LaTeX and it was working quite well so far. Unfortunately, for some reason I don´t get, the pdf document doenst show my abstract anymore. Instead, there is a clear page only with the word "contents" in italics in the upper right corner (and I have no idea where this is coming from...). Thi italic "contents" is also at my page of table of contents. I hope some of you can help me...
Thank you!!

Code: Select all

\newtocstyle[KOMAlike][leaders]{chapterwithdot}{
  \settocfeature{pagenumberbox}{\makebox[1em][r]
  \settocfeature[-1]{leaders}{\hfill}
  \settocfeature[-1]{pagenumberbox}{\phantom}
  }
\usetocstyle{chapterwithdot}
\usepackage[automark,autooneside]{scrlayer-scrpage}
\clearpairofpagestyles
\ohead{\headmark}
\ofoot*{\pagemark}

\pagenumbering{roman}
\clearpage
\tableofcontents

\clearpage

\fbox{\parbox{\linewidth}{\begin{abstract}{\textbf{Abstract}}
.....text.....}}\\\\


\clearpage
\end{abstract}

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

pdf doesn´t show my abstract, instead "content" in italics

Post by Stefan Kottwitz »

Hi!

This cannot be checked with that code. There's no document class, no \begin{document}, \newtocstyle is unknown in base LaTeX.

Perhaps post a Infominimal working example, that we can test and fix the issue.

Stefan
LaTeX.org admin
Franzi_LaTeX
Posts: 10
Joined: Sun Jun 24, 2018 1:24 am

pdf doesn´t show my abstract, instead "content" in italics

Post by Franzi_LaTeX »

Hi Stefan,

thanks for your help. I tried to do a minimal example. If it needs to be altered, tell me.
So the problem is that I don´t get the Abstract and those kind of italic heading of the sections that I dont wanna have. I hope you understand my problem. Thanks a lot!

Code: Select all

\documentclass[a4paper,12pt]{scrartcl} 


\usepackage[nottoc]{tocbibind}
\usepackage[backend=biber, 
style=authoryear-icomp, 
sorting=nyt, 
url=true,
natbib=true, 
hyperref=true, 
]{biblatex}

\DeclareLanguageMapping{english}{american-apa}
\bibliography{Terrorism_Bibliography.bib} 

\usepackage{tocstyle} 
\newtocstyle[KOMAlike][leaders]{chapterwithdot}{
  \settocfeature{pagenumberbox}{\makebox[1em][r]}
  \settocfeature[-1]{leaders}{\hfill}
  \settocfeature[-1]{pagenumberbox}{\phantom}
  }
\usetocstyle{chapterwithdot}
\usepackage[automark,autooneside]{scrlayer-scrpage}
\clearpairofpagestyles
\ohead{\headmark}
\ofoot*{\pagemark}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage{setspace}
\setlength{\parindent}{0mm}
\usepackage[paper=a4paper,left=30mm,right=30mm,top=30mm,bottom=30mm]{geometry} 
\usepackage{graphicx}
\deffootnote{1em}{1em}{\textsuperscript{\thefootnotemark\ }}

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

\begin{document}

\begin{titlepage}
\begin{small}
\raggedleft {xxx}\\
\end{small}

\begin{center}
\begin{Large}
\vfill {title} \\ \bigskip 
\end{Large}
\textit{title2} 
\end{center}
\end{titlepage}

\pagenumbering{roman}
\clearpage
\tableofcontents

\clearpage

\fbox{\parbox{\linewidth}{\begin{abstract}{\textbf{Abstract}}
\\
Abstract xxx}}\\\\
\end{abstract}


\clearpage

\section{Introduction}
introduction
\section{analysis}
analysis
\clearpage
\addcontentsline{toc}{section}{List of References}
\printbibliography[title={Book references},type=book]
\printbibliography[title={Article references},type=article]
\printbibliography[title={Webpage references}, nottype=article, nottype=book]


\end{document}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

pdf doesn´t show my abstract, instead "content" in italics

Post by Stefan Kottwitz »

You could use \markright:

Code: Select all

\clearpage
\markright{\abstractname}
\begin{abstract}
...
Stefan
LaTeX.org admin
Franzi_LaTeX
Posts: 10
Joined: Sun Jun 24, 2018 1:24 am

pdf doesn´t show my abstract, instead "content" in italics

Post by Franzi_LaTeX »

hm... this is not working :/
I just want to have it written down. Just normally, nothing special. But nothing comes out. And I have this "strange" italic header in the upper right corner where I don´t know where it comes from...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

pdf doesn´t show my abstract, instead "content" in italics

Post by Stefan Kottwitz »

Check the syntax with the curly braces. You accidentally closed with two curly braces before \end{abstract}.

Code: Select all

\clearpage
\markright{\abstractname}
\fbox{\parbox{\linewidth}{\begin{abstract}{\textbf{Abstract}}
\\
Abstract xxx\\\\
\end{abstract}}}
Stefan
LaTeX.org admin
Franzi_LaTeX
Posts: 10
Joined: Sun Jun 24, 2018 1:24 am

pdf doesn´t show my abstract, instead "content" in italics

Post by Franzi_LaTeX »

thank you so much!!!!! That´s true.
Ok, just my last concern: I do NOT want this italic heading in the upper right corner. Neither Contents nor Abstract. So I guess I should not use \markright{\abstractname}. But how do I get rid of the Contents? Do you understand what I mean?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

pdf doesn´t show my abstract, instead "content" in italics

Post by Johannes_B »

You explicitely asked for it. \ohead{\headmark} Remove that line.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

pdf doesn´t show my abstract, instead "content" in italics

Post by Stefan Kottwitz »

Or at that place, \markright{}, so with empty argument.

Stefan
LaTeX.org admin
Franzi_LaTeX
Posts: 10
Joined: Sun Jun 24, 2018 1:24 am

pdf doesn´t show my abstract, instead "content" in italics

Post by Franzi_LaTeX »

Thank you both so much, it´s working now!
Post Reply