LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-31-2017, 05:52 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
A compiler for Tex sources in Slackware?


Suppose I write a Tex source file and now I want to see how it looks. I presume there's a program which translates/compiles the source to, say, html, pdf or whatever "viewable" format. Does Slackware 12.x have something like that. I did 'apropos tex|grep -iw tex' and found:
Code:
bill@server:/almacen/STORE1/Nonsoft/libros$ apropos tex|grep -iw tex
dvipdf []            (1)  - Convert TeX DVI file to PDF using ghostscript and dvips
fig2ps2tex []        (1)  - generate a TeX file for including a PostScript file
grodvi []            (1)  - convert groff output to TeX dvi format
pic []               (1)  - compile pictures for troff or TeX
bill@server:/almacen/STORE1/Nonsoft/libros$
I often post in math forums. As I'm not always online, I'd like to write the source and see the result off-line. When it is OK and I'm online I just copy it and paste it in the forum page edit window. That' why I ask.
 
Old 01-31-2017, 07:37 PM   #2
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
If you're doing a lot of LaTeX stuff, I would recommend removing the minimal tetex that comes with Slackware, and installing the full TeX Live (there's also a slackbuild for it, although the official UNIX installer is clean and only touches one directory).

From there I use latexmk in my makefile. It produces a PDF by default, and it will automatically handle multiple runs for bibliographies, cross-refs, etc. You can select engines easily enough, for example xelatex;
Code:
latexmk -xelatex file.tex
If you're interested in different output formats, Pandoc is probably worth a look too.
 
Old 01-31-2017, 07:50 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks. Should I download (slackbuilds) the Arch-independent sources too? What are they for?
 
Old 01-31-2017, 07:54 PM   #4
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
The easiest way to install anything from slackbuilds.org is with sbopkg. If you prefer just the commandline (with some semi-automation), then sbotools are also very good. There are other programs as well, but I haven't tried them.
 
Old 02-01-2017, 03:51 AM   #5
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 535

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally Posted by stf92 View Post
Suppose I write a Tex source file and now I want to see how it looks. I presume there's a program which translates/compiles the source to, say, html, pdf or whatever "viewable" format. Does Slackware 12.x have something like that.
As you are on Slackware 12.x, try (the already installed?) tetex. To get a pdf, i like to do
Code:
pdflatex file.tex
.
If you really need more uptodate tex-packages for slackware 12.x, i would try the oldest texlive from sbo, which is maybe still to new to be build on slackware 12.x
 
Old 02-01-2017, 06:07 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Well, following a suggestion by an LQer, I installed TEXLIVE. Now I see I don't need such a monster to compile just a few tiny math propositions. I do have tetex on my Slackware 12.1. Only as I am new to Tex/Latex I do not know what are the minimum directives I should use to make the compiler not to complain. I would need to have the barest template to embed my code there, for instance $A_5= b^{m-n}$, and to be able to compile it and seeing it with pdflatex, say. Would such a template be very bulky?

Last edited by stf92; 02-01-2017 at 06:09 PM.
 
Old 02-01-2017, 07:01 PM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
If you do not especially want to learn TeX/LaTeX, LyX is an excellent editor that will let you do math expressions out of the box.

There is a LyX SlackBuild for 12.1 which works without any non-Slackware TeX packages.

On the other hand, if you want to learn how to use TeX/LaTeX markup, the The Not So Short Introduction to LaTeX2e by Tobi Oetiker is really not very long and is very complete. The first 3-4 chapters will have you writing a short template from scratch - not too difficult.
 
Old 02-01-2017, 08:38 PM   #8
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by stf92 View Post
Well, following a suggestion by an LQer, I installed TEXLIVE. Now I see I don't need such a monster to compile just a few tiny math propositions. I do have tetex on my Slackware 12.1. Only as I am new to Tex/Latex I do not know what are the minimum directives I should use to make the compiler not to complain. I would need to have the barest template to embed my code there, for instance $A_5= b^{m-n}$, and to be able to compile it and seeing it with pdflatex, say. Would such a template be very bulky?
If you are not doing your actual work in LaTeX (I mean preparing reports, articles, etc), then no, you don't need TeXLive. The minimal template to produce some output would be;
Code:
\documentclass{article}
\begin{document}

% your maths equations go here
\(A_5 = b^{m-n}\)

\end{document}
You can compile that with a simple "pdflatex file.tex". Also, see here for more info about mathematics in LaTeX.

Last edited by drgibbon; 02-02-2017 at 12:14 AM.
 
  


Reply



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
A good tex/latex editor in slackware 14.1? stf92 Slackware 18 02-03-2017 12:58 PM
Request for comment - How to improve TeX in Slackware? allend Slackware 28 04-18-2013 06:55 PM
tex live in Slackware? tramni1980 Slackware 41 03-31-2009 08:07 AM
Ever used TeX, post your work. -- Tex Art Gallery barton Linux - Software 2 02-28-2006 02:29 AM
Slackware and Lilypond (...and Tex) tubatodd Slackware 6 08-12-2004 06:55 PM

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

All times are GMT -5. The time now is 01:08 PM.

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
Open Source Consulting | Domain Registration