1gdiffmk(1)                  General Commands Manual                 gdiffmk(1)
2
3
4

Name

6       gdiffmk - mark differences between groff/nroff/troff files
7

Synopsis

9       gdiffmk [-a add-mark] [-c change-mark] [-d delete-mark] [-x diff-
10               command] [-D [-B] [-M mark1 mark2]] [--] file1 file2 [output]
11
12       gdiffmk --help
13
14       gdiffmk --version
15

Description

17       gdiffmk compares two roff(7) documents, file1 and file2, and creates  a
18       roff document consisting of file2 with added margin character (.mc) re‐
19       quests indicating output lines that differ from file1.  If the file1 or
20       file2 argument is “-”, gdiffmk reads the standard input stream for that
21       input.  If the output operand is present, gdiffmk writes  output  to  a
22       file  of  that  name.  If it is “-” or absent, gdiffmk writes output to
23       the standard output stream.  “-” cannot be both an input and output op‐
24       erand.
25

Options

27       --help  displays  a  usage message and --version shows version informa‐
28       tion; both exit afterward.
29
30       -a add-mark
31              Use add-mark for source lines not in file1 but present in file2.
32              Default: “+”.
33
34       -B     By  default,  the deleted texts marked by the -D option end with
35              an added roff break request, .br, to ensure that  the  deletions
36              are  marked  properly.   This  is the only way to guarantee that
37              deletions and small changes get flagged.   This  option  directs
38              the program not to insert these breaks; it makes no sense to use
39              it without -D.
40
41       -c change-mark
42              Use change-mark for changed source lines.  Default: “|”.
43
44       -d delete-mark
45              Use the delete-mark for deleted source lines.  Default: “*”.
46
47       -D     Show the deleted portions from changed and deleted text.
48
49       -M mark1 mark2
50              Change the delimiting marks for the  -D  option.   It  makes  no
51              sense  to use this option without -D.  Default delimiting marks:
52[[” ... “]]”.
53
54       -x diff-command
55              Use the diff-command command to perform the comparison of  file1
56              and  file2.   In  particular, diff-command should accept the GNU
57              diff(1) -D option.  Default: diff.
58
59       --     Treat all subsequent arguments as file names, even if they begin
60              with “-”.
61

Bugs

63       The  output  is  not necessarily compatible with all macro packages and
64       all preprocessors.  A  workaround  that  often  overcomes  preprocessor
65       problems  is  to run gdiffmk on the output of all the preprocessors in‐
66       stead of the input source.
67
68       gdiffmk relies on the -D option of GNU diff to make a  merged  “#ifdef”
69       output  format.  Busybox diff is known to not support it.  Also see the
70       -x diff-command option.
71

Authors

73       gdiffmk was written by Mike Bianchi ⟨MBianchi@Foveal.com⟩, now retired.
74       It is maintained by the groff developers.
75

See also

77       groff(1), nroff(1), gtroff(1), roff(7), diff(1)
78
79
80
81groff 1.23.0                    2 November 2023                     gdiffmk(1)
Impressum