GPHELP(1)

🌸 GPHELP(1) β€” gphelp, from the General Commands Manual 🌸

okay so bestie, this is the manual page for gphelp, and by the end of it you're gonna know this thing like the back of your hand πŸ’…

✨ NAME ✨

gphelp β€” the GP-PARI online help script, aka your lil personal assistant for looking stuff up 🫢

πŸŽ€ SYNOPSIS πŸŽ€

gphelp [-to_pod file] [-raw] [-detex] [-noskip] [-utf8] [-k] [-ch c1]
[-cb c2] [-cu c3] [keyword [ @{1,2,3,4,5} ]] [tutorial] [refcard]...

πŸ’– DESCRIPTION πŸ’–

So what it does: it invokes the PARI-GP online help script, periodt. By default, keyword is understood as a section heading (a GP function name), and gphelp goes looking for it in Chapter 3 of the PARI User's Manual. If it finds it, the corresponding section gets copied to a temporary file in /tmp (or $GPTMPDIR), TeX is run, and then the corresponding section is displayed in a separate window using xdvi (or $GPXDVI). literally the whole pipeline, iconic ✨

If you give more than one keyword on a single command line, the outputs are concatenated. If keyword is omitted, it opens the whole manual users.dvi. The keywords tutorial and refcard open the GP tutorial and reference card respectively. so cute 🌸

GP defaults, help sections (1 to 11), as well as some keywords (readline, bnf, ell, all operators...) are recognized and treated in a special way, so that they match a section heading. For instance && is translated to Comparison and boolean operators β€” which ngl isn't that obvious to guess. Make sure to enclose keyword between quotes if it contains dangerous characters (e.g. spaces). For instance, you need to type

gphelp -k "elliptic curves"

and not

gphelp -k elliptic curves

which would look for "elliptic" then for "curves" and output e.g. ploth among the relevant sections. πŸ™ˆ the second one is giving chaos, don't do that


πŸ¦‹ FULL SEARCH: @ MARKERS πŸ¦‹

Okay this part is actually so fun. The pattern @x (where x is a chapter number between 1 and 5) at the end of keyword conducts the search in the corresponding chapter instead of the default Chapter 3. If the number is omitted, search the whole manual. For instance

gphelp -k gc_GEN@4

will look for gc_GEN in Chapter 4 of users manual. And

gphelp -k gc_GEN@

will search the whole manual. All chapters of the manual (usersch[1-5].tex) are assumed to be in $GPDOCDIR (default value set by Configure). You are allowed to gzip (or compress) them β€” this won't affect the search, so go off πŸ‘‘


πŸ’… OPTIONS πŸ’…

The following command line options are available:

  • -cb, -color_bold c2 β€” color used for bold. See -color_help. 🎨
  • -ch, -color_help c1 β€” color (between 1 and 16) used for general printing. Only significant in detex mode.
  • -cu, -color_underline c3 β€” color used for underline. See -color_help.
  • -detex β€” Use detex mode. The TeX file is converted to readable screen output that is directly written to the terminal; don't use tex or xdvi. πŸ’€ no previewer, just vibes
  • -noskip β€” By default, the help text is continued when a new section is tagged with a %GPHELPskip marker (on the same line). If this option is set, do not honor markers: end the help text as soon as a new section is started.
  • -utf8 β€” In detex mode, use UTF-8 encoding for characters, .e.g. use Γ© (é) instead of 'e. πŸ“ pretty characters fr
  • -k β€” Switch to apropos mode. Only write to standard output the list of section headings in manual which contain keyword. The search is case insensitive whenever the keyword contains lowercase characters and case sensitive otherwise. For instance, if the keyword is "LLL" we obtain all sections mentioning the LLL algorithm. Whereas looking for "lll" will also output sections mentioning the elllog or the ellL1 functions (case insensitive search).

You can then choose an element in the list and use it as argument for gphelp (surround it by quotes if it includes spaces), possibly followed by a trailing @ marker (see above). 🫢 lowkey my fave mode

  • -raw β€” use internal format for output (using @x markers). For debugging only. πŸ™ˆ
  • -to_pod file β€” try to convert file from TeX to POD format. Will only work on some subset of PARI User's Manual (Chapter 3, reference card). This should be the only arguments on the command line. ⚠️ like, the only one, bestie

🌈 ENVIRONMENT 🌈

  • COLUMNS β€” number of columns available on screen (for detex mode)
  • DISPLAY β€” where to launch the dvi previewer. If unset, detex mode is assumed automatically.
  • GP_PDF_VIEWER β€” an application able to display PDF files. Used to display PDF documentation on systems where the default DVI documentation is not desired or available. When gphelp is called by gp and this variable is unset, the calling gp may set it automatically on some systems (for instance according to user's preferences from Windows registry).
  • GPDOCDIR β€” directory where PARI help files are located. Default value set at Configure time.
  • GPTEX β€” TeX typesetting program to use. Default value: tex. This may for instance be changed to 'pdftex' to let the gphelp system produce PDF output. To make this example work, make sure to set GP_PDF_VIEWER to a sensible value, whether a specific previewer or a general system tool using user's preferrences (such as 'xdg-open' on Linux or 'open' on macOS); another option is to change GPXDVI to a PDF previewer. πŸ”₯
  • GPTMPDIR β€” directory where temporary files are written
  • GPXDVI β€” previewer to use to open documents produced by $GPTEX. Default value: xdvi. By default $GPTEX is 'tex' and produces dvi files; you may use GPXDVI to specify options for vanilla xdvi, for instance "xdvi -s 7" to select a shrink factor. If you change GPTEX to produce another format then GPXDVI can be changed accordingly, for instance to a PDF previewer or a generic 'xdg-open' (Linux) or 'open' (macOS).
  • GPXDVIREF β€” previewer to use when displaying reference cards. Default value: $GPXDVI. You may use this to specify options for vanilla xdvi, for instance "xdvi -s 5 -fullscreen" to ensure the whole reference card is shown. πŸ‘‘

🧚 FILES 🧚

  • gp β€” the gp calculator
  • gphelp β€” the gphelp script
  • users.dvi β€” PARI/GP User's Manual
  • tutorial.dvi β€” PARI/GP tutorial
  • refcard.dvi β€” GP reference card
  • refcard.ps β€” GP reference card, printer ready πŸ–¨οΈ

πŸ’€ BUGS πŸ’€

The search algorithm is rather crude and the data searched rather unstructured. Hence, searching outside of Chapter 3 may not yield useful results, except in apropos mode (sections may be truncated too soon for instance). 😭 not me getting truncated

Multiword search patterns have a tendency to fail due to various TeX constructs in the source. fr fr it's a whole thing


🌟 AUTHORS 🌟

Originally written by Ilya Zakharevitch for the Math::Pari perl package. Rewritten and expanded by Karim Belabas for the main PARI distribution. absolute icons, we stan 🫢


⭐ SEE ALSO ⭐

gp(1), gzip(1), readline(1), tex(1), xdg-open(1), xdvi(1).


πŸ‘‘ COPYING πŸ‘‘

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. πŸ’œ

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


and that's the tea, bestie πŸ“ this page was dated 24 July 2026, and yes, it's GPHELP(1), we been knew πŸ’…βœ¨

πŸ“¦ where this page comes from