Conversion Tools ⇒ Problem with conversion from PS to PDF
Problem with conversion from PS to PDF
The problem might be related to that described in »Converting from PS to PDF«.
- Attachments
-
- ps2pdfTEST.pdf
- (13.29 KiB) Downloaded 483 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with conversion from PS to PDF
The entire code of that sample would be much more interesting to see what might cause this behaviour.lanmmt wrote:Well I was playing around with ps2pdf and I'm also unhappy with the results - what is making me unhappy is when I'm selecting some text, it selects text strangely ... I attached an example that shows the problem.
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Problem with conversion from PS to PDF
Code: Select all
\documentclass[11pt]{book}
%\usepackage[left=2.8cm, right=2.8cm, bottom=4cm]{geometry}
%%%%%%%%%%% FONTS %%%%%%%%%%
%\usepackage{english}
\usepackage{tipa}
\usepackage[T1]{fontenc}
\usepackage{anyfontsize}
%%%%%%%%%% FONTS MATH %%%%%%%
%\usepackage{pxfonts}
%\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{dsfont}
\usepackage{braket}
\usepackage{enumerate}
\usepackage[usenames,dvipsnames]{pstricks}
% \usepackage{epsfig}
% \usepackage{pst-grad} % For gradients
% \usepackage{pst-plot} % For axes
\usepackage{graphicx}
\usepackage{picture}
\usepackage{epsfig}
\usepackage{psfrag}
\usepackage{color}
\usepackage{subfigure}
%%%%% MY DEF. %%%%
\newtheorem{proof}{Proof}[section]% ew. zmienić num.
%%% cz I %%%
\newcommand{\dd}{\mathrm{d}} % pochodna - d
\newcommand{\db}{\mathrm{dB}}
\newcommand{\e}{\mathrm{e}} % liczba e
\newcommand{\ii}{\mathtt{i}} % liczba i
%%% cz II %%%
\newcommand{\w}{\boldsymbol} % pogrubienie na wektor
\newcommand{\E}{\mathcal{E}} % enargia - E "kręcone"
%%% cz przed I %%%
\newcommand{\h}{\hat} % do macierzy
\newcommand{\lf}{\left}
\newcommand{\ri}{\right}
%\usepackage{textcomp}
\newtheorem{EX}{Example}[subsection]
\newcommand{\Tr}{\mathrm{Tr}} % ślad macierzy Tr
\newcommand{\kb}{k_B} %
\newcommand{\kbt}{k_B T}
\newcommand{\kbT}{k_B T}
\newcommand{\tx}{\text}
\newcommand{\vel}{\upsilon}
%%%%%%% GRAPHIC & TABLES %%%%%%%%%%%%%%
\usepackage{epsfig}
%\usepackage{floatflt}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{braket} % pakiet do "nawiasów"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% New definition of square root:
% it renames \sqrt as \oldsqrt
\let\oldsqrt\sqrt
% it defines the new \sqrt in terms of the old one
\def\sqrt{\mathpalette\DHLhksqrt}
\def\DHLhksqrt#1#2{%
\setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0
\advance\dimen0-0.2\ht0
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
{\box0\lower0.4pt\box2}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\allowdisplaybreaks[4] %łamanie wierszy z wyrażeniami mat.
\begin{document}
are separate and their particles do not mix, that is particle number $N$ and $N_0$ and volumes of the systems are constant, they can exchange the energy.
%%%%%%%%%% rysunek %%%%%%%%%%%%%
\begin{center}
\scalebox{1} % Change this value to rescale the drawing.
{
\begin{pspicture}(0,-1.65)(6.54,1.65)
\psellipse[linewidth=0.04,dimen=outer,fillstyle=solid](3.85,0.0)(2.69,1.65)
\psellipse[linewidth=0.04,dimen=inner,fillstyle=solid](1.59,0.43)(1.59,0.96)
\usefont{T1}{ptm}{m}{n}
\rput(1.5214063,0.48){$E$, $N$, $V$}
\usefont{T1}{ptm}{m}{n}
\rput(3.8914063,-0.72){$E_0-E$, $N_0$, $V_0$}
\usefont{T1}{ptm}{m}{n}
\rput(4.4178123,0.52){heat bath}
\end{pspicture}
}
\end{center}
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with conversion from PS to PDF
Many packages and other parts of the code seem not to be relevant to the problem. But I assume that you need them and know exactly what they are doing.
Since it is too time consuming to dig through the code of your example, I can only offer a short document that should work fine.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{pstricks-add}
\begin{document}
are separate and their particles do not mix, that is particle number $N$ and $N_0$ and volumes of the systems are constant, they can exchange the energy.
\begin{figure}[!ht]
\centering
\begin{pspicture}[showgrid=false](-3,-2)(3,2)
\psellipse(0,0)(2.5,1.5)
\psellipse[fillstyle=solid](-1.5,0.75)(1.5,0.9)
\rput(-1.5,0.75){$E$, $N$, $V$}
\rput(0,-0.75){$E_0-E$, $N_0$, $V_0$}
\rput(1,0){heat bath}
\end{pspicture}
\caption{A figure}\label{fig:figure}
\end{figure}
\end{document}
[1] View topic: Obsolete packages and document classes — Avoid usage!
[2] View topic: Avoidable mistakes
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 351
- Joined: Sat Aug 02, 2008 8:47 am
Problem with conversion from PS to PDF
it is a problem with the viewer and not the code and not ps2pdf.lanmmt wrote: so here it is
Herbert
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with conversion from PS to PDF
I can comprehend the problem with Adobe Reader (on Wind0ws) and Okular (on Linux). Tests on my other machine with other viewers on Wind0ws will have to wait until I fixed the hardware crash.CrazyHorse wrote:it is a problem with the viewer and not the code and not ps2pdf. […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Problem with conversion from PS to PDF
now the text is ok, but all the time I see that (1,1) in the left top corner, and in the book (I'm writing - that's the cause of so long preambule - I need it all, and thank you that you have noticed I have double comends) I get two extra pages at the begining o_O and I get this:
Code: Select all
! Undefined control sequence.
\resetOptions ...\pst@linetype {0}\pstScalePoints
(1,1){}{}\psset [pstricks-...
l.2054 \resetOptions
? h
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
?
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2054 \resetOptions
?
)
-
- Posts: 351
- Joined: Sat Aug 02, 2008 8:47 am
Problem with conversion from PS to PDF
your PSTricks files are really out of date, update your system.lanmmt wrote:...well it works, almost...
now the text is ok, but all the time I see that (1,1) in the left top corner, and in the book (I'm writing - that's the cause of so long preambule - I need it all, and thank you that you have noticed I have double comends) I get two extra pages at the begining o_O and I get this:the same problem was with the code you've posted.Code: Select all
! Undefined control sequence. \resetOptions ...\pst@linetype {0}\pstScalePoints (1,1){}{}\psset [pstricks-... l.2054 \resetOptions
Herbert
Problem with conversion from PS to PDF
Code: Select all
\usepackage{pstricks-add}
So summarising:
I've
1) added
Code: Select all
\usepackage{pstricks-add}
Code: Select all
\usepackage[usenames,dvipsnames]{pstricks}
3) commented line 2035 in pstricks-add.tex (I've fonded it in C:\Program Files (x86)\MiKTeX 2.7\tex\generic\pstricks-add):
Code: Select all
%\pstScalePoints(1,1){}{}%
Code: Select all
@rem You can put here any commands you want - this batch file can be executed from LEd's toolbar
@rem There are 3 parameters passed to this batch:
@rem %1 - <MAINFILEDIR>
@rem %2 - <MAINFILENAME>
@rem %3 - <MAINFILEDISK>
@rem You can also define in tex_cmd.gd file some additional parameters to be passed to this batch file.
@echo off
%3
cd %1
latex.exe --src-specials %2
dvips.exe %2.dvi -o %2.ps
ps2pdf.exe %2.ps %2.pdf
Problem with conversion from PS to PDF
well I thought I've updated them last night, maybe my MikTeX haven't noticed something. I'll try to update them once more, if that won't help, maybe I should try to update them manualy?CrazyHorse wrote: your PSTricks files are really out of date, update your system.
Herbert