Fix ghc_packages
authorBen Gamari <ben@smart-cactus.org>
Mon, 4 Dec 2017 21:15:52 +0000 (16:15 -0500)
committerBen Gamari <ben@smart-cactus.org>
Mon, 4 Dec 2017 21:35:01 +0000 (16:35 -0500)
The LaTeX produced by this previously failed to compile. Changing the first cell
of the row from an inline to a paragraph fixes this. Then I noticed that the
table overflowed the page. This is fixed by applying the longtable class.

docs/users_guide/ghc_packages.py

index c91a7f2..d4a688b 100644 (file)
@@ -49,12 +49,13 @@ class PackageListDirective(Directive):
 
         for (pkg_path, reason) in sorted(packages):
             (pkg_name, pkg_version) = read_cabal_file(pkg_path)
-            cells = [ nodes.inline(text=pkg_name),
+            cells = [ nodes.paragraph(text=pkg_name),
                       nodes.inline(text=pkg_version),
                       reason ]
             package_list.append(cells)
 
         table = build_table_from_list(package_list, [20, 20, 40])
+        table['classes'].append('longtable')
         return [table]
 
 ### Initialization