Skip to content

Commit

Permalink
a new functionality: generating TeX from LDF
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@489 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Feb 23, 2009
1 parent 6e072e6 commit a0bc05d
Show file tree
Hide file tree
Showing 5 changed files with 487 additions and 3 deletions.
7 changes: 5 additions & 2 deletions shared/tools/ldf2pdf
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ elif [ ! -r $1 ]; then
exit 1
else
sh ${SLPS}/shared/tools/ldf2html $1 $1.html
sh ${SLPS}/shared/tools/ldf2tex $1 $1.tex
xsltproc ${SLPS}/shared/xsl/xhtml2fo.xslt $1.html > $1.fo
${SLPS}/download/fop/fop -q $1.fo $2
rm -f $1.html $1.fo
${SLPS}/download/fop/fop -q $1.fo $2.html.pdf
pdflatex -interaction=batchmode $1
mv $1.pdf $2.tex.pdf
rm -f $1.html $1.fo $1.tex $1.aux $1.log $1.toc
fi

18 changes: 18 additions & 0 deletions shared/tools/ldf2tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

LOCAL=${PWD}
cd `dirname $0`
cd ../..
SLPS=${PWD}
cd ${LOCAL}

if [ $# -ne 2 ]; then
echo "This tool transforms Language Document Format to LaTeX"
echo "Usage: ldf2tex <input-language-document> <output-tex-document>"
exit 1
elif [ ! -r $1 ]; then
echo "Oops: $1 not found or not readable."
exit 1
else
xsltproc ${SLPS}/shared/xsl/ldf2tex.xslt $1 > $2
fi
Loading

0 comments on commit a0bc05d

Please sign in to comment.