- Questo topic ha 0 risposte, 1 partecipante ed è stato aggiornato l'ultima volta 11 anni, 4 mesi fa da .
-
Topic
-
Salve ragazzi. ho un problema.Vorrei inserire delle figure affiancate in un ambiente article ma mi blocca il seguente errore
! Package caption Error: hang undefined.
Un pò di codice per chiarire
`\documentclass[11pt,a4paper,oneside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8,latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{setspace} %Set linespace
\usepackage{graphicx}%pacchetti personali%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{siunitx}%<--S.I. in Latex \newcommand{\gr}{\emph{grating}} %chiamata per scrivere rapidamente grating in corsivo \usepackage{subfig}%<--per mettere le immagini multiple %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{mathptmx} % Set the font to Times New Roman \usepackage[fleqn]{amsmath} % Math and equations \mathindent=7.0pt % All eqs. aligned on left with the baseline shift to 7pt \usepackage{enumitem} \setlist{noitemsep} %no item separation in ``enumerate'' \usepackage[left=2cm, right=2cm, top=2.5cm, bottom=2.5cm, marginpar=0cm, headheight=28pt]{geometry} % Set margins \usepackage{titling} \setlength{\droptitle}{-35pt} % shift the title text 'up' \usepackage{titlesec} %Change section head \titleformat*{\section}{\fontseries{b}\selectfont} \usepackage[hang, small,labelfont=normal,up,labelsep=space]{caption}% Custom captions under/above floats in tables or figures \captionsetup[figure]{name=Fig.} % Changes the name to “Fig.” for all figures \usepackage{fancyhdr} % Headers and footers HEADERS \pagestyle{fancy} % All pages have headers and footers \renewcommand{\headrulewidth}{0pt} % No head rule \fancyhead{} % Blank out the default header \fancyfoot{} % Blank out the default footer \fancyhead[L]{\emph{\small{10\textsuperscript{th} Pacific Symposium on Flow Visualization and Image Processing\\ Naples, Italy, 15-18 June, 2015}}} % Custom header text \fancyfoot[L]{Paper ID: XXX} % Custom footer text \fancyfoot[R]{\thepage} % Custom footer text \fancypagestyle{title} % Headers in the Title page { \fancyhf{} % No header/footer \renewcommand{\headrulewidth}{0pt} % No header rule \renewcommand{\footrulewidth}{0pt} % No footer rule \fancyhead[L]{\emph{\small{10\textsuperscript{th} Pacific Symposium on Flow Visualization and Image Processing\\ Naples, Italy, 15-18 June, 2015}}} % Custom header text \fancyfoot[L]{Paper ID: XXX} % Custom footer text \fancyfoot[R]{\thepage} % Custom footer text }% END HEADERS \usepackage[noblocks]{authblk} % Make title and authors TITLE \title{\Large{\bf Insert Paper Title Here / Insert Paper Title Here / Insert Paper Title Here / Insert Paper Title Here / Insert Paper Title Here}} \renewcommand\Authands{, } \author[1,*]{\bf Abcde Fghijklm} \author[1]{\bf Bcdefg H. Ijklmno} \author[2]{\bf Cdefghi Jklmnopr} \affil[1]{\small Department of ++++++++, University of ++++++, City, Country} \affil[2]{\small Faculty of +++++++, University of ++++++, City, Country} %\affil[3]{\small The affiliation should contain (i) the name of university, company, organization or institute and country and (ii) only the e-mail address of the corresponding author} \affil[*]{\small corresponding author: email@address.gggg.hh.kkk}
\date{}% END TITLE
\usepackage{abstract} % Allows abstract customization
\renewenvironment{abstract} % ABSTRACT PERSONALIZATION
{
\begin{minipage}
{0.95\textwidth}
\rule{\textwidth}{0.5pt}
}
{\\
\rule[8pt]{\textwidth}{0.5pt}
\end{minipage}
} % END ABSTRACT
\let\OLDthebibliography\thebibliography %Set bibliography linespace
\renewcommand\thebibliography[1]
{
\OLDthebibliography{#1}
\setlength{\itemsep}{0pt}
}%% BEGIN DOCUMENT——————————————————————-
\begin{document}\begin{document}
\begin{figure}
\centering
\subfloat[][Schematic representation as collimator.\label{fiber_collimator}]
{\includegraphics[width=.45\textwidth]{Figure/fiber_collimator.png}} \quad
\subfloat[][Schematic representation as focuser.\label{fiber_focuser}]
{\includegraphics[width=.45\textwidth]{Figure/fiber_focuser.png}}
\caption{Schematic representations of double working ways of collimators.}
\label{fig:scheme_collimators}
\end{figure}\begin{thebibliography}{99}
\bibitem{aaaa}
Brown B, Aaron M (2001) The politics of nature. In: Smith J (ed) The rise of modern genomics, 3rd edn. Wiley, New York, pp 230-257
\bibitem{unaltro}
South J, Blass B (2001) The future of modern genomics. Blackwell, London.
\bibitem{uno}
Greco C S, Ianiro A, Cardone G (2014) Time and phase average heat transfer in single and twin circular synthetic impinging air jets. \emph{International Journal of Heat and Mass Transfer}, vol. 73, pp 776-788. doi: 10.1016/j.ijheatmasstransfer.2014.02.030
\bibitem{kjlxh}
Lasance C J M, Aarts R (2008). Synthetic jet cooling part I: Overview of heat transfer and acoustic. In: Proceeding of the 24th, Annual IEEE Semiconductor Thermal Measurement and Management Symposium, pp 20-25
\end{thebibliography}\end{document}
`In pratica va in conflitto subfig e captionsetup…credo…
Grazie per l’aiuto
- Devi essere connesso per rispondere a questo topic.