0

I want to write (a) in the top left corner of first figure and (b) inside or outside the top left corner of figure (2). How can I do that. I don't want to use subcaption command.

`\documentclass[twocolumn, 10pt]{article}
\begin{figure}[H]
\includegraphics[width=0.49\columnwidth,height=4cm]{Fig1.PNG}
\includegraphics[width=0.49\columnwidth,height=4cm]{Fig2.PNG}
\includegraphics[width=0.49\columnwidth,height=4cm]{Fig3.PNG}
\includegraphics[width=0.49\columnwidth,height=4cm]{Fig4.PNG}
\end{figure}`
CarLaTeX
  • 62,716
jerry
  • 159
  • Why don't you use the subcaption package? It was made specifically for your purpose. – Johannes_B Jun 17 '19 at 04:51
  • If I use subcaption package in two column formate I find it difficult to fix the position of figures while compiling it. In all my document I have used figure environment. Now I'm looking for a way to mention figure number – jerry Jun 17 '19 at 04:53
  • How I have to modify above code if I use subcaption? I want to use figure environment beside I'm using two column paper. – jerry Jun 17 '19 at 05:13
  • subcaption just deals with the labels, it is not replacing the figure environment, nor influencing the positioning. – Johannes_B Jun 17 '19 at 05:16
  • So should I only mention \subcaption{fig(a)} at the end of {Fig1.PNG}? and should I commen t\ usepackage{caption} command? – jerry Jun 17 '19 at 05:22
  • I cannot follow you at all. Please have a look at the subcaption manual. You will see, that it will load caption as well. Both packages are by the same author. – Johannes_B Jun 17 '19 at 05:23
  • So for this I have to mention \begin{subfigure} and \end{subfigure}. – jerry Jun 17 '19 at 05:23
  • Actually most of the places they use it with minipage. I'm trying to figure it out from last one day. – jerry Jun 17 '19 at 05:25
  • 1
    Your question is not clear. Is this picture your only picture in the article? If not, how you numbering others? See, if this answer https://tex.stackexchange.com/questions/20354/sidesubfloats-why-does-this-errored-code-work-and-my-correct-code-doesnt can help you. – Zarko Jun 17 '19 at 05:34
  • Yes this is exactly what I want but with \sidesubfloat can I mention (a) and (b) at the top left corner by specifying anything? – jerry Jun 17 '19 at 05:38

1 Answers1

1

To big that can be fit in comment.

Your question is not clear. What should happen if you have more than one figure in your document? You not gives any information, if your figure with four subfigures has common figure caption or have only sub captions ...

To clarify, what we talking about see the following (dummy) document example:

\documentclass[twocolumn, 10pt]{article}
\usepackage{floatrow}
\usepackage{graphicx}
\usepackage[label font=bf, labelformat=simple]{subfig}
\usepackage{caption}
\floatsetup[figure]{style=plain,subcapbesideposition=top}
\setlength{\labelsep}{1mm}

\usepackage{lipsum} % for dummy text

\begin{document}
\lipsum[1][1]
    \begin{figure}[htb]
    \setkeys{Gin}{width=0.45\columnwidth,height=4cm}
    \centering
\sidesubfloat[]{\includegraphics{example-image-duck}\label{fig:a}}%
\hfill
\sidesubfloat[]{\includegraphics{example-image-duck}\label{fig:b}}

\sidesubfloat[]{\includegraphics{example-image-duck}\label{fig:c}}%
\hfill
\sidesubfloat[]{\includegraphics{example-image-duck}\label{fig:d}}
\end{figure}
\lipsum[2-3]
\begin{figure}[htb]
\includegraphics[width=\columnwidth]{example-image}
\caption{What should happen if you have more than one figure in your document? See inconsistency in images numbering!}
\end{figure}
\end{document}

which gives:

enter image description here

(red lines indicate page layout)

Please explain on this example, what is your problem.

Zarko
  • 296,517
  • I tried \sidesubfloat. This is exactly what I want. But I want to reduce the spacing b/w figure and caption (a). I used \setlength{\labelsep}{0.0001cm} but still spacing is enough. Can I reduce this spacing? – jerry Jun 17 '19 at 06:03
  • See https://tex.stackexchange.com/questions/444513/sidesubfloat-how-to-change-the-space-between-the-label-and-float. I add this option to my answer ... – Zarko Jun 17 '19 at 06:47
  • I go through your answer can we reduce this separation less than 1cm? I tried same command but it not working because I'm using \sidesubfigure to place two figures side by side in one column using two column environment – jerry Jun 17 '19 at 07:11
  • @jerry, please first let me know, if provided solution solve your basic problem. If this is a case (numbering of your figures are still unknown/fragile), I will add more explanation to answer, as well comments in code that you will able better understand the code and make some minor changes in it by yourself. – Zarko Jun 17 '19 at 07:20
  • Yes this solution has solved my problem. thanks. Numbering is okay. I want to decrease the spacing b/w figure and subcaptions (a). After using this method two columns of my two column environment are also merging in the center. I'm not sure if it is because of this subcaptions – jerry Jun 17 '19 at 07:24
  • if answer solve your problem, than it will be nice to accept it. For distance i add solution in answer. For all other your problems, please ask new question. – Zarko Jun 17 '19 at 07:52