/[gzz]/gzz/metacode/latex2e.py
ViewVC logotype

Diff of /gzz/metacode/latex2e.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by humppake, Tue Feb 11 14:00:51 2003 UTC revision 1.14 by humppake, Tue Feb 11 14:59:42 2003 UTC
# Line 196  class LaTeXTranslator(nodes.NodeVisitor) Line 196  class LaTeXTranslator(nodes.NodeVisitor)
196      d_stylesheet_path = 'style.tex'      d_stylesheet_path = 'style.tex'
197      # for pdflatex some other package. pslatex      # for pdflatex some other package. pslatex
198    
199      latex_head = '\\documentclass[%s]{%s}\n'  #    latex_head = '\\documentclass[%s]{%s}\n'
200        latex_head = '\\documentclass{%s}\n'
201  #    encoding = '\\usepackage[latin1]{inputenc}\n'  #    encoding = '\\usepackage[latin1]{inputenc}\n'
202      linking = '\\usepackage{hyperref}\n'      linking = '\\usepackage{hyperref}\n'
203  #    geometry = '\\usepackage[%s,margin=%s,nohead]{geometry}\n'  #    geometry = '\\usepackage[%s,margin=%s,nohead]{geometry}\n'
# Line 230  class LaTeXTranslator(nodes.NodeVisitor) Line 231  class LaTeXTranslator(nodes.NodeVisitor)
231  #            self.d_options += ',%s' % \  #            self.d_options += ',%s' % \
232  #                    _ISO639_TO_BABEL[settings.language_code]  #                    _ISO639_TO_BABEL[settings.language_code]
233          self.head_prefix = [          self.head_prefix = [
234                self.latex_head % (self.d_options,self.d_class),  #              self.latex_head % (self.d_options,self.d_class),
235                  self.latex_head % (self.d_class),
236  #/cite didn't work with babel (jvk)  #/cite didn't work with babel (jvk)
237  #              '\\usepackage{babel}\n',     # language is in documents settings.  #              '\\usepackage{babel}\n',     # language is in documents settings.
238                '\\usepackage{shortvrb}\n',  # allows verb in footnotes.  #              '\\usepackage{shortvrb}\n',  # allows verb in footnotes.
239  #              self.encoding,  #              self.encoding,
240                # * tabularx: for docinfo, automatic width of columns, always on one page.                # * tabularx: for docinfo, automatic width of columns, always on one page.
241                '\\usepackage{tabularx}\n',                '\\usepackage{tabularx}\n',
# Line 245  class LaTeXTranslator(nodes.NodeVisitor) Line 247  class LaTeXTranslator(nodes.NodeVisitor)
247                #                #
248                # extra space between text in tables and the line above them                # extra space between text in tables and the line above them
249                '\\setlength{\\extrarowheight}{2pt}\n',                '\\setlength{\\extrarowheight}{2pt}\n',
250                '\\usepackage{amsmath}\n',   # what fore amsmath.  #              '\\usepackage{amsmath}\n',   # what fore amsmath.
251                '\\usepackage{graphicx}\n',                '\\usepackage{graphicx}\n',
252                '\\usepackage{multirow}\n',                '\\usepackage{multirow}\n',
253                self.linking,                self.linking,
254                # geometry and fonts might go into style.tex.  #              # geometry and fonts might go into style.tex.
255  #              self.geometry % (self.d_paper, self.d_margins),  #              self.geometry % (self.d_paper, self.d_margins),
256                #  #              #
257                self.generator,  #              self.generator,
258                # admonition width and docinfo tablewidth  #              # admonition width and docinfo tablewidth
259                '\\newlength{\\admwidth}\n\\addtolength{\\admwidth}{0.9\\textwidth}\n',  #              '\\newlength{\\admwidth}\n\\addtolength{\\admwidth}{0.9\\textwidth}\n',
260  #             # optionlist environment  #             # optionlist environment
261                '\\newcommand{\\optionlistlabel}[1]{\\bf #1 \\hfill}\n'  #              '\\newcommand{\\optionlistlabel}[1]{\\bf #1 \\hfill}\n'
262                '\\newenvironment{optionlist}[1]\n',  #              '\\newenvironment{optionlist}[1]\n',
263  #              '{\\begin{list}{}\n'  #              '{\\begin{list}{}\n'
264  #              '  {\\setlength{\\labelwidth}{#1}\n'  #              '  {\\setlength{\\labelwidth}{#1}\n'
265  #              '   \\setlength{\\rightmargin}{1cm}\n'  #              '   \\setlength{\\rightmargin}{1cm}\n'
# Line 266  class LaTeXTranslator(nodes.NodeVisitor) Line 268  class LaTeXTranslator(nodes.NodeVisitor)
268  #              '   \\addtolength{\\leftmargin}{\\labelsep}\n'  #              '   \\addtolength{\\leftmargin}{\\labelsep}\n'
269  #              '   \\renewcommand{\\makelabel}{\\optionlistlabel}}\n'  #              '   \\renewcommand{\\makelabel}{\\optionlistlabel}}\n'
270  #              '}{\\end{list}}\n',  #              '}{\\end{list}}\n',
271                ## stylesheet is last: so it might be possible to overwrite defaults.  #              ## stylesheet is last: so it might be possible to overwrite defaults.
272                self.stylesheet % (self.d_stylesheet_path),  #              self.stylesheet % (self.d_stylesheet_path),
273                              ]                              ]
274          if self.linking: # and maybe check for pdf          if self.linking: # and maybe check for pdf
275              self.pdfinfo = [ ]              self.pdfinfo = [ ]
# Line 276  class LaTeXTranslator(nodes.NodeVisitor) Line 278  class LaTeXTranslator(nodes.NodeVisitor)
278          else:          else:
279              self.pdfinfo = None              self.pdfinfo = None
280          self.head = []          self.head = []
281          self.body_prefix = ['\\raggedbottom\n']          self.body_prefix = ['']
282    #        self.body_prefix = ['\\raggedbottom\n']
283          # separate title, so we can appen subtitle.          # separate title, so we can appen subtitle.
284          self.title = ""          self.title = ""
285          self.body = []          self.body = []
# Line 836  class LaTeXTranslator(nodes.NodeVisitor) Line 839  class LaTeXTranslator(nodes.NodeVisitor)
839          href = atts['uri']          href = atts['uri']
840          self.body.append('\n\\centering\n')          self.body.append('\n\\centering\n')
841          if atts.has_key('width'):          if atts.has_key('width'):
842              self.body.append('\n\\includegraphics[width on %s]{%s}\n' % (atts['width'], href))              self.body.append('\n\\includegraphics[width=%s]{%s}\n' % (atts['width'], href))
843          else:          else:
844              self.body.append('\n\\includegraphics{%s}\n' % href)              self.body.append('\n\\includegraphics{%s}\n' % href)
845          ##self.body.append('\\end{center}\n')          ##self.body.append('\\end{center}\n')

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26