{
    "content": [
        {
            "type": "text",
            "text": "# ptx(1) (man)\n\n**Summary:** ptx - produce a permuted index of file contents\n\n**Synopsis:** ptx [OPTION]... [INPUT]...   (without -G)\nptx -G [OPTION]... [INPUT [OUTPUT]]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -A | --auto-reference | — | output automatically generated references |\n| -G | --traditional | — | behave more like System V 'ptx' |\n| -F | --flag-truncation | — | use STRING for flagging line truncations. The default is '/' |\n| -M | --macro-name | — | macro name to use instead of 'xx' |\n| -O | --format | — | generate output as roff directives |\n| -R | --right-side-refs | — | put references at right, not counted in -w |\n| -S | --sentence-regexp | — | for end of lines or end of sentences |\n| -T | --format | — | generate output as TeX directives |\n| -W | --word-regexp | — | use REGEXP to match each keyword |\n| -b | --break-file | — | word break characters in this FILE |\n| -f | --ignore-case | — | fold lower case to upper case for sorting |\n| -g | --gap-size | — | gap size in columns between output fields |\n| -i | --ignore-file | — | read ignore word list from FILE |\n| -o | --only-file | — | read only word list from this FILE |\n| -r | --references | — | first field of each line is a reference |\n| -t | --typeset-mode | — |  |\n| -w | --width | — | output width in columns, reference excluded --help display this help and exit |\n| — | --version | — | output version information and exit |\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (6 lines) — 18 subsections\n  - -A --auto-reference (2 lines)\n  - -G --traditional (2 lines)\n  - -F --flag-truncation (2 lines)\n  - -M --macro-name (2 lines)\n  - -O --format (2 lines)\n  - -R --right-side-refs (2 lines)\n  - -S --sentence-regexp (2 lines)\n  - -T --format (2 lines)\n  - -W --word-regexp (2 lines)\n  - -b --break-file (2 lines)\n  - -f --ignore-case (2 lines)\n  - -g --gap-size (2 lines)\n  - -i --ignore-file (2 lines)\n  - -o --only-file (2 lines)\n  - -r --references (2 lines)\n  - -t --typeset-mode (1 lines)\n  - -w --width (4 lines)\n  - --version (2 lines)\n- **AUTHOR** (2 lines)\n- **REPORTING BUGS** (3 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (6 lines)\n\n## Full Content\n\n### NAME\n\nptx - produce a permuted index of file contents\n\n### SYNOPSIS\n\nptx [OPTION]... [INPUT]...   (without -G)\nptx -G [OPTION]... [INPUT [OUTPUT]]\n\n### DESCRIPTION\n\nOutput a permuted index, including context, of the words in the input files.\n\nWith no FILE, or when FILE is -, read standard input.\n\nMandatory arguments to long options are mandatory for short options too.\n\n#### -A --auto-reference\n\noutput automatically generated references\n\n#### -G --traditional\n\nbehave more like System V 'ptx'\n\n#### -F --flag-truncation\n\nuse STRING for flagging line truncations.  The default is '/'\n\n#### -M --macro-name\n\nmacro name to use instead of 'xx'\n\n#### -O --format\n\ngenerate output as roff directives\n\n#### -R --right-side-refs\n\nput references at right, not counted in -w\n\n#### -S --sentence-regexp\n\nfor end of lines or end of sentences\n\n#### -T --format\n\ngenerate output as TeX directives\n\n#### -W --word-regexp\n\nuse REGEXP to match each keyword\n\n#### -b --break-file\n\nword break characters in this FILE\n\n#### -f --ignore-case\n\nfold lower case to upper case for sorting\n\n#### -g --gap-size\n\ngap size in columns between output fields\n\n#### -i --ignore-file\n\nread ignore word list from FILE\n\n#### -o --only-file\n\nread only word list from this FILE\n\n#### -r --references\n\nfirst field of each line is a reference\n\n#### -t --typeset-mode\n\n#### -w --width\n\noutput width in columns, reference excluded\n\n--help display this help and exit\n\n#### --version\n\noutput version information and exit\n\n### AUTHOR\n\nWritten by F. Pinard.\n\n### REPORTING BUGS\n\nGNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n\n### COPYRIGHT\n\nCopyright  ©  2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n\n### SEE ALSO\n\nFull documentation <https://www.gnu.org/software/coreutils/ptx>\nor available locally via: info '(coreutils) ptx invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                      PTX(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ptx",
        "section": "1",
        "mode": "man",
        "summary": "ptx - produce a permuted index of file contents",
        "synopsis": "ptx [OPTION]... [INPUT]...   (without -G)\nptx -G [OPTION]... [INPUT [OUTPUT]]",
        "flags": [
            {
                "flag": "-A",
                "long": "--auto-reference",
                "arg": null,
                "description": "output automatically generated references"
            },
            {
                "flag": "-G",
                "long": "--traditional",
                "arg": null,
                "description": "behave more like System V 'ptx'"
            },
            {
                "flag": "-F",
                "long": "--flag-truncation",
                "arg": null,
                "description": "use STRING for flagging line truncations. The default is '/'"
            },
            {
                "flag": "-M",
                "long": "--macro-name",
                "arg": null,
                "description": "macro name to use instead of 'xx'"
            },
            {
                "flag": "-O",
                "long": "--format",
                "arg": null,
                "description": "generate output as roff directives"
            },
            {
                "flag": "-R",
                "long": "--right-side-refs",
                "arg": null,
                "description": "put references at right, not counted in -w"
            },
            {
                "flag": "-S",
                "long": "--sentence-regexp",
                "arg": null,
                "description": "for end of lines or end of sentences"
            },
            {
                "flag": "-T",
                "long": "--format",
                "arg": null,
                "description": "generate output as TeX directives"
            },
            {
                "flag": "-W",
                "long": "--word-regexp",
                "arg": null,
                "description": "use REGEXP to match each keyword"
            },
            {
                "flag": "-b",
                "long": "--break-file",
                "arg": null,
                "description": "word break characters in this FILE"
            },
            {
                "flag": "-f",
                "long": "--ignore-case",
                "arg": null,
                "description": "fold lower case to upper case for sorting"
            },
            {
                "flag": "-g",
                "long": "--gap-size",
                "arg": null,
                "description": "gap size in columns between output fields"
            },
            {
                "flag": "-i",
                "long": "--ignore-file",
                "arg": null,
                "description": "read ignore word list from FILE"
            },
            {
                "flag": "-o",
                "long": "--only-file",
                "arg": null,
                "description": "read only word list from this FILE"
            },
            {
                "flag": "-r",
                "long": "--references",
                "arg": null,
                "description": "first field of each line is a reference"
            },
            {
                "flag": "-t",
                "long": "--typeset-mode",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-w",
                "long": "--width",
                "arg": null,
                "description": "output width in columns, reference excluded --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit"
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-A --auto-reference",
                        "lines": 2,
                        "flag": "-A",
                        "long": "--auto-reference"
                    },
                    {
                        "name": "-G --traditional",
                        "lines": 2,
                        "flag": "-G",
                        "long": "--traditional"
                    },
                    {
                        "name": "-F --flag-truncation",
                        "lines": 2,
                        "flag": "-F",
                        "long": "--flag-truncation"
                    },
                    {
                        "name": "-M --macro-name",
                        "lines": 2,
                        "flag": "-M",
                        "long": "--macro-name"
                    },
                    {
                        "name": "-O --format",
                        "lines": 2,
                        "flag": "-O",
                        "long": "--format"
                    },
                    {
                        "name": "-R --right-side-refs",
                        "lines": 2,
                        "flag": "-R",
                        "long": "--right-side-refs"
                    },
                    {
                        "name": "-S --sentence-regexp",
                        "lines": 2,
                        "flag": "-S",
                        "long": "--sentence-regexp"
                    },
                    {
                        "name": "-T --format",
                        "lines": 2,
                        "flag": "-T",
                        "long": "--format"
                    },
                    {
                        "name": "-W --word-regexp",
                        "lines": 2,
                        "flag": "-W",
                        "long": "--word-regexp"
                    },
                    {
                        "name": "-b --break-file",
                        "lines": 2,
                        "flag": "-b",
                        "long": "--break-file"
                    },
                    {
                        "name": "-f --ignore-case",
                        "lines": 2,
                        "flag": "-f",
                        "long": "--ignore-case"
                    },
                    {
                        "name": "-g --gap-size",
                        "lines": 2,
                        "flag": "-g",
                        "long": "--gap-size"
                    },
                    {
                        "name": "-i --ignore-file",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--ignore-file"
                    },
                    {
                        "name": "-o --only-file",
                        "lines": 2,
                        "flag": "-o",
                        "long": "--only-file"
                    },
                    {
                        "name": "-r --references",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--references"
                    },
                    {
                        "name": "-t --typeset-mode",
                        "lines": 1,
                        "flag": "-t",
                        "long": "--typeset-mode"
                    },
                    {
                        "name": "-w --width",
                        "lines": 4,
                        "flag": "-w",
                        "long": "--width"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}