PPTools/Guiguts/Guiguts Manual/GGGems
Useful and Time-Saving Features in Guiguts
Here are summaries of selected features of Guiguts, with links to the Manual's full documentation of those features. The topics are not in any particular sequence. Like most Wiki pages, this one is open to modification and improvement by everyone, so please feel free to add features you find useful but possibly not widely known or used.
Tables
Guiguts has two tools to help you make tables from the ones prepared during the Rounds:
- ASCII Table Effects on the Text Menu
- Auto Table on the HTML Markup Dialog
ASCII Table Effects lets you adjust column widths to make them narrower or wider, rewrap multi-line cells, align text and column dividers that were done differently on different pages, decimal-align numeric columns, and create hanging indents. As the tool's name indicates, it's mostly intended to prepare Plain Text tables. However, it also can make it much easier to create HTML tables containing multi-line cells and/or decimal-aligned numbers. The examples in that section show you how do do each of these.
Auto Table can convert a table from the Rounds (very likely partly-processed with ASCII Table Effects) into an HTML table with almost no effort on your part. This is particularly helpful with multi-line tables (tables in which some cells were printed on several lines). One of the examples in that section prepares a Table of Contents; the other example prepares a table in which some cells are multi-line, some are single-line, and some are empty.
TIP: Before using either of these Table tools, keep existing column dividers, but entirely remove any row dividers, leaving blank lines in their places. You can add the row dividers back to the ASCII version afterwards, and will want to use the CSS border property in the HTML version.
Counting
Two basic reasons for knowing how often something occurs in a Guiguts document are "Do I want to work on this tonight or wait until I'm fresh tomorrow?" and "Is this a typo or the author's style?"
The most flexible means of counting something in Guiguts is the "Count" button on the Search and Replace Dialog (shortcut key: ctrl+B). You can configure it to count whole words, matches to regular expressions, arbitrary strings, and any of those across the entire file or within a selected range.
However, there are situations when you are already using S&R for something, but happen to notice a word that doesn't look quite right. Rather than interrupt the S&R, you can highlight the questionable word (or phrase) and use Quick Count on the Search Menu (shortcut key: alt+ctrl+B) to find out how often it occurs. Quick Count does a case-independent, whole-word search and displays the result without disrupting the main S&R.
The # button on the Quick Search dialog is just as flexible as S&R's "Count" button, and useful when you don't want to disturb an in-progress S&R.
Various tools in Guiguts have their own counters, for example: Spell Query and Word Frequency.
Unmatched tags, brackets, and block markers
Most tags, brackets, and block markers occur in opening and closing pairs. When one member of a pair is missing or malformed, it's sometimes hard to find the error. (HTML5 allows certain tags, such as </p> to be omitted, so the Nu HTML Checker will not flag such omissions as errors, even though it's good practice to use them.) Guiguts has several tools to help you find such tags, brackets, and block markers. Most are on the Tools Menu and the last one is on the HTML Menu:
- Check Orphaned Brackets lets you select one kind of DP tag, bracket, or block marker at a time, then it looks for non-matches (two of the same opening ones without an intervening closing one, and vice versa). This is more time-consuming than the newer methods listed below, but sometimes will make it easier to find an elusive omission;
- Unmatched DP Tag Check lists all unmatched DP-style tags <i> <b> <sc> <f> <g> at once, in the sequence in which they were detected. <tb<> is a unary operator and has no corresponding "close" tag.
- Unmatched Brackets Check lists all unmatched brackets ()[]{}, again in the sequence in which they were detected. This will find false positives, since some brackets are used unmatched to indicate Stage Directions, illustration credits, or curly braces in tables.
- Unmatched Block Markup Check lists all unmatched DP-style block markers, the ones beginning with a slash. Block Quotes /#...#/ may be nested within other Block Quotes, and this tool takes account of that; the other Block Markers may occur within Block Quotes, but cannot be nested.
- Unmatched HTML Tag Check is on the HTML Menu. It performs some of the functions of the Nu HTML Checker, but also detects omitted closing tags that are valid in HTML5. NOTE: This is not a substitute for using the Nu HTML Checker.
Spell Query
Spell Query (SQ) replaces Guiguts' previous spelling checker, ASpell. SQ was developed at DP, initially because the version of ASpell that works with Windows does not support Unicode. Besides supporting Unicode and running more quickly, SQ has several additional advantages over ASpell:
- you can specify a threshhold: words occurring more frequently than that value will not be listed, even if they aren't in the dictionary;
- you can make the list case-insensitive or case-sensitive, and list words alphabetically or in the sequence in which they occurred. This makes it easier to find slight variations in spellings;
- several additional dictionaries, including a Latin dictionary are available from DP;
- it is very easy to tell SQ to use more than one language dictionary at a time.
The only feature of DP's ASpell implementation that is missing from SQ is the ability to set a bookmark and return to it in a later session.
Curly Quotes
The Text Menu has three tools to make it much easier to convert straight quotes to curly ones:
- Convert to Curly Quotes converts all unambiguous single and double quotes to curlies. For example, a quotation mark at the end of a word is unambiguously a closing (right) quote. The convertor doesn't attempt to convert ambiguous marks, such as single quotes at the beginning of a word (they might indicate a dropped "h", for example).
- Curly Quote Corrections finds the next unconverted double or single quote and lets you decide what to do with it. Although it's a manual step, it's usually quick.
- Unmatched Curly Double Quote Check is an extra, optional test that may be run after converting to curlies and running through the corrections step.
Adding to the Custom Menu
You can add your own entries to the Custom Menu. Instructions for doing so are on the Custom Menu page of the Manual. Similar instructions appear when you click "Set External Programs" at the bottom of the menu itself.
You can copy-and-paste each entry that interests you into your own Custom Menu (first the Label, then the Calling Parameters).
The first couple of entries [hopefully] will be useful, but they're here mostly to prime the pump and to make it easier for other people to add to the list.
Label | Calling Parameters |
---|---|
Google Translate (highlighted text) | start https://translate.google.com/?hl=en&sl=auto&tl=en&op=translate&text=$t |
Google Search (highlighted text) | start https://www.google.com/search?q=$t |
Making Guiguts upgrades really easy
Until recently, the most time-consuming and difficult part of upgrading from one Guiguts version to another has been transferring all of your settings, preferences, and other customizations. Now, there is a one-time procedure that will make all future upgrades trivial. It's on the Preferences Menu under File Paths, and the topic is Copy Settings from a Release. It lets you select the folder containing the version of Guiguts you have been using, then it creates a folder called GGPrefs in a known location and copies all customizable settings to that folder. Each time Guiguts starts, it looks for that GGPrefs folder and uses its contents if found. Any settings changes you make will be stored there, so the next time you use Guiguts, even if you've just installed a new version, your current settings will be used. This means you won't have to copy anything from one version to the next: just download a new version of Guiguts, copy the "guiguts" folder from the download to wherever you prefer to keep Guiguts, put a shortcut to that folder's "run guiguts.bat" on your desktop, and start using the new version.
Cut, copy, paste, or move a Rectangular Area
Unlike other selections, a rectangular area can include just the middle of one or more lines of text, as shown in the Selecting Columns example. In its simplest form, it can be just a letter or word.
To select a rectangular area that spans multiple lines, position the cursor at one corner of the area, then press the SHIFT key while using the left mouse button to drag the cursor to the diagonally opposite corner. You can defer pressing SHIFT until the cursor is near or at the second corner, or press and release it while moving the cursor. Releasing the mouse button defines the area.
Once an area has been highlighted, the Selecting Columns topic explains how to use F2, F1, and F3 to cut, copy, and paste it, but you can use other Guiguts controls with it:
- shift it left or right by using the Indent controls on the Text Menu (shortcuts: alt+right arrow or alt+left arrow);
- delete it by pressing the DEL key. Everything to the right of the selection will shift to the left.
Rulers (horizontal and vertical)
Line numbers, shown along the left side of the main window, have been available for a long time. More recently, a horizontal ruler across the top of the main window, was added. (Also see the next topic, Column highlight.
Column highlight
Another visual guide to column position is to highlight an alignment column. It's useful in finding/adjusting long lines and in aligning simple tables. For more complex tables, see Tables, above.
New block markups: /R and /C
/R indicates that the contents of the block should be right-justified and not rewrapped. If the block contains several lines and some of them have trailing spaces because they should be indented away from the right margin, Plain Text rewrap will preserve the trailing spaces, while the HTML AutoGenerator will supply <spans> to right-pad those lines. (You probably will have to adjust some of their values afterwards).
/C indicates that the contents of the block should be centered and not rewrapped. It is different from /F in several ways.
Both of these are explained under Rewrap Markers.