0

I am using sharelatex.com to draft a manuscript for jjap/ apex. Using the jjap.cls file for template. I've use

\usepackage{graphics}

Figures syntax:

\begin{figure}[ht]
    \centering
    \includegraphics[width=2cm,height=5cm]{peak.jpg}
    \caption{\label{figure_2}vvv}
\end{figure}

However, the figures does not show up after compiled and error in output.pdf.

Jen
  • 21
  • welcome to tex.se! what is error? – Zarko Jul 03 '18 at 14:54
  • Images do not show up in the final pdf file though the correct syntax are used. I am also wondering what is the error. – Jen Jul 03 '18 at 14:56
  • The question was 'which error message do you see in ShareLaTeX', rather than 'what is the issue causing this'. Somewhat unrelated: the \label should be placed outside of the caption (see https://tex.stackexchange.com/a/32326/). More on-topic: did you upload the image file? Is the original filename also in lower case? – Marijn Jul 03 '18 at 15:00
  • And welcome to the site, of course :) – Marijn Jul 03 '18 at 15:00
  • Possible solution: replace \usepackage{graphics} by \usepackage{graphicx} (with an x), see https://tex.stackexchange.com/questions/23075/packages-graphics-vs-graphicx. – Marijn Jul 03 '18 at 15:42
  • @Marijn actually inside caption is best – David Carlisle Jul 03 '18 at 19:10
  • @DavidCarlisle In the linked question Martin Scharrer seems to disagree with you - why would inside a caption be better than below it (and not just a difference in convention)? – Marijn Jul 03 '18 at 19:23
  • @Marijn Because placing it after can adversely affect the spacing. I have an example in an answer here somewhere I'll see if I can find.... – David Carlisle Jul 03 '18 at 20:02
  • @Marijn https://tex.stackexchange.com/a/264115/1090 – David Carlisle Jul 03 '18 at 20:23

1 Answers1

1

This solved my problem though sharelatex setting was at "normal". \includegraphics[draft=false,width=8cm,height=5cm]{fig.jpg}

Jen
  • 21