1 #+TITLE: Testfile for OpenDocumentText Exporter
2 #+AUTHOR: Jambunathan K
3 #+EMAIL: kjambunathan@gmail.com
7 #+OPTIONS: H:4 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
8 #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
10 #+EXPORT_SELECT_TAGS: export
11 #+EXPORT_EXCLUDE_TAGS: noexport
17 Some text before first headline[fn:1].
21 Use =C-c C-e O= or =C-c C-e o= to export this buffer to OpenDocument
22 Text format. For exercising full set of features proceed as below:
24 ** Recommended packages
27 Download an [[http://debbugs.gnu.org/cgi/bugreport.cgi?msg=5;filename=htmlfontify.el;att=9;bug=9914][enhanced version of htmlfontify.el]] and put it in
28 your load-path. This will enable fontification of srcblocks in
33 Download the [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb converter]] and register it with exporter
34 as noted below. This will enable LaTeX fragments in this file to
35 be embedded as MathML formula in the exported document.
37 ** Recommended configuration
39 #+begin_src emacs-lisp
41 ;; enable these two if you have installed BasicODConverter and want
42 ;; to export directly to pdf via odt
43 ;; '(org-export-odt-preferred-output-format "pdf") ;;
44 ;; '(org-export-odt-convert-process "BasicODConverter")
45 '(org-export-odt-table-styles
46 (quote (("OrgEquation" "OrgEquation"
47 ((use-first-column-styles . t) (use-last-column-styles . t)))
48 ("TableWithHeaderRowAndColumn" "Custom"
49 ((use-first-row-styles . t) (use-first-column-styles . t)))
50 ("TableWithFirstRowandLastRow" "Custom"
51 ((use-first-row-styles . t) (use-last-row-styles . t))))))
52 '(org-latex-to-mathml-convert-command "java -jar %j -unicode -force -df %o %I")
53 '(org-latex-to-mathml-jar-file "~/tmp-odt/mathtoweb.jar"))
58 Visit this file or any of your Org files. Use =C-c C-e O= to
61 * Sample Content (Proof Of Concept)
69 /This is an italicized text/
73 _This is an underlined text_
81 ~This is a verbatim text~
85 +This is a strikethorugh text+
87 *** Super and Subscripts
89 Y = a_{0}X^{2}+a_{1}X^{1}+a_{2}
92 Here is a ndash --, a mdash ---, an ellipsis ....
99 \alpha^{n} = \beta^{n} + \gamma^{n}
107 Everything should be made as simple as possible,
108 but not any simpler -- Albert Einstein
113 Everything should be made as simple as possible,
114 but not any simpler -- Albert Einstein
119 Great clouds overhead
120 Tiny black birds rise and fall
129 This is a centered paragraph.
136 First line of the example.
137 Second line of the example.
142 : First line of the example.
143 : Second line of the example.
147 **** Emacs Lisp Block
148 #+begin_src emacs-lisp
151 (message "hello world"))
154 **** Org Source Block
158 , SCHEDULED: <2010-11-17 Wed>
161 **** Advanced Source Blocks
162 Advanced source blocks takes the following options
163 - [-+]n: restart or continue numbering
166 - i: preserve indentation
170 #+BEGIN_SRC emacs-lisp -n -r
171 (save-excursion (ref:sc)
173 (goto-char (point-min)) (ref:jump)
176 In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]] jumps
179 #+BEGIN_SRC emacs-lisp +n -r
180 (save-excursion (ref:sc1)
182 (goto-char (point-min)) (ref:jump1)
185 In line [[(sc1)]] we remember the current position. [[(jump1)][Line (jump1)]]
188 **** Text Areas in HTML export
190 #+BEGIN_EXAMPLE -t -w 40
196 ** Native HTML and ODT
201 This is a handwritten html para
207 <text:p> This is a handwritten odt para</text:p>
210 #+HTML: <div style="width:50%;float:left;">
220 #+html: <div style="width:50%;float:right;">
221 *Reversed English Alphabets*
225 *Reversed Greek Alphabets*
232 *** An Equation as Embeded MathML
233 A trigonometric equation embedded in *MathML*
237 <draw:frame draw:style-name="fr2" draw:name="Object3" text:anchor-type="as-char" svg:width="6.371cm" svg:height="0.483cm" draw:z-index="3">
239 <math xmlns="http://www.w3.org/1998/Math/MathML">
245 <mo stretchy="false">(</mo>
248 <mo stretchy="false">+</mo>
251 <mo stretchy="false">)</mo>
253 <mi mathvariant="normal">=</mi>
256 <mi mathvariant="italic">ACos</mi>
259 <mo stretchy="false">+</mo>
266 <annotation encoding="StarMath 5.0">sin (A+B) = sin ACos B + cos A sin B
279 This is a numbered list.
287 This is a bulleted list.
292 **** Description List
294 There is a nested description list down below
295 - Term-1 :: This is a definition for Term-1 which wraps around to
297 - Term-2 :: This is a definition for Term-2 which wraps around to
299 - Term-2.1 :: Definition for Term-2.1
300 - Term-2.2 :: Definition for Term-2.2
321 *** A Very Complex List
322 **** Lord of the Rings
324 My favorite scenes are (in this order)
325 1. The attack of the Rohirrim
326 2. Eowyn's fight with the witch king
327 + this was already my favorite scene in the book
328 + I really like Miranda Otto.
329 - Definition-1 :: Description-1
330 - Definition-2 :: Description-2
331 3. Peter Jackson being shot by Legolas
332 He makes a really funny face when it happens.
334 But in the end, no individual scenes matter but the film as a whole.
335 Important actors in this film are:
336 - Elijah Wood :: He plays Frodo
337 - Sean Austin :: He plays Sam, Frodo's friend. I still remember
338 him very well from his role as Mikey Walsh in
340 - Embedded Definition 1 :: Embedded Description 1
341 - Embedded Definition 2 :: Embedded Description 2
347 This is regular text. This is regular text. This is regular
348 text. This is regular text. This is regular text.
350 *************** This is a simple inline task
352 *************** This is an inline task with some text
353 Some notes about the task
356 This is regular text. This is regular text. This is regular
357 text. This is regular text. This is regular text.
361 See the You can see the official logo of Orgmode here:
362 [[http://orgmode.org/img/org-mode-unicorn.png]]
365 **** A simple inlined image
367 [[./org-mode-unicorn.png]]
369 **** A simple image with caption and label
371 #+CAPTION: Unicorn Logo
373 [[./org-mode-unicorn.png]]
375 **** An image that is explicitly sized
376 #+CAPTION: Unicorn Logo
378 #+ATTR_ODT: :width 10 :height 10
379 [[./org-mode-unicorn.png]]
381 **** An image that is scaled
382 #+ATTR_ODT: :scale 0.5
383 [[./org-mode-unicorn.png]]
386 This is a clickable image [[http://orgmode.org][./org-mode-unicorn.png]]
389 *** Reference to an Image
390 Please refer to \ref{fig:1024} for further information.
395 # See org-format-latex-options
397 #+CAPTION: Kinetic Energy
399 The equation down below has both a caption and a label.
406 The equation down below has just a label.
413 If $a^2=b$ and \( b=2 \), then the solution must be either \[
414 a=+\sqrt{2} \] or \[ a=-\sqrt{2} \].
417 The equation down below has just a caption.
419 #+CAPTION: Kinetic Energy
425 The equation down below is neither captioned nor labelled.
431 **** Reference to LaTeX Fragments
432 This is a reference to LaTeX Fragment2 \ref{Equation:2}.
436 [[../../../lisp/org-html.el][This is a relative link to org-html.el]]
439 [[file:~/src/orgmode.org/contrib/odt/OrgOdtStyles.xml][This is an absolute link to styles file]]
444 **** Target with CUSTOMID
446 :CUSTOM_ID: aabbccddeeff
449 **** Dedicated Target Style1
450 # <<Dedicated Target>>
452 **** Dedicated Target Style2
454 There is a dedicated target at the end of this sentence -
455 <<Dedicated Target1>>.
457 **** <<<Radioed Target>>>
460 **** References to Fuzzy Target
462 This is a link to [[Fuzzy Target]].
464 **** References to CUSTOMID links
466 This is a link to [[#aabbccddeeff][Target with CUSTOMID]]. This is nodesc link to [[#aabbccddeeff]].
468 **** References to Dedicated Target
470 There is a link to nodesc [[Dedicated Target]] here. There is a link
471 to [[Dedicated%20Target][Jump to Dedicated Target]] here.
473 There is a link to [[Dedicated%20Target1][Dedicated Target1]] here.
475 **** References to Radioed Links
477 This section has references to Radioed Target. One more reference
481 This is a link to BBDB entry - [[bbdb:Jambunathan%20K][Jambunathan K]]
484 *** A simple Orgmode Table
486 | EST | New York | -5:00 |
487 | IST | Madras | +5:30 |
491 *** A formatted Orgmode Table
493 - Columns are proportioned in the ratio 10:5:20:10
494 - Alignment is specified by colcookies.
496 See https://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg01186.html
498 #+CAPTION: An Example Table
501 | Labels | C1 | C2 | C3 |
502 |------------+-------+----------------------+------------|
504 | <r10> | <l5> | <c20> | <r10> |
506 | R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
507 | R2 | R2C1 | R2C2 | R2C3 |
508 |------------+-------+----------------------+------------|
509 | R3 | R3C1 | R3C2 | R3C3 |
510 | R4 | R4C1 | R4C2 | R4C3 |
511 |------------+-------+----------------------+------------|
512 | R5 | R5C1 | R5C2 | R5C3 |
513 | R6 | R6C1 | R6C2 | R6C3 |
514 | R7 | R7C1 | R7C2 | |
515 |------------+-------+----------------------+------------|
517 *** A formatted Orgmode Table (using Table Templates)
519 See https://lists.gnu.org/archive/html/emacs-orgmode/2011-09/msg00319.html
523 #+begin_src emacs-lisp
524 (setq org-export-odt-table-styles
525 '(("TableWithHeaderRowAndColumn" "Custom"
526 ((use-first-row-styles . t)
527 (use-first-column-styles . t)))
528 ("TableWithFirstRowandLastRow" "Custom"
529 ((use-first-row-styles . t)
530 (use-last-row-styles . t)))))
534 **** Table using header row and column styles
535 This table uses table template named _Custom_ and selects the
541 #+ATTR_ODT: TableWithHeaderRowAndColumn
542 | Labels | C1 | C2 | C3 |
543 |------------+-------------+---------------+--------------|
545 | <r> | <l> | <c> | <r> |
546 | R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
547 | R2 | R2C1 | R2C2 | R2C3 |
548 |------------+-------------+---------------+--------------|
549 | R3 | R3C1 | R3C2 | R3C3 |
550 | R4 | R4C1 | R4C2 | R4C3 |
551 |------------+-------------+---------------+--------------|
552 | R5 | R5C1 | R5C2 | R5C3 |
553 | R6 | R6C1 | R6C2 | R6C3 |
554 | R7 | R7C1 | R7C2 | |
555 |------------+-------------+---------------+--------------|
557 **** Table using first row and last row styles
558 This table also uses the same table template named _Custom_ and
559 selects the following styles:
563 - columns in the ratio 1:2:3:4
565 #+ATTR_ODT: TableWithFirstRowandLastRow
566 | Labels | C1 | C2 | C3 |
567 |------------+----------------------+--------------------------------+------------------------------------------|
569 | <r10> | <l20> | <c30> | <r40> |
570 | R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
571 | R2 | R2C1 | R2C2 | R2C3 |
572 |------------+----------------------+--------------------------------+------------------------------------------|
573 | R3 | R3C1 | R3C2 | R3C3 |
574 | R4 | R4C1 | R4C2 | R4C3 |
575 |------------+----------------------+--------------------------------+------------------------------------------|
576 | R5 | R5C1 | R5C2 | R5C3 |
577 | R6 | R6C1 | R6C2 | R6C3 |
578 | R7 | R7C1 | R7C2 | |
579 |------------+----------------------+--------------------------------+------------------------------------------|
584 *** Table.el Table with no Spanning
585 # See org-export-prefer-native-exporter-for-tables
587 +---------------+---------------+
589 +---------------+---------------+
592 +---------------+---------------+
595 +---------------+---------------+
596 |Three-Quarters |75% |
598 +---------------+---------------+
601 +---------------+---------------+
603 *** Table.el Table with Spanning
605 +----------+---------------------+----------+
606 |Name |cmd calls |Percentage|
607 +----------+ +----------+
609 +----------+ +----------+
611 +----------+ +----------+
612 |total |203 118 |100% |
613 +----------+---------------------+----------+
615 *** Another Table.el Table with Spanning
617 +-----------+----------+
619 +-----------+----------+
621 +-----------+----------+
625 +-----------+----------+
630 https://lists.gnu.org/archive/html/emacs-orgmode/2011-09/msg00017.html
634 #+begin_src emacs-lisp
635 (setq org-lparse-list-table-enable t)
647 A homogenous list-table
662 A degenerate list-table
672 A non-homogenous list-table
687 A complex true-to-the-spirit multiline list-table
693 - Yet another subitem under 1.1
707 There is an annotation by the original author here
709 Do you see this annotation?
712 There is an annotation by a reviewer - "Someone else" - here.
713 #+begin_annotation author "Someone else" date "<2011-10-22 Wed 15:43>"
719 Please refer to \ref{table:10} for further information.
721 ** Footnote Definitions (Part 1)
723 [fn:XYZ] There is a link to [[http://Orgmode.org][Orgmode.org]].
728 This paragraph has multiple references to the same footnote. This
729 is the first reference to a footnote [1]. This is a second
730 reference to the same footnote [1].
734 Footnote named XYZ [fn:XYZ].
738 Inlined footnote [fn:: inline definition]
740 *** Named and Inlined Footnote
742 Named and Inlined footnote [fn:name: named definition]
744 # Footnote Definitions (Part 2)
746 [1] Quick brown fox jumps over the lazy dog. Quick brown fox jumps ove
749 ** Back-to-back footnotes
751 Sample examples down below are taken from
752 http://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00426.html.
758 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
759 eiusmod tempor incididunt ut labore et dolore magna
760 aliqua[fn::inline1][1].
764 Duis aute irure dolor in reprehenderit in voluptate velit esse
765 cillum dolore eu fugiat nulla pariatur[fn:inlabel:an inline
766 footnote][fn:inlabel2:[[http://www.google.com][google]] this].
768 Call an already defined inline footnote[fn:inlabel].
771 Org is a mode for keeping notes, maintaining TODO lists, and doing
772 project planning with a fast and effective plain-text system.
774 Org develops organizational tasks around NOTES files that contain
775 lists or information about projects as plain text. Org is
776 implemented on top of Outline mode, which makes it possible to keep
777 the content of large files well structured. Visibility cycling and
778 structure editing help to work with the tree. Tables are easily
779 created with a built-in table editor. Org supports TODO items,
780 deadlines, timestamps, and scheduling. It dynamically compiles
781 entries into an agenda that utilizes and smoothly integrates much of
782 the Emacs calendar and diary. Plain text URL-like links connect to
783 websites, emails, Usenet messages, BBDB entries, and any files
784 related to the projects. For printing and sharing of notes, an Org
785 file can be exported as a structured ASCII file, as HTML, or (TODO
786 and agenda items only) as an iCalendar file. It can also serve as a
787 publishing tool for a set of linked web pages.
789 As a project planning environment, Org works by adding metadata to
790 outline nodes. Based on this data, specific entries can be extracted
791 in queries and create dynamic agenda views.
793 Org mode contains the Org Babel environment which allows you to work
794 with embedded source code blocks in a file, to facilitate code
795 evaluation, documentation, and tangling.
797 Org's automatic, context-sensitive table editor with spreadsheet
798 capabilities can be integrated into any major mode by activating the
799 minor Orgtbl mode. Using a translation step, it can be used to
800 maintain tables in arbitrary file types, for example in LaTeX. The
801 structure editing and list creation capabilities can be used outside
802 Org with the minor Orgstruct mode.
804 Org keeps simple things simple. When first fired up, it should feel
805 like a straightforward, easy to use outliner. Complexity is not
806 imposed, but a large amount of functionality is available when you
807 need it. Org is a toolbox and can be used in different ways and for
808 different ends, for example:
810 - an outline extension with visibility cycling and structure editing
811 - an ASCII system and table editor for taking structured notes
813 - a full agenda and planner with deadlines and work scheduling
814 - an environment in which to implement David Allen's GTD system
815 - a simple hypertext system, with HTML and LaTeX export
816 - a publishing tool to create a set of interlinked webpages
817 - an environment for literate programming
819 There is a website for Org which provides links to the newest
820 version of Org, as well as additional information, frequently asked
821 questions (FAQ), links to tutorials, etc. This page is located at
824 * Testcases for Tags, TODOs, Timestamps, Checkboxes etc :project:hacking:
826 - [[http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html][ODF Specification]]
827 - [[http://books.evc-cit.info/odbook/book.html][OASIS OpenDocument Essentials (Book)]]
828 - [[http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Writer_Guide][OpenOffice.org's Writer Guide]]
829 Downloadable pdf version are available [[http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Chapters][here]]
832 - [[http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-schema-v1.1.rng][OpenDocument-schema-v1.1.rng]]
833 - Use [[http://www.thaiopensource.com/relaxng/trang.html][Trang]] to generate .rnc file from .rng file.
835 ** org-odt.el Bugs and Pending Items
836 *** TODO Links to Listified Headlines are not generated
837 Export this documen with H:3 and note that link references under
838 [[References]] are broken. To circumvent this issue change default
839 settings from H:3 to H:4 for now.
840 *** TODO Cleanup on crash
841 When odt exporter throws an error the xml files are content.xml,
842 styles.xml etc are left staying around. Need to clean these up
843 using unwind-protect?
844 *** TODO Fix all interactive commands
845 org-export-region-as-odt, org-export-as-odt-to-buffer etc.
847 emacs --batch -L "~/src/org-jambu/lisp" --eval "(progn (require 'org-odt) (setq org-export-headline-levels 3) (toggle-debug-on-error))" --visit=draftcopy.org --funcall org-export-as-odt-batch
850 *** TODO Fix issues reported by Christian Moe (first post)
851 SCHEDULED: <2011-01-31 Mon>
852 See [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg01293.html][this post]].
854 - Fix cross references to Tables, Images etc. Ability to choose
855 other types names, like Chart, Figure, etc.
856 - Paragraphs were frequently split up, mid-sentence, by unwanted
857 paragraph breaks. Not sure whether this problem still exists
858 with the latest release of org-odt.
860 *** TODO Fix issues reported by Christian Moe (second post)
861 SCHEDULED: <2011-03-21 Mon>
862 See [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01379.html][this post]]
864 **** TODO Syntax highlighting of source code blocks
865 - Use htmlfontify.el maybe
867 **** TODO OrgVerse can be aesthetically more pleasing?
869 **** TODO Export of test.org with LaTeX:verbatim option
870 Equations under [[LaTeX Fragments]] go invisible
872 **** TODO Broken link within [[References to Dedicated Target]]
874 *** TODO Support for MathML
876 MathToWeb could be used for this. See [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01755.html][following post]].
878 *** TODO Validation failures with =HTML_CONTAINER_CLASS=
881 :HTML_CONTAINER_CLASS: custom
884 This section introduces two issues.
885 - A text:span element cannot occur within text:bookmark-ref. How
887 - text:style-name attribute for text:section cannot have
888 spaces. Explore styling of section in OpenOffice.
890 *** TODO Tables within a list-item :noexport:
891 Tables cannot occur as list-item. OpenOffice Writer seems to
892 handle this scenario as follows: While encountering a table
893 terminate the top-level list. Insert formatted Table with the same
894 indentation as if it were a list-item of the original list. Once
895 the table is inserted, re-open the list and start emitting the
896 following list-items at the right nested level.
898 Fixing this bug would require that the list callbacks provide
899 information on the indentation level of the current list. Not sure
900 how to set the Table indentation properties?
907 | | formula debugger label | processing stage |
909 |---+------------------------+----------------------------|
910 | | Result: | output of Calc |
911 | | Format: | reformatting with =printf= |
917 *** DONE Support for Custom Styles
918 CLOSED: <2011-03-24 Thu>
920 - CLOSING NOTE <2011-03-24 Thu>
923 See following [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01512.html][post]]
925 *** TODO Emit Table Of Contents in Native Format
926 *** TODO Pull Changes from Master Branch
927 SCHEDULED: <2011-04-02 Sat .+21d>
929 *** TODO Merge with Master branch [0/3]
930 - [ ] Synchronize with Master branch
931 - [ ] Update Org's Info Manual
932 - [ ] Fix Byte-compilation, Docstrings, Copyright, license text
937 [fn:1] This footnote referenced before first headline.