|
From: <mi...@us...> - 2012-09-06 12:29:44
|
Revision: 7506
http://docutils.svn.sourceforge.net/docutils/?rev=7506&view=rev
Author: milde
Date: 2012-09-06 12:29:33 +0000 (Thu, 06 Sep 2012)
Log Message:
-----------
Fix section numbering by LaTeX.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2012-09-03 09:17:15 UTC (rev 7505)
+++ trunk/docutils/HISTORY.txt 2012-09-06 12:29:33 UTC (rev 7506)
@@ -47,6 +47,7 @@
* docutils/writers/latex2e/__init__.py, docutils/writers/xetex/__init__.py
- Apply [ 3555160 ] ensure order of "otherlanguages".
+ - Fix section numbering by LaTeX.
* docutils/writers/s5_html/__init__.py
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2012-09-03 09:17:15 UTC (rev 7505)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2012-09-06 12:29:33 UTC (rev 7506)
@@ -1283,7 +1283,7 @@
## len(self.d_class.sections))
# Section numbering
- if not self.settings.sectnum_xform: # section numbering by Docutils
+ if settings.sectnum_xform: # section numbering by Docutils
PreambleCmds.secnumdepth = r'\setcounter{secnumdepth}{0}'
else: # section numbering by LaTeX:
secnumdepth = settings.sectnum_depth
@@ -2873,7 +2873,8 @@
self.context.append('')
# Section title
else:
- self.requirements['secnumdepth'] = PreambleCmds.secnumdepth
+ if hasattr(PreambleCmds, 'secnumdepth'):
+ self.requirements['secnumdepth'] = PreambleCmds.secnumdepth
section_name = self.d_class.section(self.section_level)
self.out.append('\n\n')
# System messages heading in red:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|