LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   tex live in Slackware? (https://www.linuxquestions.org/questions/slackware-14/tex-live-in-slackware-635217/)

tramni1980 04-14-2008 07:07 AM

tex live in Slackware?
 
Hello!
As Slack 12.0 ships with tetex-3.0, and since March 2007 teTeX was declared obsolete, I would like to ask if there are perspectives for TeX Live to be included in next Slackware?

Bruce Hill 04-14-2008 08:00 AM

You should email Pat Volkerding and ask him.
Those decisions are his, and we could only guess.

tramni1980 04-14-2008 11:22 AM

Quote:

Originally Posted by Bruce Hill (Post 3120754)
You should email Pat Volkerding and ask him.
Those decisions are his, and we could only guess.

Does somebody know what his email address is?

Bruce Hill 04-14-2008 01:01 PM

Look at the end of the file ./slackware-12.0/ANNOUNCE.12_0

Bourdieu 04-15-2008 08:13 AM

Please don't bother him with that. I already mailed him twice about this issue.

The first time was approximately a year ago :
Quote:

Mathieu Bouillaguet wrote:
> Hi Pat,
>
> Just a remainder that the tetex distribution shipped with
> slackware-11.0 is obslote and will see no future releases, as
> mentionned on the official site http://www.tug.org/tetex/.
>
> Hope you'll find time to replace tetex by texlive, or another up to
> date TeX distribution, before next release.


I know about this, but texlive is huge compared with tetex. Besides, I thought one of the design goals of TeX was to create a typesetting system that would not become obsolete -- how functionally obsolete is it?

Take care,

Pat
and the second was a few days ago about a bug report :
Quote:

Mathieu Bouillaguet wrote:
> In my opinion it should be considered to substitute texlive for tetex in the slackware 13.0 release. The tetex package becomes more and more obsolete. I know that texlive is a lot bigger than tetex but you could include a small distribution of texlive and since tex is not picked up in the standard slackware installation, it shouldn't be a problem.

It's being considered. The entire thing is too large to include (similar to OOo). I worry that people will fight over what constitutes a proper subset of texlive, though...

> PS : Thoses bugs are old !!! Does anybody use these utilities ?

Probably not, so I don't think they'll see any repair in Slackware 12.1. Thanks for pointing them out, though.

Take care,

Pat

tramni1980 04-16-2008 03:11 AM

Martin Ivanov wrote:
> Dear Mr Volkerding,
>
> I am a keen Slackware fan. I use it for both work and leisure. I use LaTeX
> a lot. As tetex is no longer supported and already considered obsolete
> (http://www.mail-archive.com/ctan-ann.../msg01091.html), I would
> like to ask if the next Slackware will include the tex live distribution.

If by next you mean the one after what we are preparing to release very
soon, yes -- we do plan to look into a better TeX. However, texlive is
too large to include without pruning it down substantially -- ideally to
contain the same TeX components as teTeX does.

Nobody here is much of a TeX expert, so tackling this for 12.1 was
pretty much out of the question.

Best regards,

Pat

tramni1980 04-16-2008 04:51 AM

Sorry for cross-posting.

I would like to ask if someone is known to support tex live slackware package? The tex live distribution is accompanied by detailed installation instructions, but I am curious whether it could be packaged into a single Slackware package? I always prefer having pakages for the purpose of clean uninstallation.

Regards,
Martin

Tsomi 04-17-2008 11:22 AM

Hello,

Here's a simple way to build a TeX Live package :

0) removepkg tetex tetex-doc
1) Get texlive-live.iso.zip file from TeX Live's website. It's quite fast to get it with the .torrent file, for example.
2) Unzip it, and then mount it as a iso9660 file:
# mount -t iso9660 -o loop image.iso /mnt/cdrom
3) Here, I think it's a better idea to use /usr/share rather than /opt for TeX Live prefix:
# cd /mnt/cdrom
# export TEXLIVE_INSTALL_PREFIX=/usr/share
4) Launch the install script :
# ./install-tl.sh
5) Then press 'D' and make sure you get the following:
o TEXDIR (main TeX directory): /usr/share/texmf
o TEXMFSYSVAR (systemwide config): /usr/share/texmf-var
o TEXMFLOCAL (systemwide styles etc.): /usr/share/texmf-local
o TEXMFHOME (personal styles etc.): $HOME/texmf
6) It's a good idea to use something else than the default scheme, which is quite big. Press 'S' and then choose what you prefer; I tend to think that 'G' (TeX Live medium scheme) is a good idea, as it's even smaller than the 'teTeX scheme'.
7) I personally decided to press 'O' and then 'S' in the main menu, in order to remove the source tree for fonts and macros.
8) Now, press 'I' to launch the installation. It doesn't compile anything so it's pretty fast.

9) The first problem here is that binaries are installed under /usr/share/bin/i386-linux... while they should be in /usr/share/texmf/bin, IMHO.

# cd /usr/share/texmf
# mkdir bin
# mv ../bin/i386-linux/* bin/
# rmdir ../bin/i386-linux
# rmdir ../bin

10) It's always a good idea to compress man pages :
# cd /usr/share/texmf/doc/man
# find . -type f -name "*.?" -exec gzip -9 {} \;
# for manpage in $(find . -type l) ; do
# ln -s $(readlink $manpage).gz $manpage.gz
# rm -f $manpage
# done

11) Now it should be a good idea to redefine the PATH and MANPATH variables:
# PATH="$PATH:/usr/share/texmf/bin"
# MANPATH="$MANPATH:/usr/share/texmf/doc/man"

12) Pat used the following lines in his teTeX buildscript. It's probably harmless to launch them:
# mv /root/.texmf-config /root/.texmf-config-$(mcookie)
# texconfig-sys confall
# texconfig-sys mode ljfour
# texconfig-sys dvips printcmd -
# texconfig-sys dvips add bjc600
# texconfig-sys dvips add stcolor
# texconfig-sys dvips add deskjet
# texconfig-sys dvips add ljet4
# texconfig-sys dvips -P bjc600 mode canonbjc
# texconfig-sys dvips -P stcolor mode epstylus
# texconfig-sys dvips -P deskjet mode deskjet
# texconfig-sys dvips -P ljet4 mode ljfour
# texconfig-sys font ro
# texconfig-sys rehash

If you use A4 format, then you'll have to launch that as well:
# texconfig-sys dvips paper a4
# texconfig-sys xdvi paper a4

13) I don't really know why /usr/share/texmf-var has special permissions... So I used the following lines to give more "habitual" permissions to this directory, as everything seems to be working fine.
# chmod 0755 /usr/share/texmf-var
# find /usr/share/texmf-var -type f -exec chmod 0644 {} \;
# find /usr/share/texmf-var -type d -exec chmod 0755 {} \;

Now, you can start to make a .tgz package:
14) I personally use fakeroot to create a package, so 'root' is only needed to install the package.

$ cd /tmp/build
$ mkdir -p texlive/usr/share
$ cd texlive/usr/share
$ cp -a /usr/share/texmf .
$ cp -a /usr/share/texmf-dist .
$ cp -a /usr/share/texmf-doc .
$ cp -a /usr/share/texmf-local .
$ cp -a /usr/share/texmf-var .

$ cd ../..
$ mkdir -p etc/profile.d
$ cd etc/profile.d
$ cat > texlive.sh << EOF
#!/bin/sh
# Add PATH and MANPATH for TeX Live:
PATH="$PATH:/usr/share/texmf/bin"
MANPATH="$MANPATH:/usr/share/texmf/doc/man"
EOF
$ cat > texlive.csh << EOF
#!/bin/csh
# Add PATH and MANPATH for TeX Live:
setenv PATH $PATH:/usr/share/texmf/bin
setenv MANPATH $MANPATH:/usr/share/texmf/doc/man
EOF
$ chmod 0755 texlive.*sh

$ mkdir ../../install
$ cd ../../install
$ cat > slack-desc << EOF
texlive: texlive (the TeX Live distribution)
texlive:
texlive: TeX Live is an easy way to get up and running with TeX. It provides a
texlive: comprehensive TeX system which includes all the major TeX-related
texlive: programs, macro packages, and fonts that are free software, including
texlive: support for many languages around the world. This package uses the
texlive: "TeX Live medium scheme".
texlive:
texlive: Learn more about TeX Live at:
texlive: http://www.tug.org/texlive/
texlive:
EOF

$ cd ..
$ fakeroot
# chown root:root . -R
# /sbin/makepkg -l y -c n /tmp/build/texlive-VERSION_NUMBER_HERE-i386-1.tgz
# exit

Then you may install the /tmp/build/texlive*.tgz package, umount /mnt/cdrom, remove the /tmp/build/texlive/ directory and the .iso file.

14) Make sure /etc/profile.d scripts are loaded, and enjoy LaTeX!

BTW, I obtain a 157M .tgz package for TeX Live, while tetex+tetex-doc packages were about 100M. I find this "acceptable" ;) .

---

Sorry if I made some mistakes. English is not my mother tongue...

tramni1980 09-04-2008 09:38 AM

So I managed to make texlive2008.08.22 into a Slackware package. It seems to work faultlessly on my box. I would be glad if you look through the SlackBuild script I wrote and post you suggestions so that we improve the script. We might finally submit it to slackbuilds.org. I hope that a creative discussion will come out of it. There are several aspects that I wish to improve. In particular, I wuld like to:

1. get rid of the need to type "I" start installation to hard drive
2. install everything directly to the package directory and configure it there, instead of (as currently is) install texlive on the system, configure it, and then move the configured installation to the package directory; of course it this is possible
3. improve the postinstallation configuration; any suggestions on improving the postinstallation configuration will be appreciated; probably adding a doinst.sh will be necessary?

So here is my script texlive.SlackBuild:

Code:

#!/bin/sh

## Written by marto

set -e

PRGNAM=texlive
VERSION=2008.08.22
PKG_VERSION=$VERSION
ARCH=${ARCH:-i386}
BUILD=${BUILD:-1}
TAG=${TAG:-_mai}
CWD=$(pwd)
PKG="/home/marto/build/tmp/LaTeX/package-$PRGNAM"
OUTPUT=${OUTPUT:-/home/marto/build/packages/LaTeX}

rm -rf $PKG
mkdir -p $PKG $OUTPUT
export TEXLIVE_INSTALL_PREFIX=/usr/share
export TEXLIVE_INSTALL_TEXDIR=/usr/share/texmf
export TEXLIVE_INSTALL_TEXMFLOCAL=/usr/share/texmf-local
export TEXLIVE_INSTALL_TEXMFSYSVAR=/usr/share/texmf-var
/mnt/cdrw/install-tl || exit 1

cd /usr/share || exit 1
echo "Adjusting directory structure:"

mv 2008 texmf || exit 1
mv texmf/bin/i386-linux/* texmf/bin || exit 1
rmdir texmf/bin/i386-linux || exit 1
mv texmf/texmf/* texmf || exit 1
rmdir texmf/texmf || exit 1
mv texmf/texmf-dist . || exit 1
mv texmf/texmf-doc . || exit 1

PATH="$PATH:/usr/share/texmf/bin"
if [ ! -r /usr/share/texmf/bin/latex ]; then
texconfig-sys init
fi
texconfig-sys confall
texconfig-sys dvips paper letter
texconfig-sys xdvi paper us
texconfig-sys mode ljfour
texconfig-sys dvips paper a4
texconfig-sys xdvi paper a4
texconfig-sys dvips printcmd -
texconfig-sys dvips add bjc600
texconfig-sys dvips add stcolor
#texconfig-sys dvips add deskjet
texconfig-sys dvips add ljet4
texconfig-sys dvips -P bjc600 mode canonbjc
texconfig-sys dvips -P stcolor mode epstylus
texconfig-sys dvips -P deskjet mode deskjet
texconfig-sys dvips -P ljet4 mode ljfour
texconfig-sys font ro
texconfig-sys rehash

# Discard local configurations:
if [ -e /root/.texmf-config ]; then
  mv /root/.texmf-config /root/.texmf-config-$(mcookie)
  echo "/root/.texmf-config moved out of the way...  you may wish"
  echo "to purge any /root/.texmf-config-* directories if the"
  echo "cruft heap gets too large."
fi

cd $PKG
mkdir -p usr/share
echo "Moving files from system directories into package texlive structure:"
mv /usr/share/texmf usr/share
mv /usr/share/texmf-var usr/share
mv /usr/share/texmf-dist usr/share
mv /usr/share/texmf-local usr/share
mv /usr/share/texmf-doc usr/share
mv /usr/share/texmf-config usr/share

echo "Adjusting permissions:"
chown -R root:root .
find . -type f -perm 666 -exec chmod 644 {} \;
chmod 0755 usr/share/texmf-var
find usr/share/texmf-var -type f -exec chmod 0644 {} \;
find usr/share/texmf-var -type d -exec chmod 0755 {} \;

mkdir -p etc/profile.d
cd etc/profile.d
cat > texlive.sh << EOF
PATH="$PATH:/usr/share/texmf/bin"
MANPATH="$MANPATH:/usr/share/texmf/doc/man"
INFOPATH="$INFOPATH:/usr/share/texmf/doc/info"
EOF
cat > texlive.csh << EOF
setenv PATH $PATH:/usr/share/texmf/bin
setenv MANPATH $MANPATH:/usr/share/texmf/doc/man
setenv INFOPATH $INFOPATH:/usr/share/texmf/doc/info
EOF
chmod 0755 texlive.*sh

echo "Stripping everything:"
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)

# Compress man pages:
( cd $PKG/usr/share/texmf/doc/man
  find . -type f -exec gzip -9 {} \;
  for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)

# Compress info pages:
( cd $PKG/usr/share/texmf/doc/info
  rm -f dir
  gzip -9 *
)


mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $PKG/usr/doc
ln -sf /usr/share/texmf/doc $PRGNAM-$VERSION

# Install script:
mkdir -p $PKG/install
cd $PKG/install
cat > slack-desc << EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

        |-----handy-ruler------------------------------------------------------|
texlive: texlive (the TeX Live distribution)
texlive:
texlive: TeX Live is an easy way to get up and running with TeX. It provides a
texlive: comprehensive TeX system which includes all the major TeX-related
texlive: programs, macro packages, and fonts that are free software, including
texlive: support for many languages around the world. This package uses the
texlive: "TeX Live full scheme".
texlive:
texlive: Learn more about TeX Live at:
texlive: http://www.tug.org/texlive/
texlive:
EOF


cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKG_VERSION-$ARCH-$BUILD$TAG.tgz


brixtoncalling 09-06-2008 10:47 AM

I used the slackbuild to make my own Texlive package. Two points for anyone else about to try:

1) you obviously have to change PKG and OUTPUT to something appropriate for you system
2) more importantly, don't change the default install directories offered by the installer, the script expects those and will fail on anything different

Works great though.

amani 09-06-2008 11:06 AM

Does the script deal with all the options properly?

Apparently no

Few would want to install the whole of Texlive2008.

As such the built-in Texlive2008 install script works well in Slamd64.


Best

A. Mani

amani 09-06-2008 11:09 AM

Fedora has a rpm building script(tl-rpm) that can deal with the options in some reasonable way.
Can that be adapted?

tramni1980 09-06-2008 12:32 PM

Quote:

Originally Posted by amani (Post 3271622)
Fedora has a rpm building script(tl-rpm) that can deal with the options in some reasonable way.
Can that be adapted?

Could you please provide a link to the fedora script? We could see to it.

I wrote the script using Tsomi's script and Patrick's build for tetex as as a basis.

Any suggestions for improving the SlackBuild for texlive will be welcome.

brixtoncalling 09-06-2008 03:42 PM

Quote:

Originally Posted by amani (Post 3271621)
Does the script deal with all the options properly?

Apparently no

Few would want to install the whole of Texlive2008.

If I understand what you meant correctly, the answer is yes. After you run the script, you have the option of selecting which components you wish to install. I chose a subset (~550mb as a .tgz) and it seems to be running fine.

amani 09-06-2008 05:10 PM

Quote:

Originally Posted by tramni1980 (Post 3271698)
Could you please provide a link to the fedora script? We could see to it.

I wrote the script using Tsomi's script and Patrick's build for tetex as as a basis.

Any suggestions for improving the SlackBuild for texlive will be welcome.

Here
[1] http://people.redhat.com/jnovy/files/texlive/tl2rpm
[2] http://people.redhat.com/jnovy/files...llections.spec
[3] http://people.redhat.com/jnovy/files..._packages.spec
[4] http://people.redhat.com/jnovy/files...ve-rpmlist.txt
-----------------------------------------------------------------------------------------------

There was a long discussion on this in the Texlive developers mailing list starting from:

http://tug.org/mailman/htdig/tex-liv...st/017190.html

In *buntu TexLive is always split up into various parts and that is good too.


Best

A. Mani


All times are GMT -5. The time now is 11:24 PM.