Imported Upstream version 1.22.4
[platform/upstream/groff.git] / contrib / mom / examples / README.txt
1     -*- mode: text; coding: utf-8; -*-
2     Copyright (C) 2004-2018 Free Software Foundation, Inc.
3
4     Copying and distribution of this file, with or without modification,
5     are permitted in any medium without royalty provided the copyright
6     notice and this notice are preserved.
7
8 ========================================================================
9
10 The files in this directory show mom in action.
11
12 If you have downloaded and untarrred a version of mom from her
13 homepage, you'll see that none of the example files come with
14 corresponding PDF (.pdf) files, as they do with pre-compiled
15 versions of groff, or groff built from source.
16
17 I haven't included the PDF output because I want to keep the mom
18 archive as lean as possible.  To view the PDF output, process the
19 files with pdfmom(1).
20
21     pdfmom mom-pdf.mom > mom-pdf.pdf
22     pdfmom sample_docs.mom > sample_docs.pdf
23     pdfmom slide-demo.mom > slide-demo.pdf
24     pdfmom -k letter.mom > letter.pdf
25     pdfmom -k mon_premier_doc.mom > mon_premier_doc.pdf
26     pdfmom -k typesetting.mom > typesetting.pdf
27
28 The files themselves
29 --------------------
30
31 All are set up for US letter papersize except mom-pdf.mom and
32 mon_premier_doc.mom, which uses A4.
33
34 ***typesetting.mom**
35
36 The file, typesetting.mom, demonstrates the use of typesetting tabs,
37 string tabs, line padding, multi-columns and various indent styles,
38 as well as some of the refinements and fine-tuning available via
39 macros and inline escapes.
40
41 Because the file also demonstrates a cutaround using a small picture
42 of everybody's favourite mascot, Tux, the PDF file, penguin.pdf has
43 been included in the directory.
44
45 ***sample_docs.mom***
46
47 The file, sample_docs.mom, shows examples of three of the document
48 styles available with the mom's document processing macros, as well
49 as demonstrating the use of COLLATE.  It also shows off some of
50 mom's PDF features, including a PDF outline and clickable links in
51 the printable Table of Contents.
52
53 The last sample, set in 2 columns, demonstrates mom's flexibility
54 when it comes to designing documents.
55
56 The PRINTSTYLE of this file is TYPESET, to give you an idea of mom's
57 default behaviour when typesetting a document.
58
59 If you'd like to see how mom handles exactly the same file when the
60 PRINTSTYLE is TYPEWRITE (ie typewritten, double-spaced), simply
61 change .PRINTSTYLE TYPESET to .PRINTSTYLE TYPEWRITE near the top of
62 the file.
63
64 ***letter.mom***
65
66 This is just the tutorial example from the momdocs, ready for
67 previewing.
68
69 ***slide-demo.mom***
70
71 The file, slide-demo.mom, demonstrates a slide presentation with
72 PAUSE and TRANSITION effects.  The .pdf created by pdfmom should be
73 opened in Presentation Mode in a PDF reader (e.g. Okular, Evince,
74 Acroread).  Note that not all transition effects are available in
75 all PDF readers.
76
77 ***mon_premier_doc.mom***
78
79 The file, mon_premier_doc.mom, is a simple example in French showing
80 the use of common elements: section headings, paragraphs, lists, table
81 of contents and clickable links.  It should be generated with option -k
82 as there are some accented letters.
83
84 A few settings were also changed for this French document:
85 ATTRIBUTE_STRING is used to replace "by" by "par" in the document
86 header (where the title and the author are displayed).
87 TOC_HEADER_STRING is used to modity the Table of Content title to
88 "Table des matières". And finally, INDENT_FIRST_PARAS is used to
89 indent the first paragraph of a section -- this is the usual
90 convention in French typesetting.
91
92 ***mom-pdf.mom***
93
94 The manual, Producing PDFs with mom and groff.
95
96 ***mom.vim***
97
98 The vim syntax highlighting rules are based on those provided by
99 Christian V. J. Brüssow (cvjb@cvjb.de).  Copy mom.vim file to your
100 ~/.vim/syntax directory; then, if your vim isn't already set up to
101 do so, enable mom syntax highlighting with
102
103   :syntax enable
104 or
105   :syntax on
106
107 ***elvis_syntax.new***
108
109 For those who use the vi clone, elvis, you can paste this file into
110 your elvis.syn.  Provided your mom documents have the extension
111 .mom, they'll come out with colorized syntax highlighting.  The
112 rules in elvis_syntax aren't exhaustive, but they go a long way to
113 making mom files more readable.