From: Guenter M. <mi...@us...> - 2009-11-17 14:02:29
|
Dear Docutils developers, currently, the running rst2latex with default settings and pdflatex on the output results in PDFs that use bitmap fonts. Viewed on-screen (with a PDF viewer like xpdf, acroread, or evince) the documents look fuzzy and do not properly scale to higher magnifications. However, the TeX default font Computer Modern (CM) is problematic for on-screen viewing even if the Type 1 version is used, due to suboptimal hinting and the "modern" design with high contrast between thick and thin elements. A review of the possible font solutions is available under http://docutils.sourceforge.net/docs/user/latex.html#font Proposal ~~~~~~~~ * Use one of the Postscript default fonts supported by standard LaTeX (pages 10 and 11 of the `PSNFSS documentation`_) My preference would be Times or Palatino. * Implement as default stylesheet option, so it can be easily overridden. .. _PSNFSS documentation: http://dante.ctan.org/CTAN/macros/latex/required/psnfss/psnfss2e.pdf Problems ~~~~~~~~ To set serif, sans-serif, and monospaced fonts, three packages are required:: \usepackage{mathptmx} % Times for serif and math \usepackage[scaled=.92]{helvet} % downscaled Helvetica for sans serif \usepackage{courier} % Courier for teletype (mono-space) The sans-serif Helvetica needs to be scaled, this is achieved via an option to the helvet package. Alternative solutions: a) do not select Helvetica (the standard layout does not use sans-serif fonts. +1 simple -1 bad, if sans-serif is used (e.g. in the KOMA script document classes). b) set this in a style sheet http://docutils.sf.net/sandbox/stylesheets/times-helvetica-courier.sty +1 simple use ``--stylesheet=times-helvetica-courier`` -1 this is no standard stylesheet c) a new ``--tex-preamble`` setting for "raw" LaTeX code to be inserted in the preamble (similar to Sphinx's latex_preamble resp. latex_elements['preamble']) This would allow flexible customization "on the fly" or in a config file and could default to the font-setting three-liner. If choosing b), a way to install/use the style sheet is needed: i) upload the style sheet (as "times-et-al.sty") to CTAN +1 simple usage: ``--stylesheet=times-et-al`` +1 allows use independent of Docutils -1 it will take some years until it can be relied upon as standard in an average LaTeX installation (if ever). ii) as with the html4css1 writer, the sheet resides with the writer and is by default embedded. +1 the approved Docutils' way, -1 lengthy, variable path in the option ``--stylesheet-path=/usr/share/lib/Python2.5/docutils/docutils/writers/latex2e/times-et-al.sty`` -1 problematic to combine with other style sheets (combining style sheets (packages) to achieve a desired layout/feature set is common in LaTeX). iii) extend the syntax for files at a "Docutils standard location" used in the "include" directive +1 simple usage: ``--stylesheet=<times-et-al>`` +1 combination with other styles possible, e.g. ``--stylesheet=<times-et-al>,parskip`` Günter |
From: Roberto A. <ra...@ne...> - 2009-11-17 15:09:31
|
On Tuesday 17 November 2009 11:00:20 Guenter Milde wrote: > * Use one of the Postscript default fonts supported by standard LaTeX > (pages 10 and 11 of the `PSNFSS documentation`_) > > My preference would be Times or Palatino. Isn't there a way to make LaTeX use one of the standard PDF fonts? Otherwise you are always embedding custom fonts and making the PDF larger. It's not much of course, but here is an example with and without the Charter Type 1 font: -rw-r--r-- 1 ralsina users 39898 2009-11-17 12:09 test_issue_226.pdf -rw-r--r-- 1 ralsina users 2483 2009-11-17 12:10 test_issue_226.pdf Best regards, -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH) (_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar _..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia (l)-'' ((i).' ((!.' according to alexa.com (27/5/2007) |
From: Guenter M. <mi...@us...> - 2009-12-01 09:35:53
|
On 2009-11-17, Guenter Milde wrote: > Dear Docutils developers, after discussing the issue with the LaTeX2e writer maintainer, the default fonts are now set to the "PDF Standard Fonts" Times/Helvetica/Courier: > \usepackage{mathptmx} % Times for serif and math > \usepackage[scaled=.90]{helvet} % downscaled Helvetica for sans serif > \usepackage{courier} % Courier for teletype (mono-space) as default value for: > c) a new ``--tex-preamble`` setting for "raw" LaTeX code to be inserted > in the preamble (similar to Sphinx's latex_preamble resp. > latex_elements['preamble']) (i.e. you get back the old behaviour with --tex-preamble=""). For details and more configuring options, see http://docutils.sourceforge.net/docs/user/latex.html#font Günter |