summaryrefslogtreecommitdiff
path: root/office
diff options
context:
space:
mode:
authorNitish Ragoomundun <lrugratz@gmail.com>2018-12-08 11:15:58 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-12-08 11:15:58 +0700
commit3373f432d5bfae63c4455e01cd49c64d1ea7e360 (patch)
treef8184fde1f90b9aad09b109993af187301426e88 /office
parent146d19ec577773e6d375bca1254f6a8a5a20c402 (diff)
downloadslackbuilds-3373f432d5bfae63c4455e01cd49c64d1ea7e360.tar.gz
office/latex2rtf: Added (LaTeX converter).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office')
-rw-r--r--office/latex2rtf/README20
-rw-r--r--office/latex2rtf/latex2rtf.SlackBuild118
-rw-r--r--office/latex2rtf/latex2rtf.info10
-rw-r--r--office/latex2rtf/slack-desc19
4 files changed, 167 insertions, 0 deletions
diff --git a/office/latex2rtf/README b/office/latex2rtf/README
new file mode 100644
index 0000000000..a6712d3019
--- /dev/null
+++ b/office/latex2rtf/README
@@ -0,0 +1,20 @@
+latex2rtf is a translator program to convert LaTeX formatted text files into
+"rich text format" (RTF) files. RTF is a published standard format by
+Microsoft. This standard can be ambiguous in places, but RTF is supported by
+many text editors. Specifically, it is supported by Microsoft Word. This means
+that the conversion of a LaTeX document to RTF allows anyone with a copy of
+Word to convert LaTeX files to Word .doc or .docx files.
+
+Features
+
+- Conversion of a wide range of input encodings
+- Conversion of equations (unfortunately using the broken Microsoft
+ implementation of EQ fields)
+- Conversion of tables
+- Conversion of graphics
+- Conversion of cross-references
+- Conversion of bibliographies
+
+latex2rtf translates the text and as much of the formatting information from
+LaTeX to RTF. Be forewarned that the typeset output is not nearly as good as
+what you would get from using LaTeX directly.
diff --git a/office/latex2rtf/latex2rtf.SlackBuild b/office/latex2rtf/latex2rtf.SlackBuild
new file mode 100644
index 0000000000..d926885a3e
--- /dev/null
+++ b/office/latex2rtf/latex2rtf.SlackBuild
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Slackware build script for latex2rtf
+
+# Copyright 2018 Nitish Ragoomundun, Mauritius
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=latex2rtf
+VERSION=${VERSION:-2.3.17}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+
+# Fix the path for the configuration files in the Makefile
+mv Makefile{,.orig}
+sed -e '154s@\$(DESTDIR)@/usr@' \
+ -e '157s@\$(DESTDIR)@/usr@' \
+ -e '231s@\$(DESTDIR)@/usr@' Makefile.orig > Makefile
+
+# Build executables
+CFLAGS=$SLKCFLAGS make DESTDIR=$PKG/usr latex2rtf
+
+# Make documentation
+make DESTDIR=$PKG/usr doc
+
+# Install
+make DESTDIR=$PKG/usr install
+make DESTDIR=$PKG/usr install-info
+
+# Fix permission for executable latex2png
+chmod 755 $PKG/usr/bin/latex2png
+
+# Compress man pages if they exist
+if [ -d $PKG/usr/share/man ]; then
+ ( cd $PKG/usr/share/man
+ find . -type f -exec gzip -9 \{\} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+ )
+fi
+
+# Compress info pages if they exist (and remove the dir file)
+if [ -d $PKG/usr/share/info ]; then
+ gzip -9 $PKG/usr/share/info/*.info
+ rm -f $PKG/usr/share/info/dir
+fi
+
+mv $PKG/usr/share/{man,info} $PKG/usr/
+
+# Copy the rest of documentation
+cp -a ChangeLog Copyright HACKING README $PKG/usr/share/$PRGNAM/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/share/$PRGNAM/$PRGNAM.SlackBuild
+find $PKG/usr/share/$PRGNAM -type f -exec chmod 644 \{\} \;
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/office/latex2rtf/latex2rtf.info b/office/latex2rtf/latex2rtf.info
new file mode 100644
index 0000000000..83d9783a2f
--- /dev/null
+++ b/office/latex2rtf/latex2rtf.info
@@ -0,0 +1,10 @@
+PRGNAM="latex2rtf"
+VERSION="2.3.17"
+HOMEPAGE="http://latex2rtf.sourceforge.net"
+DOWNLOAD="https://sourceforge.net/projects/latex2rtf/files/latex2rtf-unix/2.3.17/latex2rtf-2.3.17.tar.gz"
+MD5SUM="025a6b779eb6ca1c86da71a284e7459f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="texlive"
+MAINTAINER="Nitish Ragoomundun"
+EMAIL="lrugratz@gmail.com"
diff --git a/office/latex2rtf/slack-desc b/office/latex2rtf/slack-desc
new file mode 100644
index 0000000000..9d6f2d7edc
--- /dev/null
+++ b/office/latex2rtf/slack-desc
@@ -0,0 +1,19 @@
+# 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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+latex2rtf: latex2rtf (LaTeX converter)
+latex2rtf:
+latex2rtf: It is a translator for converting LaTeX sources into
+latex2rtf: "Rich Text Format" (RTF), a published standard format by Microsoft.
+latex2rtf: This standard can be ambiguous in places but RTF is supported by many
+latex2rtf: text editors, among which there is Microsoft Word. Thus, latex2rtf
+latex2rtf: allows its users to convert LaTeX files to .doc or .docx format.
+latex2rtf:
+latex2rtf: Homepage: http://latex2rtf.sourceforge.net
+latex2rtf:
+latex2rtf: