Help:Manual Textframes

From Scribus Wiki
Jump to: navigation, search

Table of Contents

Working with Text

Unlike using a wordprocessor, Scribus uses a frames environment. Therefore, you cannot simply enter text on a document page. See Working with Frames to learn about frame creation and manipulation. Once you have a text frame, your task now is to put some text into it.

You may place text into a text frame in the following ways:

  • Using Story Editor.
  • Directly into the frame on the main screen.
  • Importing text from a plain text file.
  • Importing from selected formatted files, such as ODT, HTML, CSV. There are other file formats such as DOC files which can import only the text without any formatting.
  • You can also set up custom tags in text files to act as a filter for formatting on import.

Using Story Editor

This is listed first because it is the recommended way to enter text manually from the keyboard. Bring up the Story Editor (SE) from the Context menu or with Ctrl+T. Because SE is very versatile, it will be covered in detail in its own section. Its main disadvantage is that you will not see the final appearance of the text until you update the frame, with or without exiting SE. SE is also a convenient way to create, edit, and apply Paragraph and Character Styles.

On the Main Screen

A selected frame can enter Edit Contents mode by clicking the Edit Contents icon on the toolbar or double-clicking on the frame (keyboard: E). The advantage of this is that you can see immediately the appearance of your additions or edits. It is a bit slower, since screen refreshes are involved. You can use Properties to change the font, style, and other characteristics such as linespacing. For small edits and frames which only contain a small amount of text, Edit Contents can serve your needs well.

Inline Graphics

You may also insert any graphics in a line of text. Simply copy the item (Ctrl+C, for example), then paste into the line of text while in Edit Contents mode. This will not work in Story Editor.

Importing Text From a File

We'll collapse our above list a bit, so that we consider all these unformatted, formatted, and tagged files close together.

Plain Text

<p>Clicking Get Text will bring up a file dialog and by default look for files ending in .csv, .html, .htm, .odt, .pdb, .sxw, and .txt, so if you save a plain text file, try to save as *.txt. You can also import .doc files in Linux if you have installed antiword – on Windows versions of Scribus this is already present. If the frame has content that you want to add to, use Append Text instead. While appending text works in both Select Item and Edit Contents modes, they both will append text at the end.

If you really do want to insert a file somewhere in the middle, append, then select the text in Edit Contents mode, cut, then paste at the point you wish it to go, while in Edit Contents mode or in Story Editor.

Plain text into an empty frame will use the default font settings for your text frames, which you can change in File > Preferences > Tools

.

CSV, HTML, and ODT files

  • CSV files (comma-separated values) are typically generated by spreadsheet or database programs, but they are simple enough that they could be created with a text editor. The data will be arranged so that a comma or some other character tells Scribus when the next field is coming, and a newline tells when the next row comes in the file. On importation, you have an opportunity to declare the separator, and also declare a value separator, typically quotation marks. The value separator is optional, and would be used to allow the inclusion of a comma inside the field. If you check that the first row is a header, those values will be made bold. When Scribus pulls in the data, it will use tabs between the fields. For the header row, these will be center-type and for the rest left-type.
  • Considering the wide variety of HTML tags, it shouldn't be surprising that there are limitations to what Scribus can interpret from an HTML file. It will interpret text only between the <body> and </body> tags and mainly focus on recognizing headers, paragraph and line breaks, and text styles, though the styles available may depend on the fonts on the system. You can expect at least some extraneous text in a complex HTML file. Scribus will assign styles to variously formatted text.
  • ODT files (from OpenOffice.org) are the recommended format when you want to automatically assign Scribus styles to text you import into a frame. Generally a very good to excellent result can be expected for recognizing and assigning styles, provided that you use styles in oowriter. This can also be a workaround for DOC or other files, by importing into oowriter and then saving as an ODT file. You cannot expect good results importing tables in this fashion, even in an ODT file.

Tagged Files

The idea of putting some kind of text indicator, or tag, at intervals in a text file in order to trigger some action when the file is read is elegant and has survived since the early days of computing. The purpose in Scribus would be to automatically cause the application of some edit to the text, most commonly a paragraph style. These tags can be anything you want, but should be a combination of easy to type, easy to find visually as you scan the file, and unique. This is why the suggestions you see on the wiki and the printed manual use 2-3 letter combinations, beginning with a backslash (\).

On the textfile end of things you want to put these tags, let's say \h1 and \h2, at the beginning of a paragraph which is to receive some style. Once you have saved the file, you then import it, initially no different than a plain text file, by using Get Text. You likely did not see it, but please now note the button labeled Automatic in the dialog. Clicking this shows a drop-down list, where you can find Text Filters as a choice.

"Automatic text filtering 2"

"Automatic text filtering"

On choosing Text Filters, and then selecting your file and pressing Ok, you now have a bit of work to do, since unless you have already created the specific actions based on your tags, you must do so now. For each tag you have a choice of Remove, Replace, or Apply as the action, and of course here we want to apply a style, but as you can imagine, we might also use this to remove or replace some text on import without altering the file itself.

In this small example, we have set up a filter that we have named thesis by choosing to Apply a paragraph style, named header1 for paragraphs starting with our tag, \h1, and we will remove match (the \h1). Had we previously set up thesis, it could be chosen from the drop-down button in the upper right corner of the dialog. Similarly, if we have already created these styles, they could be chosen from a list where you see header1 and header2. We could delete an action by clicking on the '-' button, and add another with the '+' button.

"Automatic text filtering 3"

Context Menu

<td>"Text frame Context menu"</td> </table>

Linking Text Frames

Right-click on a frame to show its context menu, seen to the right. We will not cover all the features of the text frame context menu, but here is the particular list of choices available for text frames.
  • At the top, Info gives information about the content of the frame, statistics on number of paragraphs, lines, and so forth, and also whether this frame is set to print, which also applies to whether it will be included in PDF export.
  • Undo will undo the last operation on the frame, but it's important to mention that this does not include text editing, which is currently not Undo-able. Redo is available when some operation has been undone.
  • Get Text and Append Text allow for importation of text data from a file.
  • Edit Text brings up the Story Editor</b>
  • Sample Text allows for importing so-called Lorem ipsum text, not only in the original Latin, but also many other languages. A dialog comes up for choice of the language and amount of sample text to create.
  • Attributes and PDF Options are advanced features not covered here.
  • Is Locked will lock all characteristics of a frame, such as position, size, and contents. It cannot be deleted, but can be copied and pasted, and the copy will also be locked. If you Duplicate a locked frame, the duplication will not be locked.
  • Size is Locked, as the name suggests, only locks the size of the frame.
  • Send to Scrapbook and Send to Patterns will not be covered here, except to say that this allows for saving content to be shared among documents.
  • Level allows you to move the frame up or down levels on the current layer. If your document has more than one layer, there will also be an item Send to Layer to allow moving the frame to a different layer.
  • Convert to gives you the following sub-choices:
    • Image Frame converts to that kind of frame, in which case your text becomes invisible, but will be restored if you convert back to a text frame. You cannot show text and an image together, except where text is incorporated in an image. Use a superimposed text frame to apply text over an image.
    • Outlines transforms the glyphs (characters) into vector graphics, which are then grouped. Some caution is advised here, since even though there seems to be an option to convert back to a text frame, this will not allow editing of the text. Best to Undo back to before the text to outlines conversion, but you must do this with the toolbar Undo or Ctrl+Z.
    • Polygon, like Image Frame, converts to a polygon, with apparent loss of text, recoverable with Convert to Text Frame.
  • Cut, Copy, and Delete are covered in Working with Frames.
  • Contents > Clear is only present when your frame has content, and you will get a dialog to Ok the operation.
  • Properties brings up or hides the Properties palette
  • </ul>
Any multipage document is likely to need to link text from one page to the next. An automatic way of setting this up is when a new document is created. This graphic is from the lower right corner of the New Document dialog. We have set the Options for 4 pages initially, with 2-column frames (which will fill to the margins), and an 11-point gap between columns. Show Document Settings After Creation will bring up the Document Settings dialog after OK is clicked.

You may freely edit the individual frames on pages afterward without losing your text linkage. Furthermore, if you add more pages to your document, they will also have these same linked frames. If you unlink somewhere in the middle, you will need to re-establish your linking pattern.

"Options in New Document Dialog"

Linking Existing Text Frames

Help text-frame-link.png A selected but unlinked text frame will show the toolbar icon to the left (green arrow) active. Click the link icon, then click the next frame that your selected frame is to link to. If you have more frames you wish to link to, continue clicking on them in order. When your linking is finished, remember to click the link icon to deactivate it.

Help text-frame-unlink.png Unlinking is a similar process. The icon will only be active if you have selected a linked frame. Select the frame where you want the linking to stop, click the unlink icon, then click the next frame in the linkage. You will need to re-establish a linking pattern if you simply want to skip over a particular frame.

Properties: Text

"Properties: Text tab" Due to the addition of new capabilities in versions 1.3.5+, and redesign of the Properties palette, the Text tab has become quite complex. The basic view seems simpler, but now we have a series of sub-tabs to choose from. At the top of the tab, there is a button for the font family, and then just below it the fontface in that family. Next we come to the spinbox for text size, and just below that a drop-down selector for linespacing, with 3 choices: Fixed, Automatic, and Align to Baseline Grid. Fixed linespacing allows you to set the space between lines of text using the spinbox to the right. Automatic spacing causes Scribus to adjust for you, according to the font size. The default setting for this is 120% of the font size, but this can be adjusted in File > Preferences > Typography. Finally, the row of buttons at the bottom sets justification – left, center, right, full, and forced full.

At this point it should be mentioned that when you are in Select Item mode, any changes will apply to the entire frame contents. In Edit Contents mode, things are a bit more complex.

  • If your cursor is at some particular position, changes in font, fontface, and size apply to the single glyph to the right of the cursor.
  • If your cursor is highlighting a block of text, changes in font, fontface, and size apply to the highlighted glyphs.
  • Changes in linespacing and justification apply to the paragraph in which the cursor is located or in the paragraph(s) where words are highlighted. Note that with automatic linespacing, this is adjusted line-by-line in situations where font size varies from word-to-word or letter-by-letter in the same paragraph. In most cases, you will find that fixed linespacing produces a more attractive result when font size is variable within a paragraph.

Baseline Grid

The baseline grid is always present but hidden by default, and is never seen in printed output or in your PDF. Click View > Show Baseline Grid to see it. Its default setting is 14.40 points, and the default is adjustable in File > Preferences > Guides, where you will see that the Offset is also adjustable – this is the displacement of glyphs from the baseline, and can have a positive or negative value.

To the right we see text aligned to the baseline grid for the entire frame, along with an illustration of localized adjustments in Edit Contents mode. The Offset here is 0. As you can see, this is also a method for keeping linespacing constant when font size varies in a paragraph, since aligning to the baseline grid is just another kind of fixed linespacing. The other common use for aligning to baseline grid is to make sure that lines of text match their spacing in adjacent frames or columns.

"Baseline Grid"

Color & Effects

Here we choose the colors for text. The fill color for a font is the main color. The line color only is active when outline or shadow effects are activated, and there is only one color applied to both effects.

From left to right, the effects buttons are as follows:

  1. Underline sections of text, including intervening spaces. Hold down the button to make adjustments of Displacement and Linewidth. Defaults are in File > Preferences > Typography.
  2. Underline words only, not intervening spaces. Hold down the button to make adjustments of Displacement and Linewidth. Defaults are in File > Preferences > Typography.
  3. Subscript. Relative size (<Scaling) and Displacement are set in File > Preferences > Typography.
  4. Superscript. Defaults are in File > Preferences > Typography.
  5. All caps.
  6. Small caps. There are a few fonts that have a real small caps subset, but this is a workaround for those that do not.
  7. Strikethrough. Hold down the button to make adjustments of Displacement and Linewidth. Defaults are in File > Preferences > Typography.
  8. Outline. Hold down the button to adjust Stroke width.
  9. Shadow. Hold down the button to adjust the X- and Y-Offsets.
  10. Right to Left Writing. Glyphs are flipped horizontally and run from right to left. Only available on a frame-wide basis, i.e., not by glyph/word/paragraph.
"Color & Effects
"Reverse a word workaround" To the left is a workaround for the apparent inability to reverse only an individual word using inline graphics. A small text frame was made with our word to be reversed, then converted to outlines. The group of outlines was then flipped, copied, then inserted inline (as in inline graphics) into our sample text.

Style Settings

Here in the Properties palette, we can only set an already created style. An explanation on creating and editing styles is found in WwStyles.html Working with Styles.

First Line Offset

First line offset refers to how closely the first line of text approaches the top of the frame or the space it is allowed. In this example, where we have set a top distance, we see from left to right, Maximum Ascent, Font Ascent, and Line Spacing offsets.
"First Line Offset

Columns and Text Distances

"Columns and Text Distances" Formerly, this was in the Shape tab, but now has sensibly moved to Text, since it does apply to text frames. Another enhancement is that now we can see in this example that two Columns, a Gap, and Top and Left distances have been set, even in an empty frame. This feature can be turned off/on with View > Show Text Frame Columns.

Tabulators

Tabulators will also be covered in Working with Styles, but here we can create and apply frame-wide tab stops. Operationally this is quite easy. Simply click somewhere along the ruler, and a Left tab is created. Adjust Position manually or with the spinbox. If desired you can change the tab type to Right, Period, Comma, or Center. To delete an individual tab, click-drag it off the ruler.

The space between stops (Fill Char) will by default be white space (None), or can be Dot, Hyphen, Underscore or a Custom character of your choice.

Tab Types

  • Left - entered text goes to the right of the stop.
  • Right - entered text goes to the left until Tab is pressed again.
  • Period - entered text or numbers center on a period/decimal point, ending when Tab is pressed again.
  • Comma - entered text or numbers center on a comma/decimal separator, ending when Tab is pressed again.
  • Center - entered text centers on the middle of a string, ending when Tab is pressed again.

"Tabulators"

Optical Margins

When there is punctuation ending or beginning a line, the adjacent characters will be pushed in a bit resulting in a slightly ragged edge to the text. Application of optical margins allows the punctuation to extend from the frame just a bit so that the edges of other characters line up more closely.

In the image to the right, on the left side we see the edge with no optical margins applied, and the right side shows what we see with optical margins.

"Optical Margins"

Advanced Settings

The upper part of this sub-tab contains some features long present in Scribus, but have simply moved here. Starting from the upper left spinbox and going clockwise, we have an adjustment to baseline, and not just for align to baseline grid, so that selected words can be shifted above or below the baseline for the desired effect.

Next we have kerning, in which the spaces between glyphs can be adjusted, again in a smaller than normal (negative percent) or larger fashion.

In the lower right corner we can stretch or shrink glyphs vertically, and in the lower left shrink or stretch horizontally.

"Advanced Settings"

Word Tracking and Glyph Extension

You might consider these a more advanced or intelligent kerning and character width adjustment, where we can, by setting the Minimum and Normal, or Minimum and Maximum parameters, allow for adjustments in spacing in a selective fashion, yet frame-wide. As you adjust these, you will see only some words, some lines adjusting. The idea is to adjust for more pleasing, even layout of the words in the frame, trying to avoid or eliminate problems like white space rivers.

This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder. A copy of the license is included in the section entitled "Text of the Open Publication License."