I am working on a publication for IEEE and trying to add 3 figures as subfigure in latex on top over 2 column text.
I have tried the folloeing latex code:
\documentclass[conference]{IEEEtran}
\usepackage{subcaption}
\usepackage{caption}
\begin{document}
\begin{figure*}[!h]
\centering
\label{fig_path_loss}
\subfigure[]{\includegraphics[width=0.32\textwidth]{Find3.jpg}}
\label{fig_rain}
\subfigure[]{\includegraphics[width=0.32\textwidth]{Find2.jpg}}
\
\subfigure[]{\includegraphics[width=0.32\textwidth]{Find1.jpg}}
\label{fig_gas}
\caption{(a) aaa (b) bbb (c) ccc }
\end{figure*}
\end{document}
My problem is that Overleaf I use didnt reference the subfigures.
(subcaption) with the subfigure package.
See the subcaption package documentation for explanation.
Type H <return> for immediate help.
...
l.66 \subcaption#CheckCompatibility
If you do not understand this error, please take a closer look
at the documentation of the `subcaption' package, especially the
section about errors.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
I added \usepackage{subcaption} on the beginning of my doc.
Could you please suggest me a solution of this issue?
you are missing the graphicx package
labels need to be placed in or after the caption
the subcaption package automatically loads the caption package. In principle you don't need to load the caption package yourself, but if you absolutely want to load it, do it before the subcaption package
you can use the \subcaptionbox macro from the subcaption package like this:
\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure*}[htbp]
\centering
\subcaptionbox{\label{fig_rain}}{\includegraphics[width=0.32\textwidth]{example-image-duck}}
\subcaptionbox{}{\includegraphics[width=0.32\textwidth]{example-image-duck}}
\subcaptionbox{\label{fig_gas}}{\includegraphics[width=0.32\textwidth]{example-image-duck}}
\caption{(a) aaa (b) bbb (c) ccc }
\label{fig_path_loss}
\end{figure*}
\subref{fig_gas}
\ref{fig_gas}
\end{document}
Related
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{import}
% links Symbol
\usepackage{bbding,pifont}
\usepackage[hidelinks]{hyperref}
% Redefinition:
\let\orighref\href
\newcommand{\hrefa}[1]{\raisebox{-0.4ex}{\HandRight}\,\orighref{...code}{#1}}
\newcommand{\hrefb}[1]{\raisebox{-0.4ex}{\HandRight}\,\orighref{xxx/}{#1}}
\newcommand{\hrefc}[1]{\raisebox{-0.4ex}{\HandRight}\,\orighref{ccc}{#1}}
\newcommand{\hrefd}[1]{\raisebox{-0.4ex}{\HandRight}\,\orighref{vvv/}{#1}}
\newcommand{\hrefe}[1]{\raisebox{-0.4ex}{\HandRight}\,\orighref{vvv}{#1}}
\newcommand{\hreff}[1]{\raisebox{-0.4ex}{\HandRight}\,\orighref{vvv}{#1}}
% end links symbol
% personal data
\name{...}
\title{}
\address{..}{}{}
\phone[mobile]{+...4}
\email{xxx#a.com}
\extrainfo{\hrefd{xc.com}}
%\photo[64pt][0.4pt]{photo.jpg}
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
Error:
LaTeX Error: Option clash for package hyperref.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.40 \begin{document}
The package hyperref has already been loaded with options:
[hidelinks]
There has now been an attempt to load it with options
[unicode]
Adding the global options:
hidelinks,unicode
to your \documentclass declaration may fix this.
Try typing <return> to proceed.
when i try to convert to pdf, i get an empty html file.
The moderncv class automatically loads the hyperref package. You can use \PassOptionsToPackage{hidelinks}{hyperref} to make sure it is loaded with the options you want.
(although your hidelinks option won't make a big difference because moderncv sets the line width of the link boxes to zero, so they are already invisible)
\PassOptionsToPackage{hidelinks}{hyperref}
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{import}
% links Symbol
\usepackage{bbding,pifont}
% personal data
\name{...}
\title{}
\address{..}{}{}
\phone[mobile]{+...4}
\email{xxx#a.com}
%\extrainfo{\hrefd{xc.com}}
%\photo[64pt][0.4pt]{photo.jpg}
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
test
\url{stackoverflow.com}
\end{document}
I am newbie in latex and trying to add figure into the latex file as follows:
\documentclass{bmcart}
%%% Load packages
\usepackage{amsthm,amsmath}
\usepackage[utf8]{inputenc} %unicode support
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{graphicx}
\def\includegraphic{}
\def\includegraphics{}
\startlocaldefs
\endlocaldefs
\begin{document}
\begin{figure}[h!]
\includegraphics{figures/GBMfigure3.jpg}
\caption{show the results of the different settings for the parameters of the penalty model for solving the problem \ref{q11}.}
\end{figure}
\end{document}
But, the figure is not displayed and the text itself is displayed instead of the figure, for example the resulted file is as below:
So, what's the solution of that issue please.
With \def\includegraphics{} you redefine the command to do nothing. If you want it to include your image, don't do such a redefinition.
\documentclass{bmcart}
%%% Load packages
\usepackage{amsthm,amsmath}
\usepackage[utf8]{inputenc} %unicode support
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{graphicx}
%\def\includegraphic{}
%\def\includegraphics{}
\startlocaldefs
\endlocaldefs
\begin{document}
\begin{figure}[h!]
\includegraphics{example-image-duck}
\caption{show the results of the different settings for the parameters of the penalty model for solving the problem \ref{q11}.}
\end{figure}
\end{document}
How can I set the written part inside the "block" as white color?
\documentclass{tikzposter}
\usepackage[paperwidth=1080px,paperheight=1980px]{geometry}
\usepackage{xcolor}
%\usetheme{Board}
\begin{document}
% See Section 4.1
\column{0.7}
\block{A test!}{
}
\end{document}
\end{document}
This one is compiling if you run it on overleaf
Several problems:
tikzposter already loads the geometry package. You must not load it with different options afterwards. An error messages in the log will tell you that!
There is a missing ; after \node .... An error message in the log will tell you that!
\block has two mandatory arguments - you must not use it with only one argument. This will cause an error message!
finally you can change the text colour of the block title with \colorlet{blocktitlefgcolor}{red}
you don't need to load the xcolor package, this is already taken care of by tikz
\documentclass{tikzposter}
\geometry{paperwidth=1080px,paperheight=1980px}
\usetheme{Board}
\begin{document}
\node[above right,opacity=1.2,inner sep=0pt,outer sep=0pt] at (bottomleft) {\includegraphics[width=\paperwidth,height=\paperheight]{example-image-duck}};
\maketitle % See Section 4.1
\colorlet{blockbodybgcolor}{black}
\colorlet{blocktitlefgcolor}{red}
\block{\textbf{Ultrastructural anylisis}}{}
\end{document}
i´m trying to align several subfigures in a row. 2 figures are working fine. When trying to include the third subfigure following err message appears: File ended while scanning use of #subfloat. \include{doc}
This tex document is included in the main file with packages:
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{subcaption}
%%%%%%new doc
\begin{figure}[h!]
\centering
\subfigure[a]{\includegraphics[width=0.1\textwidth]{Logos/Symbol_One_flow_path}}
\subfigure[b]{\includegraphics[width=0.1\textwidth]{Logos/1920px-Symbol_Two_flow_paths}}
\subfigure[c]{\includegraphics[width=0.1\textwidth]{Logos/Symbol_Two_flow_paths_(diagonally)} \subfigure[d]{\includegraphics[width=0.3\textwidth{Logos/Symbol_Two_flow_paths_with_connection}
\subfigure[e]{\includegraphics[width=0.3\textwidth]{Logos/graph}
\end{figure}
this issue is probably due to the missing } at the end of figures c,d and e.
That can explain why you just have the figures a and b.
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{subcaption}
\begin{figure}[h!]
\centering
\subfigure[a]{\includegraphics[width=0.1\textwidth]{Logos/Symbol_One_flow_path}}
\subfigure[b]{\includegraphics[width=0.1\textwidth]{Logos/1920px-Symbol_Two_flow_paths}}
\subfigure[c]{\includegraphics[width=0.1\textwidth]{Logos/Symbol_Two_flow_paths_(diagonally)}} %one } was missing here !
\subfigure[d]{\includegraphics[width=0.3\textwidth{Logos/Symbol_Two_flow_paths_with_connection}} % here also
\subfigure[e]{\includegraphics[width=0.3\textwidth]{Logos/graph}} %and here
\end{figure}
I have a figure in LaTeX with a caption to which I need to add a formula (equation* or displaymath environments). For example:
\documentclass[12pt]{article}
\begin{document}
\begin{figure}[tbph]
\begin{center}
%...
\end{center}
\caption{As you can see
\begin{displaymath}4 \ne 5\end{displaymath}
}
\label{fig:somefig}
\end{figure}
\end{document}
This makes pdflatex angry, though it will produce a PDF.
! Argument of \#caption has an extra }.
<inserted text>
\par
l.9 }
What's the right way to go about adding an equation to a figure caption?
NOTE: Please do not suggest simply using the $ ... $ math environment;
the equation shown is a toy example; my real equation is much more intricate.
See also:
Adding a caption to an equation in LaTeX (the reverse of this question)
Using the package "caption":
\begin{figure}
\begin{center}
...
\captionsetup{singlelinecheck=off}
\caption[.]{
\begin{displaymath}
assoc\_meaning(\lambda x_{SBJ}. followed(x,y) \&actor(x) \nonumber \&actor(y),\lambda x_{SBJ}. maintained(x,\nonumber <(dist\_from(y),1))
\end{displaymath}}
\end{center}
\end{figure}
The square brackets following \caption aren't optional, but leaving them off won't cause an error that looks any different than the one before you added \usepackage{caption} and \captionsetup{...}.
I'm not sure why you do not want to use the $ ... $ solution, because of fractions?
If so, you can use \dfrac instead of \frac.
I would try $ \displaystyle \dfrac{1}{2} \cdot \sum_{i=0}^n i$, i.e. use the \displaystyle command.