org.texi (Custom Table Styles - An Illustration): New node
Also improve various menus.
This commit is contained in:
parent
cbd4bd7bdb
commit
ebd450a170
165
doc/org.texi
165
doc/org.texi
|
@ -612,7 +612,7 @@ DocBook export
|
||||||
|
|
||||||
OpenDocument Text export
|
OpenDocument Text export
|
||||||
|
|
||||||
* Pre-requisites for @acronym{ODT} export::
|
* Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on
|
||||||
* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export
|
* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export
|
||||||
* Applying Custom Styles:: How to apply custom styles to the output
|
* Applying Custom Styles:: How to apply custom styles to the output
|
||||||
* Links in @acronym{ODT} export:: How links will be interpreted and formatted
|
* Links in @acronym{ODT} export:: How links will be interpreted and formatted
|
||||||
|
@ -620,27 +620,20 @@ OpenDocument Text export
|
||||||
* Images in @acronym{ODT} export:: How to insert images
|
* Images in @acronym{ODT} export:: How to insert images
|
||||||
* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted
|
* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted
|
||||||
* Literal Examples in @acronym{ODT} export:: How source and example blocks are formatted
|
* Literal Examples in @acronym{ODT} export:: How source and example blocks are formatted
|
||||||
* Advanced topics in @acronym{ODT} export::
|
* Advanced topics in @acronym{ODT} export:: Read this if you are a power user
|
||||||
|
|
||||||
Math formatting in @acronym{ODT} export
|
Math formatting in @acronym{ODT} export
|
||||||
|
|
||||||
* Working with @LaTeX{} math snippets::
|
* Working with @LaTeX{} math snippets:: How to embed @LaTeX{} math fragments
|
||||||
* Working with MathML or OpenDocument formula files::
|
* Working with MathML or OpenDocument formula files:: How to embed equations in native format
|
||||||
|
|
||||||
Advanced topics in @acronym{ODT} export
|
Advanced topics in @acronym{ODT} export
|
||||||
|
|
||||||
* Exporting and Converting to Other formats::
|
* Exporting and Converting to Other formats:: How to produce @samp{pdf} and other formats
|
||||||
* Configuring a converter::
|
* Working with OpenDocument style files:: Explore the internals
|
||||||
* Using the converter::
|
* Creating One-Off styles:: How to produce custom highlighting etc
|
||||||
* Working with OpenDocument style files::
|
* Customizing Tables in @acronym{ODT} export:: How to define and use Table templates
|
||||||
* Working with raw OpenDocument XML::
|
* Validating OpenDocument XML:: How to debug corrupt OpenDocument files
|
||||||
* Customizing Tables in @acronym{ODT} export::
|
|
||||||
* Validating OpenDocument XML::
|
|
||||||
|
|
||||||
Exporting and Converting to Other formats
|
|
||||||
|
|
||||||
* Configuring a converter:: How to install a converter
|
|
||||||
* Using the converter:: How to use the converter
|
|
||||||
|
|
||||||
Publishing
|
Publishing
|
||||||
|
|
||||||
|
@ -10768,7 +10761,7 @@ Open Document Format for Office Applications (OpenDocument) Version 1.2}} and
|
||||||
are compatible with LibreOffice 3.4.
|
are compatible with LibreOffice 3.4.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Pre-requisites for @acronym{ODT} export::
|
* Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on
|
||||||
* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export
|
* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export
|
||||||
* Applying Custom Styles:: How to apply custom styles to the output
|
* Applying Custom Styles:: How to apply custom styles to the output
|
||||||
* Links in @acronym{ODT} export:: How links will be interpreted and formatted
|
* Links in @acronym{ODT} export:: How links will be interpreted and formatted
|
||||||
|
@ -10776,7 +10769,7 @@ are compatible with LibreOffice 3.4.
|
||||||
* Images in @acronym{ODT} export:: How to insert images
|
* Images in @acronym{ODT} export:: How to insert images
|
||||||
* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted
|
* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted
|
||||||
* Literal Examples in @acronym{ODT} export:: How source and example blocks are formatted
|
* Literal Examples in @acronym{ODT} export:: How source and example blocks are formatted
|
||||||
* Advanced topics in @acronym{ODT} export::
|
* Advanced topics in @acronym{ODT} export:: Read this if you are a power user
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Pre-requisites for @acronym{ODT} export, @acronym{ODT} export commands, OpenDocument Text export, OpenDocument Text export
|
@node Pre-requisites for @acronym{ODT} export, @acronym{ODT} export commands, OpenDocument Text export, OpenDocument Text export
|
||||||
|
@ -11011,9 +11004,11 @@ original height:width ratio, do the following
|
||||||
@node Math formatting in @acronym{ODT} export, Literal Examples in @acronym{ODT} export, Images in @acronym{ODT} export, OpenDocument Text export
|
@node Math formatting in @acronym{ODT} export, Literal Examples in @acronym{ODT} export, Images in @acronym{ODT} export, OpenDocument Text export
|
||||||
@subsection Math formatting in @acronym{ODT} export
|
@subsection Math formatting in @acronym{ODT} export
|
||||||
|
|
||||||
|
@acronym{ODT} exporter has special support for handling Math.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Working with @LaTeX{} math snippets::
|
* Working with @LaTeX{} math snippets:: How to embed @LaTeX{} math fragments
|
||||||
* Working with MathML or OpenDocument formula files::
|
* Working with MathML or OpenDocument formula files:: How to embed equations in native format
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Working with @LaTeX{} math snippets, Working with MathML or OpenDocument formula files, Math formatting in @acronym{ODT} export, Math formatting in @acronym{ODT} export
|
@node Working with @LaTeX{} math snippets, Working with MathML or OpenDocument formula files, Math formatting in @acronym{ODT} export, Math formatting in @acronym{ODT} export
|
||||||
|
@ -11131,17 +11126,19 @@ the variable @code{org-export-odt-fontify-srcblocks}.
|
||||||
@node Advanced topics in @acronym{ODT} export, , Literal Examples in @acronym{ODT} export, OpenDocument Text export
|
@node Advanced topics in @acronym{ODT} export, , Literal Examples in @acronym{ODT} export, OpenDocument Text export
|
||||||
@subsection Advanced topics in @acronym{ODT} export
|
@subsection Advanced topics in @acronym{ODT} export
|
||||||
|
|
||||||
|
If you rely heavily on @acronym{ODT} export, you may want to exploit the full
|
||||||
|
set of features that the exporter offers. This section describes features
|
||||||
|
that would be of interest to power users.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Exporting and Converting to Other formats::
|
* Exporting and Converting to Other formats:: How to produce @samp{pdf} and other formats
|
||||||
* Configuring a converter::
|
* Working with OpenDocument style files:: Explore the internals
|
||||||
* Using the converter::
|
* Creating One-Off styles:: How to produce custom highlighting etc
|
||||||
* Working with OpenDocument style files::
|
* Customizing Tables in @acronym{ODT} export:: How to define and use Table templates
|
||||||
* Working with raw OpenDocument XML::
|
* Validating OpenDocument XML:: How to debug corrupt OpenDocument files
|
||||||
* Customizing Tables in @acronym{ODT} export::
|
|
||||||
* Validating OpenDocument XML::
|
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Exporting and Converting to Other formats, Configuring a converter, Advanced topics in @acronym{ODT} export, Advanced topics in @acronym{ODT} export
|
@node Exporting and Converting to Other formats, Working with OpenDocument style files, Advanced topics in @acronym{ODT} export, Advanced topics in @acronym{ODT} export
|
||||||
@subsubsection Exporting and Converting to Other formats
|
@subsubsection Exporting and Converting to Other formats
|
||||||
@cindex convert
|
@cindex convert
|
||||||
@cindex doc, docx
|
@cindex doc, docx
|
||||||
|
@ -11149,15 +11146,27 @@ the variable @code{org-export-odt-fontify-srcblocks}.
|
||||||
@acronym{ODT} exporter adds support for exporting Org outlines to formats
|
@acronym{ODT} exporter adds support for exporting Org outlines to formats
|
||||||
that are not supported natively by Org. It also adds support to convert
|
that are not supported natively by Org. It also adds support to convert
|
||||||
document from one format to another. To use these features, you need to
|
document from one format to another. To use these features, you need to
|
||||||
configure a command-line converter.
|
configure a command-line converter. Once a command-line converter is
|
||||||
|
configured you can use it to extend the list of formats to which Org can
|
||||||
|
export to. @xref{x-export-to-other-formats,,Automatically Exporting to Other
|
||||||
|
formats}. You can also use it to perform one-off document conversion as
|
||||||
|
detailed below.
|
||||||
|
|
||||||
@menu
|
@vindex org-export-odt-convert
|
||||||
* Configuring a converter:: How to install a converter
|
@table @kbd
|
||||||
* Using the converter:: How to use the converter
|
|
||||||
@end menu
|
|
||||||
|
|
||||||
@node Configuring a converter, Using the converter, Exporting and Converting to Other formats, Advanced topics in @acronym{ODT} export
|
@item M-x org-export-odt-convert
|
||||||
|
Convert an existing document from one format to another format as determined
|
||||||
|
by variable @code{org-export-odt-convert-capabilities}
|
||||||
|
(@pxref{x-odt-converter-capabilities,,Configure converter
|
||||||
|
capabilities}). @strong{Please note} that you can use this command to even
|
||||||
|
convert documents that is produced outside of Org and in formats that is
|
||||||
|
different from @acronym{ODT} format.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@anchor{x-configuring-a-converter}
|
||||||
@subsubheading Configuring a converter
|
@subsubheading Configuring a converter
|
||||||
|
This section explores how to configure a converter.
|
||||||
|
|
||||||
@subsubheading Pre-configured converters
|
@subsubheading Pre-configured converters
|
||||||
|
|
||||||
|
@ -11213,31 +11222,16 @@ Select the newly added converter as the preferred one by customizing the
|
||||||
variable @code{org-export-odt-convert-process}.
|
variable @code{org-export-odt-convert-process}.
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@node Using the converter, Working with OpenDocument style files, Configuring a converter, Advanced topics in @acronym{ODT} export
|
@node Working with OpenDocument style files, Creating One-Off styles, Exporting and Converting to Other formats, Advanced topics in @acronym{ODT} export
|
||||||
@subsubheading Using the converter
|
|
||||||
Once a command-line converter is configured you can use it to extend the list
|
|
||||||
of formats to which Org can export
|
|
||||||
to. @xref{x-export-to-other-formats,,Automatically Exporting to Other
|
|
||||||
formats}. You can also use it to perform one-off document conversion as
|
|
||||||
detailed below.
|
|
||||||
|
|
||||||
@vindex org-export-odt-convert
|
|
||||||
@table @kbd
|
|
||||||
|
|
||||||
@item M-x org-export-odt-convert
|
|
||||||
Convert an existing document from one format to another format as determined
|
|
||||||
by variable @code{org-export-odt-convert-capabilities}
|
|
||||||
(@pxref{x-odt-converter-capabilities,,Configure converter capabilities}).
|
|
||||||
|
|
||||||
Note that you can use this command to even convert documents that is produced
|
|
||||||
outside of Org and in formats that is different from @acronym{ODT} format.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@node Working with OpenDocument style files, Working with raw OpenDocument XML, Using the converter, Advanced topics in @acronym{ODT} export
|
|
||||||
@subsubsection Working with OpenDocument style files
|
@subsubsection Working with OpenDocument style files
|
||||||
@cindex styles, custom
|
@cindex styles, custom
|
||||||
@cindex template, custom
|
@cindex template, custom
|
||||||
|
|
||||||
|
This section explores the internals of @acronym{ODT} exporter and the means
|
||||||
|
by which it produces stylized documents. Read this section if you are
|
||||||
|
interested in exploring the automatic and custom OpenDocument styles used by
|
||||||
|
the exporter.
|
||||||
|
|
||||||
@anchor{x-factory-styles}
|
@anchor{x-factory-styles}
|
||||||
@subsubheading Factory styles
|
@subsubheading Factory styles
|
||||||
|
|
||||||
|
@ -11332,8 +11326,8 @@ Use this variable to specify the blank @file{content.xml} that will be used
|
||||||
in the final output.
|
in the final output.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@node Working with raw OpenDocument XML, Customizing Tables in @acronym{ODT} export, Working with OpenDocument style files, Advanced topics in @acronym{ODT} export
|
@node Creating One-Off styles, Customizing Tables in @acronym{ODT} export, Working with OpenDocument style files, Advanced topics in @acronym{ODT} export
|
||||||
@subsubsection Working with raw OpenDocument XML
|
@subsubsection Creating One-Off styles
|
||||||
|
|
||||||
There are times when you would want one-off formatting in the exported
|
There are times when you would want one-off formatting in the exported
|
||||||
document. You can achieve this by embedding raw OpenDocument XML in the Org
|
document. You can achieve this by embedding raw OpenDocument XML in the Org
|
||||||
|
@ -11399,19 +11393,55 @@ This paragraph is specially formatted and uses bold text.
|
||||||
|
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@node Customizing Tables in @acronym{ODT} export, Validating OpenDocument XML, Working with raw OpenDocument XML, Advanced topics in @acronym{ODT} export
|
@node Customizing Tables in @acronym{ODT} export, Validating OpenDocument XML, Creating One-Off styles, Advanced topics in @acronym{ODT} export
|
||||||
@subsubsection Customizing Tables in @acronym{ODT} export
|
@subsubsection Customizing Tables in @acronym{ODT} export
|
||||||
@cindex tables, in ODT export
|
@cindex tables, in ODT export
|
||||||
|
|
||||||
@cindex #+ATTR_ODT
|
@cindex #+ATTR_ODT
|
||||||
You can override the default formatting of the table by specifying a custom
|
You can override the default formatting of the table by specifying a custom
|
||||||
table style with the @code{#+ATTR_ODT} line.
|
table style with the @code{#+ATTR_ODT} line. For a discussion on default
|
||||||
|
formatting of tables @xref{Tables in @acronym{ODT} export}.
|
||||||
|
|
||||||
This feature closely mimics the way table templates are defined in the
|
This feature closely mimics the way table templates are defined in the
|
||||||
OpenDocument-v1.2
|
OpenDocument-v1.2
|
||||||
specification@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html,
|
specification@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html,
|
||||||
OpenDocument-v1.2 Specification}}.
|
OpenDocument-v1.2 Specification}}.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@subsubheading Custom Table Styles - An Illustration
|
||||||
|
|
||||||
|
To have a quick preview of this feature, install the below setting and export
|
||||||
|
the table that follows.
|
||||||
|
|
||||||
|
@lisp
|
||||||
|
(setq org-export-odt-table-styles
|
||||||
|
(append org-export-odt-table-styles
|
||||||
|
'(("TableWithHeaderRowAndColumn" "Custom"
|
||||||
|
((use-first-row-styles . t)
|
||||||
|
(use-first-column-styles . t)))
|
||||||
|
("TableWithFirstRowandLastRow" "Custom"
|
||||||
|
((use-first-row-styles . t)
|
||||||
|
(use-last-row-styles . t))))))
|
||||||
|
@end lisp
|
||||||
|
|
||||||
|
@example
|
||||||
|
#+ATTR_ODT: TableWithHeaderRowAndColumn
|
||||||
|
| Name | Phone | Age |
|
||||||
|
| Peter | 1234 | 17 |
|
||||||
|
| Anna | 4321 | 25 |
|
||||||
|
@end example
|
||||||
|
|
||||||
|
In the above example, you used a template named @samp{Custom} and installed
|
||||||
|
two table styles with names @samp{TableWithHeaderRowAndColumn} and
|
||||||
|
@samp{TableWithFirstRowandLastRow}. (@strong{Important:} The OpenDocument
|
||||||
|
styles needed for producing the above template has been pre-defined for you.
|
||||||
|
These styles are available under section marked @samp{Custom Table Template}
|
||||||
|
in @file{OrgOdtContentTemplate.xml}
|
||||||
|
(@pxref{x-orgodtcontenttemplate-xml,,Factory styles}). If you need
|
||||||
|
additional templates you have to define these styles yourselves.
|
||||||
|
|
||||||
|
@subsubheading Custom Table Styles - The Nitty Gritties
|
||||||
To use this feature proceed as follows:
|
To use this feature proceed as follows:
|
||||||
|
|
||||||
@enumerate
|
@enumerate
|
||||||
|
@ -11505,12 +11535,13 @@ by selectively activating the individual cell styles in that template.
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(setq org-export-odt-table-styles
|
(setq org-export-odt-table-styles
|
||||||
'(("TableWithHeaderRowsAndColumns"
|
(append org-export-odt-table-styles
|
||||||
"Custom"
|
'(("TableWithHeaderRowAndColumn" "Custom"
|
||||||
((use-first-row-styles . t)
|
((use-first-row-styles . t)
|
||||||
(use-first-column-styles . t)))
|
(use-first-column-styles . t)))
|
||||||
("TableWithHeaderColumns"
|
("TableWithFirstRowandLastRow" "Custom"
|
||||||
"Custom" ((use-first-column-styles . t)))))
|
((use-first-row-styles . t)
|
||||||
|
(use-last-row-styles . t))))))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
@item
|
@item
|
||||||
|
@ -11520,7 +11551,7 @@ To do this, specify the table style created in step (2) as part of
|
||||||
@code{ATTR_ODT} line as show below.
|
@code{ATTR_ODT} line as show below.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
#+ATTR_ODT: TableWithHeaderColumns
|
#+ATTR_ODT: TableWithHeaderRowAndColumn
|
||||||
| Name | Phone | Age |
|
| Name | Phone | Age |
|
||||||
| Peter | 1234 | 17 |
|
| Peter | 1234 | 17 |
|
||||||
| Anna | 4321 | 25 |
|
| Anna | 4321 | 25 |
|
||||||
|
@ -11534,7 +11565,7 @@ Occasionally, you will discover that the document created by the
|
||||||
@acronym{ODT} exporter cannot be opened by your favorite application. One of
|
@acronym{ODT} exporter cannot be opened by your favorite application. One of
|
||||||
the common reasons for this is that the @file{.odt} file is corrupt. In such
|
the common reasons for this is that the @file{.odt} file is corrupt. In such
|
||||||
cases, you may want to validate the document against the OpenDocument RELAX
|
cases, you may want to validate the document against the OpenDocument RELAX
|
||||||
NG Compact Syntax (RNC) schema.
|
NG Compact Syntax (RNC) schema.
|
||||||
|
|
||||||
For de-compressing @file{.odt} file@footnote{@file{.odt} files are nothing
|
For de-compressing @file{.odt} file@footnote{@file{.odt} files are nothing
|
||||||
but @samp{zip} archives} @inforef{File Archives,,emacs}. For general help
|
but @samp{zip} archives} @inforef{File Archives,,emacs}. For general help
|
||||||
|
|
Loading…
Reference in New Issue