I created a PNG image using MS Paint to use in my document (old school I know). I would like to keep the figure within the page width without losing image quality. I have tried using a JPG image instead but the quality is still poor (in that the words are too small to see when viewed in PDF mode at 100 % zoom).
Can someone suggest a solution please? I include my code and 2 screenshots.
Thanks in advance!
\documentclass[a4paper,11pt]{article}
\usepackage{color}
\usepackage{graphicx, epstopdf}
\usepackage{gensymb}
\usepackage{times}
\usepackage{adjustbox}
\usepackage{tabulary}
\usepackage{tabularx}
\usepackage{booktabs,caption, makecell}
\usepackage{pdflscape,afterpage,caption}
\usepackage[british]{babel}
\usepackage[backend=bibtex, citestyle=ieee, bibstyle=ieee]{biblatex}
\usepackage[section]{placeins}%Allows you to permanently fix figures.
\begin{document}
\begin{figure}[h!]
\centering
\includegraphics[width=1.5\textwidth]{IMAGE_Raman_principles}
\caption{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.
Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.
Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.
Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy.
}
\end{figure}
\end{document}
답변1
Drawings like this, which consist of straight lines with sharp edges, should really be done as vector graphic for a decent result.
In the following a quick and dirty attempt to recreate your first image in inkscape and export it to pdf+tex
. The .svg
file which can be edited in inkscape can for the moment be found at https://www.dropbox.com/s/4usem6v976o7r8h/drawing.svg?dl=0 and the resulting .pdf
at https://www.dropbox.com/s/wsgfuoe018djtln/drawing.pdf?dl=0 (I'll delete them in a few weeks).
\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\begin{document}
\begin{figure}
\setlength{\unitlength}{.7\textwidth}%
\begin{picture}(1,0.59469542)%
\put(0,0){\includegraphics[width=\unitlength]{drawing.pdf}}%
\put(0.30,0.57){Rayleigh scatter}%
\put(0.30,0.51){Raman scatter}%
\put(0.00,0.42){Laser excitation}%
\put(0.49,0.40){Scattered light}%
\put(0.36,0.04){\textcolor{white}{Sample}}%
\end{picture}%
\caption{text}
\end{figure}
\end{document}
If you must use a pixel based format, choose .png
rather then .jpg
.
Furthermore consider to export the image without text and add the text in latex. This will have several advantages, for example the text has the same size and font as the surrounding text and it can be searched for in the .pdf
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\setlength{\unitlength}{\textwidth}%
\begin{picture}(1,0.55070867)%
\put(0,0){\includegraphics[width=\unitlength]{t4cc9}}%
\put(0.37,0.51){Rayleigh scatter}%
\put(0.37,0.46){Raman scatter}%
\end{picture}%
\caption{text}
\end{figure}
\end{document}