248 lines
4.5 KiB
HTML
248 lines
4.5 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>What are the font
|
|
conventions?</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Man Page Howto"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Should I distribute source
|
|
and/or already formatted documentation?"
|
|
HREF="q7.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Polishing your man
|
|
page"
|
|
HREF="q9.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Man Page Howto</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="q7.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="q9.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="Q8"
|
|
></A
|
|
>8. What are the font
|
|
conventions?</H1
|
|
><P
|
|
>First of all: don't use direct font operators like
|
|
<TT
|
|
CLASS="LITERAL"
|
|
>\fB</TT
|
|
>, <TT
|
|
CLASS="LITERAL"
|
|
>\fP</TT
|
|
> etc. Use macros
|
|
which take arguments. This way you avoid a common glitch:
|
|
forgetting the font change at the end of the word and having the
|
|
bold or italic extend up to the next font change. Believe me, it
|
|
happens more often than you think. The <TT
|
|
CLASS="LITERAL"
|
|
>tmac.an</TT
|
|
>
|
|
macros provide the following type faces:</P
|
|
><P
|
|
>.B Bold</P
|
|
><P
|
|
>.BI Bold alternating with italics</P
|
|
><P
|
|
>.BR Bold alternating with Roman</P
|
|
><P
|
|
>.I Italics</P
|
|
><P
|
|
>.IB Italics alternating with bold</P
|
|
><P
|
|
>.IR Italics alternating with Roman</P
|
|
><P
|
|
>.RB Roman alternating with bold</P
|
|
><P
|
|
>.RI Roman alternating with italics</P
|
|
><P
|
|
>.SM Small (scaled 9/10 of the regular size)</P
|
|
><P
|
|
>.SB Small bold (<EM
|
|
>not</EM
|
|
> small alternating
|
|
with bold)</P
|
|
><P
|
|
>X alternating with Y means that the odd arguments are typeset
|
|
in X while the even arguments are typeset in Y. For example</P
|
|
><P
|
|
>.BI "Arg 1 is Bold, " "Arg 2 is Italics,
|
|
" "and Bold, " "and Italics."</P
|
|
><P
|
|
>The double quotes are needed to include white space into an
|
|
argument; without them, no white space appears between the
|
|
alternating typefaces. In fact, you'll only need the macros for
|
|
alternating typefaces in cases where you <EM
|
|
>want</EM
|
|
>
|
|
to avoid white space between typeface changes. So much for
|
|
what's available. Here's how you should make use of the
|
|
different typefaces: (portions shamelessly stolen from
|
|
man(7))</P
|
|
><P
|
|
>Although there are many arbitrary conventions for man pages
|
|
in the UNIX world, the existence of several hundred Linux-specific
|
|
man pages defines our standards: For functions, the arguments are
|
|
always specified using italics, even in the SYNOPSIS section, where
|
|
the rest of the function is specified in bold:</P
|
|
><P
|
|
>.BI "myfunction(int " argc ", char **"
|
|
argv );</P
|
|
><P
|
|
>Filenames are always in italics, except in the SYNOPSIS
|
|
section, where included files are in bold. So you should use</P
|
|
><P
|
|
>.I /usr/include/stdio.h</P
|
|
><P
|
|
>and</P
|
|
><P
|
|
>.B #include <stdio.h></P
|
|
><P
|
|
>Special macros, which are usually in upper case, are in
|
|
bold:</P
|
|
><P
|
|
>.B MAXINT</P
|
|
><P
|
|
>When enumerating a list of error codes, the codes are in
|
|
bold. This list usually uses the .TP (paragraph with hanging tag)
|
|
macro as follows:</P
|
|
><P
|
|
>.TP.B EBADF.I fd is not a valid file descriptor..TP.B
|
|
EINVAL.I fd is unsuitable for reading</P
|
|
><P
|
|
>Any reference to another man page (or to the subject of the
|
|
current man page) is in bold. If the manual section number is
|
|
given, it is given in roman, without any spaces:</P
|
|
><P
|
|
>.BR man (7)</P
|
|
><P
|
|
>Acronyms look best when typeset in small type face. So I
|
|
recommend</P
|
|
><P
|
|
>.SM UNIX</P
|
|
><P
|
|
>.SM ASCII</P
|
|
><P
|
|
>.SM TAB</P
|
|
><P
|
|
>.SM NFS</P
|
|
><P
|
|
>.SM LALR(1)</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="q7.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="q9.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Should I distribute source
|
|
and/or already formatted documentation?</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Polishing your man
|
|
page</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |