Graphics, Figures & TablestikZ | Many small Triangles form a Word

Information and discussion about graphics, figures & tables in LaTeX documents.
EigenGoofy
Posts: 42
Joined: Fri Jul 22, 2011 12:26 am

tikZ | Many small Triangles form a Word

Post by EigenGoofy »

Hi, CrazyHorse!

It is wonderful to see people posting code here! Thank you very much for your code and beautiful figure, CrazyHorse!

However, I have to add -shell-escape, otherwise your code does not work at all for pdfLatex.

Moreover, even adding that, the code still does not work in my computer. I paste your entire code on TeXworks 0.4.0 r759, then execute it, pdf file can not be generated, and the following errors come out:

Code: Select all

Package auto-pst-pdf Warning: 
    Creation of test-pics.pdf failed.
This warning occured on input line 124.

Code: Select all

Package auto-pst-pdf Warning: 
    Could not create test-pics.pdf. Auxiliary files not deleted.
This warning occured on input line 124.

Code: Select all

Package pst-pdf Warning: pspicture No. 1 undefined.

Code: Select all

Package pst-pdf Warning: File `test-pics.pdf' not found.
(pst-pdf)                Use the following commands to create it:
(pst-pdf)                ---------------------------------------------------- 
(pst-pdf)                latex test.tex
(pst-pdf)                dvips -o test-pics.ps test.dvi
(pst-pdf)                ps2pdf test-pics.ps
(pst-pdf)                ----------------------------------------------------
Any idea? Thank you~

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

tikZ | Many small Triangles form a Word

Post by CrazyHorse »

EigenGoofy wrote:Moreover, even adding that, the code still does not work in my computer. I paste your entire code on TeXworks 0.4.0 r759, then execute it, pdf file can not be generated, and the following errors come out:

Code: Select all

Package auto-pst-pdf Warning: 
    Creation of test-pics.pdf failed.
This warning occured on input line 124.
It looks like that you have no Perl installed. Try

Code: Select all

\usepackage[crop=off]{auto-pst-pdf}

when running it with "pdflatex -shell-escape <file>"

However, installing Perl is always a good idea: http://activestate.com/perl/
EigenGoofy
Posts: 42
Joined: Fri Jul 22, 2011 12:26 am

tikZ | Many small Triangles form a Word

Post by EigenGoofy »

Hi, Crazyhorse!

Thank you for your help, Crazyhorse!

Code: Select all

\usepackage[crop=off]{auto-pst-pdf}
This code works in TeXworks, but does not work very well! It generate a pdf file with figure being rotated 90 degree and located on the second page, instead of the first page, and only part of figure are shown on the pdf, not the whole thing. It is very weird!

As you recommend, I also download and installed ActivePerl 5.14.2(free version). However, the problem remains. I don't know how to solve it, and what happens.

However, the code looks working in LyX, but it run so slow, I have to wait for 3 minutes for generating pdf file.
Attachments
Triangle.pdf
(19.41 KiB) Downloaded 231 times
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

tikZ | Many small Triangles form a Word

Post by CrazyHorse »

EigenGoofy wrote:

Code: Select all

\usepackage[crop=off]{auto-pst-pdf}
This code works in TeXworks, but does not work very well! It generate a pdf file with figure being rotated 90 degree and located on the second page, instead of the first page, and only part of figure are shown on the pdf, not the whole thing. It is very weird!

As you recommend, I also download and installed ActivePerl 5.14.2(free version). However, the problem remains. I don't know how to solve it, and what happens.

However, the code looks working in LyX, but it run so slow, I have to wait for 3 minutes for generating pdf file.
Make the image smaller. Attached is a LyX file which worked correctly for me with "pdflatex -shell-escape". It uses Perl, otherwise modify the preamble with [crop=off].

The problem with the compilation time is that LyX runs this file several times which is in this case not needed.
Attachments
triangle.lyx
(2.57 KiB) Downloaded 247 times
EigenGoofy
Posts: 42
Joined: Fri Jul 22, 2011 12:26 am

tikZ | Many small Triangles form a Word

Post by EigenGoofy »

Hi, Crazyhorse!

Thank you very much for providing your LyX file! I have to use [crop=off] to run your file, even if Perl is installed; otherwise it will produce a blank PDF.

From the attachment, we can see the generated PDF, in which part of the letter "T" is missing. I don't know why, but this problem disappear when changing from

Code: Select all

\DeclareFixedFont{\pb}{T1}{pbk}{b}{n}{3cm}
to

Code: Select all

\DeclareFixedFont{\pb}{T1}{pbk}{b}{n}{2cm}
The compilation time for your file on my computer is 25 seconds. It is still long. I heard that LyX can compile 300 pages-long document by just using 10 seconds. How can I decrease the comilation time please?

Thank you, CrazyHorse!
Attachments
triangle_download.pdf
(15.19 KiB) Downloaded 278 times
Post Reply