Working With Text

From Scribus Documentation Project

Jump to: navigation, search

Contents

Single Text Frames

To create a text frame, click the Text Frame icon on the toolbar, menu item Insert > Text Frame, or use the keyboard shortcut: T. Then click-drag-let up to make your frame.

Automatic Text Frames

Unlike other kinds of frames, text frames can be inserted automatically when you create a new document. To the right hand side of the New Document dialog there is a checkbox for automatic frame creation, where you specify the number of columns and the gap between them. You can also initially indicate a number of pages. Any additional pages that you might insert later will continue with this same automatic scheme, in which a text frame will fill the page up to the preset margins. When there are multiple pages, the frames will be already linked. Relinking manually created frames is not supported with a chain of automatically created frames.

Context Menu: Text Frames

Here is the context menu introduced in Working with Frames, obtained by right-clicking inside a text frame.

Image:Context text.png

  • Info will give you some information about the content of the frame: the number of paragraphs, the number of words, the number of characters and its export/print status
  • Undo will undo the last operation on the frame itself. Operations which cannot be undone are deleting the frame or clearing or editing its contents.
  • Redo gives you an opportunity to revert an undo, in case you change your mind.
  • Get Text of course will be used to load a text file into the frame, generating a file dialog. If you use this option for a frame which already has content, that content will be replaced, but you will be warned.
  • Append Text allows for adding to already existing text in the frame.
  • Edit Text brings up the Story Editor.ENDNOTE
  • Sample Text gives you a choice of sample texts: the classic Lorem ipsum, and many other language variants.
  • Attributes. A frame may have a number of Attributes which can be used for various purposes, such as generating a table of contents.ENDNOTE
  • PDF Options allows for conversion of the frame to a PDF Annotation or PDF Bookmark for PDF export.
  • Is Locked will prevent editing of the frame in all respects.
  • Size is Locked locks only the size of the frame.
  • Send to Scrapbook. The ScrapbookENDNOTE is a folder where text frames and other content can be saved, and reused. Sending to Scrapbook does not delete the frame from the current document. Moreover, it will also make it available in other documents.
  • Send to Layer will only be present if you have more than one layerENDNOTE in your document, and allows you to move the frame to a different layer – you are presented with a list of choices.
  • Level. Use this to move this frame toward the surface (top) of the current layer or toward its bottom.
  • Convert to allows conversion to other frame types, but there are limitations, denoted by a choice being greyed out if not possible for the current frame. For example, a text frame in a series of linked frames cannot be converted.
  • Cut, Copy, Delete are conceptually self-explanatory, but what happens depends on what mode you are in. In Select Item mode, the frame and contents will be cut, copied, or deleted. In the editing mode, this applies to any highlighted text.
  • Contents > Clear allows for deleting the text from the frame. It cannot be undone, but you will receive a dialog, asking for confirmation.
  • Properties simply shows/hides the Properties Palette.

Entering/Editing Text in the Frame

The Story Editor

The Story Editor is the easiest way to enter text directly from the keyboard. With the text frame selected, click the Story Editor icon on the toolbar, select Edit > Edit Text..., or use the shortcut Ctrl+Y. It is also an option in the context menu ("Edit Text").

The many features of Story Editor are covered in its own chapter.ENDNOTE For this brief introduction, just note that a large array of text features are completely under your control in the Story Editor, including font face, color, spacing, kerning, justification, and more. Changing a setting will only modify text that you have selected (highlighted) and any subsequently entered text. Its most important function within Scribus, however, is the possibility to apply and change paragraph styles easily.

Take the time to learn how to create and use styles, also in its own chapter,ENDNOTE which will save time when you are repetitively using a specific set of text features.

Editing from the main page

Click the “Edit Contents of Frame" icon on the toolbar (keyboard: E). Double-clicking inside the frame will also activate this mode. When you click inside the frame, you will see a blinking vertical cursor where you may add, remove or edit text as you are used to from text editors or word processors. You may also select (highlight) text and change the highlighted text features in the Text tab of the Properties Palette. As you can see the choices are analogous to those in the Story Editor.

You can enter text directly from the keyboard, and also by using the context menu > Append Text... to add to the text from a file. Context menu > Get Text... will replace the text in the frame.

Editing All the text in the Frame

It's possible to manipulate the appearance of text in a frame by simply selecting the frame and using the Properties Palette. The text itself cannot be edited by this method, but font type and features can be, as well as applying Styles. If not already selected, click the “Select Item” icon on the Toolbar (keyboard: C). Note that if you are in the editing mode, pressing C will enter text in the frame – simply clicking outside the frame, then inside switches to Select Item mode. At this point, if you make changes in the Text tab of the Properties Palette, all text in the frame will be modified.

While you cannot enter text directly from the keyboard, you can use context menu > Append Text... to add to the text from a file. Just as you can in the editing mode, context menu > Get Text... will replace the text in the frame.

Inline Graphics

While in the editing mode (double-click on frame, click the icon on the Toolbar, or keyboard: E), you can add graphics like text in your frame. Select your image frame, copy it (context menu > Copy, Edit > Copy, or keyboard: Ctrl+C), then put your cursor where you want the graphic to be inserted, then Edit > Paste or keyboard: Ctrl+V to insert it wherever you want.

Here we see some Scribus icons inserted randomly in Sample Text. This will work best when the font size and image size are roughly in the same scale.

Loading Text from a File

Load text from a file from the context menu > Get Text, or from the menu File > Import > Get Text. You may also append text (Get Text will replace whatever is already in the frame). Files may also be loaded into the Story Editor.

The default behaviour of the File dialog is to automatically sense the type of file from its extension, then load its contents appropriately. You may also specify a type of file, and whether to remove all formatting from the text in the file (Import Text Only checkbox). This is useful when you want to ignore styles that would otherwise be imported from certain document types (OpenOffice.org for example).

Image:Importtextdialog.png

Selections for file type
Selections for file type
Import filter types
Import filter types

Comma Separated Values Files

There is a built-in filter for comma-separated values (CSV), which can be the output from a spreadsheet or database. They are most often automatically generated by other software, yet since they are simple, could be done manually. In Scribus, if you are not planning on stripping out the text, you will need to indicate what you want Scribus to do with the comma separated values.

Scribus will assign a default format (or Style) for your CSV data, once you indicate in the pop-up dialog what the field separators are. Tab stops will be created as needed for the number of fields per line. See below for a description of editing styles – the names of these Styles will take the name of the frame and append "-CSV_data", so for example, a frame named "Text5" will create a Style "Text5-CSV_data". This allows you to easily edit this style later and apply it to all the imported data in that frame.

Image:CSVimportdialog.png

Example import - First row is a header was checked
Example import - First row is a header was checked

Here is an example of a table imported from a database output. What you see here is that for the header line a bold style is set using the default font for the frame, and while the tab stops are actually the same as the columns below, they are center type rather than left as the rest of the columns are. Therefore, expect that adjustments in the assigned stops will be necessary.

HTML Files

Upon import, the importer will create paragraph styles which correspond to the HTML markup. Bold, italics and monospace text and alignment are also supported. Below is a listing of the HTML markup supported – both upper and lower case tags:

  • body, div, a – Text must be within the <body> tags.
  • p and br – Corresponding to paragraph and line breaks.
  • H1 to H4 – Correspond to heading sizes 1 to 4.
  • ol, ul, li – Corresponding to ordered or unordered lists.
  • pre and code – Corresponding to pre-formatted text and source code listings. These will be converted to text using the fixed pitch font Courier.
  • b, u, i, em, strong, sub. sup, del, u – Text formatting is converted to the corresponding font styles. Note, your default font should have all of these variants available to Scribus.
View in a browser
View in a browser

Here is an example showing part of a saved page from Wikipedia. One must save the source as an HTM or HTML file, then import into your frame – simply use “Get Text”. Similar to the above example, paragraph styles are created. To the right we see the result in Scribus. As you can see, there is an attempt to implement simple text styles such as bold or italics, but not font type. Links are shown in blue text. Bullets are changed to hyphens in the list structure shown. Tables will not be imported with any kind of a tabular structure. Much of the metadata and formatting information will be left out, but in a complex web page expect extraneous text.

View in Scribus after import
View in Scribus after import

Importing OpenDocument Text and OpenOffice.org documents

The importer for Writer imports only the text contained in a file. Thus, a compound Writer document with tables or charts will not be imported in its entirety. Tables, charts or other embedded objects need to be placed into their own Draw file, exported and then imported into Scribus separately.

The singular most important issue to take into consideration for hassle-free OpenOffice.org Writer import is well chosen usage and correctly applying of Styles in OpenOffice.org. Doing so will greatly reduce the amount of time needed within Scribus to format and style text. Any special paragraph styles in your Writer file will automatically be imported into your existing Scribus document.

Here are the steps necessary to import an OpenOffice.org Writer file or an OpenDocument Text file:


  1. Select the text frame.
  2. Right Click > Get Text...
  3. Select your OpenOffice.org document. The importer is smart enough to know recognize the type of OpenOffice.org file (*.sxw or *.odt).

This will import all the text in your source document, so ensure there is enough space in your frames or link extra text frames on subsequent pages. You can also add and link later. You can comfortably import 10, 20 or even 50 pages of text in one go. In testing the importer, 600 pages have been imported. However, the practical limit is probably not more than a chapter's (15–30 pages) worth of text for performance reasons.

When importing text from OO.org there are three important options, which need to be carefully considered:

  • Update Paragraph Styles: This option will tell Scribus to change the formatting of any created styles in your Scribus document to follow those in the OO.org document.
  • Merge Paragraph Styles: This option looks at the actual attributes (fonts, size) of the OO.org file and merges styles which have common attributes. This can help to eliminate differently named, but similar styles.
  • Use document name as a Prefix for Paragraph Styles: This is self-explanatory, but can be useful for sorting styles when importing from several documents.
  • Do Not Ask Again: Here you should be cautious, as this last option will make this permanent unless you edit your preferences files in a text editor. If you inadvertently checked this option and want to revert it, open the file prefs13.xml in the hidden folder ./scribus in your $HOME directory (or in Documents and Settings on Windows) with a text editor. Search for the text string <attribute key="askAgain" value="0"/>, change the 0 to 1 and save the file. Now the import dialog will show up again.

Image:ODTimportdialog.png

Here is an example importing part of the Introduction from Origin of Species by Charles Darwin, to which some font types and styles have been artificially applied. The two font types (Liberation Serif and Luxi Sans) have been correctly used, and features such as center justification, bold, and italics have been applied as well.

In the original ODT document, only one paragraph style was used, Text body. On import to Scribus, two Styles were created, origin-example_P2 for the initial heading, and origin-example_Text_20_body. Even though the font changed in the next paragraph, Scribus did not create a new paragraph style, since this was not done in oowriter. Instead, the new font was applied to the previous style, just as it was in the original ODT file.

Palm PDB documents

Pilot Database formatted files (.pdb) may also be imported. Like those processed by antiword, they will be stripped to plain text. Unlike .doc files, no additional software is needed.

Word (.doc) File Import

In order for Word files to be imported, and for that matter to be acknowledged as existing in the dialog, you must have installed the package antiword. Consult your distribution/OS to find and install this – it will come with your Windows installation of Scribus automatically.

With the appropriate setup (see infobox) you can also import Word (.doc) files, though these will be stripped of formatting. A workaround for this would be to save from Word as HTML or load the *.doc file into another application such as OpenOffice.org Writer, then save to *.sxd, *.odt or HTML format.

Text Filters and Text Files

Text Filters

You can also create your own filters, used to tell Scribus which Style to apply to a given paragraph. See Importing Tagged Text with FiltersENDNOTE for detailed information.

Text Files

Finally, for plain text files, one can simply import the text into the frame. This will be automatic for files ending in .txt but if the file has some other extension, specifying this action will help.

Sample Text

There are also the special files of "Lorem ipsum" text, that can most easily be accessed via context menu > Sample Text. Scribus has this in several language versions, in addition to fake Latin. Lorem ipsum is used as arbitrary text, for assessing typographic aspects of a given font, justification, and other features which may help in making decisions as a layout is being developed.

Linking One Frame to Another

Text may be continued from one frame to another, on the same page or different pages.

Before linking
Before linking
After linking – arrows show path of text flow
After linking – arrows show path of text flow

Here are the steps:

  • Select the first frame
  • Click the "Link Text Frames" icon on the Toolbar (keyboard: N)
  • Click the second frame – that's it.
  • Continue clicking to continue linking further frames. Remember that the links go in the order that you click from one to the next. When you are finished, click the Select icon to stop linking.
  • To add more frames later, create the new frames, select the last of the linked frames, then click the Link icon, then the new frame(s) you want to link to. Newly added frames always are appended at the end.

Be sure to unselect the "Link Frames" icon or click on the canvas when you are finished, since this will interfere with normal operations while selected.

Note that frames can be linked before or after they have any content. On the document, you can tell when a frame is linked, because its border will have a solid dark red line for its border.

Unlinking Frames

Unlink text frames is operationally similar – click the first frame, then the "Unlink" icon in the toolbar (keyboard: U), then the frames to unlink.

Columns

Two-column format, Border (Line) Color set to Black
Two-column format, Border (Line) Color set to Black

In the middle of the Shape tab in the Properties Palette is a block labeled “Distances”. Here is where we can set the number of columns in a text frame. columns can be set before or after text is entered. “Gap” refers to the space between columns, and “Top”, “Bottom”, “Left”, and “Right” refer to the empty space between the text and the borders of a frame. As shown here, these spaces may become necessary when we are applying a color to the frame border.

Because of the way that a font may be placed on its baseline, adjusting the offset to baseline can be useful for evening out the top and bottom spaces. This text shows good alignment of the text in both columns, obtained by setting “Align to Baseline”. See the settings in Text tab for further help with these. Baseline grid spacing for the current document can be changed in File > Document Settings > Guides.

Columns – An Alternative Approach

Columns In-Frame (top), and With Two Linked Frames (bottom)
Columns In-Frame (top), and With Two Linked Frames (bottom)

Like many things in Scribus, there is more than one way to accomplish a columns structure, and you may use more than one in the same document.

To the right we see the bottom of the two-column frame introduced above, and the top of two frames, aligned with the top frame and linked, so that text flows from one to the next – we can see they are linked because they are outlined in solid pale red (these red lines will not show when the document is printed or in the PDF). We are using page guides and the margins to help us align these new frames with the above columns, and even though these frames are linked, you can see that each can have independent left and right spaces, so lining up our text with the top frame is quite easy. Using “Align to Baseline” is especially necessary when we generate two columns with separate frames and when the tops of the frames are not aligned.

Tabulators

Editing Tabs from the Properties Palette

Clicking on the "Tabulators" button in the Shape tab of the Properties Palette brings up the "Manage Tabulators" dialog, the central feature being a ruler for your frame in the appropriate units. Stretch out the dialog or scroll along the ruler as needed. Left-clicking along the ruler adds new stops, the active stop being highlighted in red. To highlight and adjust an existing stop, carefully place the cursor over the stop until the cursor looks something like <->, then left-click. Now see that you can either manually adjust its position or use the spinbox to do “Position” more precisely.

Appearance of stops on the ruler: Left, Right, Period (selected), Comma, CenterPeriod and Comma are indistinguishable
Appearance of stops on the ruler:
Left, Right, Period (selected), Comma, Center
Period and Comma are indistinguishable

Tabs may behave in various ways. A typical, typewriter-like tab stop behaves like the stops labelled left – pressing the tab key jumps to the stop, and subsequently entered text appears to the right of the stop in a left-to-right fashion. A right stop, in contrast, will enter text which builds to the left of the tab stop, still in a left-to-right fashion. Period (aka full stop) and comma are used to align around the decimal point or comma respectively (in many countries, commas are used in numbers where English uses decimal points, and vice-versa) – in essence each will build text to the left until you type the appropriate character, then build to the right. The “Center” type of stop centers entered text on the stop, until you press the tab key once again. Right-clicking a tab stop will toggle through the choices.

Left-click and drag a stop off the ruler to delete an individual one, “Delete All” is self-explanatory. Press “OK” to save stop positions.

Editing Tabs from the Main Page in the Editing Mode

Tabs in ruler
Tabs in ruler

Here we see a closeup of a text frame near the ruler in the main screen. The frame is in editing mode. What we see here is that replacing the black numbers and ticks in the ruler are blue ones, corresponding to a ruler for the frame – in this example the units are in points.

We also see our tab stops indicated in black, the one on the left is a left stop and the other is period. Just as in our “Manage Tabulators” dialog, we can manually move this with the left mouse button or toggle through types of stops with a right click on a stop symbol. Drag the tab stop off the ruler to delete it. Enlarging the view helps to place stops with more precision.

Editing Tabs as a Feature of a Style

This is covered in the chapter Working with Styles.ENDNOTE

Properties: Shape: Text Flows Around Frame

Use this to determine what happens with text underneath the selected frame. Flow can be around the frame, the Bounding Box, or the Contour Line. See Working with FramesENDNOTE for further information.

Image:Textflowsexample.png

The Text Tab of the Properties Palette

The Text tab of the Properties Palette shows the font name, and just under it the font face. These font subtypes must be included in the font description, since Scribus does not make artificial ones if they do not exist. Incidentally, there is a small symbol to the left of the name indicating its type. This one is an Open Type font (a blue "O") – TrueType fonts are indicated by a red "T", PostScript/Type 1 fonts by a green "1".

Next we see two colums of spinboxes:

  • Font size
  • Line spacing
  • Width – deviation from standard
  • Offset to baseline of characters
  • Kerning
  • Height – deviation from standard


Notes

  • Offset to baseline of characters allows for placement of font characters a set distance from the baseline grid.
  • Line Spacing – If you click-hold the icon to the left of the spinbox, you are offered a choice of Fixed Linespacing, Automatic Linespacing, or Align to Baseline Grid. When you adjust font size, linespacing automatically changes to 120% of the font size. Fixed Linespacing allows you to then independently adjust linespacing, Automatic Linespacing does not. Align to Baseline Grid keeps the linespacing according to the baseline grid, adjustable in File > Document Settings > Guides.
  • Kerning adjusts the space between individual letters.

Now we have colors:

  • Line (only applies to outline and shadow and these will use the same color), and
  • Fill (body of a character)

For both Line and Fill, click the percentage to select a degree of shading (Saturation) from a list, or choose Other... to enter a value between 0 and 100.

Under these is a row of buttons, from left to right:

  • Underline – Click-hold to adjust displacement and line width.
  • Underline Words only (not intervening spaces) – Click-hold to adjust displacement and line width.
  • Subscript – Position and size are editable in File > Document Settings > Typography.
  • Superscript - Position/size editable in File > Preferences, File > Document Settings.
  • All Caps – For all letters uppercase glyphs will be used.
  • Small Caps – Upercase letters will get a large cap for the capitalized letter, and lowercase letters a small one.
  • Strikethrough – Click-hold to adjust displacement and line width.
  • Outline– Click-hold to adjust linewidth.
  • Shadow – Click-hold to adjust X-Offset and Y-Offset.
  • Right to Left Writing – Completely mirrors the direction of all characters in a text frame.

Next are justification choices: Left, Center, Right, Full, and Forced Full. With Forced Full, even partially filled lines will be fully justified.

To the right of each color selector is a percentage. Click and hold to choose a shading (Saturation) from a list or enter a custom value (Other...).

Personal tools