* [PATCH] Add poor person's slanted shape for 'newtxtext' font
@ 2018-03-10 23:59 Akira Yokosawa
2018-03-11 1:40 ` Akira Yokosawa
0 siblings, 1 reply; 4+ messages in thread
From: Akira Yokosawa @ 2018-03-10 23:59 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
From 9a2d254007e243e39ec9ee13319f1d25d882fea1 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 11 Mar 2018 07:49:24 +0900
Subject: [PATCH] Add poor person's slanted shape for 'newtxtext' font
The "newtx" font package switched to TeX Gyre Termes fonts in
version 1.4 (released in TeX Live 2014). It lacks slanted shape.
In perfbook, slanted shape is not used in LaTeX sources at the
moment, but is used in page headers generated in the "book" document
style.
The switch of Times Roman clone font to "newtxtext" font made in
commit b4ad25eae241 ("future/QC: Use upright glyph for math constant
and descriptive suffix") had a side-effect of page headers to
be rendered in italic font when TeX Live 2014 or later is used.
Most notably, chapter/section numbers in page headers are rendered
upright.
This commit adds poor person's slanted shapes for roman fonts
as suggested at https://tex.stackexchange.com/questions/247539/.
This change should not have visual difference on TeX Live 2013.
Fixes: b4ad25eae241 ("future/QC: Use upright glyph for math constant and descriptive suffix")
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
perfbook.tex | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/perfbook.tex b/perfbook.tex
index efb6750..ce0c3a0 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -12,6 +12,12 @@
\renewcommand*\ttdefault{lmtt}
%msfontstub
+% Poor person's slanted shape for roman --- newtxtext lacks slanted shape
+\AtBeginDocument{%
+ \DeclareFontShape{\encodingdefault}{\rmdefault}{m}{sl}{<-> ptmro7t}{}%
+ \DeclareFontShape{\encodingdefault}{\rmdefault}{b}{sl}{<-> ptmbo7t}{}%
+ \DeclareFontShape{\encodingdefault}{\rmdefault}{bx}{sl}{<->ssub * ptm/b/sl}{}%
+}
% Improves the text layout
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Add poor person's slanted shape for 'newtxtext' font
2018-03-10 23:59 [PATCH] Add poor person's slanted shape for 'newtxtext' font Akira Yokosawa
@ 2018-03-11 1:40 ` Akira Yokosawa
2018-03-11 3:24 ` [PATCH v2] " Akira Yokosawa
0 siblings, 1 reply; 4+ messages in thread
From: Akira Yokosawa @ 2018-03-11 1:40 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
On 2018/03/11 8:59, Akira Yokosawa wrote:
> From 9a2d254007e243e39ec9ee13319f1d25d882fea1 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sun, 11 Mar 2018 07:49:24 +0900
> Subject: [PATCH] Add poor person's slanted shape for 'newtxtext' font
>
> The "newtx" font package switched to TeX Gyre Termes fonts in
> version 1.4 (released in TeX Live 2014). It lacks slanted shape.
>
> In perfbook, slanted shape is not used in LaTeX sources at the
> moment, but is used in page headers generated in the "book" document
> style.
>
> The switch of Times Roman clone font to "newtxtext" font made in
> commit b4ad25eae241 ("future/QC: Use upright glyph for math constant
> and descriptive suffix") had a side-effect of page headers to
> be rendered in italic font when TeX Live 2014 or later is used.
> Most notably, chapter/section numbers in page headers are rendered
> upright.
>
> This commit adds poor person's slanted shapes for roman fonts
> as suggested at https://tex.stackexchange.com/questions/247539/.
>
> This change should not have visual difference on TeX Live 2013.
>
> Fixes: b4ad25eae241 ("future/QC: Use upright glyph for math constant and descriptive suffix")
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Paul, please ignore this patch.
I've just observed a build error on TeX Live 2017 after this change.
Sorry for the noise.
Thanks, Akira
> ---
> perfbook.tex | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/perfbook.tex b/perfbook.tex
> index efb6750..ce0c3a0 100644
> --- a/perfbook.tex
> +++ b/perfbook.tex
> @@ -12,6 +12,12 @@
> \renewcommand*\ttdefault{lmtt}
> %msfontstub
>
> +% Poor person's slanted shape for roman --- newtxtext lacks slanted shape
> +\AtBeginDocument{%
> + \DeclareFontShape{\encodingdefault}{\rmdefault}{m}{sl}{<-> ptmro7t}{}%
> + \DeclareFontShape{\encodingdefault}{\rmdefault}{b}{sl}{<-> ptmbo7t}{}%
> + \DeclareFontShape{\encodingdefault}{\rmdefault}{bx}{sl}{<->ssub * ptm/b/sl}{}%
> +}
> % Improves the text layout
> \usepackage{microtype}
> \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2] Add poor person's slanted shape for 'newtxtext' font
2018-03-11 1:40 ` Akira Yokosawa
@ 2018-03-11 3:24 ` Akira Yokosawa
2018-03-12 2:09 ` Paul E. McKenney
0 siblings, 1 reply; 4+ messages in thread
From: Akira Yokosawa @ 2018-03-11 3:24 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa
From 12a6abc21cd570f4fcf371d79d983f43d673b67d Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 11 Mar 2018 07:49:24 +0900
Subject: [PATCH v2] Add poor person's slanted shape for 'newtxtext' font
The "newtx" font package switched to TeX Gyre Termes fonts in
version 1.4 (released in TeX Live 2014). It lacks slanted shape.
In perfbook, slanted shape is not used in LaTeX sources at the
moment, but is used in page headers generated in the "book" document
class.
The change of Times Roman clone font to "newtxtext" font made in
commit b4ad25eae241 ("future/QC: Use upright glyph for math constant
and descriptive suffix") had a side-effect of page headers to
be rendered in italic font when TeX Live 2014 or later is used.
Most notably, chapter/section numbers in page headers are rendered
upright.
This commit adds poor person's slanted shapes for roman fonts
as suggested in https://tex.stackexchange.com/questions/247539/.
This change doesn't have visual effect on TeX Live 2013.
Fixes: b4ad25eae241 ("future/QC: Use upright glyph for math constant and descriptive suffix")
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
Change in v2:
Moved the definitions into the "else" clause of \IfSansSerif to avoid
conflict with the up-to-date version of "newtxsf" math font package in
target "1csf".
NOTE 1: Target "1csf" does not affected by the lack of slanted shape in
roman font.
NOTE 2: Target "1csf" doesn't build on TeX Live 2013.
"newtxsf" on TeX Live 2015/debian or Tex Live 2016 on Fedora 26/27 does
not conflict in v1 of this patch.
You may need to install newtxsf v1.05 [1] to see the conflict and
the resolution in v2.
[1]: https://www.ctan.org/pkg/newtxsf
Thanks, Akira
--
perfbook.tex | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/perfbook.tex b/perfbook.tex
index efb6750..fe9421e 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -95,6 +95,12 @@
\usepackage[slantedGreek,scaled=.96]{newtxsf}
}{
\usepackage[slantedGreek]{newtxmath} % math package to be used with newtxtext
+% Poor person's slanted shape for roman --- newtxtext lacks slanted shape
+\AtBeginDocument{%
+ \DeclareFontShape{\encodingdefault}{\rmdefault}{m}{sl}{<-> ptmro7t}{}%
+ \DeclareFontShape{\encodingdefault}{\rmdefault}{b}{sl}{<-> ptmbo7t}{}%
+ \DeclareFontShape{\encodingdefault}{\rmdefault}{bx}{sl}{<->ssub * ptm/b/sl}{}%
+}
}
\newcommand{\LstLineNo}{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] Add poor person's slanted shape for 'newtxtext' font
2018-03-11 3:24 ` [PATCH v2] " Akira Yokosawa
@ 2018-03-12 2:09 ` Paul E. McKenney
0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2018-03-12 2:09 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: perfbook
On Sun, Mar 11, 2018 at 12:24:58PM +0900, Akira Yokosawa wrote:
> >From 12a6abc21cd570f4fcf371d79d983f43d673b67d Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sun, 11 Mar 2018 07:49:24 +0900
> Subject: [PATCH v2] Add poor person's slanted shape for 'newtxtext' font
>
> The "newtx" font package switched to TeX Gyre Termes fonts in
> version 1.4 (released in TeX Live 2014). It lacks slanted shape.
>
> In perfbook, slanted shape is not used in LaTeX sources at the
> moment, but is used in page headers generated in the "book" document
> class.
>
> The change of Times Roman clone font to "newtxtext" font made in
> commit b4ad25eae241 ("future/QC: Use upright glyph for math constant
> and descriptive suffix") had a side-effect of page headers to
> be rendered in italic font when TeX Live 2014 or later is used.
> Most notably, chapter/section numbers in page headers are rendered
> upright.
>
> This commit adds poor person's slanted shapes for roman fonts
> as suggested in https://tex.stackexchange.com/questions/247539/.
>
> This change doesn't have visual effect on TeX Live 2013.
>
> Fixes: b4ad25eae241 ("future/QC: Use upright glyph for math constant and descriptive suffix")
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Applied, thank you!
Thanx, Paul
> ---
> Change in v2:
>
> Moved the definitions into the "else" clause of \IfSansSerif to avoid
> conflict with the up-to-date version of "newtxsf" math font package in
> target "1csf".
>
> NOTE 1: Target "1csf" does not affected by the lack of slanted shape in
> roman font.
>
> NOTE 2: Target "1csf" doesn't build on TeX Live 2013.
> "newtxsf" on TeX Live 2015/debian or Tex Live 2016 on Fedora 26/27 does
> not conflict in v1 of this patch.
> You may need to install newtxsf v1.05 [1] to see the conflict and
> the resolution in v2.
>
> [1]: https://www.ctan.org/pkg/newtxsf
>
> Thanks, Akira
> --
> perfbook.tex | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/perfbook.tex b/perfbook.tex
> index efb6750..fe9421e 100644
> --- a/perfbook.tex
> +++ b/perfbook.tex
> @@ -95,6 +95,12 @@
> \usepackage[slantedGreek,scaled=.96]{newtxsf}
> }{
> \usepackage[slantedGreek]{newtxmath} % math package to be used with newtxtext
> +% Poor person's slanted shape for roman --- newtxtext lacks slanted shape
> +\AtBeginDocument{%
> + \DeclareFontShape{\encodingdefault}{\rmdefault}{m}{sl}{<-> ptmro7t}{}%
> + \DeclareFontShape{\encodingdefault}{\rmdefault}{b}{sl}{<-> ptmbo7t}{}%
> + \DeclareFontShape{\encodingdefault}{\rmdefault}{bx}{sl}{<->ssub * ptm/b/sl}{}%
> +}
> }
>
> \newcommand{\LstLineNo}{\makebox[5ex][r]{\arabic{VerbboxLineNo}\hspace{2ex}}}
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-12 2:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-10 23:59 [PATCH] Add poor person's slanted shape for 'newtxtext' font Akira Yokosawa
2018-03-11 1:40 ` Akira Yokosawa
2018-03-11 3:24 ` [PATCH v2] " Akira Yokosawa
2018-03-12 2:09 ` 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.