All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Add targets for alternative fonts
@ 2016-10-18 21:57 Akira Yokosawa
  2016-10-18 21:59 ` Akira Yokosawa
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 21:57 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From ec360d66cdab86bbe98d544aca52aaec1e03518e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 16 Oct 2016 20:11:35 +0900
Subject: [PATCH 0/6] Add targets for alternative fonts

Hi,

As I implied in the cover-letter of previous patch set, I attempted to
add make targets for alternative monospaced fonts.

Courier font is said to be a standard monospeced typewriter font.
It is good as long as you don't mix it with other fonts, but when mixed
used in Times Roman text, it looks too wide and too thin.

Typewriter fonts available in LaTeX are listed at the LaTeX Font
Catalogue site: http://www.tug.dk/FontCatalogue/typewriterfonts.html
(including both monospaced and proportional fonts).

I have no idea how much people prefer courier font, so I took two
approaches.

One was to try courier font variations.
The other was to try "txtt" based font packages. "txtt" is a font
designed to look better when mixed used with Times fonts.

But I couldn't figure out which to propose because of pros and cons
of candidate fonts. So I just added make targets for people to try.

Detailed explanation of these new targets and font packages can be
found in the commit message of the 3rd patch ("Makefile: Add targets
for alternative monospace fonts").

Summary of pros and cons of each target is as follows.

  mss: (courier scaled)
    pros: o can build on old TeX installation
    cons: o too thin
          o scaling by .94 affects apparent vertical position (looks
            slightly lower than Times Roman text)
  msr: (nimbusmono regular)
    pros: o thick enough
    cons: o requires recent TeX installation
          o scaling by .94 affects apparent vertical position (looks
            slightly lower than Times Roman text)
  msn: (nimbusmononarrow)
    pros: o can hold up to 64 characters in a line of code snippet
    cons: o requires recent TeX installation
          o single letter variable names denoted by \co{} may be hard
	    to recognize
  mstx: (txtt)
    pros: o can build on old TeX installation
          o looks mostly good when mixed with Times Roman
    cons: o zero character is slashed
          o asterisk character has a higher position
  msnt: (newtxtt)
    pros: o looks mostly good when mixed with Times Roman
    cons: o requires recent TeX installation
          o asterisk character has a higher position

Shrinking courier based fonts reduces the x-height, and causes
monospaced text to look somewhat lower than Times Roman text.
Actual baseline is not affected but the look is affected.

My preference is the target "msnt" which uses "newtxtt" font package.
But "txtt" based fonts have higher positions of "*" character.
I anticipate some people to have hesitation to use it.

There are other obstacles here.  Some of the targets require quite
recent LaTeX installation or manual installation of font packages.

On Ubuntu Trusty, only the targets "mss" and "mstx" can be built on
TeX Live 2013 available there.

On Ubuntu Xenial, TeX Live 2015 works just fine for all the targets.

My recommendation is to use "mss" (courier scaled) option as the default
and permit up to 57 characters in a line of code snippets, and give people
alternative font choices as make targets.

If "mss" is acceptable as the default, we can modify "perfbook.tex" and
revert ad hoc fontsize tweaks done in the past.

The latter half of this patch set is an attempt to use sans serif font
(Helvetica) as default font for one-column layout. Sans serif fonts are
said to be easier to read on a lower resolution display. 

Again, there is an obstacle here. I used a package "mathastext" for math
mode font tweaks, but the version of mathastext on Ubuntu Trusty conflicts
with hyperref package. The version provided on Ubuntu Xenial works fine
with a workaround given in the 5th patch ("Redefine \path command for
sans serif font").

Please take time to see which one meets your preference and let me
know what you feel.

                                                Thanks, Akira

Akira Yokosawa (6):
  Separate font package declarations
  Adjust scale of sans serif font
  Makefile: Add targets for alternative monospace fonts
  Makefile: Add target '1csf' (one-column sans serif)
  Redefine \path command for sans serif font
  Makefile: Add notice of mathastext version for 1csf

 Makefile     | 25 ++++++++++++++++++++++++-
 perfbook.tex | 38 ++++++++++++++++++++++++++------------
 2 files changed, 50 insertions(+), 13 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/6] Add targets for alternative fonts
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
@ 2016-10-18 21:59 ` Akira Yokosawa
  2016-10-18 22:15   ` Akira Yokosawa
  2016-10-18 22:01 ` [PATCH 2/6] Adjust scale of sans serif font Akira Yokosawa
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 21:59 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 0cfe68cfd9e7c5413c26f25408ea3cb78f1a334c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 9 Oct 2016 17:59:03 +0900
Subject: [PATCH 1/6] Separate font package declarations

This is a preparation of font-choice tweaks to follow.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook.tex | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/perfbook.tex b/perfbook.tex
index 66c93fe..87d5b53 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -5,7 +5,9 @@
 % A more pleasant font
 \usepackage[T1]{fontenc} % use postscript type 1 fonts
 \usepackage{textcomp} % use symbols in TS1 encoding
-\usepackage{mathptmx,helvet,courier} % use nice, standard fonts for roman, sans and monospace respectively
+\usepackage{mathptmx} % use nice, standard fonts for roman,
+\usepackage{helvet}   % sans serif,
+\usepackage{courier}  % and monospace respectively

 % Improves the text layout
 \usepackage{microtype}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/6] Adjust scale of sans serif font
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
  2016-10-18 21:59 ` Akira Yokosawa
@ 2016-10-18 22:01 ` Akira Yokosawa
  2016-10-18 22:03 ` [PATCH 3/6] Makefile: Add targets for alternative monospace fonts Akira Yokosawa
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 22:01 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 052b26ecc718edba3cc32d611111b1e43c5a23af Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 9 Oct 2016 18:25:21 +0900
Subject: [PATCH 2/6] Adjust scale of sans serif font

In the documentation[1] of "psnfss2e" package, it is stated that the
sans serif font "helvet" should be scaled by 0.92 to match the size
of Times font.

This commit adds the option to do so.

[1] http://mirrors.ctan.org/macros/latex/required/psnfss/psnfss2e.pdf

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/perfbook.tex b/perfbook.tex
index 87d5b53..f808c7f 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -6,7 +6,7 @@
 \usepackage[T1]{fontenc} % use postscript type 1 fonts
 \usepackage{textcomp} % use symbols in TS1 encoding
 \usepackage{mathptmx} % use nice, standard fonts for roman,
-\usepackage{helvet}   % sans serif,
+\usepackage[scaled=.92]{helvet}   % sans serif,
 \usepackage{courier}  % and monospace respectively

 % Improves the text layout
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/6] Makefile: Add targets for alternative monospace fonts
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
  2016-10-18 21:59 ` Akira Yokosawa
  2016-10-18 22:01 ` [PATCH 2/6] Adjust scale of sans serif font Akira Yokosawa
@ 2016-10-18 22:03 ` Akira Yokosawa
  2016-10-18 22:05 ` [PATCH 4/6] Makefile: Add target '1csf' (one-column sans serif) Akira Yokosawa
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 22:03 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 22d9797e88856033fb4837542b22da37dd0687e2 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
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@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/6] Makefile: Add target '1csf' (one-column sans serif)
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
                   ` (2 preceding siblings ...)
  2016-10-18 22:03 ` [PATCH 3/6] Makefile: Add targets for alternative monospace fonts Akira Yokosawa
@ 2016-10-18 22:05 ` Akira Yokosawa
  2016-10-18 22:06 ` [PATCH 5/6] Redefine \path command for sans serif font Akira Yokosawa
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 22:05 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From bfa3017cea4952b495aa706643a87b83ffd9637e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Mon, 10 Oct 2016 16:08:07 +0900
Subject: [PATCH 4/6] Makefile: Add target '1csf' (one-column sans serif)

Sans serif fonts are said to be easier to read on a (not high
definition) display than serif fonts.
Current perfbook-1c.pdf is supposed to be for such readers, but
is using serif font (Times Roman).
To try a sans serif font (Helvetica) version for one-column layout,
this commit adds a new boolean "sansserif" in the preamble and
a make target "1csf" that sets the boolean true.

Since the boolean is referred to in an earlier part of the preamble,
declarations of custom booleans are moved forward along with the
new boolean.

The result can not be said as optimal, but it is mostly good.
As for monospece font this commit uses "inconsolata", which is
mostly sans serif.
For epigraphs, Times Roman is used as before.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 Makefile     |  6 +++++-
 perfbook.tex | 33 ++++++++++++++++++++++-----------
 2 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index de6cd0d..2ccce9d 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ LATEXSOURCES = \

 LATEXGENERATED = qqz.tex contrib.tex origpub.tex

-ABBREVTARGETS := 1c hb mss mstx msr msn msnt
+ABBREVTARGETS := 1c hb mss mstx msr msn msnt 1csf

 PDFTARGETS := perfbook.pdf $(foreach v,$(ABBREVTARGETS),perfbook-$(v).pdf)

@@ -113,6 +113,10 @@ perfbook-msnt.tex: perfbook.tex
 	sed -e 's/usepackage{courier}/usepackage[zerostyle=a]{newtxtt}/' < $< > $@
 	@echo "## This target requires font package newtxtt. ##"

+perfbook-1csf.tex: perfbook-1c.tex
+	sed -e 's/setboolean{sansserif}{false}/setboolean{sansserif}{true}/' \
+	    -e 's/usepackage{courier}/usepackage[var0]{inconsolata}/' < $< > $@
+
 # Rules related to perfbook_html are removed as of May, 2016

 $(EPSSOURCES_FROM_TEX): %.eps: %.tex
diff --git a/perfbook.tex b/perfbook.tex
index f808c7f..0d6f08d 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -45,6 +45,27 @@
 \usepackage{qqz}
 \usepackage{origpub}

+% custom booleans
+
+\newboolean{inbook}
+\setboolean{inbook}{true}
+\newcommand{\IfInBook}[2]{\ifthenelse{\boolean{inbook}}{#1}{#2}}
+\newboolean{twocolumn}
+\setboolean{twocolumn}{true}
+\newcommand{\IfTwoColumn}[2]{\ifthenelse{\boolean{twocolumn}}{#1}{#2}}
+\newboolean{hardcover}
+\setboolean{hardcover}{false}
+\newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}}
+\newboolean{sansserif}
+\setboolean{sansserif}{false}
+\newcommand{\IfSansSerif}[2]{\ifthenelse{\boolean{sansserif}}{#1}{#2}}
+
+\IfSansSerif{
+\renewcommand{\familydefault}{\sfdefault}
+\normalfont
+\usepackage[italic]{mathastext}
+}{}
+
 \begin{document}

 %%HTMLSKIP
@@ -69,7 +90,7 @@
 % ---  End of workaround for Fedora 23 Texlive bug
 \newcommand{\co}[1]{\lstinline[breaklines=true,breakatwhitespace=true]{#1}}
 \newcommand{\nbco}[1]{\lstinline[breaklines=false,breakatwhitespace=false]{#1}}
-\newcommand{\Epigraph}[2]{\epigraphhead[65]{\epigraph{#1}{#2}}}
+\newcommand{\Epigraph}[2]{\epigraphhead[65]{\rmfamily\epigraph{#1}{#2}}}

 \title{Is Parallel Programming Hard, And, If So, What Can You Do About It?}
 \author{
@@ -93,16 +114,6 @@
 \renewcommand\dbltopfraction{.75}
 \renewcommand\dblfloatpagefraction{.5}

-\newboolean{inbook}
-\setboolean{inbook}{true}
-\newcommand{\IfInBook}[2]{\ifthenelse{\boolean{inbook}}{#1}{#2}}
-\newboolean{twocolumn}
-\setboolean{twocolumn}{true}
-\newcommand{\IfTwoColumn}[2]{\ifthenelse{\boolean{twocolumn}}{#1}{#2}}
-\newboolean{hardcover}
-\setboolean{hardcover}{false}
-\newcommand{\IfHardCover}[2]{\ifthenelse{\boolean{hardcover}}{#1}{#2}}
-
 \IfTwoColumn{
 \setlength{\textheight}{8.25in}
 \setlength{\textwidth}{6.5in}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/6] Redefine \path command for sans serif font
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
                   ` (3 preceding siblings ...)
  2016-10-18 22:05 ` [PATCH 4/6] Makefile: Add target '1csf' (one-column sans serif) Akira Yokosawa
@ 2016-10-18 22:06 ` Akira Yokosawa
  2016-10-18 22:08 ` [PATCH 6/6] Makefile: Add notice of mathastext version for 1csf Akira Yokosawa
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 22:06 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From e5db129b6fe3f2612a9f823f213a734499a0893e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Mon, 10 Oct 2016 23:34:50 +0900
Subject: [PATCH 5/6] Redefine \path command for sans serif font

The "mathastext" package interferes with \path command and make
it lose line-breaking at a "/" or a ".".
Redefining \path command seems to work.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook.tex | 1 +
 1 file changed, 1 insertion(+)

diff --git a/perfbook.tex b/perfbook.tex
index 0d6f08d..0dfc380 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -64,6 +64,7 @@
 \renewcommand{\familydefault}{\sfdefault}
 \normalfont
 \usepackage[italic]{mathastext}
+\renewcommand{\path}[1]{\nolinkurl{#1}} % workaround of interference with mathastext
 }{}

 \begin{document}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/6] Makefile: Add notice of mathastext version for 1csf
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
                   ` (4 preceding siblings ...)
  2016-10-18 22:06 ` [PATCH 5/6] Redefine \path command for sans serif font Akira Yokosawa
@ 2016-10-18 22:08 ` Akira Yokosawa
  2016-10-18 22:24 ` [PATCH 1/6] Separate font package declarations Akira Yokosawa
  2016-10-19  6:45 ` [PATCH 0/6] Add targets for alternative fonts Paul E. McKenney
  7 siblings, 0 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 22:08 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From ec360d66cdab86bbe98d544aca52aaec1e03518e Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 16 Oct 2016 19:35:37 +0900
Subject: [PATCH 6/6] Makefile: Add notice of mathastext version for 1csf

On Ubuntu Trusty, the version of mathastext package installed in
TeX Lve is 1.3c. It conflicts with hyperref package's \url and
\path commands and breaks their line-break behavior.
The issue was resolved in version 1.3i.
This commit adds a notice to the target "1csf" regarding this.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 2ccce9d..a73aadb 100644
--- a/Makefile
+++ b/Makefile
@@ -116,6 +116,7 @@ perfbook-msnt.tex: perfbook.tex
 perfbook-1csf.tex: perfbook-1c.tex
 	sed -e 's/setboolean{sansserif}{false}/setboolean{sansserif}{true}/' \
 	    -e 's/usepackage{courier}/usepackage[var0]{inconsolata}/' < $< > $@
+	@echo "## This target requires recent version (>= 1.3i) of mathastext. ##"

 # Rules related to perfbook_html are removed as of May, 2016

-- 
2.7.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/6] Add targets for alternative fonts
  2016-10-18 21:59 ` Akira Yokosawa
@ 2016-10-18 22:15   ` Akira Yokosawa
  0 siblings, 0 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 22:15 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2016/10/19 6:59, Akira Yokosawa wrote:
>>From 0cfe68cfd9e7c5413c26f25408ea3cb78f1a334c Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sun, 9 Oct 2016 17:59:03 +0900
> Subject: [PATCH 1/6] Separate font package declarations
> 
> This is a preparation of font-choice tweaks to follow.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> ---
>  perfbook.tex | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/perfbook.tex b/perfbook.tex
> index 66c93fe..87d5b53 100644
> --- a/perfbook.tex
> +++ b/perfbook.tex
> @@ -5,7 +5,9 @@
>  % A more pleasant font
>  \usepackage[T1]{fontenc} % use postscript type 1 fonts
>  \usepackage{textcomp} % use symbols in TS1 encoding
> -\usepackage{mathptmx,helvet,courier} % use nice, standard fonts for roman, sans and monospace respectively
> +\usepackage{mathptmx} % use nice, standard fonts for roman,
> +\usepackage{helvet}   % sans serif,
> +\usepackage{courier}  % and monospace respectively
>  
>  % Improves the text layout
>  \usepackage{microtype}
> 

Sorry, I failed to put a correct subject to this mail.
The one in the mail body is what was intended.

                                            Thanks, Akira


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/6] Separate font package declarations
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
                   ` (5 preceding siblings ...)
  2016-10-18 22:08 ` [PATCH 6/6] Makefile: Add notice of mathastext version for 1csf Akira Yokosawa
@ 2016-10-18 22:24 ` Akira Yokosawa
  2016-10-19  6:45 ` [PATCH 0/6] Add targets for alternative fonts Paul E. McKenney
  7 siblings, 0 replies; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-18 22:24 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 0cfe68cfd9e7c5413c26f25408ea3cb78f1a334c Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 9 Oct 2016 17:59:03 +0900
Subject: [PATCH 1/6] Separate font package declarations

This is a preparation of font-choice tweaks to follow.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 perfbook.tex | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/perfbook.tex b/perfbook.tex
index 66c93fe..87d5b53 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -5,7 +5,9 @@
 % A more pleasant font
 \usepackage[T1]{fontenc} % use postscript type 1 fonts
 \usepackage{textcomp} % use symbols in TS1 encoding
-\usepackage{mathptmx,helvet,courier} % use nice, standard fonts for roman, sans and monospace respectively
+\usepackage{mathptmx} % use nice, standard fonts for roman,
+\usepackage{helvet}   % sans serif,
+\usepackage{courier}  % and monospace respectively

 % Improves the text layout
 \usepackage{microtype}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/6] Add targets for alternative fonts
  2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
                   ` (6 preceding siblings ...)
  2016-10-18 22:24 ` [PATCH 1/6] Separate font package declarations Akira Yokosawa
@ 2016-10-19  6:45 ` Paul E. McKenney
  2016-10-19 14:45   ` Akira Yokosawa
  7 siblings, 1 reply; 12+ messages in thread
From: Paul E. McKenney @ 2016-10-19  6:45 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Wed, Oct 19, 2016 at 06:57:56AM +0900, Akira Yokosawa wrote:
> >From ec360d66cdab86bbe98d544aca52aaec1e03518e Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sun, 16 Oct 2016 20:11:35 +0900
> Subject: [PATCH 0/6] Add targets for alternative fonts
> 
> Hi,
> 
> As I implied in the cover-letter of previous patch set, I attempted to
> add make targets for alternative monospaced fonts.
> 
> Courier font is said to be a standard monospeced typewriter font.
> It is good as long as you don't mix it with other fonts, but when mixed
> used in Times Roman text, it looks too wide and too thin.
> 
> Typewriter fonts available in LaTeX are listed at the LaTeX Font
> Catalogue site: http://www.tug.dk/FontCatalogue/typewriterfonts.html
> (including both monospaced and proportional fonts).
> 
> I have no idea how much people prefer courier font, so I took two
> approaches.
> 
> One was to try courier font variations.
> The other was to try "txtt" based font packages. "txtt" is a font
> designed to look better when mixed used with Times fonts.
> 
> But I couldn't figure out which to propose because of pros and cons
> of candidate fonts. So I just added make targets for people to try.
> 
> Detailed explanation of these new targets and font packages can be
> found in the commit message of the 3rd patch ("Makefile: Add targets
> for alternative monospace fonts").
> 
> Summary of pros and cons of each target is as follows.
> 
>   mss: (courier scaled)
>     pros: o can build on old TeX installation
>     cons: o too thin
>           o scaling by .94 affects apparent vertical position (looks
>             slightly lower than Times Roman text)
>   msr: (nimbusmono regular)
>     pros: o thick enough
>     cons: o requires recent TeX installation
>           o scaling by .94 affects apparent vertical position (looks
>             slightly lower than Times Roman text)
>   msn: (nimbusmononarrow)
>     pros: o can hold up to 64 characters in a line of code snippet
>     cons: o requires recent TeX installation
>           o single letter variable names denoted by \co{} may be hard
> 	    to recognize
>   mstx: (txtt)
>     pros: o can build on old TeX installation
>           o looks mostly good when mixed with Times Roman
>     cons: o zero character is slashed
>           o asterisk character has a higher position
>   msnt: (newtxtt)
>     pros: o looks mostly good when mixed with Times Roman
>     cons: o requires recent TeX installation
>           o asterisk character has a higher position
> 
> Shrinking courier based fonts reduces the x-height, and causes
> monospaced text to look somewhat lower than Times Roman text.
> Actual baseline is not affected but the look is affected.
> 
> My preference is the target "msnt" which uses "newtxtt" font package.
> But "txtt" based fonts have higher positions of "*" character.
> I anticipate some people to have hesitation to use it.
> 
> There are other obstacles here.  Some of the targets require quite
> recent LaTeX installation or manual installation of font packages.
> 
> On Ubuntu Trusty, only the targets "mss" and "mstx" can be built on
> TeX Live 2013 available there.
> 
> On Ubuntu Xenial, TeX Live 2015 works just fine for all the targets.
> 
> My recommendation is to use "mss" (courier scaled) option as the default
> and permit up to 57 characters in a line of code snippets, and give people
> alternative font choices as make targets.
> 
> If "mss" is acceptable as the default, we can modify "perfbook.tex" and
> revert ad hoc fontsize tweaks done in the past.
> 
> The latter half of this patch set is an attempt to use sans serif font
> (Helvetica) as default font for one-column layout. Sans serif fonts are
> said to be easier to read on a lower resolution display. 
> 
> Again, there is an obstacle here. I used a package "mathastext" for math
> mode font tweaks, but the version of mathastext on Ubuntu Trusty conflicts
> with hyperref package. The version provided on Ubuntu Xenial works fine
> with a workaround given in the 5th patch ("Redefine \path command for
> sans serif font").
> 
> Please take time to see which one meets your preference and let me
> know what you feel.
> 
>                                                 Thanks, Akira
> 
> Akira Yokosawa (6):
>   Separate font package declarations
>   Adjust scale of sans serif font
>   Makefile: Add targets for alternative monospace fonts
>   Makefile: Add target '1csf' (one-column sans serif)
>   Redefine \path command for sans serif font
>   Makefile: Add notice of mathastext version for 1csf
> 
>  Makefile     | 25 ++++++++++++++++++++++++-
>  perfbook.tex | 38 ++++++++++++++++++++++++++------------
>  2 files changed, 50 insertions(+), 13 deletions(-)

Applied and pushed, thank you!

Getting on a plane soon, but will check tables containing code later, as
these have been the places where font size has been the most troublesome.

Next time, could you please resend the whole series as v2?  Just makes it
a bit easier to process.  ;-)

							Thanx, Paul


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/6] Add targets for alternative fonts
  2016-10-19  6:45 ` [PATCH 0/6] Add targets for alternative fonts Paul E. McKenney
@ 2016-10-19 14:45   ` Akira Yokosawa
  2016-10-19 17:59     ` Paul E. McKenney
  0 siblings, 1 reply; 12+ messages in thread
From: Akira Yokosawa @ 2016-10-19 14:45 UTC (permalink / raw)
  To: paulmck; +Cc: perfbook

On 2016/10/18 23:45:48 -0700, Paul E. McKenney wrote:
> On Wed, Oct 19, 2016 at 06:57:56AM +0900, Akira Yokosawa wrote:
>> >From ec360d66cdab86bbe98d544aca52aaec1e03518e Mon Sep 17 00:00:00 2001
>> From: Akira Yokosawa <akiyks@gmail.com>
>> Date: Sun, 16 Oct 2016 20:11:35 +0900
>> Subject: [PATCH 0/6] Add targets for alternative fonts
>>
>> Hi,
>>
>> As I implied in the cover-letter of previous patch set, I attempted to
>> add make targets for alternative monospaced fonts.
>>
>> Courier font is said to be a standard monospeced typewriter font.
>> It is good as long as you don't mix it with other fonts, but when mixed
>> used in Times Roman text, it looks too wide and too thin.
>>
>> Typewriter fonts available in LaTeX are listed at the LaTeX Font
>> Catalogue site: http://www.tug.dk/FontCatalogue/typewriterfonts.html
>> (including both monospaced and proportional fonts).
>>
>> I have no idea how much people prefer courier font, so I took two
>> approaches.
>>
>> One was to try courier font variations.
>> The other was to try "txtt" based font packages. "txtt" is a font
>> designed to look better when mixed used with Times fonts.
>>
>> But I couldn't figure out which to propose because of pros and cons
>> of candidate fonts. So I just added make targets for people to try.
>>
>> Detailed explanation of these new targets and font packages can be
>> found in the commit message of the 3rd patch ("Makefile: Add targets
>> for alternative monospace fonts").
>>
>> Summary of pros and cons of each target is as follows.
>>
>>   mss: (courier scaled)
>>     pros: o can build on old TeX installation
>>     cons: o too thin
>>           o scaling by .94 affects apparent vertical position (looks
>>             slightly lower than Times Roman text)
>>   msr: (nimbusmono regular)
>>     pros: o thick enough
>>     cons: o requires recent TeX installation
>>           o scaling by .94 affects apparent vertical position (looks
>>             slightly lower than Times Roman text)
>>   msn: (nimbusmononarrow)
>>     pros: o can hold up to 64 characters in a line of code snippet
>>     cons: o requires recent TeX installation
>>           o single letter variable names denoted by \co{} may be hard
>> 	    to recognize
>>   mstx: (txtt)
>>     pros: o can build on old TeX installation
>>           o looks mostly good when mixed with Times Roman
>>     cons: o zero character is slashed
>>           o asterisk character has a higher position
>>   msnt: (newtxtt)
>>     pros: o looks mostly good when mixed with Times Roman
>>     cons: o requires recent TeX installation
>>           o asterisk character has a higher position
>>
>> Shrinking courier based fonts reduces the x-height, and causes
>> monospaced text to look somewhat lower than Times Roman text.
>> Actual baseline is not affected but the look is affected.
>>
>> My preference is the target "msnt" which uses "newtxtt" font package.
>> But "txtt" based fonts have higher positions of "*" character.
>> I anticipate some people to have hesitation to use it.
>>
>> There are other obstacles here.  Some of the targets require quite
>> recent LaTeX installation or manual installation of font packages.
>>
>> On Ubuntu Trusty, only the targets "mss" and "mstx" can be built on
>> TeX Live 2013 available there.
>>
>> On Ubuntu Xenial, TeX Live 2015 works just fine for all the targets.
>>
>> My recommendation is to use "mss" (courier scaled) option as the default
>> and permit up to 57 characters in a line of code snippets, and give people
>> alternative font choices as make targets.
>>
>> If "mss" is acceptable as the default, we can modify "perfbook.tex" and
>> revert ad hoc fontsize tweaks done in the past.
>>
>> The latter half of this patch set is an attempt to use sans serif font
>> (Helvetica) as default font for one-column layout. Sans serif fonts are
>> said to be easier to read on a lower resolution display. 
>>
>> Again, there is an obstacle here. I used a package "mathastext" for math
>> mode font tweaks, but the version of mathastext on Ubuntu Trusty conflicts
>> with hyperref package. The version provided on Ubuntu Xenial works fine
>> with a workaround given in the 5th patch ("Redefine \path command for
>> sans serif font").
>>
>> Please take time to see which one meets your preference and let me
>> know what you feel.
>>
>>                                                 Thanks, Akira
>>
>> Akira Yokosawa (6):
>>   Separate font package declarations
>>   Adjust scale of sans serif font
>>   Makefile: Add targets for alternative monospace fonts
>>   Makefile: Add target '1csf' (one-column sans serif)
>>   Redefine \path command for sans serif font
>>   Makefile: Add notice of mathastext version for 1csf
>>
>>  Makefile     | 25 ++++++++++++++++++++++++-
>>  perfbook.tex | 38 ++++++++++++++++++++++++++------------
>>  2 files changed, 50 insertions(+), 13 deletions(-)
> 
> Applied and pushed, thank you!
> 
> Getting on a plane soon, but will check tables containing code later, as
> these have been the places where font size has been the most troublesome.
> 
> Next time, could you please resend the whole series as v2?  Just makes it
> a bit easier to process.  ;-)

Yes. I noticed the error just before leaving home. I half expected to get
request for v2. Doing manual patch submission in the morning was a bad idea...

                                                   Regards, Akira

> 
> 							Thanx, Paul
> 
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/6] Add targets for alternative fonts
  2016-10-19 14:45   ` Akira Yokosawa
@ 2016-10-19 17:59     ` Paul E. McKenney
  0 siblings, 0 replies; 12+ messages in thread
From: Paul E. McKenney @ 2016-10-19 17:59 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Wed, Oct 19, 2016 at 11:45:03PM +0900, Akira Yokosawa wrote:
> On 2016/10/18 23:45:48 -0700, Paul E. McKenney wrote:
> > On Wed, Oct 19, 2016 at 06:57:56AM +0900, Akira Yokosawa wrote:
> >> >From ec360d66cdab86bbe98d544aca52aaec1e03518e Mon Sep 17 00:00:00 2001
> >> From: Akira Yokosawa <akiyks@gmail.com>
> >> Date: Sun, 16 Oct 2016 20:11:35 +0900
> >> Subject: [PATCH 0/6] Add targets for alternative fonts
> >>
> >> Hi,
> >>
> >> As I implied in the cover-letter of previous patch set, I attempted to
> >> add make targets for alternative monospaced fonts.
> >>
> >> Courier font is said to be a standard monospeced typewriter font.
> >> It is good as long as you don't mix it with other fonts, but when mixed
> >> used in Times Roman text, it looks too wide and too thin.
> >>
> >> Typewriter fonts available in LaTeX are listed at the LaTeX Font
> >> Catalogue site: http://www.tug.dk/FontCatalogue/typewriterfonts.html
> >> (including both monospaced and proportional fonts).
> >>
> >> I have no idea how much people prefer courier font, so I took two
> >> approaches.
> >>
> >> One was to try courier font variations.
> >> The other was to try "txtt" based font packages. "txtt" is a font
> >> designed to look better when mixed used with Times fonts.
> >>
> >> But I couldn't figure out which to propose because of pros and cons
> >> of candidate fonts. So I just added make targets for people to try.
> >>
> >> Detailed explanation of these new targets and font packages can be
> >> found in the commit message of the 3rd patch ("Makefile: Add targets
> >> for alternative monospace fonts").
> >>
> >> Summary of pros and cons of each target is as follows.
> >>
> >>   mss: (courier scaled)
> >>     pros: o can build on old TeX installation
> >>     cons: o too thin
> >>           o scaling by .94 affects apparent vertical position (looks
> >>             slightly lower than Times Roman text)
> >>   msr: (nimbusmono regular)
> >>     pros: o thick enough
> >>     cons: o requires recent TeX installation
> >>           o scaling by .94 affects apparent vertical position (looks
> >>             slightly lower than Times Roman text)
> >>   msn: (nimbusmononarrow)
> >>     pros: o can hold up to 64 characters in a line of code snippet
> >>     cons: o requires recent TeX installation
> >>           o single letter variable names denoted by \co{} may be hard
> >> 	    to recognize
> >>   mstx: (txtt)
> >>     pros: o can build on old TeX installation
> >>           o looks mostly good when mixed with Times Roman
> >>     cons: o zero character is slashed
> >>           o asterisk character has a higher position
> >>   msnt: (newtxtt)
> >>     pros: o looks mostly good when mixed with Times Roman
> >>     cons: o requires recent TeX installation
> >>           o asterisk character has a higher position
> >>
> >> Shrinking courier based fonts reduces the x-height, and causes
> >> monospaced text to look somewhat lower than Times Roman text.
> >> Actual baseline is not affected but the look is affected.
> >>
> >> My preference is the target "msnt" which uses "newtxtt" font package.
> >> But "txtt" based fonts have higher positions of "*" character.
> >> I anticipate some people to have hesitation to use it.
> >>
> >> There are other obstacles here.  Some of the targets require quite
> >> recent LaTeX installation or manual installation of font packages.
> >>
> >> On Ubuntu Trusty, only the targets "mss" and "mstx" can be built on
> >> TeX Live 2013 available there.
> >>
> >> On Ubuntu Xenial, TeX Live 2015 works just fine for all the targets.
> >>
> >> My recommendation is to use "mss" (courier scaled) option as the default
> >> and permit up to 57 characters in a line of code snippets, and give people
> >> alternative font choices as make targets.
> >>
> >> If "mss" is acceptable as the default, we can modify "perfbook.tex" and
> >> revert ad hoc fontsize tweaks done in the past.
> >>
> >> The latter half of this patch set is an attempt to use sans serif font
> >> (Helvetica) as default font for one-column layout. Sans serif fonts are
> >> said to be easier to read on a lower resolution display. 
> >>
> >> Again, there is an obstacle here. I used a package "mathastext" for math
> >> mode font tweaks, but the version of mathastext on Ubuntu Trusty conflicts
> >> with hyperref package. The version provided on Ubuntu Xenial works fine
> >> with a workaround given in the 5th patch ("Redefine \path command for
> >> sans serif font").
> >>
> >> Please take time to see which one meets your preference and let me
> >> know what you feel.
> >>
> >>                                                 Thanks, Akira
> >>
> >> Akira Yokosawa (6):
> >>   Separate font package declarations
> >>   Adjust scale of sans serif font
> >>   Makefile: Add targets for alternative monospace fonts
> >>   Makefile: Add target '1csf' (one-column sans serif)
> >>   Redefine \path command for sans serif font
> >>   Makefile: Add notice of mathastext version for 1csf
> >>
> >>  Makefile     | 25 ++++++++++++++++++++++++-
> >>  perfbook.tex | 38 ++++++++++++++++++++++++++------------
> >>  2 files changed, 50 insertions(+), 13 deletions(-)
> > 
> > Applied and pushed, thank you!
> > 
> > Getting on a plane soon, but will check tables containing code later, as
> > these have been the places where font size has been the most troublesome.
> > 
> > Next time, could you please resend the whole series as v2?  Just makes it
> > a bit easier to process.  ;-)
> 
> Yes. I noticed the error just before leaving home. I half expected to get
> request for v2. Doing manual patch submission in the morning was a bad idea...

I do know that feeling...  ;-)

							Thanx, Paul


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-10-19 18:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18 21:57 [PATCH 0/6] Add targets for alternative fonts Akira Yokosawa
2016-10-18 21:59 ` Akira Yokosawa
2016-10-18 22:15   ` Akira Yokosawa
2016-10-18 22:01 ` [PATCH 2/6] Adjust scale of sans serif font Akira Yokosawa
2016-10-18 22:03 ` [PATCH 3/6] Makefile: Add targets for alternative monospace fonts Akira Yokosawa
2016-10-18 22:05 ` [PATCH 4/6] Makefile: Add target '1csf' (one-column sans serif) Akira Yokosawa
2016-10-18 22:06 ` [PATCH 5/6] Redefine \path command for sans serif font Akira Yokosawa
2016-10-18 22:08 ` [PATCH 6/6] Makefile: Add notice of mathastext version for 1csf Akira Yokosawa
2016-10-18 22:24 ` [PATCH 1/6] Separate font package declarations Akira Yokosawa
2016-10-19  6:45 ` [PATCH 0/6] Add targets for alternative fonts Paul E. McKenney
2016-10-19 14:45   ` Akira Yokosawa
2016-10-19 17:59     ` Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.