aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/grosciteco.tes
AgeCommit message (Collapse)AuthorFilesLines
2025-08-21support Groff v1.19.2 as still used by default on NetBSD 10Robin Haberkorn1-1/+1
* They have a newer version in pkgsrc, but it's not even available as a binary package on the arm6. * Has some glitches, e.g. does accept the ASCII 27 in tutorial.ms, but it's probably not worth to work around.
2025-08-06command-line arguments are no longer passed via the unnamed buffer, but via ↵Robin Haberkorn1-18/+20
special Q-registers ^Ax * The unnamed buffer is also used for reading from --stdin, so you couldn't practically combine --stdin with passing command-line arguments to macros. * The old approach of passing command-line arguments via lines in the unnamed buffer was flawed anyway as it wouldn't work with filenames containing LF. This is just a very ancient feature, written when there weren't even long Q-reg names in SciTECO. * You can now e.g. pipe into SciTECO and edit what was read interactively, e.g. `dmesg | sciteco -i`. You can practically use SciTECO as a pager. * htbl.tes is now a command-line filter (uses -qio). * grosciteco.tes reads Troff intermediate code from stdin, so we no longer need "*.intermediate" temporary files. * added a getopt.tes test case to the testsuite. * This change unfortunately breaks most macros accepting command-line arguments, even if they used getopt.tes. It also requires updating ~/.teco_ini - see fallback.teco_ini.
2025-06-27fixed an asterisk in the <EN> manpage entryRobin Haberkorn1-0/+1
* We have to avoid `/*` within comments, so one of the two characters will have to use a named glyph. \[**] is actually a special symbol, which wasn't noticed until supporting Unicode. There is no named glyph for the plain asterisk. Thus we now use \[sl] to escape the `/` character. `/\c*` might have also worked. * grosciteco now supports the `sl` glyph.
2025-05-24<EI> has been repurposed and is the macro file inclusion (indirect file) ↵Robin Haberkorn1-1/+1
command now * Improves DEC TECO-11 compatibility. * <EM> is still supported as a synonym, but considered deprecated and is no longer documented. A warning is printed when invoked. It can be repurposed at any time in the future. * `EI$` is not yet supported. I am unsure whether this makes any sense.
2025-05-02grosciteco: folding in woman pagesRobin Haberkorn1-0/+30
* Support fold level configuration using `.SCITECO_FOLDLEVEL`. This sets the current output line as the fold header and all subsequent lines with the given fold level (until another `.SCITECO_FOLDLEVEL` instruction is encountered). * This is now done automatically for man's SH and SS macros, so the man-page based woman pages provide folding. * The folding margin is therefore now always enabled in fallback.teco_ini.
2025-04-23fixup: fixed monospace sections in womanpages when lexer.font is not ↵Robin Haberkorn1-2/+2
customized (refs #34) * In the grosciteco-generated .woman.tec files, the fonts were only set on the monospaced styles if lexer.font was set since it was undefined by default. We'd need a lare IF-ELSE statement to handle that in womanpages since woman.tes changes the default font to a variable-width font. Just leaving the default font, therefore won't work. * We now always initialize lexer.font in lexer.tes. You no longer have to check for its existance. * Consequently, you can no longer set lexer.font *before* munging lexer.tes because it will be overwritten. At least not without additional checks. Such a design is not suggested by fallback.teco_ini, though. * Fixes monospaced sections in the tutorial and other womanpages on Gtk.
2025-04-22Gtk: monospaced sections in womanpages now respect lexer.font and ↵Robin Haberkorn1-2/+2
variable-width font is configurable via lexer.woman.font (refs #34) * grosciteco was just hardcoding "Monospace", regardless of what was configured via lexer.font in ~/.teco_ini * The variable-width font used for ordinary "womanpage" body texts was hardcoded to "Serif". It is now configurable via the lexer.woman.font register. * There is a difference, though: lexer.font has no default value and must therefore be checked everywhere. This is so you can set it even before munging lexer.tes. lexer.woman.font however has a default (Serif), so it can only be overridden after munging lexer.tes. Perhaps it would be easier and more consistent to have a default for lexer.font as well.
2025-03-31grosciteco: added the `oq` and `cq` glyphsRobin Haberkorn1-0/+2
This fixes building of the new tutorial.woman on Ubuntu.
2025-03-29added `@W`, `@P`, `@V` and `@Y` command variantsRobin Haberkorn1-2/+2
* They swap the default order of skipping characters. For positive arguments: first non-word chars, then word chars. * This is especially useful after executing the non-at-modified versions. For instance, at the beginning of a word, `@W` jumps to its end. `@V` would delete the remainder of the word. * Since they have to evaluate the at-modifier, which has syntactic significance, the command implementations can no longer use transition tables, so they are in the switch-statements instead.
2025-03-23grosciteco: fixed topic collectionRobin Haberkorn1-1/+1
* regression from 867d22e419afe769f05ad26b61c6ea5ea1432c3c
2025-03-22harmonized all word-movement and deletion commands: they move/delete until ↵Robin Haberkorn1-2/+2
the beginning of words now * All commands and their documentations were inconsistent. * ^W rubbed out to the beginning of words. * Shift+Right (fnkeys.tes) moved to the beginning of the next word if invoked at the beginning of a word and to the end of the next word otherwise. * <W> (and <V> and <Y> by extension) moved to the end of the next word. * The cheat sheet would claim that <W> moves to the beginning of the next word. * Video TECO's <W> command would differ again from everything else. With positive arguments, it moved to the beginning of words, while with negative it moved to end of words. I decided not to copy this behavior. * It has been decided to adopt a consistent beginning-of-words policy. -W therefore differs from Video TECO in moving to the beginning of the current or previous word. * teco_find_words() is now based on parsing the document pointer, instead of relying on SCI_WORDENDPOSITION, since the latter cannot actually be used to skip strictly non-word characters. This requires a constant amount of Scintilla messages but will require fewer messages only when moving for more than 3 words. * The semantics of <W> are therefore now consistent with Vim and Emacs as well. * Shift+Right/Left is still based on SCI_WORDENDPOSITION, so it's behavior differs slightly from <W> for instance at the end of lines, as it will stop at linebreaks. * Unfortunately, these changes will break lots of macros, among others the M#rf, M#sp and git.blame macros ("Useful macros" from the wiki).
2024-11-18fixed some common typos: "ie." and "eg.", "ocur" instead of "occur"Robin Haberkorn1-1/+1
2024-11-10updated TODORobin Haberkorn1-0/+1
2024-11-10grosciteco: basic support for GNU pic graphicsRobin Haberkorn1-26/+52
* The line drawing algorithm currently works only with tbl, though. * Also only straight lines are currently supported. * This was meant for rendering presentations in SciTECO - it's not currently used or planned to be used in the manpages. Although we might well add pic graphics to the manpages in the future.
2024-11-10grosciteco: support .SCITECO_STARTSTYLING and .SCITECO_SETSTYLING macrosRobin Haberkorn1-0/+9
This could theoretically be used to apply Scintilla styles not natively and easily supported by grosciteco, eg. different fonts and font sizes.
2024-11-10grosciteco: added some more quote glyphsRobin Haberkorn1-0/+2
2024-11-07grosciteco: fixed the CuXXXX postprocessor command, ie. insertion of ↵Robin Haberkorn1-1/+1
characters by unicode, ie. typesetting of most non-latin text * This was broken at least for characters that happened to contain hexadecimal digits > 9 since "D does not detect hexadecimal digits.
2024-11-07grosciteco: fixed styling of multi-byte text (ie. non-latin characters)Robin Haberkorn1-1/+1
* We just passed the length in glyphs to SCI_SETSTYLING.
2024-10-16grosciteco: support glyphs.pcRobin Haberkorn1-0/+1
* This might fix builds on Ubuntu Bionic. I would have to make another minor release in order to try that out and push another Ubuntu PPA release. * Since the PPA is practically not used by anybody, it's not worth it.
2024-10-12grosciteco: added the "ti" glyph (refs #22)Robin Haberkorn1-0/+1
2024-10-11grosciteco: added the "ha" glyph (refs #22)Robin Haberkorn1-0/+1
2024-10-11grosciteco: added the "aq" glyph (refs #22)Robin Haberkorn1-0/+1
2024-09-09grosciteco: support Unicode (refs #5)Robin Haberkorn1-27/+45
* All manpages are processed with the "utf8" device and with preconv. Manpage sources can contain Unicode glyphs now. * grosciteco supports CuXXXX and N commands now * Lines are drawn with Unicode box characters now. This works at least with tbl and -Tutf8. It's probably still too simplistic for pic graphics. * The topic list at the top of .woman.tec contain byte offsets, so that we don't need glyphs2bytes conversion when looking up topics.
2023-04-05default font is now "Monospace" instead of CourierRobin Haberkorn1-2/+2
* Courier has the quirk that letter sequences like "fi" are turned into ligatures which breaks the monospaced nature of the display. * We assume that "Monospace" is also more portable, although it hasn't yet been tested on Windows. * only relevant for the Gtk UI of course * It might be a good idea to set SCI_STYLESETCHECKMONOSPACED as well (FIXME?)
2023-04-05fixed grosciteco for newer Groff versions (refs #11)Robin Haberkorn1-0/+1
* The intermediate output of Groff will contain `t` commands before the font 1 is defined which we interpret as the default font. We therefore hardcode the default-font position to 1 by default - it won't change anyway.
2021-06-08all SciTECO scripts used during the build process now always write files ↵Robin Haberkorn1-2/+2
with Unix linebreaks * when hosted on Windows, the default is DOS linebreaks * Unix linebreaks are in many cases more consistent as all other sources use Unix linebreaks * woman pages with Unix linebreaks are slightly faster to load due to EOL conversion * especially Groff input must not contain CR as it will otherwise log lots of warnings (affects htbl.tes and tedoc.tes).
2017-02-22grosciteco: added support for the `F` commandRobin Haberkorn1-0/+3
* equivalent to `xF` and currently ignored by grosciteco. * older versions of Groff use `F` instead of `xF`, even though it is not documented. Therefore this fixes building on systems with slightly outdated versions of Groff like Haiku and OS X.
2016-11-22partially reversed/fixed-up b7ff56db631: avoid g_slice allocators and ↵Robin Haberkorn1-0/+2
performance issues with memory measurements * Fixed build problems on Windows * g_slice on Windows has been shown to be of little use either and it does not work well with the GetProcessMemoryInfo() measurements. Also, it brings the same problem as on Glibc: Not even command-line termination returns the memory to the OS. Therefore, we don't use g_slice at all and commented on it. * The custom Linux and Windows memory measurement approaches have been shown to be inefficient. As a workaround, scripts disable memory limiting. * A better approach -- but it will only work on Glibc -- might be to hook into malloc(), realloc() and free() globally and use the malloc_usable_size() of a heap object for memory measurements. This will be relatively precise and cheap. * We still need the "Object" base class in order to measure memory usage as a fallback approach.
2016-11-18standard lib: added getopt.tes for parsing command line options in scriptsRobin Haberkorn1-4/+9
* this uses an optstring compatible with getopt(3). * It does not use repeated getopt calls to iterate options, though but places the results in registers beginning with "getopt.". E.g. option "C" will result in "getopt.C" being set after the call to setopt. String arguments are supported and are placed in the string part of the getopt registers. * The grosciteco.tes and symbols-extract.tes scripts make use of getopt now, to simplify and clean up their command line handling.
2016-11-18improved command line option handlingRobin Haberkorn1-1/+1
* it turns out that option-like arguments could not be reliably passed to SciTECO scripts for two reasons: a) "--" arguments are not removed from argv by GOption if it detects and following option-like argument. "--" would thus be passed as a script argument which will disable option parsing in scripts that interpret "--". b) A script run via the Hash-Bang line "#!...sciteco -m" would require an explicit "--" to turn of GOption parsing. However it is __impossible__ to insert after the script file name on UNIX. * Therefore, SciTECO now removes leading "--" arguments left over by GOption. * If possible (Glib >= 2.44), option parsing is performed in strict POSIX mode which inhibits parsing after the first non-option argument. This reduces the number of cases where an explicit "--" is required. * --mung no longer takes an argument. Instead, the first non-option argument is expected to be the script file name. This looks weird at first but is more consistent with how other interpeters work. Once we revise argument passing to scripts, the script name can also be passed to the script which is more consistent with it being the first non-option argument. Also, with strict POSIX parsing, this fixed Hash-Bang lines since the script file name constructed by the kernel will automatically switch off option parsing, passing all option-like script arguments uninterpreted to the script. * Since we're supporting Glib < 2.44, the Hash-Bang lines are still broken for certain builds. Therefore, a wrapper script is installed to libexecdir (it never has to be executed by users and Hash-Bang lines need absolute paths anyway) which transparently inserts "--" into the SciTECO command line and should be used as the interpreter in portable SciTECO scripts. The wrapper script is generated and points to the exact SciTECO binary installed. This is important when doing parallel installs of Curses and Gtk binaries since each one will get its own working wrapper script. The wrapper-script workaround can be removed once we depend on Glib >= 2.44 (some day...). * The default /usr/bin/env Hash-Bang lines are no longer used in the scripts since they are broken anyway (UNIX incl. Linux cannot pass multiple arguments to the interpreter!). Scripts that get installed will get a fixed-up Hash-Bang line referring to the installed SciTECO binary anyway. * Interface::main() has been renamed to Interface::init() and is optional now. The Interface::main() method was introduced because of the misconception that interfaces will find their options in the argv array and have to do their own parsing. This is wrong, since their option group already cares about parsing. Therefore, gtk_init() does not have to called explicitly, too.
2016-11-18implemented self-documenting (online) help systemRobin Haberkorn1-0/+283
* the new "?" (help) command can be used to look up help topics. * help topics are index from $SCITECOPATH/women/*.woman.tec files. * looking up a help topic opens the corresponding "womanpage" and jumps to the position of the topic (it acts like an anchor into the document). * styling is performed by *.woman.tec files. * Setting up the Scintilla view and munging the *.tec file is performed by the new "woman.tes" lexer. On supporting UIs (Gtk), womanpages are shown in a variable-width font. * Woman pages are usually not hand-written, but generated from manpages. A special Groff post-processor grosciteco has been introduced for this purpose. It is much like grotty, but can output SciTECO macros for styling the document (ie. the *.woman.tec files). It is documented in its own man-page. * grosciteco also introduces sciteco.tmac - special Troff macros for controlling the formatting of the document in SciTECO. It also defines .SCITECO_TOPIC which can be used to mark up help topics/terms in Troff markup. * Woman pages are generated/formatted by grosciteco at compile-time, so they will work on platforms without Groff (ie. as on windows). * Groff has been added as a hard compile-time requirement. * The sciteco(1) and sciteco(7) man pages have been augmented with help topic anchors.