NAME | SYNOPSIS | DESCRIPTION | OPTIONS | BUGS | AUTHORS | SEE ALSO | COLOPHON

GDIFFMK(1)                 General Commands Manual                GDIFFMK(1)

NAME         top

       gdiffmk - mark differences between groff/nroff/troff files

SYNOPSIS         top

       gdiffmk [-a addmark] [-c changemark] [-d deletemark] [ -D [-B]
               [-M mark1 mark2] ] [-x diffcmd] [--] [--help] [--version]
               file1 file2 [ output ]

DESCRIPTION         top

       gdiffmk compares two groff(1), nroff(1), or troff(1) documents, file1
       and file2, and creates an output which is file2 with added “margin
       character” (.mc) commands that indicate the differences.

       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 preprocessors.  See the BUGS section below.

OPTIONS         top

       -aaddmark
              Use the addmark for source lines not in file1 but present in
              file2.  Default: +.

       -B     By default, the deleted texts marked by the -D option end with
              an added troff break 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.

       -cchangemark
              Use the changemark for changed source lines.  Default: |.

       -ddeletemark
              Use the deletemark for deleted source lines.  Default: *.

       -D     Show the deleted portions from changed and deleted text.
              Default delimiting marks: [[ ... ]].

       -Mmark1 mark2
              Change the delimiting marks for the -D option.  It makes no
              sense to use this option without -D.

       -xdiffcmd
              Use the diffcmd command to perform the comparison of file1 and
              file2.  In particular, diffcmd should accept the GNU diff
              -Dname option.  Default: diff(1).

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

       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 -Dname option of GNU diff(1) to make a merged
       “#ifdef” output format.  It hasn't been tested whether other versions
       of diff(1) do support this option.  See also the -xdiffcmd option.

       Report bugs to ⟨bug-groff@gnu.org⟩.  Include a complete, self-con‐
       tained example that will allow the bug to be reproduced, and say
       which version of gdiffmk you are using.

AUTHORS         top

       gdiffmk was written and is maintained by Mike Bianchi ⟨MBianchi@
       Foveal.com⟩.

SEE ALSO         top

       groff(1), nroff(1), gtroff(1), diff(1)

COLOPHON         top

       This page is part of the groff (GNU troff) project.  Information
       about the project can be found at 
       ⟨http://www.gnu.org/software/groff/⟩.  If you have a bug report for
       this manual page, see ⟨http://www.gnu.org/software/groff/⟩.  This
       page was obtained from the project's upstream Git repository
       ⟨https://git.savannah.gnu.org/git/groff.git⟩ on 2018-02-02.  (At that
       time, the date of the most recent commit that was found in the repos‐
       itory was 2018-02-02.)  If you discover any rendering problems in
       this HTML version of the page, or you believe there is a better or
       more up-to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not part
       of the original manual page), send a mail to man-pages@man7.org

Groff Version 1.22.3          24 November 2017                    GDIFFMK(1)

Pages that refer to this page: groff(1)