[Tex/LaTex] Abstract name/title same indent as abstract text

abstracttitles

Im trying to make an abstract where the title of the abstract and the text are indented 12.7 mm left and right. So far I have done this for the text but since the abstract name follows the width of the normal page \flushleft does not work. How do I keep the same indent.

 \usepackage{abstract} 

 \setlength{\absleftindent}{12.7mm}\\

 \setlength{\absrightindent}{12.7mm}

 \setlength{\parindent}{12.7mm} % Do not indent the 1st line of a paragraph. 
 \setlength{\parskip}{3mm}   % Add space between paragraphs.


 %% redefine \footnoterule for using the whole text width
 \renewcommand\footnoterule{%  
 \kern-3\p@\hrule\@width\columnwidth\kern 2.6\p@ }


 % Begin document 
 \begin{document}


 \renewcommand*\abstractname{\flushleft\textbf{Abstract}\hfill}
 \begin{abstract} \noindent                 % Remove default indentation
 \textbf{
 \noindent Your abstract here \\ 
 Keywords: Your keywords here}
 \end{abstract}

Best Answer

I would set the abstract as an adjustwidth block (from changepage) which allows you to set the left/right indent as needed:

enter image description here

\documentclass{article}
\usepackage{lipsum}% Just for this example
\usepackage{changepage}

\renewenvironment{abstract}
  {\setlength{\parindent}{0pt}% No paragraph indent
   \begin{adjustwidth}{12.7mm}{12.7mm}
   {\centering \textbf{\abstractname}\par}\medskip}
  {\end{adjustwidth}}

\begin{document}

\noindent
\rule{12.7mm}{1pt}\hfill\rule{12.7mm}{1pt}% Just for this 

\begin{abstract}
  \lipsum[1]
  \textbf{Keywords}: Your keywords here
\end{abstract}

\lipsum[2]
\end{document}