I am having trouble with my figures when formatting my document directly to PDF. When using the way via PS it works. How come?
Neither non-horizontal nor non-vertical lines drawn by command put or command path are drawn when formatting LaTeX => PDF.
Anyone having an explanation? (I am happy that I found out it worked with LaTeX => PS => PDF, I thought I would have trouble for days to make it work.)
Cheers, Aski
General ⇒ Figures corrupted when formatting directly to PDF
NEW: TikZ book now 40% off at Amazon.com for a short time.
Figures corrupted when formatting directly to PDF
Are your figures in *.eps format? If they are, this is the answer.Aski wrote:I am having trouble with my figures when formatting my document directly to PDF. When using the way via PS it works. How come?
Neither non-horizontal nor non-vertical lines drawn by command put or command path are drawn when formatting LaTeX => PDF.
Anyone having an explanation? (I am happy that I found out it worked with LaTeX => PS => PDF, I thought I would have trouble for days to make it work.)
Cheers, Aski
Re: Figures corrupted when formatting directly to PDF
No, they are drawn direclty in LaTeX. Here is an example:
\begin{figure}[htb]
\centering
\setlength{\unitlength}{1cm}
\begin{picture}(7,6.5)
%triangel ABC
\put(2,3){\line(1,0){3}}
\put(2,3){\line(15,30){1.5}}
\put(5,3){\line(-15,30){1.5}}
\end{picture}
\caption{Likbent triangel, förlängning av benen}
\label{fig:LikbentForlangning}
\end{figure}
The horizontal line is drawn when formatting LaTeX=>PDF, but not the other two. I am using TeXnicCenter if that might influence the result
\begin{figure}[htb]
\centering
\setlength{\unitlength}{1cm}
\begin{picture}(7,6.5)
%triangel ABC
\put(2,3){\line(1,0){3}}
\put(2,3){\line(15,30){1.5}}
\put(5,3){\line(-15,30){1.5}}
\end{picture}
\caption{Likbent triangel, förlängning av benen}
\label{fig:LikbentForlangning}
\end{figure}
The horizontal line is drawn when formatting LaTeX=>PDF, but not the other two. I am using TeXnicCenter if that might influence the result
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Figures corrupted when formatting directly to PDF
This code can't work, neither with latex nor pdflatex. And trying to compile it, there are four errors. The reasons are three important rules for the (x,y) pairs in the \line(x,y){length} command.Aski wrote:No, they are drawn direclty in LaTeX. Here is an example: [...] The horizontal line is drawn when formatting LaTeX=>PDF, but not the other two. I am using TeXnicCenter if that might influence the result
- The used values for the slope have to be integers.
- Only the values 0,1,...,6 are allowed.
- The pair of values mustn't have a common divisor.
Code: Select all
\begin{figure}[!ht]
\centering
\setlength{\unitlength}{1cm}
\begin{picture}(7,6.5)
% triangle ABC
\put(2,3){\line(1,0){3}}
\put(2,3){\line(1,2){1.5}}
\put(5,3){\line(-1,2){1.5}}
\end{picture}
\caption{Likbent triangel, förlängning av benen}\label{fig:LikbentForlangning}
\end{figure}
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10