From: Dave K. <dku...@pa...> - 2009-12-28 22:35:44
|
I've added a new capability to the odf_odt writer. Are we in the midst of a code freeze, or can I check it in? The new capability enables users to insert headers and footers that contain page numbers, date, time, etc into a document. Since the way to format page numbers, dates, etc is not standard reST/Docutils, I've used new command line options to specify the headers and footers. (In the rst2latex writer, LaTeX packages are used to keep this feature outside of reST.) I've attached the additional documentation for this new feature below. Suggestions are welcome. - Dave # =========================================================== Custom header/footers: inserting page numbers, date, time, etc ---------------------------------------------------------------- You can specify custom headers and footers for your document from the command line. These headers and footers can be used to insert fields such as page numbers, date, time, etc. (See below for a complete list. To insert a custom header or footer, use the "--custom-odt-header" or "--custom-odt-footer" command line options. For example, the following inserts a footer containing the page number and page count:: $ rst2odt.py --custom-odt-footer="Page %p% of %P%" ... f1.txt f1.odt Field specifiers ~~~~~~~~~~~~~~~~~~ You can use the following field specifiers to insert ``oowriter`` fields in your custom headers and footers: %p% The current page number. %P% The number of pages in the document. %d1% The current date in format 12/31/99. %d2% The current date in format 12/31/1999. %d3% The current date in format Dec 31, 1999. %d4% The current date in format December 31, 1999. %d5% The current date in format 1999-12-31. %t1% The current time in format 14:22. %t2% The current time in format 14:22:33. %t3% The current time in format 02:22 PM. %t4% The current time in format 02:22:33 PM. %t% The document title. %a% The author of the document. **Note:** The use of the above field specifiers in the body of your reStructuredText document is **not** supported, because these specifiers are not standard across Docutils writers. # =========================================================== -- Dave Kuhlman http://www.rexx.com/~dkuhlman |