Graphics, Figures & TablesNo Output of LaTeXDraw in Document

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
sachinrajsharma
Posts: 35
Joined: Sun Apr 08, 2012 5:48 am

No Output of LaTeXDraw in Document

Post by sachinrajsharma »

Hi,

I used a package LaTeXDraw, and got some code for the drawing I made in that, when I used the source code generated in LaTeXDraw and use this in my editor which is TeXmaker, I am not getting the result (output).

Both files are attached for your reference. I am attaching the output which I got in LaTeX as well for reference.

Please guide.


Regards,
Sachin Sharma
Attachments
test diagram.tex
(1.64 KiB) Downloaded 409 times

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

No Output of LaTeXDraw in Document

Post by localghost »

Since the program relies on PSTricks, you either have to compile with LaTeX→DVI→PS→PDF, XeLaTeX→PDF or us the auto-pst-pdf package for direct compilation with PDFLaTeX.

Perhaps its is better to use PSTricks directly instead of relying on bad export by third part software.

Code: Select all

% !TeX program = pdflatex
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}

\begin{document}
  \begin{pspicture}[showgrid=false](0,-2)(6,4)
    \begin{psclip}{\psframe(0,0)(4,4)}
      \psframe[fillstyle=hlines](2,2)(6,-2)
    \end{psclip}
    \psframe(2,2)(6,-2)
  \end{pspicture}
  \begin{pspicture}[showgrid=false](-2,-4)(4,2)
    \begin{psclip}{\pscircle(0;0){2}}
      \pscircle[fillstyle=vlines](2;315){2}
    \end{psclip}
    \pscircle(2;315){2}
  \end{pspicture}
\end{document}
Needs of course shell escape enabled for the PDFLaTeX compiler. The output is attached.


Remarks:
  • The \scalebox command is forbidden in the preamble.
  • The epsfig package is obsolete for a long time.

Thorsten
Attachments
ytmp.png
ytmp.png (4.37 KiB) Viewed 4832 times
Post Reply