1

I want to remove the figures of my document so that it compiles more quickly and compile it as a draft as indicated in this SO question. However what I would like is to remove the figures but while keeping the hyperlinks (chapter section and so on) which make the navigation easier. Here is an example:

\documentclass[draft]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    pdftitle={Sharelatex Example},
    bookmarks=true,
    pdfpagemode=FullScreen,
}
\urlstyle{same}
\begin{document}
\tableofcontents
\chapter{First Chapter}
This will be an empty chapter and I will put some text here
\begin{equation}
\label{eq:1}
\sum_{i=0}^{\infty} a_i x^i
\end{equation}
The equation \ref{eq:1} shows a sum that is divergent. This formula 
will later be used in the page \pageref{second}.
For further references see \href{http://www.sharelatex.com}{Something 
Linky} or go to the next url: \url{http://www.sharelatex.com} or open 
the next file \href{run:./file.txt}{File.txt}
It's also possible to link directly any word or 
\hyperlink{thesentence}{any sentence} in your document.
\begin{figure}
  \includegraphics{somefig.png}
\end{figure}
\end{document}
ecjb
  • 883

1 Answers1

2

According to this post by egreg or the hyperref documentation pg. 6 you supposedly can use the option final

Hence, I'd suggest:

\documentclass[draft]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    pdftitle={Sharelatex Example},
    bookmarks=true,
    pdfpagemode=FullScreen,
    final
}
\urlstyle{same}
\begin{document}
\tableofcontents
\chapter{First Chapter}
This will be an empty chapter and I will put some text here
\begin{equation}
\label{eq:1}
\sum_{i=0}^{\infty} a_i x^i
\end{equation}
The equation \ref{eq:1} shows a sum that is divergent. This formula 
will later be used in the page \pageref{second}.
For further references see \href{http://www.sharelatex.com}{Something 
Linky} or go to the next url: \url{http://www.sharelatex.com} or open 
the next file \href{run:./file.txt}{File.txt}
It's also possible to link directly any word or 
\hyperlink{thesentence}{any sentence} in your document.
\begin{figure}
  \includegraphics{somefig.png}
\end{figure}
\end{document}
nhck
  • 740