1

I have an article to be written with 1 inch margins, with figures of course in the figure environment. [...] I now narrowed down the problem to the use of \abstract{...}. I use

\documentclass[12pt]{article}   
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{graphicx,authblk}    
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}   
\usepackage{csquotes}

\begin{document}    
\abstract{Lorem ipsum dolor sit amet, \ldots}

\section{Test}    
Test

\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{fig_Test.pdf}
\caption{This is a long sentence used as caption. It has 
to be so long to illustrate my problem.}
\label{fig_Test}
\end{figure}

\end{document}

If I remove the \abstract directive, everything works fine. But as soon as the \abstract instruction is there, its formatting (narrower textblock than standard) is kept for the subsequent sections, and the captions are wider than the text block. What to do, if I do want to provide an abstract for the paper?

Narrow text/wide caption

7
  • Welcome to TeX.SX! Can you please remove everything from your example, that is not needed to reproduce the problem (e.g., the whole \ifpdf…\else…\fi section could be replaced by loading graphicx and tikz without options) and make the example compilable, e.g., replacing the unknown image by an example image of package mwe? The resulting MWE would help us to help you. BTW: Don't understand your 2nd sentence. Aug 7, 2017 at 10:43
  • 2
    Compiling your example code I get i.stack.imgur.com/t63ks.png which looks fine. How are you compiling? I used pdflatex from Texlive 2017. Aug 7, 2017 at 10:50
  • @Mico If I would retract my vote I could not vote for closing again. So I wouldn't be able to support your close vote. Because of this, I will not retract my vote even though the reason is meanwhile the wrong one. Aug 7, 2017 at 13:39
  • @Mico: So you want to vote-to-reopen and close it as something else?
    – Werner
    Aug 7, 2017 at 15:13

2 Answers 2

7

(edited this answer after the OP revealed some previously missing information)

If you want to write the Abstract using the directive

 \abstract{Lorem ipsum dolor sit amet...}

you must terminate the abstract section with a matching \endabstract directive:

 \abstract
 Lorem ipsum dolor sit amet...
 \endabstract

The \abstract directive does not actually take an argument. Thus, writing \abstract{Lorem ipsum ...} is equivalent to writing \abstract Lorem ipsum ....

However, it's much better (and certainly clearer, in my view) to write

\begin{abstract}
Lorem ipsum dolor sit amet...
\end{abstract}
1
  • Thanks already for all your help, I've narrowed it down to an abstract problem (see edit in my question).
    – rower2000
    Aug 7, 2017 at 12:06
2
  • to have caption wide the text width special effort is needed :), so described problem is unlikely (i can't reproduce it)
  • instead \graphics you should load \graphicx
  • the way how the some packages is loaded is wrong, they had to outside of \ifpdf test
  • minimal working example (mwe) is:

\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{a4paper, margin=1in}

\usepackage[demo]{graphicx}
\usepackage{caption}

\usepackage{lipsum}

\begin{document}
\lipsum[11]
    \begin{figure}[ht]
\centering
\includegraphics[width=0.8\textwidth]{fig_Test.pdf}
\caption{This is a long sentence used as caption. It has to be so long to illustrate my problem.}
\label{fig_Test}
    \end{figure}
\end{document}

enter image description here

2
  • 1
    Your answer was a valiant attempt to address issue as framed in the OP's original write-up. It turned out, though, that the real problem was somewhere completely else, viz., in the use of \abstract (a directive, not an environment) without a corresponding \endabstract instruction.
    – Mico
    Aug 7, 2017 at 17:09
  • @Mico, thank you for nice words. in similar question many times i have dilemma, what to do: wait with my answer (with risk that nor earn some reputation :)) , or write an answer before the question is clarified ... from question, at least to me, still not obvious, that the abstract is the problem ... as i see, actually is not, problem is wrong comparison caption width with abstract width, which narrower than text width ... i need to rethink if i should add comment about his to my answer ...
    – Zarko
    Aug 7, 2017 at 17:56

You must log in to answer this question.

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