PPTools/Guiguts/Guiguts Manual/Navigation

From DPWiki
Jump to navigation Jump to search


GUIGUTS VERSION 1.5.0 MANUAL

Navigating with the Keyboard

Guiguts has a surprisingly large number of ways to help you move around within the text, and to find different kinds of tags, markups, strings, and locations. This topic covers most of them; the Search & Replace dialog, which you are likely to keep open most of the time, is a separate topic unto itself.


Scrolling the Text

You scroll the text in the window using the Page Up and Page Down keys; or by dragging or clicking in the vertical and horizontal scroll bars.

When running Guiguts under X-windows (Mac or Linux) you can scroll the file rapidly by control-dragging. Hold down the ctrl key, then drag steadily up or downward in the text area. (Note this does not seem to work in Mac OS X 10.4.—Linux user please comment)

In Windows you can use the middle button of a three-button mouse in either of two ways. You can drag the text up and down by holding the middle button and dragging in the text window. Use middle-drag to reposition the text by a few lines. You can also use middle-scrolling in the manner of the Firefox browser: middle-click (don't drag) to open a scroll indicator. The move the mouse pointer up or down (without holding any buttons) and the text will scroll in the same direction.


Moving the Cursor

You move the cursor through the file with keys that should, for the most part, be familiar. The arrow, page, home and end keys move small distances:

left arrow prior character
right arrow next character
up arrow line above
down arrow line below
home left end of line
end right end of line
page up move up the file by one window-height
page down move down the file by one window-height

Hold down the control key to modify the effects of these keys:

ctrl-left arrow prior word
ctrl-right arrow next word
ctrl-up arrow previous paragraph
ctrl-down arrow next paragraph
ctrl-home top of file
ctrl-end end of file
ctrl-page up shift the display left to show the left margin
ctrl-page down shift the display right to show the rightmost letter

Using any these keys clears the selection, if there is a selection.


Bookmarks

The Bookmarks menu gives you the tools to set up to five bookmarks in the file, and return to them with a single keystroke.

Gg1.0-49a-bookmarkmenu.png

Bookmarks are remembered across sessions for each file. They are stored in the .bin file associated with the text file, so they will be lost if that file is lost; see this page.

With a little practice you will find it most convenient to set and use bookmarks using the keyboard shortcuts shown in this menu. The bookmarks are numbered from 1 to 5. Use ctrl-shift-n (where n is a number between 1 and 5) to set bookmark n at the current position. Use ctrl-n to jump the insertion point directly to bookmark n.


Using the Search Menu and the Status Bar

Gg-1.4.1-11a-searchmenu.png

The Search menu and the Status bar offer several ways to find and move to specific places or types of places in a file. "Search & Replace" is the most powerful and flexible of these, and is described separately, under Searching; the others are explained here.


Quick Count

Quick Count (usually run with its shortcut key: Shift+Ctrl+b) displays the number of occurrences of the word(s) you've currently highlighted (selected). Text highlighted by other means, such as by a regular Search & Replace, isn't used unless you've also highlighted it yourself. Quick Count performs a case-insensitive, whole-word search that is independent of the "Search & Replace" dialog. The result is displayed in a small pop-up box that can be dismissed by pressing ESC, Enter, or clicking "OK". If there is no selection, nothing happens. Since the count is based on whole words only, selecting part of a word, e.g., "selec", may return a count of zero. The selection may include multiple words, punctuation, numbers, and special characters, but they must be on one line.

One example of its use is when you are resolving Proofer's Notes and are trying to determine whether an oddly-spelled word is a typo or the author's style. Instead of copy/pasting the word into another editor or temporarily changing the full "Search & Replace" dialog, you can just highlight the word and press Shift+Ctrl+b.


Go to the text corresponding to a specific page Image

This uses the image names (e.g., p097) of the page images. Select Search->Goto Page, or use the keyboard shortcut ctrl-p, or click the image-number field (Img:xxx) in the status bar. Any of these will open a small dialog for going to the text of a particular page image.

Guiguts gotopage.png

Goto Page is only available when the file had page-separator data when it was downloaded from DP, and still had those separators the first time it was saved by Guiguts. When it does, the image number field is visible in the status bar. The first line of text from the image you specify is displayed in the middle of the window with the cursor at the left end of the line.


Go to the text on a specific page number of the original Book

Goto Page Label is available only when the file has page-separator data and you have performed page label assignment before removing those separators. (If you haven't already done that, and the page separators still are in the text, right-click Lbl: in the Status bar, synchronize the image names and page numbers, click 'Use these values', and then you will be able to navigate to specific pages as explained here.) Then the page label field in the status bar displays either Lbl: Pg nn or Lbl: None.

Select Search->Goto Page Label, or use the keyboard shortcut ctrl-shift-p, or click Lbl: on the Status bar (Mac: control-click) to open the Goto Page Label dialog:

Guiguts gotolabel.png

Enter the entire label of the logical page, for example Pg 206 or Pg iii. (By default, the "Pg" prefix will be filled in the first time you start to do this, and the current page number will be pre-selected, so you can just type the new one to replace it.) When you click "OK", if you've entered a page number that exists, he first line of text of that page image is displayed in the middle of the window.

NOTE: You cannot jump to a page that was designated "No Count" in label assignment, because it has no label.


Go to a specific Line

Select Search->Goto Line, or use the keyboard shortcut ctrl-j, or click the line number (Ln:nnn) in the status bar. Any of these will open a small dialog for going to a particular line:

Guiguts gotoline.png

The display scrolls to display the line you specify at the middle of the window with the cursor at the left end of the line.


Which Line?

This displays the current line and column number in a pop-up window. The same information is in the first box of the Status bar at the bottom of the window.

Find Proofers' Comments ( [**notes] )

Find Next Proofer Comment and Find Previous Proofer Comment move the cursor and text to the next or previous occurrence of [**].

The regular expression shown below, placed in the Search line of the Search & Replace dialog, does that, too, but it also highlights the entire comment, stays on the screen without occupying the space taken by the Search menu, and, if you leave the first Replace line empty, lets you delete the comment by clicking Replace or R & S after you've resolved the comment.

(Make sure Regex is checked, and don't use Rpl All, of course; those comments are invaluable and you want to read and resolve each one individually.)

Search: \[\*((.|\n)*?)]
Replace:  (leave this line empty)


Step Through Block Markups (removed)

This section of the menu was removed in version 1.4.0 because it was long, yet incomplete and of limited use. In its place, there is a more versatile Regular Expression in the Rewrap Markers section of the Tools Menu. That regex finds entire blocks and lets you change some of the markers to more useful ones, e.g., change poetry, marked in the Formatting Rounds by /* ... */, to /P ... P/.


Find Orphaned DP Markup

This option of the Search menu invokes the Search & Replace dialog and places the following regular expression in the Search line:

Gg1.0-18a-find orphaned DP markup.png

Click the Search button to find such orphans, correct them, and click the button again, until all unbalanced tags have been resolved.

Notes: For large files, there may be a long delay before the cursor resumes blinking. This search is not guaranteed to find every error.

The Tools menu has a related option that finds unbalanced (orphaned) brackets.


Find Asterisks w/o Slash

This may be useful in finding unbalanced no-wrap markers and malformed proofers' notes. If you use it, do so after you've resolved and removed all normal proofers' notes, or it will keep finding the first one.


Highlighting Characters

The Search menu contains four commands that help you locate unbalanced quotes and other special characters. (Guiguts cannot find unbalanced quotes reliably, as it can find unbalanced parentheses, because there is no simple and reliable way to tell a straight open-quote from a straight close-quote, or a single-quote from an apostrophe, or if an omitted quotation mark at the end of a paragraph is an error.)

These commands operate on a selection. For example, select a paragraph or a passage in which you have confused or unbalanced quotes, then choose Search->Highlight Double Quotes in Selection. The double quotes in the passage are revealed in the highlight color selected on the Preferences->Appearance menu (the default color is lavender). You can highlight single quotes (apostrophes) by using "Highlight Single Quotes in Selection".

Highlight Character, String or Regex...

The command Highlight arbitrary characters... opens a dialog in which you can specify any of:

  • A single special character, for example an ampersand
  • A literal string, for example :=
  • A regular expression that selects various characters or a class of characters
Gg1.0-19a-highlight arbitrary characters in selection.png

When using a regular expression be careful to escape special characters with a leading backslash, as shown.

When you click Apply Highlights, Guiguts searches the current selection for all strings that match, and highlights them in the color selected on the Preferences->Appearance menu (the default color is lavender). The Previous Selection button recovers the last selection so you can search the same selection for different things. Select Whole File does just that, so that matched values are hightlighted everywhere.

The highlighting set by any of these commands remains active until you highlight some other character, or use the final menu item, Remove Highlights. The keyboard shortcut ctrl+0 also removes the highlights.

Highlight Surrounding Quotes & Brackets

This highlights the first occurrence of quote and bracket symbols preceding and following the current cursor position. It is useful when looking for missing symbols that normally occur as balanced pairs. The text range does not have to be pre-selected, but the search stops within a reasonable distance from the cursor. It looks for straight and curly double and single quotes, parentheses, and square brackets, and uses different colors to distinguish them, as shown in the example below. The keyboard shortcut to toggle it is ctrl+; (hold down the Ctrl key and press semi-colon). The keyboard shortcut ctrl+0 also removes the highlights. (When this example was made, the cursor was positioned on the fourth line, after the word "Pacific", making the "c" look a bit like a "d".)

Gg-1.3.2-19c-highlight pairs example.png


Highlight Alignment Column

This creates a vertical green line highlighting all characters at the cursor's offset position.

Highlight Alignment Column

It's intended to make it easier for you to align Plain Text, usually in simple tables, without having to use ASCII Table Effects or trying to guess how many spaces to insert or delete. This situation usually arises when text crosses page boundaries and was formatted by different people. The green line stays in position as you scroll and add/delete spaces. The keyboard shortcut ctrl+shift+a toggles the vertical highlighting, and is quicker to use than the menu option.

Nothing will be highlighted on lines shorter than the cursor offset position, as there will not be any characters to highlight there.


Remove Highlights

As the name suggests, this removes all highlights.


Automatic Word Highlighting

Guiguts can highlight many words of interest at one time by using a word list. The default, included with Guiguts, is wordlist/en-common.txt in the Guiguts folder. To use a different list, right-click the button H in the status bar (this isn't on a menu) and a normal file-open dialog will appear. Use it to find the file containing a list of words to highlight.

NOTE: Once H is right-clicked, you must choose a file; this action can't be cancelled or ignored. However, after choosing a file, you don't have to do anything with it.

Once a wordlist has been chosen, you can left-click H or use Preferences->Appearance->Enable Scannos Highlighting to highlight all occurrences of all of the words in the list; click it again to turn off highlighting. H will continue to act as a toggle switch for the rest of the session. You can page or scroll through the text to easily see all of the words in the wordlist. The highlight color is the one selected on the Preferences->Appearance menu (the default color is lavender).

The en-common.txt file is meant as an example of an auto-highlighting list. It contains English words that are often mis-scanned, and it can be useful to have these words highlighted.

However, you can make your own file of words to highlight, or you can make a version of en-common.txt that is a better test of your book. For example, you could make a copy of en-common.txt and add to it the contents of the "Bad Words List" for this book.

The file format of the wordlist is simple text with one word per line. Words may not contain any punctuation except the apostrophe. Words may use any Unicode character below ordinal FE00. The highlighting is case-sensitive, so if a word might appear with and without an initial cap, include both versions in the list.


Step Through Pages and Images

These two controls are on the Status bar, on either side of See Img.

Gg-1.3-05a-display-adjust-page-markers.png

Use the "<" and ">" buttons on the status bar to page through the text while showing the corresponding page images in the external image viewer you've chosen to use with Guiguts. The Adjust Page Markers dialog also will appear, should you need to use it (only as a last resort, if Guiguts has lost synchronization between the text and the images).


Step Through Proofer Markups

You can use the Search & Replace dialog to step through proofreader markups. For example, set the search text to [I (case insensitive, not whole word, not regex, start at beginning). Click Search or press Enter repeatedly to step through all [Illustration: markups in sequence. Use [F to step through all footnotes, [S for all sidenotes, or [G for Greek transliterations.

Set the search text to \[[^FIS] (literal left-bracket followed by the class of neither-F-nor-I-nor-S; case-insensitive, not whole-word, regex) and step through all left-bracket markups that are not notes or illustrations. This would include proofer notes marked with [* and transliterations, as well as most footnote anchors.

In a similar way you can set the search text to </?i> (either "<i>" or "</i>"; case-insensitive, not whole word, regex) and step through all italic markups. You could use </?[bi]> to step through all bold and italic markups. A search for *\s+* (asterisk, one or more whitespaces, asterisk) steps through thought breaks.