I would like to insert figure in another pdf into my document, but the new image is overlapping the text. Can I perfectly insert it?
\documentclass{article}
\title{Product Variety and Quality Under Monopoly}
\author{Zhou}
\date{January 2019}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage[final]{pdfpages}
\setboolean{@twoside}{false}
\usepackage[UTF8]{ctex}
\begin{document}
\maketitle
\section{Horizontal Product Differentiation }
To choose the number of retail outlets $n$, the price $p$ and the location of outlets. Preset the density of consumer $N$ and assume everyone consume only one unit. The distance from consumer $i$ to the closest outlet is $x_i$
%Here, to insert the cropped pdf.
\begin{figure}[h]
\includegraphics[clip, trim=1cm 5cm 1cm 6cm, width=1.00\textwidth]{image1.pdf}
\centering
\end{figure}
\subsection{n == 1}
\noindent\textbf{\emph{Full Price}}: $p+tx$\\
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
There is another theory which states that this has already happened.
\section{Conclusion}
``I always thought something was fundamentally wrong with the universe'' \citep{adams1995hitchhiker}
\bibliographystyle{plain}
\bibliography{references}
\end{document}
The original pdf is here:https://1drv.ms/b/s!Alipxzqy9-AoZ1UJUpy7ODd_90A
pdfTeX warning: pdflatex.exe (file ./image1.pdf): PDF inclusion: found PDF version <1.6>, but at most version <1.5> allowed
. Check your log file for similar messages. Which LaTeX distribution are you using? MikTeX on Windows? In your case maybe just the PDF size is taken incorrectly.\includegraphics[clip,trim=2.3cm 0.5cm 2.6cm 7.5cm, width=1.00\textwidth]{image1.pdf}
. There might be an issue with the PDF version causing the incorrect size being taken bypdflatex
. You can crop the image usingpdfcrop
by providing the--bbox
parameter (see the help text for more details). Also you could just redraw the diagram using TikZ.begin{figure}[h]
without\caption
does not make much sense. The\centering
should be first not last anyway. Just add the\includegraphics
on its own, e.g. inside a\centerline{ ... }
. Or useadjustbox
to center it.trim=left bottom right top
. My guess the behaviour you are seeing is because your bottom trim overlaps your top trim. Notice @MartinScharrer's bottom trim is much smaller than your 5cm and your PDF does not have much space below the image to trim off. When the top and bottom trim parameters overlap LaTeX gets calculates the wrong height and you get the overlap.