-if ( ! -r $XSLDIR."/latex.xsl" ) {
- die "Could not find LaTeX stylesheet (latex.xsl) in $DATADIR!";
+if ( ! -e $DATADIR."/latex.xsl" ) {
+ if ( ! -r $XSLDIR."/latex.xsl" ) {
+ die "Could not find LaTeX stylesheet (latex.xsl) in $XSLDIR!";
+ }
+ # Link, if it does not exist the XSL file to the DATADIR
+ if ( ! link $XSLDIR."/latex.xsl", $DATADIR."/latex.xsl" ) {
+ die "Could not link the LaTeX stylesheet (latex.xsl) from $XSLDIR to $DATADIR!";
+ }
+}
+if ( ! -e $DATADIR."/latex.xsl" ) {
+ die "Could not find LaTeX stylesheet (latex.xsl) in $DATADIR!";