TEXPROF(1)

πŸ’– TEXPROF(1) β€” the manual page, but make it a group chat πŸ’–

okay bestie, gather round β€” this is the texprof page from the General Commands Manual. It's the TeX profiler. Yes, the profiler. Not the compiler. Not the typesetter. The one that ✨ times things ✨. Buckle up. πŸŽ€


🌸 NAME 🌸

texprof β€” a profiler for TeX source files. It's giving "stopwatch but make it TeX". ⏱️✨


πŸ¦‹ SYNOPSIS πŸ¦‹

texprof [options] [&format] [file|\commands]

so basically you hand it options, maybe a format, maybe a file, maybe a pile of commands. Slay. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

Run the TeX profiler on file, which usually creates file.dvi and file.tprof. If your file argument has no extension? .tex gets appended to it, no questions asked, that's just the vibe. 🫢

Instead of a file name, you can also hand it a list of TeX commands β€” and heads up, the first one has to start with a backslash (\), no cap. πŸ”₯

And if you pass a &format argument, the TeX profiler uses a different set of precompiled commands, the ones living inside format.fmt. ngl though, it's usually better to use the -fmt format option instead. Just saying. πŸ™ˆ


The TeX profiler is a version of TeX that measures the time TeX needs to execute individual input lines or macros. It writes all that collected data into a file with extension .tprof. Then a separate program, texprofile (go read texprofile(1)), is what actually displays the content of a .tprof file in a readable form. Two icons, one job. πŸ‘‘

The typical use of the TeX profiler is with pre generated formats. So:

  • texprof uses the equivalent of the plain TeX format πŸŽ€
  • latexprof uses the equivalent of the LaTeX format πŸ¦‹

And if you want to investigate the timing of macros targeted to pdftex or pdflatex, you can use pdftexprof or pdflatexprof. iconic honestly 🌈

The TeX profiler's handling of its command-line arguments is similar to that of the other TeX programs in the web2c implementation. Same family, same energy. πŸ’«


✨ OPTIONS ✨

This version of the TeX profiler understands the following command line options. Every single one, bestie, we're not skipping a single flag. πŸ’…

  • -cnf-line string β€” Parse string as a texmf.cnf configuration line. See the Kpathsea manual. πŸ“–
  • -etex β€” Enable the e-TeX extensions. Careful though: this option is only effective in combination with -ini. See etex(1). ⚑
  • -file-line-error β€” Print error messages in the form file:line:error, which is similar to the way many compilers format them. Very "we've all been there" of it. 😭
  • -no-file-line-error β€” Disable printing error messages in the file:line:error style. The off switch. 🚫
  • -fmt format β€” Use format as the name of the format to be used, instead of the name by which the TeX profiler was called or a %& line. 🌟
  • -help β€” Print help message and exit. 🫢
  • -ini β€” Start in INI mode, which is used to dump formats. INI mode can be used for typesetting, but no format is preloaded, and basic initializations like setting catcodes may be required. You've been warned. πŸ’€
  • -interaction mode β€” Sets the interaction mode. The mode can be either batchmode, nonstopmode, scrollmode, and errorstopmode. The meaning of these modes is the same as that of the corresponding \commands. πŸŽ›οΈ
  • -jobname name β€” Use name for the job name, instead of deriving it from the name of the input file. πŸ’–
  • -kpathsea-debug bitmask β€” Sets path searching debugging flags according to the bitmask. See the Kpathsea manual for details. πŸ”
  • -ltx β€” Enable the LaTeX extensions. Again: this option is only effective in combination with -ini. See latex(1). πŸ¦‹
  • -mktex fmt β€” Enable mktexfmt, where fmt must be either tex, tfm, fmt, or pk. βœ…
  • -no-mktex fmt β€” Disable mktexfmt, where fmt must be either tex, tfm, fmt, or pk. Same four, opposite energy. ❌
  • -output-directory directory β€” Write output files in directory instead of the current directory. Look up input files in directory first, then along the normal search path. πŸ“
  • -parse-first-line β€” If the first line of the main input file begins with %&, parse it to look for a dump name. πŸ•΅οΈ
  • -no-parse-first-line β€” Disable parsing of the first line of the main input file. πŸ™…
  • -pdf β€” Enable the simulation of common pdftex primitives. This option requires the -ini option and implies the -ltx option. See pdftex(1). πŸ“„
  • -prof β€” Enable profiling as soon as TeX enters the main loop. If tis option it not used, profiling needs to switched on using the \profileon primitive. Profiling can be switched of with the \profileoff primitive. ⏱️✨
  • -progname name β€” Pretend to be program name. This affects both the format used and the search paths. method acting fr fr 🎭
  • -version β€” Print version information and exit. πŸ’«

🌈 ENVIRONMENT 🌈

See the Kpathsea library documentation (e.g., the Path specifications node) for precise details of how the environment variables are used. And the kpsewhich utility can be used to query the values of the variables. iykyk πŸ”Ž

  • TEXMFOUTPUT β€” Normally, TeX puts its output files in the current directory. If any output file cannot be opened there, it tries to open it in the directory specified in the environment variable TEXMFOUTPUT. There is no default value for that variable. For example, if you say texprof paper and the current directory is not writable and TEXMFOUTPUT has the value /tmp, TeX attempts to create /tmp/paper.log , /tmp/paper.dvi , and /tmp/paper.tprof . TEXMFOUTPUT is also checked for input files, as TeX often generates files that need to be subsequently read; for input, no suffixes (such as ``.tex'') are added by default, the input name is simply checked as given. 🏠
  • TEXINPUTS β€” Search path for \input and \openin files. This normally starts with .''</cyan>, so that user files are found before system files. An empty path component will be replaced with the paths defined in the <cyan>`texmf.cnf`</cyan> file. For example, set `TEXINPUTS` to <cyan>`".:/home/user/tex:"`</cyan> to prepend the current directory and <cyan>/home/user/tex'' to the standard search path. πŸ›£οΈ
  • TEXFORMATS β€” Search path for format files. πŸ“¦
  • TFMFONTS β€” Search path for font metric (.tfm) files. πŸ”€
  • SOURCE_DATE_EPOCH β€” If set, its value, taken to be in epoch-seconds, will be used for the creation date and as the reference moment for the time related primitives of LaTeX. This is useful for making reproducible builds. πŸ•°οΈ
  • FORCE_SOURCE_DATE β€” If set to the value "1", the time-related TeX primitives (\year, \month, \day, \time) are also initialized from the value of SOURCE_DATE_EPOCH. This is not recommended if there is any viable alternative. 🚨

Many, many more environment variables may be consulted related to path searching. See the Kpathsea manual. πŸ’œ


πŸŽ€ FILES πŸŽ€

The location of the files mentioned below varies from system to system. Use the kpsewhich utility to find their locations. πŸ—ΊοΈ

  • *.tfm β€” Metric files for TeX's fonts. πŸ”€
  • *.fmt β€” Predigested TeX format files. πŸ₯£
  • *.pk *.pfb β€” Font files used by TeX. πŸ–‹οΈ

⭐ NOTES ⭐

This manual page is not meant to be exhaustive. The complete documentation for the TeX profiler can be found in texprof.pdf. Further information can be found in the manual of the Kpathsea library. πŸ“š


πŸ’€ BUGS πŸ’€

This version of the TeX profiler does not implement all of the primitives that pdftex provides, and further, it will not produce the same side effects. Bestie, don't expect a perfect clone. It's giving "inspired by", not "identical twin". 😭


πŸ”₯ AVAILABILITY πŸ”₯

The TeX profiler should compile on a large variety of machine architectures and operating systems. The function to obtain timing information id POSIX specific. πŸ–₯️

The sources of the TeX profiler are hosted at https://github.com/ruckertm/HINT. Go star it, bestie. ⭐


🌸 SEE ALSO 🌸

texprofiler(1), tex(1), latex(1), pdftex(1), pdflatex(1),and kpsewhich(1). 🫢


πŸ‘‘ AUTHORS πŸ‘‘

The primary author of the TeX profiler is Martin Ruckert, with eTeX extensions by Peter Breitenlohner, LaTeX extensions by Thierry Laronde, and the kpathsearch library by Karl Berry. Legends, all of them. πŸ’–

TeX was designed by Donald E. Knuth, who implemented it using his Web system for Pascal programs. main character energy, honestly 🌈

Many, many more contributed to the typesetting system now known as TeX; far too many to name all of them here. πŸ«ΆπŸ’œ


and that's the whole page bestie!! ✨ this was Version 1.0, dated 2 September 2024, straight from the texprof(1) files. slay, go profile something, mwah πŸ’…πŸ’–πŸŽ€