diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2012-03-17 15:38:02 +1300 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2012-03-17 15:38:02 +1300 |
commit | ee7ddb507f110bea2ca2f546cae0b8e455b32fc8 (patch) | |
tree | 3c7f0740dbb425e141adaf5c0587687e8d979639 | |
parent | 4f6e38a588313885d1799711aa076dd586e008b2 (diff) | |
download | asciidoc-git-ee7ddb507f110bea2ca2f546cae0b8e455b32fc8.tar.gz |
FAQ updates.8.6.7
-rw-r--r-- | CHANGELOG.txt | 2 | ||||
-rw-r--r-- | doc/asciidoc.dict | 10 | ||||
-rw-r--r-- | doc/asciidoc.txt | 2 | ||||
-rw-r--r-- | doc/faq.txt | 74 |
4 files changed, 70 insertions, 18 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 647ee9f..8965577 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -23,7 +23,7 @@ things, fixes Jython compatibility and improves Windows compatibility. HTML backends to allow the Table of Contents placement to be set manually by the author. - Added FAQs: 'How can I control page breaks when printing HTML - outputs?' and ' 'Is it possible to reposition the Table of Contents + outputs?' and 'Is it possible to reposition the Table of Contents in HTML outputs?'. - Added `--backend` and `--backend-opts` options to the 'a2x' command to allow 'a2x' to use backend plugin code extensions. diff --git a/doc/asciidoc.dict b/doc/asciidoc.dict index fb27aef..5c8342b 100644 --- a/doc/asciidoc.dict +++ b/doc/asciidoc.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 1070 +personal_ws-1.1 en 1078 mandoc colspecs API @@ -73,6 +73,7 @@ Potapov nisl Gao nullam +LibreOffice Moolenaar Habitasse mimetypes @@ -218,6 +219,7 @@ articleinfo auctor refname mim +Paillotin Farhat uninstall localdate @@ -296,6 +298,7 @@ AsciiMathML asciimathml conf RCS +lowriter UnicodeDecodeError CalloutList SidebarBlocks @@ -491,6 +494,7 @@ xyz simpara lf defacto +resized mb IndentedBlocks js @@ -529,6 +533,7 @@ td px vivamus py +Helleu getElementById addon th @@ -543,6 +548,7 @@ autolabel LinuxDoc linuxdoc tt +Hackett VM Frédérique SidebarBlock @@ -881,6 +887,7 @@ bodyrow navMap listtags mauris +Wiers ListingBlocks TableUnderline bookinfo @@ -1029,6 +1036,7 @@ Freshmeat dbhtml manversion TableBody +Loïc abc aliquam llevar diff --git a/doc/asciidoc.txt b/doc/asciidoc.txt index e8fbeb4..c7730ba 100644 --- a/doc/asciidoc.txt +++ b/doc/asciidoc.txt @@ -5890,7 +5890,7 @@ Link CSS stylesheets and JavaScripts. By default 'linkcss' is undefined in which case stylesheets and scripts are automatically embedded in the output document. -|max-width |html5, xhtml11 | +|[[X103]]max-width |html5, xhtml11 | Set the document maximum display width (sets the 'body' element CSS 'max-width' property). diff --git a/doc/faq.txt b/doc/faq.txt index 944673b..ae4d436 100644 --- a/doc/faq.txt +++ b/doc/faq.txt @@ -381,7 +381,7 @@ http://dblatex.sourceforge.net/doc/sec-custom.html[doc.lot.show XSL parameter] -- you can set it using the dblatex `--param` command-line option, for example: - $ a2x --dblatex-opts="--param=doc.lot.show=figure,table" doc/article.txt + a2x --dblatex-opts="--param=doc.lot.show=figure,table" doc/article.txt == How can I stop the document title being displayed? @@ -477,7 +477,7 @@ CSS stylesheet. For example the following command will generate a single `article.html` file containing embedded images, admonition icons and the CSS stylesheet: - $ asciidoc -a data-uri -a icons article.txt + asciidoc -a data-uri -a icons article.txt == Are there any tools to help me understand what's going on inside AsciiDoc? @@ -943,20 +943,55 @@ http://live.gnome.org/Yelp[Yelp], the GNOME help viewer, does a creditable job of displaying DocBook XML files directly. -== Can you create ODF documents using AsciiDoc? +== Can you create ODF and PDF files using LibreOffice? -The easiest and highest fidelity method I've seen is to generate -HTML from AsciiDoc then paste it from your browser (we use Firefox) -into OpenOffice Writer. +https://www.libreoffice.org/[LibreOffice] can convert HTML produced by +AsciiDoc to ODF text format and PDF format (I used LibreOffice 3.5 at +the time of writing, the fidelity is very good but it's not perfect): -- I found that that there is better fidelity pasting HTML generated by - the 'html4' backend instead of the default 'xhtml11' backend. -- Don't paste AsciiDoc tables of contents, OpenOffice Writer (I was - using version 2.3) hangs when saving. This may be something to do - with the embedded JavaScript but I haven't looked closely at it, I - may even be wrong about this. +. Create the HTML file using AsciiDoc, for example: -This tip was contributed by Bernard Amade. + asciidoc -a icons -a numbered -a disable-javascript article.txt ++ +JavaScript is disabled because LibreOffice does not execute +JavaScript, this means that AsciiDoc table of contents and footnotes +will not be rendered into ODF (if you want the table of contents and +footnotes you could manually cut and paste them from a Web browser). + +. Convert the HTML file to an ODF text file using LibreOffice: + + lowriter --invisible --convert-to odt article.html ++ +-- +The images imported from an HTML file will be linked, if your document +contains images you should convert them to embedded images: + +[lowerroman] +. Open the document in LibreOffice Writer. +. Run the 'Edit->Links...' menu command. +. Select all links and press the 'Break Link' button. + +Some images may also have been resized. To restore an image to its +original size: + +[lowerroman] +. Right-click on the image and select the 'Picture...' menu item. +. Click on the 'Crop' tab. +. Press the 'Original Size' button. + +-- + +. Convert the ODF file to an PDF text file using LibreOffice: + + lowriter --invisible --convert-to pdf article.odt ++ +A PDF index is automatically created using the section headings. + +Alternatively you could manually copy-and-paste the entire document +from a Web browser into a blank ODF document in LibreOffice -- this +technique will bring through the table of contents and footnotes. + +This tip was originally contributed by Bernard Amade. == How can I suppress cell separators in included table data files? @@ -1017,7 +1052,7 @@ characters. If you need spaces encode them as `%20`. For example: Set the AsciiDoc 'lang' attribute to the appropriate language code. For example: - $ a2x -a lang=es doc/article.txt + a2x -a lang=es doc/article.txt This will ensure that downstream DocBook processing will generate the correct language specific document headings (things like table of @@ -1090,7 +1125,7 @@ The default format for the `{localdate}` attribute is the ISO 8601 the `{localdate}` attribute. For example by setting it using the asciidoc(1) `-a` command-line option: - $ asciidoc -a localdate=`date +%d-%m-%Y` mydoc.txt + asciidoc -a localdate=`date +%d-%m-%Y` mydoc.txt You could also set it by adding an Attribute Entry to your source document, for example: @@ -1252,3 +1287,12 @@ and this where you want the TOC to appear: toc::[] ------- + +== HTML generated by AsciiDoc fills the width of the browser, how can I limit it to a more readable book width? +You can set the maximum with for outputs generated by 'html5', +'xhtml11' and 'slidy' backends by assigning the +link:userguide.html#X103[max-width] attribute (either from the +command-line or with an attribute entry in the document header). For +example: + + asciidoc -a max-width=55em article.txt |