|
Packit Service |
76cb02 |
#
|
|
Packit Service |
76cb02 |
# DbLatex main class handling the compilation of a DocBook file via
|
|
Packit Service |
76cb02 |
# XSL Transformation and LaTeX compilation.
|
|
Packit Service |
76cb02 |
#
|
|
Packit Service |
76cb02 |
import os
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
from dbtexmf.core.sgmlxml import Osx
|
|
Packit Service |
76cb02 |
from dbtexmf.core.dbtex import DbTex, DbTexCommand
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
cd7d79 |
from dbtexmf.dblatex.rawtex import RawLatex
|
|
Packit Service |
cd7d79 |
from dbtexmf.dblatex.runtex import RunLatex
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
class DbLatex(DbTex):
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
def __init__(self, base=""):
|
|
Packit Service |
76cb02 |
DbTex.__init__(self, base=base)
|
|
Packit Service |
76cb02 |
self.name = "dblatex"
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
# Engines to use
|
|
Packit Service |
76cb02 |
self.runtex = RunLatex()
|
|
Packit Service |
76cb02 |
self.runtex.index_style = os.path.join(self.topdir,
|
|
Packit Service |
76cb02 |
"latex", "scripts", "doc.ist")
|
|
Packit Service |
76cb02 |
self.rawtex = RawLatex()
|
|
Packit Service |
76cb02 |
self.sgmlxml = Osx()
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
def set_base(self, topdir):
|
|
Packit Service |
76cb02 |
DbTex.set_base(self, topdir)
|
|
Packit Service |
76cb02 |
self.xslmain = os.path.join(self.topdir, "xsl", "latex_book_fast.xsl")
|
|
Packit Service |
76cb02 |
self.xsllist = os.path.join(self.topdir,
|
|
Packit Service |
76cb02 |
"xsl", "common", "mklistings.xsl")
|
|
Packit Service |
76cb02 |
self.texdir = os.path.join(self.topdir, "latex")
|
|
Packit Service |
76cb02 |
self.texlocal = os.path.join(self.topdir, "latex", "style")
|
|
Packit Service |
76cb02 |
self.confdir = os.path.join(self.topdir, "latex", "specs")
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
#
|
|
Packit Service |
76cb02 |
# Command entry point
|
|
Packit Service |
76cb02 |
#
|
|
Packit Service |
76cb02 |
def main(base=""):
|
|
Packit Service |
76cb02 |
command = DbTexCommand(base)
|
|
Packit Service |
76cb02 |
command.run = DbLatex(base=base)
|
|
Packit Service |
76cb02 |
command.main()
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
if __name__ == "__main__":
|
|
Packit Service |
76cb02 |
main()
|