2011-09-29 10:23:09 +02:00
|
|
|
From d4f65688290a2362af9a66ecb3ae93beb591fbf9 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Michal Vyskocil <mvyskocil@suse.cz>
|
|
|
|
Date: Thu, 29 Sep 2011 09:19:01 +0200
|
|
|
|
Subject: [PATCH] documentation for the locale keyword
|
|
|
|
|
|
|
|
---
|
2019-01-04 15:23:17 +01:00
|
|
|
doc/groff.texi | 28 +++++++++++++++++++++++++++-
|
|
|
|
man/groff_font.5.man | 8 +++++++-
|
2011-09-29 10:23:09 +02:00
|
|
|
2 files changed, 34 insertions(+), 2 deletions(-)
|
|
|
|
|
2023-09-04 17:23:25 +02:00
|
|
|
Index: b/doc/groff.texi
|
|
|
|
===================================================================
|
2019-01-04 15:23:17 +01:00
|
|
|
--- a/doc/groff.texi
|
|
|
|
+++ b/doc/groff.texi
|
2023-09-04 17:23:25 +02:00
|
|
|
@@ -18404,10 +18404,36 @@ for points, and @samp{P} for picas. Exa
|
|
|
|
argument that starts with a digit is always treated as a custom paper
|
|
|
|
format.
|
|
|
|
|
|
|
|
-Finally, the argument can be a file name (e.g., @file{/etc/papersize});
|
|
|
|
+Or, the argument can be a file name (e.g., @file{/etc/papersize});
|
|
|
|
if the file can be opened, the first line is read and a match attempted
|
|
|
|
against each of the other forms. No comment syntax is supported.
|
2011-09-29 10:23:09 +02:00
|
|
|
|
|
|
|
+Finally, @var{string} can be a keyword @code{locale}. In this case groff will
|
|
|
|
+determine the default paper size from the country code of @code{LC_PAPER}. For
|
|
|
|
+most of combinations (including @code{LC_PAPER=C} or @code{POSIX}) a4 is used.
|
|
|
|
+In case of countries listed in Common Language Data Repository 2.0 of Unicode
|
|
|
|
+Consorcium - US (@code{US}), Canada (@code{CA}), Belize (@code{BZ}), Chile
|
|
|
|
+(@code{CL}), Colombia (@code{CO}), Costa Rica (@code{CR}), El Salvador
|
|
|
|
+(@code{SV}), Guatemala (@code{GT}), Panama (@code{PA}), Philippines
|
|
|
|
+(@code{PH}), Puerto Rico (@code{PR}), Mexico (@code{MX}), Nicaragua (@code{NI})
|
|
|
|
+and the Venezula (@code{VE}) size letter is used. The value of @code{LC_PAPER}
|
|
|
|
+is usually derived from @code{LANG} or @code{LC_ALL} and needs to be changed
|
|
|
|
+only if your main locale does not match the expected default paper size. Then
|
|
|
|
+you need to put the correct LC_PAPER variable into your environment.
|
|
|
|
+
|
|
|
|
+@example
|
|
|
|
+@group
|
|
|
|
+# the locale keyword is in devpts
|
|
|
|
+shell> grep papersize /usr/share/groff/current/font/devps/DESC
|
|
|
|
+papersize locale
|
|
|
|
+# default locale is US producing a letter papersize
|
|
|
|
+shell> locale | grep LC_PAPER
|
|
|
|
+LC_PAPER="en_US.UTF-8"
|
|
|
|
+# let's use a4 (German default) in this case
|
|
|
|
+shell> LC_PAPER=de_DE.UTF-8 groff -Tps ...
|
|
|
|
+@end group
|
|
|
|
+@end example
|
|
|
|
+
|
2023-09-04 17:23:25 +02:00
|
|
|
More than one argument can be specified;
|
|
|
|
each is scanned in turn and the first valid paper specification used.
|
2011-09-29 10:23:09 +02:00
|
|
|
|
2023-09-04 17:23:25 +02:00
|
|
|
Index: b/man/groff_font.5.man
|
|
|
|
===================================================================
|
2019-01-04 15:23:17 +01:00
|
|
|
--- a/man/groff_font.5.man
|
|
|
|
+++ b/man/groff_font.5.man
|
2023-09-04 17:23:25 +02:00
|
|
|
@@ -286,7 +286,7 @@ format.
|
2011-09-29 10:23:09 +02:00
|
|
|
.
|
2023-09-04 17:23:25 +02:00
|
|
|
.
|
|
|
|
.IP
|
2011-09-29 10:23:09 +02:00
|
|
|
-Finally,
|
2023-09-04 17:23:25 +02:00
|
|
|
+Or,
|
|
|
|
the argument can be a file name
|
|
|
|
(e.g.,
|
|
|
|
.IR /etc/papersize );
|
|
|
|
@@ -296,7 +296,13 @@ the first line is read and a match attem
|
|
|
|
No comment syntax is supported.
|
|
|
|
.
|
2011-09-29 10:23:09 +02:00
|
|
|
.
|
|
|
|
+Finally
|
|
|
|
+.I string
|
|
|
|
+can be a keyword locale, so
|
|
|
|
+.B groff
|
|
|
|
+will determine the papersize from system locale (LC_PAPER).
|
|
|
|
.IP
|
|
|
|
+.
|
|
|
|
More than one argument can be specified;
|
2023-09-04 17:23:25 +02:00
|
|
|
each is scanned in turn and the first valid paper specification used.
|
|
|
|
.
|