Page LayoutAbstract Heading like Paragraph Heading

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
LesJacques
Posts: 8
Joined: Fri Feb 17, 2012 3:17 pm

Abstract Heading like Paragraph Heading

Post by LesJacques »

Hi everybody,

I have a simple problem, but i can't manage to resolve it. I'm sure you gonna find the solution easily. I'm writing a document using the "article" class.

My section name is: "Abstract:"
My text is: "My text"

So my output looks like :
Abstract:
My text
And i want my text to be on the same line as my section title "Abstract".
So i want that :
Abstract: My text
I'll be glad if you can help me to manage this !
Last edited by LesJacques on Wed Feb 22, 2012 1:32 pm, edited 1 time in total.

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

Abstract Heading like Paragraph Heading

Post by Stefan Kottwitz »

Hi,

you could use \paragraph instead of \section:

Code: Select all

\paragraph{Abstract:} Your text
Stefan
LaTeX.org admin
LesJacques
Posts: 8
Joined: Fri Feb 17, 2012 3:17 pm

Abstract Heading like Paragraph Heading

Post by LesJacques »

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc} % codage moderne des caractères sous Latex
\usepackage{mathptmx} % Police Times
\usepackage[english]{babel}
\usepackage{fancyhdr} 
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{2pc}{}
\usepackage[nottoc,notlof,notlot]{tocbibind}

\begin{document}
\setcounter{page}{0}
\setlength{\parindent}{0pt}
\thispagestyle{empty}

My page 1

\newpage
\setlength{\parindent}{16pt}
\begin{center}
{\huge\textbf{My title}}\bigskip\\
\textbf{My name}\bigskip\\
\end{center}
\begin{multicols}{2}
\section*{Abstract} My text.\bigskip\\
\bibliographystyle{plain}
\bibliography{bonjour}
\end{multicols}
\end{document}
Here is my code, and what i'm looking for is a way to have "Abstract" and "My text" on the same line in my pdf. Because for the moment after "Abstract" (which is my section title), "My text" is on the next line, i'm trying to have it on the same line.

Thanks


Edit : Perfect Stefan, that's what i was looking for. However, "Abstract" format is now different from a section format (size). You know how to use \paragraph and still having \section typical font ?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Abstract Heading like Paragraph Heading

Post by Stefan Kottwitz »

I think it's a bit inconsistent to use a heading section heading this one time in a different way, as a run-in heading.

Run-in headings commonly have the same size as the following text, but they are often bold or italic for emphasis. I would not mix font sizes on the same text line.

However, this is how you could do it directly without modifying sectioning commands:

Code: Select all

{\Large\bfseries\noindent Abstract} My texte.
If you use this serveral times, make a macro for this heading. I would do this in any case.

Stefan
LaTeX.org admin
LesJacques
Posts: 8
Joined: Fri Feb 17, 2012 3:17 pm

Re: Abstract Heading like Paragraph Heading

Post by LesJacques »

Perfect !
Thank you very much !
Post Reply