LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-24-2020, 06:32 PM   #1
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,846

Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
How can I generate a PDF from a *.tex file in Slackware 14.2?


I am using the following command
Code:
texi2pdf dummy.tex
to create a PDF from a *.tex file, which was created from 'GeoGebra' by "export->graphics view as pstricks".
However, it always throws several errors (see below) and the resulting PDF is corrupted/incomplete. I have added /usr/share/texmf/bin to my PATH variable and installed the 'texlive' package from slackbuilds.org. It still does not build properly.

Is there some additional configuration that I need to do or some additional package that needs to be installed?

Addtional information:

The content of the tex file
Code:
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{pstricks-add}
\pagestyle{empty}
\begin{document}
\psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=5pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-12.49984777440859,-11.265342340794472)(28.03951999775536,19.802881102297736)
\multips(0,-11)(0,5.0){7}{\psline[linestyle=dashed,linecap=1,dash=1.5pt 1.5pt,linewidth=0.4pt,linecolor=lightgray]{c-c}(-12.5,0)(28.0,0)}
\multips(-12,0)(5.0,0){9}{\psline[linestyle=dashed,linecap=1,dash=1.5pt 1.5pt,linewidth=0.4pt,linecolor=lightgray]{c-c}(0,-11.265342340794472)(0,19.802881102297736)}
\psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=5.,Dy=5.,ticksize=-2pt 0,subticks=2]{->}(0,0)(-12.49984777440859,-11.265342340794472)(28.03951999775536,19.802881102297736)
\psline{->}(0.,0.)(3.,3.)
\psline{->}(3.,3.)(6.44,3.26)
\psline{->}(6.44,3.26)(0.96,5.86)
\psplot[linestyle=dashed,dash=17pt 17pt]{-12.49984777440859}{28.03951999775536}{(--40.59956282946034-7.020271276268703*x)/9.106684230332956}
\begin{scriptsize}
\psdots[dotsize=3pt 0,dotstyle=*,linecolor=darkgray](0.,0.)
\rput[bl](0.27184685115810553,0.43008588374139306){\darkgray{$A$}}
\psdots[dotstyle=*,linecolor=blue](3.,3.)
\rput[bl](3.285392774044629,3.730636180236177){\blue{$B$}}
\rput[bl](1.2763621587869467,1.7216055649784825){$u$}
\psdots[dotstyle=*,linecolor=blue](6.44,3.26)
\rput[bl](6.729445257343513,3.9458894604423587){\blue{$C$}}
\rput[bl](4.64866354868377,3.443631806627935){$v$}
\psdots[dotstyle=*,linecolor=blue](0.96,5.86)
\rput[bl](1.2763621587869467,6.600679916318598){\blue{$D$}}
\rput[bl](3.572397147652869,4.376396020854722){$w$}
\psdots[dotstyle=*,linecolor=blue](-2.,6.)
\rput[bl](-1.7371837640995769,6.74418210312272){\blue{$E$}}
\psdots[dotstyle=*,linecolor=blue](7.106684230332957,-1.020271276268703)
\rput[bl](7.375205097962054,-0.2874250502792122){\blue{$F$}}
\rput[bl](-12.141092307398289,12.4125184818855){$f$}
\end{scriptsize}
\end{pspicture*}
\end{document}
and the first error is:

Code:
...
(/usr/share/texmf-dist/tex/generic/pst-math/pst-math.tex
`pst-math' v0.64 , (CJ,hv)) `pstricks-add' v3.87, 2019/01/12 (dr,hv))
 v1.91, 2018/08/31 (tvz,hv)))
(/usr/share/texmf-dist/tex/latex/pst-node/pst-node.sty
(/usr/share/texmf-dist/tex/generic/pst-node/pst-node.tex))
(/usr/share/texmf-dist/tex/latex/pst-3d/pst-3d.sty
(/usr/share/texmf-dist/tex/generic/pst-3d/pst-3d.tex))
(/usr/share/texmf-dist/tex/latex/pst-math/pst-math.sty
(/usr/share/texmf-dist/tex/latex/pst-calculate/pst-calculate.sty
(/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/share/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(/usr/share/texmf-dist/tex/latex/siunitx/siunitx.sty
(/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf-dist/tex/latex/tools/array.sty)
(/usr/share/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/share/texmf-dist/tex/latex/translator/translator.sty)))
(/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texmf-dist/tex/generic/xstring/xstring.sty
(/usr/share/texmf-dist/tex/generic/xstring/xstring.tex))
(/usr/share/texmf-dist/tex/generic/pst-math/pst-math.tex))
(/usr/share/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex))
(/home/user/workspace/shell/subdir/dummy.aux)
(/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texmf-dist/tex/latex/base/ts1enc.dfu)
(/usr/share/texmf-dist/tex/latex/translator/translator-basic-dictionary-English
.dict) (/usr/share/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg)
./dummy.tex:8: Undefined control sequence.
\c@lor@to@ps ->\PSTricks 
                         _Not_Configured_For_This_Format
l.8 ...linecolor=lightgray]{c-c}(-12.5,0)(28.0,0)}
?                                                  

./dummy.tex:8: Undefined control sequence.
\XC@usec@lor ...string \color@ #1#2\endcsname \@@ 
                                                  \fi \space 
l.8 ...linecolor=lightgray]{c-c}(-12.5,0)(28.0,0)}
                                                  
?
It goes on for a while with similar errors. I have to hit 'Enter' after every '?' to continue.
 
Old 01-24-2020, 06:55 PM   #2
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 333

Rep: Reputation: 164Reputation: 164
Red face ignore

EDIT: very tired, read that as txt to pdf


Here you go, what I do:

Code:
enscript -p out.ps in.txt
ps2pdf out.ps out.pdf

Last edited by jmccue; 01-24-2020 at 06:57 PM.
 
Old 01-25-2020, 01:42 AM   #3
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 474

Rep: Reputation: 107Reputation: 107
[QUOTE=crts;6082658]I am using the following command
Code:
texi2pdf dummy.tex
Since the input file is a latex file, you should use
the following command:
Code:
pdflatex dummy.tex
 
2 members found this post helpful.
Old 01-25-2020, 05:02 AM   #4
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 135

Rep: Reputation: Disabled
Quote:
Originally Posted by vonbiber View Post
Quote:
Originally Posted by crts View Post
I am using the following command
Code:
texi2pdf dummy.tex
Since the input file is a latex file, you should use
the following command:
Code:
pdflatex dummy.tex
Indeed. texi2pdf is meant to process texi files (e. g. the GNU manuals you can find in /usr/info), not latex. To process latex, you need texlive.
 
Old 01-25-2020, 08:27 AM   #5
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,846

Original Poster
Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Quote:
Originally Posted by vonbiber View Post
Since the input file is a latex file, you should use
the following command:
Code:
pdflatex dummy.tex
Quote:
Originally Posted by NonNonBa View Post
Indeed. texi2pdf is meant to process texi files (e. g. the GNU manuals you can find in /usr/info), not latex. To process latex, you need texlive.
'texi2pdf' is a script which does call 'pdflatex' eventually, however, I also tried running 'pdflatex' directly. The result is still the same. I installed texlive, texlive-extra and texlive-docs but it is still not building correctly.

Is anyone able to correctly build the above sample? This way I would at least know if it is only an issue on my side.
 
Old 01-25-2020, 08:48 AM   #6
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 118

Rep: Reputation: 86
I have the full suite of texlive software installed on my laptop and tried making a PDF from your tex sample with pdflatex. I get undefined control sequence errors here too. I usually use tikz and pgfplots for arrows/lines/graphs in my PDF files and haven't used the "pstricks" package before so I'm not sure if your syntax is correct.
 
Old 01-25-2020, 08:48 AM   #7
captain_sensible
Member
 
Registered: Apr 2010
Posts: 206

Rep: Reputation: 63
this is your pdf image when i ran your.tex latex2html
Attached Files
File Type: pdf images.pdf (24.7 KB, 9 views)

Last edited by captain_sensible; 01-25-2020 at 08:50 AM.
 
1 members found this post helpful.
Old 01-25-2020, 08:52 AM   #8
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 118

Rep: Reputation: 86
@ captain_sensible: Thats the same thing that pdflatex spits out for me after all the errors.
 
1 members found this post helpful.
Old 01-25-2020, 08:55 AM   #9
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 135

Rep: Reputation: Disabled
Quote:
Originally Posted by crts View Post
'texi2pdf' is a script which does call 'pdflatex' eventually, however.
Indeed. I've learned something today.

Quote:
Originally Posted by crts View Post
'texi2pdf' is a script which does call 'pdflatex' eventually,
Is anyone able to correctly build the above sample? This way I would at least know if it is only an issue on my side.
OK. I think it's purely LaTeX related. The pstricks-add documentation says you need pstricks to use it, which is not in your preamble.
 
Old 01-25-2020, 09:34 AM   #10
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 118

Rep: Reputation: 86
Seems it can't be done with pdflatex, and the issue seems to be specific to PSTricks. See here for reference:
http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput

I tried their method of using
Code:
latex <file>.tex
dvips <file>.dvi
ps2pdf <file>.ps
and got a PDF file that had your plot on it, although it didn't fit on the page properly. There's still some errors regarding out of bounds boxes.
Attached Files
File Type: pdf test.pdf (9.3 KB, 8 views)

Last edited by 0XBF; 01-25-2020 at 09:38 AM.
 
1 members found this post helpful.
Old 01-25-2020, 12:50 PM   #11
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,846

Original Poster
Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Using the triple 'latex', 'dvips' and 'ps2pdf' builds it properly. The fact that it is cut-off is due to the settings in GeoGebra while exporting it. Good to know that it was not a TeX configuration or wrong installation issue.

Thanks everybody.
 
  


Reply

Tags
geogebra, latex, pdf, tex, texi2pdf


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
the other disto along slackware, recomendations? wine to play , tex to tex igadoter Slackware 30 12-22-2019 07:44 PM
vim file.tex !latex file.tex & pdfdvi file.dvi & xpdf -remote sname -reload Mol_Bolom Linux - General 0 07-09-2009 08:46 PM
Generating Pdf/Tex and changing Pdf Permissions nx5000 Linux - Software 3 03-28-2006 05:37 PM
Ever used TeX, post your work. -- Tex Art Gallery barton Linux - Software 2 02-28-2006 03:29 AM
TeX can't find tex.fmt jrdioko Linux - Software 0 11-14-2005 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration