>From 22d9797e88856033fb4837542b22da37dd0687e2 Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Sat, 15 Oct 2016 19:34:08 +0900 Subject: [PATCH 3/6] Makefile: Add targets for alternative monospace fonts "courier" font is a bit too wide and thin when used among text of "Times Roman" font. Also, code snippets figures tend to become too wide for two-column layout. Some of such figures have been tweaked by using non-standard font sizes and line spacings. This issue of courier font is fairly well known among LaTeX community and quite a few packages exist to address it. Courier based: o "couriers" (courier-scaled) package [1] provides scaling of courier font. o "nimbus15" package [2] provides courier based monospace fonts with thicker and narrower geometries. "txtt" based: o "txtt" font provided in "txfonts" package (thicker than courier and looks better when mixed with Times font) o "newtxtt" package [3] provides improved txtt font with an option to select appearance of zero character. This commit adds 5 make targets to use these alternative fonts. o "mss" ([m]ono[s]pace [s]caled): "couriers" with "scaled=.94" option. o "mstx" ([m]ono[s]pace [tx]tt): "txtt" o "msr" ([m]ono[s]pace [r]egular): "nimbusmono" with "scaled=.94" option. o "msn" ([m]ono[s]pace [n]arrow): "minbusmononarrow". o "msnt" ([m]ono[s]pace [n]ew[t]xtt): "newtxtt" with "zerostyle=a" option. Scaling factor of 0.94 is chosen to reduce overfulness of code snippets which are not yet tweaked. When these targets are used, code snippet figures of scriptsize can hold the following number of characters within the column width of two-column layout. courier : 54 (current default) mss, msr : 57 mstx, msnt : 61 msn : 64 Note that packages "newtxtt" and "nimbus15" are fairly new, and you may need install them or upgrade TeX installation to use targets "msr", "msn", and "msnt". The target "mstx" is provided as an easy means to evaluate "newtxtt" without installing it. [1] http://mirrors.ctan.org/fonts/psfonts/courier-scaled/Couriers.pdf [2] http://mirrors.ctan.org/fonts/nimbus15/doc/nimbus15-doc.pdf [3] http://mirrors.ctan.org/fonts/newtxtt/doc/newtxtt-doc.pdf Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- Makefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eb83af4..de6cd0d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ LATEXSOURCES = \ LATEXGENERATED = qqz.tex contrib.tex origpub.tex -ABBREVTARGETS := 1c hb +ABBREVTARGETS := 1c hb mss mstx msr msn msnt PDFTARGETS := perfbook.pdf $(foreach v,$(ABBREVTARGETS),perfbook-$(v).pdf) @@ -95,6 +95,24 @@ perfbook-1c.tex: perfbook.tex perfbook-hb.tex: perfbook.tex sed -e 's/,twocolumn/&,letterpaperhb/' -e 's/setboolean{hardcover}{false}/setboolean{hardcover}{true}/' < $< > $@ +perfbook-mss.tex: perfbook.tex + sed -e 's/usepackage{courier}/usepackage[scaled=0.94]{couriers}/' < $< > $@ + +perfbook-mstx.tex: perfbook.tex + sed -e 's/usepackage{courier}/renewcommand*\\ttdefault{txtt}/' < $< > $@ + +perfbook-msr.tex: perfbook.tex + sed -e 's/usepackage{courier}/usepackage[scaled=0.94]{nimbusmono}/' < $< > $@ + @echo "## This target requires font package nimbus15. ##" + +perfbook-msn.tex: perfbook.tex + sed -e 's/usepackage{courier}/usepackage{nimbusmononarrow}/' < $< > $@ + @echo "## This target requires font package nimbus15. ##" + +perfbook-msnt.tex: perfbook.tex + sed -e 's/usepackage{courier}/usepackage[zerostyle=a]{newtxtt}/' < $< > $@ + @echo "## This target requires font package newtxtt. ##" + # Rules related to perfbook_html are removed as of May, 2016 $(EPSSOURCES_FROM_TEX): %.eps: %.tex -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html