Estoy intentando hacer un informe de laboratorio y quiero que algunas secciones/subsecciones estén en dos columnas, pero cuando intento cambiarlo a dos columnas, no genera mi imagen cuando la compilo. Intenté usar \includegraphics[width=0.5\textwidth]{chapter/introduction/Thermionic.png}
el cual funciona bien, pero quiero usarlo \begin{figure} \end{figure}
porque necesito incluir un título y etiquetarlo. A continuación se muestra mi código para esto.
\begin{multicols}{2}
When a metal filament is heated in a vacuum by passing a sufficient large current along the filament, electrons are emitted. By applying a positive voltage to an anode nearby, a current will start flowing between the filament (which acts as a cathode) and the anode. This setup is known as the \textbf{thermionic diode}. Figure \ref{fig:thermdiode} shows the schematic of a thermionic diode similar to the one used in the experiment. \cite{labbook}
\begin{figure}[h!]
{\includegraphics[width = 0.5\textwidth]{chapter/introduction/Thermionic.png}}
\caption{Schematic Diagram of a Thermionic Diode \cite{labbook}}
\label{fig:ThermDiode}
\end{figure}
%\includegraphics[width=0.5\textwidth]{chapter/introduction/Thermionic.png}
\end{multicols}
Parece que no puedo entender qué hay de malo en mi código. Cualquier ayuda sería apreciada.
Respuesta1
El mecanismo flotante de LaTeX está parcialmente deshabilitado en multicols
. Entonces puedes usar \captionof
.
\documentclass{article}
\usepackage{showframe}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
When a metal filament is heated in a vacuum by passing a sufficient large current along the filament, electrons are emitted. By applying a positive voltage to an anode nearby, a current will start flowing between the filament (which acts as a cathode) and the anode. This setup is known as the \textbf{thermionic diode}. \figurename~\ref{fig:ThermDiode} shows the schematic of a thermionic diode similar to the one used in the experiment.
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = 0.5\textwidth]{example-image}
\captionof{figure}{Schematic Diagram of a Thermionic Diode}
\label{fig:ThermDiode}
\end{minipage}
\end{multicols}
\end{document}