3

Is there a way to get the colored box around the abstract more even and with blue lines at the top and bottom edges?

Like here in this journal:Like here in this journal

I am using default TeXStudio, this is my code so far:

\documentclass[oneside,onecolumn,9pt]{extarticle}

\usepackage[T1]{fontenc} %Encoding
\usepackage[english]{babel} %Language
\usepackage{amssymb} %Symbols

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%Side margins and colums seperation 
\usepackage[hmarginratio=1:1,columnsep=25pt]{geometry}
\geometry{
    left=1.8cm,
    right=1.8cm,
    top=2.5cm,
    bottom=2cm,
    bindingoffset=0mm}
%%%%%Colors
\usepackage{xcolor}
\definecolor{acsblue}{RGB}{17,76,139}
\definecolor{acsyellow}{RGB}{255,241,204}
%%%%%Frames
\usepackage{framed}
\definecolor{shadecolor}{RGB}{255,241,204}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%Abstract costumizaiton
\usepackage{abstract}
\renewcommand{\absnamepos}{flushleft}
\setlength{\absleftindent}{8.5pt}
\setlength{\absrightindent}{8.5pt}
\renewenvironment{abstract}{{\color{acsblue}\normalfont\textbf{ABSTRACT:}}}
{\vspace*{\baselineskip}}

\usepackage{lipsum}

\begin{document}

    \begin{shaded*}
        \begin{abstract}
            \noindent \lipsum[1]
        \end{abstract}
    \end{shaded*}


\end{document}

1 Answer 1

4

The mdframed package gives you slightly more options to customize with. For example:

\documentclass[oneside,onecolumn,9pt]{extarticle}

\usepackage[T1]{fontenc} %Encoding
\usepackage[english]{babel} %Language
\usepackage{amssymb} %Symbols

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%Side margins and colums seperation 
\usepackage[hmarginratio=1:1,columnsep=25pt]{geometry}
\geometry{
    left=1.8cm,
    right=1.8cm,
    top=2.5cm,
    bottom=2cm,
    bindingoffset=0mm}
%%%%%Colors
\usepackage{xcolor}
\definecolor{acsblue}{RGB}{17,76,139}
\definecolor{acsyellow}{RGB}{255,241,204}
%%%%%Frames
\usepackage{mdframed}
\definecolor{shadecolor}{RGB}{255,241,204}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%Abstract costumizaiton
\usepackage{abstract}
\renewcommand{\absnamepos}{flushleft}
\setlength{\absleftindent}{8.5pt}
\setlength{\absrightindent}{8.5pt}
\renewenvironment{abstract}{{\color{acsblue}\normalfont\textbf{ABSTRACT:}}}
{}

\mdfdefinestyle{mdfabstract}{%
    linecolor=acsblue, linewidth=0.8pt,
    backgroundcolor=shadecolor,
    leftline=false, rightline=false,
    innertopmargin=0.25cm, innerbottommargin=0.25cm,
    innerleftmargin=0.25cm, innerrightmargin=0.25cm,
}

\usepackage{lipsum}

\begin{document}
    \begin{mdframed}[style=mdfabstract]
        \begin{abstract}
            \noindent \lipsum[1]
        \end{abstract}
    \end{mdframed}

\lipsum[1]

\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .