## 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 has or had been the recommended way to enter text manually from the keyboard. At this stage of Scribus development, some argue that Story Editor has lost any unique approach to editing text. Currently, by using Edit Contents mode combined with the Text Properties palette, you can more readily edit your frame and have the advantage of instantly seeing the results of your edits on the canvas. If there might be one advantage in Story Editor, it is in a situation where text may be linked from one fame to another and over several pages. In this case you can easily move through the entirety of the linked text in the editor window.

Bring up the Story Editor (SE) from the Context Menu or with Ctrl+T. 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. It's worth running your cursor over the toolbar icons to note that, beginning with the 4th icon from the left, you can exit SE and update the frame, leave SE without updating the frame, reload from the frame (losing any edits), and update the frame without exiting. SE has a convenient way to apply Paragraph Styles and their associated Character Styles, but not Character Styles by themselves. Both of these are quite easy now combining Edit Contents and Text Properties.

### 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

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. Check Importing HTML files for more detail.
- ODT files (for example from LibreOffice) 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 Writer (or another wordprocessor that supports ODT). This can also be a workaround for DOC or other files, by importing into Writer 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.

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.

### Context Menu

Right-click on a frame to show its Context Menu, seen to the right. The layout has changed considerably with 1.5 versions of Scribus. If your frame has no content, some of these choices may not be present.

- Info gives information about the content of the frame, statistics on number of paragraphs, lines, and so forth, and also whether print is enabled, which also applies to whether it will be included in PDF export.
- Content has submenu items, as shown.

- Get Text allows for import of text from a file, and will replace any existing text in the frame.
- Append Text will also import text from a file, but will add it to the end of the current text.
- Edit Text brings up the Story Editor
- Sample Text allows for importing so-called Lorem ipsum text, not only in the original (pseudo-)Latin, but also many other languages. A dialog comes up for choice of the language and amount of sample text to create.
- Clear is only present when your frame has content, and you will get a dialog to Ok the operation.

- Adjust Frame Height to Text is a new feature, and will shrink the height of the frame to fit the amount of text. It will not expand the height when there is text overflow.
- Locking has submenu items.

- 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 has submenu items.

- Scrapbook and Patterns will not be covered here, except to say that this allows for saving content to be shared among documents.
- Inline Items will allow for the frame to be inserted into a line of text like a glyph.

- Send to Layer (not shown) will appear if your document has more than one layer, to allow moving the frame to a different layer.
- Level has submenu items. Just as in the X,Y,Z tab of Properties, you can Raise or Lower a level, or Raise to Top or Lower to Bottom.
- 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.
- Symbol, which is new to 1.5.3 versions, allows its reuse as is, or as a Pattern. From the menu, Windows > Symbols brings up the Symbols palette.

- Attributes and PDF Options are advanced features not covered here.
- Edit has submenu items.

- Cut, Copy, and Delete are covered in Working with Frames. These apply to the entire frame and contents.
- Undo will undo the last operation on the frame. Redo is available when some operation has been undone.

- Properties brings up or hides the Properties palette

### Linking Text Frames

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.

### Linking Existing Text Frames

Begin with a text frame selected. 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, you need to click the icon again, then click the next frame in the series.

If your frame is one of a linked series of frames, clicking the unlink icon will show you the link(s) with arrows from one frame to the next. To unlink, click the frame after the arrow denoting the link to be broken. Note that all the subsequent links will be broken as well.

See also:

<
- Text Properties
- Working with Frames
- Working with Styles
- Hyphenation
- Page Numbering
- Short Words Plug-in
- Importing OpenOffice.org and ODF Files
- Importing HTML