Help:Manual Importhtml: Difference between revisions
(Created page with "Category:Help_Manual Table of Contents <h2>Notes on Importing HTML into Scribus</h2> <p>Scribus has an HTML importer which can import clean, well formed HTML a...") |
No edit summary |
||
Line 4: | Line 4: | ||
<h2>Notes on Importing HTML into Scribus</h2> <p>Scribus has an HTML importer which can import clean, well formed HTML and retain much of the layout and and formatting, provided the formatting or styling is basic HTML <strong>in the HTML markup</strong>, not via css style sheets. CSS support will come in the future.</p> <h4>So what kind of HTML is supported and how does it work ?</h4> <p>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.</p> <ul> <li>body, div, a - Text must be within the <body> tags.</li> <li>p and br - Corresponding to paragraph and line breaks.</li> <li>H1 to H4 - Correspond to Heading Sizes 1 to 4.</li> <li>ol,ul,li - Corresponding to ordered or unordered lists.</li> <li>pre and code - Corresponding to preformatted text and source code listings. These will be converted to text using the fixed pitch font Courier.</li> <li>www. style web links are converted to text with blue coloring to highlight them in the same manner as most web browsers do in their default settings.</li> <li>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.</li> </ul> Hence the following section of html will display and create paragraph styles in Scribus as demonstrated below. <pre> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>H1 Text</h1> <h2>H2 Text</h2> <h3>H3 Text</h3> <h4>H4 Text</h4> <ol> <li>Ordered List Item 1 </li> <li>Ordered List Item 2 </li> </ol> <ul> <li>Un-Ordered List Item 1 </li> <li>Un-Ordered List Item 2 </li> </ul> <code>code listings</code> <p><b>Bold Paragraph Style</b></p> <p><i>Italic Paragraph Style</i></p> <p align="center">Centered Text</p> </body> </html> </pre> <p>Below the imported styles from the file above.</p> <table width="100%"> <tr> <td align="center">[[File:Help_htmlstyle.png|alt= "HTML Styles imported into Scribus"]]</td> </tr> </table> <p>Below is the imported text displayed on the canvas:</p> <table width="100%"> <tr> <td align="center">[[File:Help_htmlimport.png|alt= "HTML imported into Scribus"]]</td> </tr> </table> <p>Not all applications export HTML with high fidelity to the W3C specifications. You can use htmltidy to clean up and make conformant HTML text you need to import. See : [http://w3c.org http://w3c.org]</p> | <h2>Notes on Importing HTML into Scribus</h2> <p>Scribus has an HTML importer which can import clean, well formed HTML and retain much of the layout and and formatting, provided the formatting or styling is basic HTML <strong>in the HTML markup</strong>, not via css style sheets. CSS support will come in the future.</p> <h4>So what kind of HTML is supported and how does it work ?</h4> <p>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.</p> <ul> <li>body, div, a - Text must be within the <body> tags.</li> <li>p and br - Corresponding to paragraph and line breaks.</li> <li>H1 to H4 - Correspond to Heading Sizes 1 to 4.</li> <li>ol,ul,li - Corresponding to ordered or unordered lists.</li> <li>pre and code - Corresponding to preformatted text and source code listings. These will be converted to text using the fixed pitch font Courier.</li> <li>www. style web links are converted to text with blue coloring to highlight them in the same manner as most web browsers do in their default settings.</li> <li>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.</li> </ul> Hence the following section of html will display and create paragraph styles in Scribus as demonstrated below. <pre> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>H1 Text</h1> <h2>H2 Text</h2> <h3>H3 Text</h3> <h4>H4 Text</h4> <ol> <li>Ordered List Item 1 </li> <li>Ordered List Item 2 </li> </ol> <ul> <li>Un-Ordered List Item 1 </li> <li>Un-Ordered List Item 2 </li> </ul> <code>code listings</code> <p><b>Bold Paragraph Style</b></p> <p><i>Italic Paragraph Style</i></p> <p align="center">Centered Text</p> </body> </html> </pre> <p>Below the imported styles from the file above.</p> <table width="100%"> <tr> <td align="center">[[File:Help_htmlstyle.png|alt= "HTML Styles imported into Scribus"]]</td> </tr> </table> <p>Below is the imported text displayed on the canvas:</p> <table width="100%"> <tr> <td align="center">[[File:Help_htmlimport.png|alt= "HTML imported into Scribus"]]</td> </tr> </table> <p>Not all applications export HTML with high fidelity to the W3C specifications. You can use htmltidy to clean up and make conformant HTML text you need to import. See : [http://w3c.org http://w3c.org]</p> | ||
{{OPL}} |
Latest revision as of 18:34, 29 March 2012
Notes on Importing HTML into Scribus
Scribus has an HTML importer which can import clean, well formed HTML and retain much of the layout and and formatting, provided the formatting or styling is basic HTML in the HTML markup, not via css style sheets. CSS support will come in the future.
So what kind of HTML is supported and how does it work ?
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 preformatted text and source code listings. These will be converted to text using the fixed pitch font Courier.
- www. style web links are converted to text with blue coloring to highlight them in the same manner as most web browsers do in their default settings.
- 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.
Hence the following section of html will display and create paragraph styles in Scribus as demonstrated below.
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>H1 Text</h1> <h2>H2 Text</h2> <h3>H3 Text</h3> <h4>H4 Text</h4> <ol> <li>Ordered List Item 1 </li> <li>Ordered List Item 2 </li> </ol> <ul> <li>Un-Ordered List Item 1 </li> <li>Un-Ordered List Item 2 </li> </ul> <code>code listings</code> <p><b>Bold Paragraph Style</b></p> <p><i>Italic Paragraph Style</i></p> <p align="center">Centered Text</p> </body> </html>
Below the imported styles from the file above.
Below is the imported text displayed on the canvas:
Not all applications export HTML with high fidelity to the W3C specifications. You can use htmltidy to clean up and make conformant HTML text you need to import. See : http://w3c.org
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." |