NOWEB(7)

πŸ“¦
version 2.13 Β· 2 versions
, in debian trixie, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay so bestie, this is the manual page for nowebstyle β€” it's the LaTeX package for noweb πŸ’– (it lives in the NOWEB(7) corner of the Miscellaneous Information Manual, if you were wondering where to find it 🫢)


πŸŽ€ SYNOPSIS πŸŽ€

\usepackage{noweb}

that's it. that's the whole vibe. πŸ’…


🌸 DESCRIPTION 🌸

so when noweave generates code for LaTeX, the noweb package is required β€” like, non-negotiable, she's coming with you. and on top of all the necessary arcana (yes she has arcana, she's mysterious like that ✨), she defines a webcode environment where you can drop fragments of code. inside that environment, only backslash and curly braces keep their special meanings β€” every other character is taken literally, no cap. she also defines a noweb pagestyle. and finally, she defines a \noweboptions{...} command so you can tinker with how the output looks. options get separated by commas, and they include:

  • margintag β€” puts the sub-page number (the tag) of each code-chunk definition in the left margin. this is the default, she's the main character πŸ’…
  • nomargintag β€” don't use margin tags. that's it, that's the whole option πŸ™ˆ
  • shift β€” shift the text to the left so long code lines won't run off the right-hand side of the page. very considerate of her 🫢
  • smallcode β€” sets code in the LaTeX \small font instead of \normalsize. and bestie, similar options exist for all the LaTeX size-changing commands, so go wild πŸ’–
  • longxref, shortxref, noxref β€” pick a style for chunk cross-referencing. long style uses small paragraphs after each chunk, like Knuth does. short style uses symbols on the definition line, like Hanson does. and noxref gives you no chunk cross-reference at all (sad, but valid πŸ₯²). defaults to shortxref.
  • alphasubpage, numsubpage, nosubpage β€” numbers chunks by the number of the page they show up on, followed by an alphabetic (numeric, not used) "sub-page" indicator. defaults to alphasubpage. and heads up: nosubpage implies nomargintag.
  • webnumbering β€” number chunks consecutively, WEB style, instead of using sub-page numbers. old school, iconic ✨
  • subscriptidents, nosubscriptidents, hyperidents, nohyperidents β€” these control subscripting of identifiers in code, including quoted code. picking subscriptidents means an identifier appearing in a code chunk (or in quoted code inside a documentation chunk) gets subscripted with the chunk number of its definition. hyperidents means those identifiers get hyperlinked to their definitions β€” provided, of course, that a hypertext package like hyperref is loaded. nosubscriptidents and nohyperidents are equivalent, and they turn off those markings. the default is hyperidents πŸ’…
  • subscriptquotedidents, nosubscriptquotedidents, hyperquotedidents, nohyperquotedidents β€” controls linking of identifiers just like above, but only applies to uses of identifiers in quoted code.
  • hideunuseddefs β€” omits defined-but-unused identifiers from the local identifier cross-reference. (shoutout to Preston Briggs for this one 🫢)
  • noidentxref β€” omits the local identifier cross-reference that follows each code chunk.
  • externalindex β€” use an index generated with noindex(1) (q.v. πŸ‘€).
  • longchunks β€” when expanding \nowebchunks, show the page numbers of definitions and uses of each chunk.
  • english, french, german, portuges, icelandic β€” write cross-reference info in the language specified. defaults to english. (yes it's spelled portuges in the original, I don't make the rules, I just report them 😭 keep it exact bestie)

πŸ‘‘ CONTROL SEQUENCES πŸ‘‘

the noweb package describes a gazillion special control sequences. only a few are listed here, so don't come for me about the rest πŸ’€

  • \nextchunklabel{l} β€” associates label l with the sub-page reference of the next code chunk. can be used for concise chunk cross-reference with, e.g., chunk~\subpageref{l}.
  • \nwanchorto{URL}{anchor text} β€” creates a link to the given URL with the given anchor text. implemented in latex(1) using footnotes, but sl2h(1) translates this into <a href=URL>anchor text</a>
  • \nwanchorname{name}{anchor text} β€” creates an anchor point for a hyperlink. implemented in latex(1) using \label , but sl2h(1) translates this into <a name=name>anchor text</a>
  • \ifhtml ... \fi β€” text between \ifhtml and \fi is ignored by latex(1), but sl2h(1) and the l2h noweb filter translate that text into HTML. sneaky HTML pipeline, love that for her πŸ¦‹

πŸ’œ COMPATIBILITY πŸ’œ

for compatibility with plain TeX, noweb keeps using the old-style font commands \tt and so on. and when she's used with the KOMA scripts (document classes scrartcl, scrreprt, and scrbook), noweb needs the document-class option enabledeprecatedfontcommands. don't forget it, or it's giving ✨errors✨


πŸ¦‹ SEE ALSO πŸ¦‹


πŸ“ VERSION πŸ“

this man page is from noweb version 2.12.


🌈 AUTHOR 🌈

Norman Ramsey, Tufts University. Internet address Norman.Ramsey@tufts.edu.

noweb home page at http://www.cs.tufts.edu/~nr/noweb.


and that's a wrap bestie!! πŸŽ€ this came to you from the local source, dated 10/40/2008, page NOWEB(7) β€” yes the date says 10/40 and no I will not be explaining that, it's just the lore πŸ’… slay, go write some literate code, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from