Commits

Lennart Regebro committed 6e80ccd Draft

Tables now look good.

Comments (0)

Files changed (1)

sphinx/writers/latex.py

             self.body.extend(self.tableheaders)
             self.body.append('\\endfirsthead\n\n')
             self.body.append('\\multicolumn{%s}{c}%%\n' % self.table.colcount)
-            self.body.append(r'{{\bfseries \tablename\ \thetable{} -- %s}} \\'
+            #self.body.append(r'{{\bfseries \tablename\ \thetable{} -- %s}} \\'
+            self.body.append(r'{{\textsf{\tablename\ \thetable{} -- %s}}} \\'
                              % _('continued from previous page'))
             self.body.append('\n\\hline\n')
             self.body.extend(self.tableheaders)
             self.body.append('\\endhead\n\n')
-            self.body.append(ur'\hline \multicolumn{%s}{|r|}{{%s}} \\ \hline'
+            #self.body.append(ur'\hline \multicolumn{%s}{|r|}{{%s}} \\ \hline'
+            self.body.append(ur'\hline \multicolumn{%s}{|r|}{{\textsf{%s}}} \\ \hline'
                              % (self.table.colcount,
                                 _('Continued on next page')))
             self.body.append('\n\\endfoot\n\n')
-            self.body.append('\\hline\n')
+            #self.body.append('\\hline\n')
             self.body.append('\\endlastfoot\n\n')
         else:
             self.body.append('\\hline\n')
         # Redirect head output until header is finished. see visit_tbody.
         self.body = self.tableheaders
     def depart_thead(self, node):
-        pass
+        self.body.append('\\hline')
 
     def visit_tbody(self, node):
         if not self.table.had_head:
             self.visit_thead(node)
         self.body = self.tablebody
     def depart_tbody(self, node):
-        pass
+        self.body.append('\\hline')
 
     def visit_row(self, node):
         self.table.col = 0
     def depart_row(self, node):
         if self.previous_spanning_row == 1:
             self.previous_spanning_row = 0
-            self.body.append('\\\\\n')
-        else:
-            self.body.append('\\\\\\hline\n')
+        self.body.append('\\\\\n')
         self.table.rowcount += 1
 
     def visit_entry(self, node):
                 self.body.append('}{l|}{')
             context += '}'
         if isinstance(node.parent.parent, nodes.thead):
-            self.body.append('\\textbf{')
-            context += '}'
+            self.body.append('\\textsf{')
+        else:
+            self.body.append('\\footnotesize{')
+        context += '}'
         if self.remember_multirow.get(self.table.col + 1, 0) > 1:
             self.remember_multirow[self.table.col + 1] -= 1
             context += ' & '
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.