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 20:47:28 +1100

> 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.

Files which contain Unicode characters need to be pre-processed with
preconv(1).
You can achieve this by running groff(1) with the `-k` switch:

groff -Tpdf -k < input.roff > output.pdf


Some characters can also be specified by name; consult groff_char(7) to
learn more.

> Second question is on the space when switching typefaces.
>
> Now, this will produce a space between ABC and ). Is there some way
> that I can get rid of the space there?

To switch typefaces, you can also use an inline escape like `\f[I]` or `\fI
`:

\fI*ABC*\fP)


(In the example above, \fP means "Previous font", which restores whatever
typeface was in-use before switching to Italic).

Alternatively, you can use \c as Dale suggested above, but be aware this
feature is somewhat cryptic.
It means "\connect to next input text", which has the effect of loading the
next line into the `.I` macro whilst skipping the usual space added whilst
filling text lines.

If you're using the man(7) macros (which provide an `.I` macro for
italics), there's also a macro called `.IR` that alternates between Italic
and Roman:

.IR ABC ).

.RI ( ABC ).


The arguments are emitted without spaces between them, so the above example
will output something like:

*ABC*).
*(ABC*).


Hope that helps.
— John


On Mon, 4 Nov 2019 at 18:09, Xianwen Chen (陈贤文) <address@hidden>
wrote:

> Dear list,
>
> Today is my second day trying out groff. I have over a decade
> experiences with LaTeX and a few years experiences with markdown.
>
> 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.
>
> Second question is on the space when switching typefaces.
>
> Here is an example:
>
> (See for example,
> I. ABC
> )
>
> Now, this will produce a space between ABC and ). Is there some way
> that I can get rid of the space there?
>
> Yours sincerely,
> Xianwen
>
>


reply via email to

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