General ⇒ Figures corrupted when formatting directly to PDF
Figures corrupted when formatting directly to PDF
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
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
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
\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¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10