Table of Contents
HTML is a format used for internet pages and online documents.
HTML is a hypertext format–by clicking on a link you can jump to another spot in the text or even to another document.
E-Books are made of HTML documents. Thus, to generate an e-book, Papyrus also uses HTML.
You can work with your documents in Papyrus, just as always, and in the end HTML pages will be produced that are ready to be used in the internet or as an e-book.
Papyrus will decide automatically which text styles to use when creating your HTML document. You can, of course, change the appearance if you choose.
How your text will look depends on which CSS control file has been used.
This, after all, is the purpose of a CSS file: it determines how your HTML document will look.
When you export in HTML (this also goes for e-books), you can choose between a variety of CSS documents.
The export as an e-book/HTML can be found in the menu “File” under “Export.” For more information see the article about e-books.
In the export window, you can switch between the CSS templates Papyrus has to offer. The preview window on the right will show you how your HTML document will look with that specific CSS template.
For those of you familiar with HTML development and CSS documents, you can either use Papyrus’s CSS templates or one of your own CSS documents. All CSS templates–ours as well as yours–should be saved in the folder “Papyrus Author/Modules/Templates.css.”
If you want to use your own formatting for HTML or e-books, you will need to choose your settings for E-book/HTML export.
If you open an already-existing HTML document, Papyrus will automatically use the template “_HTML.PAP” from “(Papyrus Folder)\Modules\Templates.fix.” The style template window contains a list of all relevant HTML text style tags as a Papyrus text style template. The same applies when you want to create a new HTML document using the “HTML_Start.PAP” (we created this document specifically to be used this way, so it also contains all of the HTML tags).
Tables and Pictures in HTML
When Papyrus exports a table in HTML, every element of the table that can be preserved, will be. HTML tables, though, are not capable of using formulas, and it is also not possible to change the line style within a table when in HTML.
Otherwise, Papyrus tables and HTML tables work similarly: tasks like merging cells and changing the alignment of text within a cell are identical. The column width can be set in Papyrus to an absolute or relative width, which will also be used in HTML. You can change the settings for the column width in HTML in the “HTML” tab of the “Table” window.
Nested tables (a table within a table) do not work in Papyrus. However, all nested tables can also be created using separate tables, so this should not create a problem.
When it comes to HTML export with Papyrus, pictures are also easy to work with. How your picture is anchored will determine how it will look in HTML, but Papyrus will decide automatically whether a picture will be anchored as a character with a height and width, or whether it will be anchored to the beginning of a paragraph. Normally, you won’t need to change anything here.
It is also possible to use a background picture behind your text. The settings for this can be found in the “Background Picture” dialog (“Document” → “Document Properties” → “Background Picture”).
“Table HTML” Dialog
When you export a Papyrus document in HTML, whether and how column widths will be displayed is important for the display of the tables in general. These settings can be found in the HTML dialog for table properties in the “Graphics” menu → “HTML Table Properties.”
Picture Properties in HTML
The dialog for picture properties in HTML can be found in the “Graphics” menu → “Graphic Object Properties” → “eBook/HTML.”
The box for alternative text is for the case when your picture cannot be displayed for some reason. If this should happen, the alternative text will be displayed instead. This is mostly for when you export in HTML. Some reasons that the picture cannot be displayed in HTML are:
- The picture has only been saved as a reference in the HTML document and can’t be found
- If the internet connection is very slow, the pictures will load last (until that happens, the text will be displayed)
- The browser has stopped loading pictures because the connection is too slow
- A browser is being used on an ASCII terminal that is not able to work with pictures
File Path/URL for HTML export: If you enter something here, the text will be used as the path instead of the actual picture path when you export in HTML. This is useful when:
- You are referring to a URL instead of a relative path
- You are working with a document that will be exported in HTML and printed on paper and want to use a lower resolution in the HTML version than the Papyrus document. Simply prepare those versions of the pictures and enter the path here.
If you want to change the settings for a picture object in this dialog, you will first need to activate it by clicking on it. However, the alternative text and the file path/URL for HTML export are not actually linked to the picture object, but to the picture itself. That means that if you have used more than one version or made copies of the same picture in your text, you only need to change the settings once in this dialog and they will be applied each time the picture is used.
The dialog for HTML tags (“Insert” → “Hypertext”) allows you to add or change HTML tags that Papyrus does not yet recognize.
Papyrus recognizes almost all HTML tags, but in case you would like to add something new or change an existing tag, this dialog will allow you to do so.
Tags that Papyrus doesn’t recognize will be displayed with a small blue flag.
If Papyrus is able to recognize the tag as a closure for a valid tag, the flag will point to the left.
This can be changed in the “Display” drop-down menu.
Under the drop-down menu “For export format” you can choose whether the unknown tag should be valid for HTML or for another ASCII format.
By selecting the box “Insert into existing HTML tag” you can prevent the unknown tag from being separated into its own category (in HTML with angle brackets “<>”). The unknown tag will be inserted into an existing HTML tag instead, which means that parts of tags which Papyrus does not recognize will be sorted into existing HTML tags recognized by Papyrus.
Unfamiliar HTML Tags
This singular, but important setting will tell Papyrus how to read HTML documents with unfamiliar HMTL tags (language elements).
These tags can either remain in the text and Papyrus will simply ignore them, or, if you prefer simple, clean HTML, you can filter out all of the unknown tags.
The Checkbox for this can be found in the Papyrus “Preferences” → “Import/Export” → “HTML.”