Please read the homepage for the details on how to use this toolset.
Save it as recipe.toml, and use the pdftocgen command to automatically generate an outline $ pdftocgen onlisp.pdf tocĪnd import it to the PDF file using pdftocio: $ pdftocio -o output.pdf onlisp.pdf < toc You could use the pdfxmeta tool to build a "recipe" file ]
It uses the embedded font attributes and position information of headings to generate a table of contents automatically.įor example, for the PDF version Paul Graham's On Lisp, available for download on his website but comes without a table of contents. I wrote an open source command line toolset called pdf.tocgen just for doing this. (although Emacs's amazing PDF-tools and Zathura are my favorite PDF editor and viewer respectively).
It works well under wine.Īlthough not related to the question, I just would like to add that at the moment PDF X-Change viewer appears to me to be the most powerful PDF editor/viewer on linux. We would recommend choosing: Automatic Table 1 or Automatic Table 2. On the left, you can click on Table of Contents and can choose any version you would like to use. If these options do not work, then I would also like to recommend PDF-XChange Viewer as a very powerful bookmark/contents extractor (selected text can be easily added to the bookmarks). When you start creating a table of contents in Word, you have to click on References. However, I would suggest you try the python script called document-contents-extractor to extract the contents. (Not enough reputation points to comment) Like the answer by Patrick Bourdon, I would also recommend HandyOutliner ( ). In case this package's functionality is not sufficient or using Emacs is no option then the remaining part of this answer remains valid. In the Options pop-up screen, make sure that Create bookmarks using: Headings is selected. From the Save as type drop-down, select PDF (.pdf).
It includes options to extract the TOC via OCR. Navigate to where you want to save your file. First, choose Insert Table of Contents and then Document at your insertion point. For our purposes I removed the Table of Contents from the sample brief and otherwise left the brief alone. For this project I am using a sample brief found on the website for Ohios 12th District Court of Appeals. It is a similar process to Word, but with a couple of small differences. After using this tutorial you can use my next tutorial to learn how to Create a Table of Contents for a legal brief with Microsoft Word. Using this package becomes even easier with the toc-mode package for (Spac)Emacs described next.įor all other PDF and DJVU documents there is a new package called toc-mode for Emacs, which in my opinion provides the easiest way to add Table of Contents to documents (for linux and possibly also for different OS's). The process above is similar for most versions of MS Word, including Word 2007, Word 2010, and Word for Mac. How to Create a Table of Contents in OpenOffice/LibreOffice: This is a tutorial in how to auto create a Table Of Contents (TOC) for your document using OpenOffice or LibreOffice with a few clicks. PDF's not created from scans, I recommend to use (and upvote the answer by Krasjet) pdf.tocgen.