Compiling my document I get this warning but I can't figure out why, anyone have idea?
Code: Select all
Package caption Warning: The option `hypcap=true' will be ignored for
this (caption) particular \caption on input line 280.
Code: Select all
Package caption Warning: The option `hypcap=true' will be ignored for
this (caption) particular \caption on input line 280.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Not without astefano91 wrote:Compiling my document I get this warning but I can't figure out why, anyone have idea?
Code: Select all
\documentclass[a4paper,10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[italian,english]{babel}
\usepackage{url}
\usepackage[font={small}, labelfont=bf]{caption}[2004/07/16]
\usepackage{hyperref}
\usepackage{abstract}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{multirow}
\usepackage{xspace}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{bpchem}
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage[babel]{csquotes}
\usepackage{guit}
\usepackage{listing} %inserisci codice in testo
\usepackage{alltt}
\usepackage[style=numeric-comp,sorting=none,sortcites=true,doi=false,url=false,hyperref]{biblatex}%style=numeric-comp,backend=biber
\hyphenation{QIAquick}
\renewbibmacro{in:}{% elimina il in nella biblio
\ifentrytype{article}{}{%
\printtext{\bibstring{in}\intitlepunct}}}
\renewcommand*{\bibfont}{\small}
\bibliography{bib_lab}
%opening
\title{Lab Report}
\author{Stefano Grasso}
\begin{document}
\twocolumn[
\maketitle
\begin{onecolabstract}
\end{onecolabstract}
]
\input{labintro}
\input{MaM}
\input{results}
\input{DaC}
\printbibliography
\newpage
\input{suppl}
\end{document}
Code: Select all
\begin{listing}
\begin{alltt}\label{lis:sas3}
.
.
.
\end{alltt}
\caption{Amino acid alignment for sample Saswati3. Alignment with the hAQP10 sequence with N133Q mutation.}
\end{listing}
Code: Select all
\documentclass{article}
\usepackage{caption}
\usepackage{listing}
\usepackage{hyperref}
\begin{document}
\begin{listing}
foo
\caption{bar}\label{lst:bar}
\end{listing}
See listing~\ref{lst:bar}
\end{document}
hypcap=false
the warning will disappear.Code: Select all
\documentclass{article}
\usepackage[hypcap=false]{caption}
\usepackage{listing}
\usepackage{hyperref}
\begin{document}
\begin{listing}
foo
\caption{bar}\label{lst:bar}
\end{listing}
See listing~\ref{lst:bar}
\end{document}
\capstart
where you want the hyperlink to be directed to:Code: Select all
\documentclass{article}
\usepackage{caption}
\usepackage{listing}
\usepackage{hyperref}
\usepackage{hypcap}
\begin{document}
\begin{listing}
\capstart
foo
\caption{bar}\label{lst:bar}
\end{listing}
See listing~\ref{lst:bar}
\end{document}
If you had read the side about the minimal working example (MWE) that cgnieder linked to, you would know how to make your code into a MWE; you should have used the hacking down approach.stefano91 wrote:Sorry I just didn't know what was importan and what wasn't
Yes, the warning has disappeared, but the "hypcap" feature, too. This means now all hyperlinks to figures and tables will jump to the caption of the figure and table instead to the figure or table itself.stefano91 wrote:Anyway adding hycap=false as option of captation the warning disappeard.
"The option ‘hypcap=true’ will be ignored for this particular \caption."
The caption package hasn’t found a proper hyperlink anchor for this particular caption, so it decides to ignore the setting hypcap=true (which is set by default). As a result a link to this caption (e.g. in the List of Figures, or set by \ref or \autoref) will link you to the caption of the figure or table, not to the figure or table itself.
This can happen if you use \captionof inside a non-floating environment, but also if you use some package which redefines figure or table, and which is unknown to the caption package.
If this is ok for you but you want to suppress this warning, simply place a \captionsetup{hypcap=false} just before the \caption or \captionof command which is causing the warning. If this is not ok for you, you can set a hyperlink anchor with \captionsetup{type= float type } for yourself.
(See section 6.5: hyperref )
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p