# gdiffmk(1) - man - phpMan

[GDIFFMK(1)](https://www.chedong.com/phpMan.php/man/GDIFFMK/1/markdown)                             General Commands Manual                            [GDIFFMK(1)](https://www.chedong.com/phpMan.php/man/GDIFFMK/1/markdown)



## NAME
       gdiffmk - mark differences between groff/nroff/troff files

## SYNOPSIS
       **gdiffmk** [**-a** _addmark_] [**-c** _changemark_] [**-d** _deletemark_] [**-D** [**-B**] [**-M** _mark1_ _mark2_]] [**-x** _diffcmd_]
               [**--**] _file1_ _file2_ [_output_]

### gdiffmk --help

### gdiffmk --version

## DESCRIPTION
       **gdiffmk** compares two [**groff**(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown), [**nroff**(1)](https://www.chedong.com/phpMan.php/man/nroff/1/markdown), or [**troff**(1)](https://www.chedong.com/phpMan.php/man/troff/1/markdown) documents, _file1_ and _file2_, and  creates
       an  output which is _file2_ with added “margin character” (.mc) commands that indicate the dif‐
       ferences.

       If the _output_ filename is present, the output is written there.  If it is  **-**  or  absent  the
       output is written to the standard output.

       If  the _file1_ or _file2_ argument is **-** the standard input is read for that input.  Clearly both
       cannot be **-**.

       Note that the output is not necessarily compatible with all macro packages and all preproces‐
       sors.  See section “Bugs” below.

## OPTIONS
### -a
              Use the _addmark_ for source lines not in _file1_ but present in _file2_.  Default: **+**.

### -B -D
              command, **.br**, to ensure that the deletions are marked properly.  This is the only  way
              to  guarantee  that  deletions and small changes get flagged.  This option directs the
              program not to insert these breaks; it makes no sense to use it without **-D**.

### -c
              Use the _changemark_ for changed source lines.  Default: **|**.

### -d
              Use the _deletemark_ for deleted source lines.  Default: *****.

### -D
              ... **]]**.

### -M
              Change  the  delimiting marks for the **-D** option.  It makes no sense to use this option
              without **-D**.

### -x
              Use the _diffcmd_ command to perform the comparison of _file1_ and _file2_.  In  particular,
              _diffcmd_ should accept the GNU **diff** **-D**_name_ option.  Default: [**diff**(1)](https://www.chedong.com/phpMan.php/man/diff/1/markdown).

       **--**     All the following arguments are treated as file names, even if they begin with **-**.

       **--help** Print a usage message on standard error output and exit.

### --version
              Print version information on the standard output and exit.

## BUGS
       The  output  is  not necessarily compatible with all macro packages and all preprocessors.  A
       workaround that is often successful against preprocessor problems is to run  **gdiffmk**  on  the
       output of all the preprocessors instead of the input source.

       **gdiffmk**  relies  on the **-D**_name_ option of GNU [**diff**(1)](https://www.chedong.com/phpMan.php/man/diff/1/markdown) to make a merged “#ifdef” output format.
       It hasn't been tested whether other versions of [**diff**(1)](https://www.chedong.com/phpMan.php/man/diff/1/markdown) do support this option.  See also the
### -x

## AUTHORS
       **gdiffmk** was written and is maintained by Mike Bianchi ⟨<MBianchi@Foveal.com>⟩.

## SEE ALSO
       [**groff**(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown), [**nroff**(1)](https://www.chedong.com/phpMan.php/man/nroff/1/markdown), [**gtroff**(1)](https://www.chedong.com/phpMan.php/man/gtroff/1/markdown), [**diff**(1)](https://www.chedong.com/phpMan.php/man/diff/1/markdown)



groff 1.22.4                                23 March 2022                                 [GDIFFMK(1)](https://www.chedong.com/phpMan.php/man/GDIFFMK/1/markdown)
