Graphics, Figures & Tablesdvi2pdf and ps2pdf problem

Information and discussion about graphics, figures & tables in LaTeX documents.
jinglala
Posts: 1
Joined: Sat May 14, 2011 7:37 am

dvi2pdf and ps2pdf problem

Post by jinglala »

Hello all

I have a problem with making PDF from dvi with regard to figures in my paper.

I am using winedt as my text editor and when I make dvi file everything is fine and all the figures are complete but when I make PDF from dvi by dvitopdf, in the PDF file some figures are cut in half.

I have tried another way of dvitops first and then pstopdf. In this case, in the final PDF file pictures are fine but the whole body of the paper is moved up, very close to top of each page and I have a big empty space at the bottom!!!!!

The figures are .eps and I am using graphix package with the following commands for inserting picture:

\begin{figure}[ht]
\centering
\includegraphics[width=3in]{file's name}
\caption{some captions}
\label{fig_flexbends}
\end{figure}

Any help is appreciated.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: dvi2pdf and ps2pdf problem

Post by Stefan Kottwitz »

Hallo jinglala,

welcome to the board!

Perhaps your paper format has changed, you could check that. Which document class and which packages do you use? Do you load the geometry package? Alrady loading this package could fix PDF paper format issues.

Stefan
LaTeX.org admin
caraboo2001
Posts: 7
Joined: Wed Dec 10, 2014 8:54 pm

Re: dvi2pdf and ps2pdf problem

Post by caraboo2001 »

I am having the exact same problem. I am preparing an article for journal submission so I have to use the journal article class: \documentclass[draft,jgrga]{agutex}
Loading the geometry package alone does not solve the problem, it just adds one: compilation error "1.995 \Gm@process". I would be very grateful for a solution to this problem.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

dvi2pdf and ps2pdf problem

Post by Johannes_B »

Hi and welcome,

i think this is a different problem and deserves a different topic :-)

Can you add some more information? A minimal working example would be the easiest way for us to help.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
caraboo2001
Posts: 7
Joined: Wed Dec 10, 2014 8:54 pm

dvi2pdf and ps2pdf problem

Post by caraboo2001 »

I am attaching a brief example below. If I try to use the geometry package, I get error 1.995 \Gm@process.

But finally this is what interests me least. What I really want is the solution to the anomalous dvi-to-pdf figure cropping. Thank you again!

Code: Select all

\documentclass[draft,jgrga]{agutex} %document class for Journal of Geophysical Research articles

\usepackage{lineno}
\linenumbers*[1]

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{url}
\usepackage{widetext}
\usepackage[dvips]{graphicx}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{geometry}

\setkeys{Gin}{draft=false} %required for draft format in this document class

%% ------------------------------------------------------------------------ %%
%
%  ENTER PREAMBLE
%
%% ------------------------------------------------------------------------ %%

% Author names in capital letters:
\authorrunninghead{CARABOO2001 ET AL.}

% Shorter version of title entered in capital letters:
\titlerunninghead{A BRILLIANT TITLE}

%Corresponding author mailing address and e-mail address:
\authoraddr{Corresponding author: caraboo2001,
Somewhere in the Milky Way.
}

\begin{document}
\title{The brilliant title, but longer}

\authors{caraboo2001\altaffilmark{1,2}}

\altaffiltext{1}{Institute1}

\altaffiltext{2}{Institute2}

\begin{abstract}
Abstract...
\end{abstract}

\begin{article}
\section{Introduction}
\label{intro}

...



\section{Data}
\label{sec:data}

...


\subsection{Methodology}
\label{sec:methods}

...
At some point I cite Figure ~\ref{fig:myfig}
...

\end{article}


 \newpage
 \setcounter{figure}{4}
 \begin{figure}[t!]
 \centering
 % Use the relevant command to insert your figure file.
 % For example, with the graphicx package use
 \rule{4in}{3in}
   %\includegraphics[trim=0.2cm 1.4cm 0.2cm 1.4cm, clip=true, height=0.48\textwidth, angle=270]{Fig5.eps}
 % figure caption is below the figure
 \caption{Legend.}
 \label{fig:myfig}       % Give a unique label
 \end{figure}
 \clearpage
Last edited by Stefan Kottwitz on Thu Dec 11, 2014 1:14 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

dvi2pdf and ps2pdf problem

Post by Stefan Kottwitz »

Welcome to the forum!

caraboo2001 wrote:If I try to use the geometry package, I get error 1.995 \Gm@process.
The complete error message is:

Code: Select all

! Package geometry Error: \paperwidth (0.0pt) too short.

See the geometry package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.995 \Gm@process
So the quickest fix would be setting the paper size:

Code: Select all

\usepackage[a4paper]{geometry}
Of course the margins can be specified as well.

Stefan
LaTeX.org admin
caraboo2001
Posts: 7
Joined: Wed Dec 10, 2014 8:54 pm

Re: dvi2pdf and ps2pdf problem

Post by caraboo2001 »

Thank you for the quick reply. Your fix works as far as compiling the document with the geometry package goes. But unfortunately it does not fix the initial problem signaled by jinglala of the obscure figure cropping when going from dvi to pdf. Any other ideas?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: dvi2pdf and ps2pdf problem

Post by Stefan Kottwitz »

Vague ideas, but no specific suggestion without actually seeing the problem in a testable case, i.e. such a problem picture as addition to the code. You can post a picture as attachment to a post, so we could test and fix it.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

dvi2pdf and ps2pdf problem

Post by Johannes_B »

I am not an expert here, i usually use thhe way to get direct pdf-output.

Please try dvips filename and later ps2pdf filename.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
caraboo2001
Posts: 7
Joined: Wed Dec 10, 2014 8:54 pm

dvi2pdf and ps2pdf problem

Post by caraboo2001 »

Here is my problematic figure. I call it in the tex file with:

Code: Select all

 \newpage
 \setcounter{figure}{4}
 \begin{figure}[t!]
 \centering
 % Use the relevant command to insert your figure file.
 % For example, with the graphicx package use
   \includegraphics[trim=0.2cm 1.4cm 0.2cm 1.4cm, clip=true, height=0.48\textwidth, angle=270]{Fig5.eps}
 % figure caption is below the figure
 \caption{(\textbf{a}) Amplitude of the climatological seasonal cycle of the observational mean surface zonal wind stress, $\tau_x$; (\textbf{b}) and (\textbf{c}) observational and simulated climatological seasonal cycles of $\tau_x$, averaged over two regions of the same size in the West Pacific warm pool (PWP: 125$\mathrm{^o}$E-185$\mathrm{^o}$E, 5$\mathrm{^o}$N-15$\mathrm{^o}$N) and in the East equatorial Pacific (NINO3: 210$\mathrm{^o}$E-270$\mathrm{^o}$E, 5$\mathrm{^o}$S-5$\mathrm{^o}$N), respectively.}
 \label{fig:TAUX_seasonality}       % Give a unique label
 \end{figure}
 \clearpage
Attachments
Fig5.eps
(252.91 KiB) Downloaded 223 times
Post Reply