Here's my preamble:


and problematic part of code:

\includegraphics[width=\textwidth]{"Figure 1_2_8(GIMP)".jpg}

When I try to compile the code I get this error:

! Argument of \language@active@arg" has an extra }.
<inserted text> 
l.69 ...idth=\textwidth]{"Figure 1_2_8(GIMP)".jpg}

? Runaway argument?
! Paragraph ended before \language@active@arg" was complete.
<to be read again> 
l.69 ...idth=\textwidth]{"Figure 1_2_8(GIMP)".jpg}


I suppose it could be caused by incorrect using quotes. I tried use {} before {, but it didn't help. Can you help? Thanks!

  • 2
    russian makes the quote " active. You could try \shorthandoff{"} before the graphic, but better is to avoid spaces in file names -- then you don't need quotes. – Ulrike Fischer Nov 23 '16 at 21:17
  • also unrelated to the error but you probably should replace \begin{minipage}{\hsize} \begin{center} by \centering – David Carlisle Nov 23 '16 at 21:43

" is an active short hand character of russianb.ldf (package babel). It does not work in file names, because it is not expandable.

Three options:

  • \shorthandoff{"}, see comment of Ulrike Fischer:

    \includegraphics{"example image a"}%
  • Macro \dq is the expandable version of the double quotes for languages with the double quote as shorthand (e.g., russianb.ldf, ngermanb.ldf).

     \includegraphics{\dq example image a\dq}%
  • Package grffile adds some support for spaces in image file names:

    \includegraphics{example image a}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.