Linux cli command typog-grep

➡ A Linux man page (short for manual page) is a form of software documentation found on Linux and Unix-like operating systems. This man-page explains the command typog-grep and provides detailed information about the command typog-grep, system calls, library functions, and other aspects of the system, including usage, options, and examples of _. You can access this man page by typing man followed by the typog-grep.

NAME 🖥️ typog-grep 🖥️

grep - grep for typog-inspect elements in LaTeX log files

SYNOPSIS

typog-grep -a|–all|–any [OPTION…] LOG-FILE…

typog-grep [OPTION…] REGEXP LOG-FILE…

The first form shows all <typog-inspect id="ID" ...> elements in LOG-FILE.

The second form shows the contents of <typog-inspect id="ID" ...> elements whose IDs match REGEXP in LOG-FILE.

If no LOG-FILE is given read from stdin. The filename - is synonymous to stdin.

DESCRIPTION

typog-grep is a tailored post-processor for LaTeX log files and the typoginspect environment as provided by package typog. It shares more with the venerable sgrep <https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html> than with POSIX grep <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html>.

The LaTeX user brackets her text in

egin{typoginspect}{ID} Text and code to investigate nd{typoginspect}

where ID is used to identify one or more bracketed snippets. ID does not have to be unique. The REGEXP mechanism makes it easy to select groups of related IDs if they are named accordingly.

In LOG-FILE the environment shows up, packed with tracing information, as

<typog-inspect id=“ID” job=“JOB-NAME” line=“LINE-NUMBER” page=“PAGE-NUMBER”> Trace Data </typog-inspect>

where all the capital-letter sequences are meta-variables and in particular JOB-NAME is the expansion of \jobname, LINE-NUMBER is the LaTeX source file line number of the beginning of the typoginspect environment, and PAGE-NUMBER is the page where the output of Text and code to investigate occurs.

typog-grep reveals the contents of LOG-FILE between <typog-inspect id="ID" ...> and </typog-inspect> excluding the XML-tags. Access the JOB-NAME, LINE-NUMBER, and PAGE-NUMBER with the commandline options –job-name, –line-number, and –page-number, respectively. Use –id to show the name of the IDs that matched REGEXP.

typoginspect environments can be nested. typog-grep respects the nesting, i.e., if the ID of the nested environment does not match REGEXP it will not be included in the program’s output.

OPTIONS

The list of options is sorted by the names of the long options.

-a, –all, –any
ID-discovery mode: Show all typog-inspect elements independent of any matching patterns.

–color, colour WHEN
Colorize specific log contents for the matching ids. The argument WHEN determines when to apply color: always, never, or auto. The setting auto checks whether standard output has been redirected. This is the default.

-C, –config KEY=VALUE[:KEY=VALUE[:…]]
Set one or more configuration KEY to VALUE pairs. See Sec. CONFIGURATION below for a description of all available configuration items. Use option –show-config to display the default configuration.

–debug
Turn on debug output on stderr.

-h, –help
Display brief help then exit.

-i, –[no-]id
Print the actual id name that matched REGEXP. Control the appearance of the matching id with configuration item id-heading.

-y, –[no-]ignore-case
Match ids while ignoring case distinctions in patterns and data.

-j, –[no-]job-name
Print the \jobname that tex associated with the input file.

-n, –[no-]line-number
Print the line number where the typoginspect environment was encountered in the LaTeX source file.

-N, –[no-]log-line-number
Print the line number of the log-file where the current line was encountered.

-p, –[no-]page-number
Print page number where the contents of the typoginspect environment starts in the typeset document.

-P, –[no-]pager
Redirect output from stdout to the configured pager.

–show-config
Show the default configuration and exit.

-V, –version
Show version information and exit.

-w, –[no-]word-regexp
Match only whole words.

CONFIGURATION

“id-format”=FORMAT
Control the FORMAT for printing matching ids in inline-mode, where FORMAT is passed to Perl’s printf. Default: %s:.

“id-heading”=0|1
Choose between printing the matching ids with option –id: Inline (0) or heading before the matching data (1). Default: 0.

“id-heading-format”=FORMAT
Control the FORMAT for printing matching ids in heading-mode, where FORMAT is passed to Perl’s printf. Default: --> %s <--.

“id-indent”=INDENT
Indentation of nested typog-inspect tags. Only used in ``discovery’’ mode (first form), i.e., if –all is active. Default: 8.

“id-max-length”=MAXIMUM-LENGTH
Set the maximum length of a matching id for printing. It a matching id exceeds this length it will be truncated and the last three characters (short of MAXIMUM-LENGTH) will be replaced by dots. Default: 40.

“line-number-format”=FORMAT
Control the FORMAT for printing TeX source line numbers, where FORMAT is passed to Perl’s printf. Default: %5d.

“log-line-number-format”=FORMAT
Control the FORMAT for printing log line numbers, where FORMAT is passed to Perl’s printf. Default: %6d.

“page-number-format”=FORMAT
Control the FORMAT for printing page numbers, where FORMAT is passed to Perl’s printf. Default: [%3d].

“pager”=PAGER
Name of pager application to pipe output into if run with option –pager. Default: less.

“pager-flags”=FLAGS
Pass FLAGS to PAGER. Default: --quit-if-one-screen.

Color Configuration
For the syntax of the color specifications consult the manual page of Term::ANSIColor(pm).

“file-header-color”
Color of the filename header.

“fill-state-color”
Color of the messages that report ``Underfull hbox’’ or ``Overfull hbox’'.

“first-vbox-color”
Color of the first vbox on a page.

“font-spec-color”
Color of font specifications.

“horizontal-break-candidate-color”
Color of lines with horizontal-breakpoint candidates @.

“horizontal-breakpoint-color”
Color of lines with horizontal breakpoints @@.

“id-color”
Color of matching ids when printed inline.

“id-heading-color”
Color of matching ids when printed in heading form.

“line-break-pass-color”
Color of the lines showing which pass (e.g., @firstpass) of the line-breaking algorithm is active.

“line-number-color”
Color of TeX-source-file line numbers.

“log-line-number-color”
Color of log-file line numbers.

“math-color”
Color used for math expressions including their font specs.

“page-number-color”
Color of page numbers of the final output.

“tightness-color”
Color of lines with Tight/Loose hbox reports.

“vertical-breakpoint-color”
Color of possible vertical breakpoints.

Brief summary of colors and attributes

Foreground Color
black, red, green, yellow, blue, magenta, cyan, white, Prefix with bright_ for high-intensity or bold foreground.

Foreground Grey
grey0, …, grey23

Background Color
on_black, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white Replace on_ with on_bright_ for high-intensity or bold background.

Background Grey
on_grey0, …, on_grey23

Text Attribute
bold, dark, italic, underline, reverse

EXIT STATUS

The exit status is 0 if at least one ID matched REGEXP, 1 if no ID matched REGEXP, and 2 if an error occurred.

SEE ALSO

grep(1), printf(3), Term::ANSIColor(pm)

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░