groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two questons: Norwgegian characters and space when switching typefac


From: John Gardner
Subject: Re: Two questons: Norwgegian characters and space when switching typeface
Date: Mon, 4 Nov 2019 21:07:04 +1100

> In *roff languages

Just to clarify, Roff and TeX are similar in that their macro packages are
sometimes regarded as separate languages, especially if the macros
themselves are written like a DSL of sorts. mdoc(7) is a noteworthy example
of this.

When learning to use Groff for the first time, my biggest hurdle was
figuring out where/what everything was. I went some time believing man(7)
macros were a built-in part of the language. You can liken Roff and its
macro-packages to TeX and LaTeX — the former is low-level and impractical
for everyday use, whereas the latter is a higher-level abstraction intended
for commonplace usage.


On Mon, 4 Nov 2019 at 20:48, G. Branden Robinson <
address@hidden> wrote:

> At 2019-11-04T08:08:57+0100, Xianwen Chen (陈贤文) wrote:
> > Dear list,
>
> Hi Xianwen!
>
> > Today is my second day trying out groff.
>
> Welcome aboard!
>
> > I have over a decade experiences with LaTeX and a few years
> > experiences with markdown.
>
> If you're familiar with basic concepts of typesetting you should adapt
> to groff pretty easily.
>
> > I have two questions.
> >
> > First question is on Norwegian characters: ø, å, and æ. It seems that
> > I cannot type them as plain text, because the produced PDF file gives
> > funny output.
>
> The short answer is that you need to pass groff (or troff, or nroff) the
> "-k" flag to have the "preconv" command operate on the input.
>
> > Second question is on the space when switching typefaces.
> >
> > Here is an example:
> >
> > (See for example,
> > I. ABC
> > )
>
> You're getting a space here because groff normally interprets every line
> break as a word break.
>
> There are a couple of ways around that but first I think we need some
> clarification on what you're trying to do.
>
> Are you trying to set "ABC" in italics using a macro package like man or
> ms?  If so, you want ".I", not "I.".
>
> In *roff languages, a line beginning with a dot (".") indicates a
> request or a macro call.  Dots are not otherwise special (except for
> end-of-sentence detection).
>
> > Now, this will produce a space between ABC and ). Is there some way
> > that I can get rid of the space there?
>
> Definitely.  In the man macro package for man pages, you'd do this:
>
> (See, for example,
> .IR ABC ).
>
> The groff_man(7) man page has more on this.
>
> I've attached a document that renders fine for me with Norwegian
> characters (and without using character escapes for that purpose).  It
> contains instructions for using itself embedded within.
>
> Regards,
> Branden
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]