Introduced org-lprint prefix.
[org-mode/org-jambu.git] / contrib / odt / files / test.org
blob292d97192ac24b0a671684488e0cd67ccd98b27f
1 #+TITLE: Testfile for OpenDocumentText Exporter
2 #+AUTHOR:    Jambunathan K
3 #+EMAIL:     kjambunathan@gmail.com
4 #+DATE:      2011-04-04 Mon
5 #+DESCRIPTION:
6 #+KEYWORDS:
7 #+LANGUAGE:  en
8 #+OPTIONS:   H:4 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
9 #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
11 #+EXPORT_SELECT_TAGS: export
12 #+EXPORT_EXCLUDE_TAGS: noexport
13 #+LINK_UP:   
14 #+LINK_HOME: 
15 #+XSLT:
16 #+STARTUP: overview
19 # Use C-c C-e O or C-c C-e o to export this buffer to OpenDocumentText
21 * ODT Exporter                                              :project:hacking:
22 ** Online References
23    - [[http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html][ODF Specification]]
24    - [[http://books.evc-cit.info/odbook/book.html][OASIS OpenDocument Essentials (Book)]]
25    - [[http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Writer_Guide][OpenOffice.org's Writer Guide]]
26      Downloadable pdf version are available [[http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Chapters][here]]
28 ** Validation tools
29    - [[http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-schema-v1.1.rng][OpenDocument-schema-v1.1.rng]]
30    - Use [[http://www.thaiopensource.com/relaxng/trang.html][Trang]] to generate .rnc file from .rng file.
32 ** org-odt.el Bugs and Pending Items
33 *** TODO Links to Listified Headlines are not generated
34     Export this documen with H:3 and note that link references under
35     [[References]] are broken. To circumvent this issue change default
36     settings from H:3 to H:4 for now.
37 *** TODO Cleanup on crash
38     When odt exporter throws an error the xml files are content.xml,
39     styles.xml etc are left staying around. Need to clean these up
40     using unwind-protect?
41 *** TODO Fix all interactive commands
42     org-export-region-as-odt, org-export-as-odt-to-buffer etc. 
43 #+begin_src sh
44   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
45 #+end_src
47 *** TODO Fix issues reported by Christian Moe (first post)
48     SCHEDULED: <2011-01-31 Mon>
49     See [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg01293.html][this post]].
51     - Fix cross references to Tables, Images etc. Ability to choose
52       other types names, like Chart, Figure, etc.
53     - Paragraphs were frequently split up, mid-sentence, by unwanted
54       paragraph breaks. Not sure whether this problem still exists
55       with the latest release of org-odt.
57 *** TODO Fix issues reported by Christian Moe (second post)
58     SCHEDULED: <2011-03-21 Mon>
59     See [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01379.html][this post]]
61 **** TODO Syntax highlighting of source code blocks
62      - Use htmlfontify.el maybe
64 **** TODO OrgVerse can be aesthetically more pleasing?
66 **** TODO Export of test.org with LaTeX:verbatim option
67      Equations under  [[LaTeX Fragments]] go invisible
69 **** TODO Broken link within [[References to Dedicated Target]] 
71 *** TODO Support for MathML
72     [2011-03-29 Tue]
73     MathToWeb could be used for this. See [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01755.html][following post]].
75 *** TODO Validation failures with =HTML_CONTAINER_CLASS= 
76     [2011-04-02 Sat]
77     :PROPERTIES:
78     :HTML_CONTAINER_CLASS: custom
79     :END:
81     This section introduces two issues. 
82     - A text:span element cannot occur within text:bookmark-ref. How
83       to handle this.
84     - text:style-name attribute for text:section cannot have
85       spaces. Explore styling of section in OpenOffice.
87 *** TODO Tables within a list-item                                 :noexport:
88     Tables cannot occur as list-item. OpenOffice Writer seems to
89     handle this scenario as follows: While encountering a table
90     terminate the top-level list. Insert formatted Table with the same
91     indentation as if it were a list-item of the original list. Once
92     the table is inserted, re-open the list and start emitting the
93     following list-items at the right nested level.
95     Fixing this bug would require that the list callbacks provide
96     information on the indentation level of the current list. Not sure
97     how to set the Table indentation properties?
99     - L1.1
100     - L1.2
101       - L2.1
102       - L2.2
104         |   | formula debugger label | processing stage           |
105         | / | <                      | <>                         |
106         |---+------------------------+----------------------------|
107         |   | Result:                | output of Calc             |
108         |   | Format:                | reformatting with =printf= |
111       - L2.3
112     - L1.3
113       
114 *** DONE Support for Custom Styles
115     CLOSED: <2011-03-24 Thu>
116     :LOGBOOK:
117     - CLOSING NOTE  <2011-03-24 Thu>
118     :END:
120     See following [[http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01512.html][post]]
122 *** TODO Emit Table Of Contents in Native Format
123 *** TODO Pull Changes from Master Branch
124     SCHEDULED: <2011-04-02 Sat .+21d>
126 *** TODO Merge with Master branch [0/3]
127     - [ ] Synchronize with Master branch
128     - [ ] Update Org's Info Manual
129     - [ ] Fix Byte-compilation, Docstrings, Copyright, license text
130       etc etc
133 * Sample Content (Proof Of Concept)
134 ** Character Styles
135 *** Bold
137     *This is bold text*
138     
139 *** Italic
141     /This is an italicized text/
142     
143 *** Underline
145     _This is an underlined text_
146     
147 *** Code
149     =This is a code text=
150     
151 *** Verbatim
153     ~This is a verbatim text~
154     
155 *** Strikethrough
157     +This is a strikethorugh text+
159 *** Super and Subscripts
161     Y = a_{0}X^{2}+a_{1}X^{1}+a_{2}
162 ** Miscellaneous
163    
164    Here is a ndash --, a mdash ---, an ellipsis ....
165    
166    and a horizontal line
167    ---------------------
169 ** Special entities
171    \alpha^{n} = \beta^{n} + \gamma^{n}
172    
173 ** Paragraph Styles
174 *** Quotation
175     
176 **** Style1
178 #+BEGIN_QUOTE
179     Everything should be made as simple as possible,
180     but not any simpler -- Albert Einstein
181 #+END_QUOTE
182     
183 **** QUOTE Style2
185      Everything should be made as simple as possible,
186      but not any simpler -- Albert Einstein
188 *** Verse
190 #+BEGIN_VERSE
191   Great clouds overhead
192   Tiny black birds rise and fall
193   Snow covers Emacs
195       -- AlexSchroeder
196 #+END_VERSE
197       
198 *** Centered
200 #+BEGIN_CENTER
201    This is a centered paragraph.
202 #+END_CENTER
203   
204 *** Example
205 **** Example Style 1
207 #+begin_example
208   First line of the example.
209   Second line of the example.
210 #+end_example  
211   
212 **** Example Style 2
214 :     First line of the example.
215 :     Second line of the example.
216     
217   
218 *** Source Block
219 **** Emacs Lisp Block 
220 #+begin_src emacs-lisp
221   (defun helloworld () 
222     ""
223     (message "hello world"))
224 #+end_src  
225     
226 **** Org Source Block
227     
228 #+begin_src org
229   ,* Some Appointment
230   ,  SCHEDULED: <2010-11-17 Wed>
231 #+end_src    
233 **** Advanced Source Blocks 
234      Advanced source blocks takes the following options 
235      - [-+]n: restart or continue numbering
236      - r: remove labels
237      - k: keep
238      - i: preserve indentation
239      - t: text area
240      - w: width
241      - h: height
242      #+BEGIN_SRC emacs-lisp -n
243      (save-excursion                  (ref:sc)
244         (ignore)
245         (goto-char (point-min))       (ref:jump)
246      #+END_SRC
248      In line [[(sc)]] we remember the current position.  [[(jump)][Line (jump)]] jumps
249      to point-min.
251 **** Text Areas in HTML export
253      #+BEGIN_EXAMPLE -t -w 40
254        (defun org-xor (a b)
255           "Exclusive or."
256           (if a (not b) b))
257      #+END_EXAMPLE
259 ** Native HTML and ODT
260 *** Handcrafted Para
261    
262 #+begin_html
263   <p> 
264     This is a handwritten html para
265   </p>
266 #+end_html
267    
269 #+begin_odt
270   <text:p> This is a handwritten odt para</text:p>
271 #+end_odt
273 #+HTML: <div style="width:50%;float:left;">
274   *English Alphabets*
275     - A
276     - B 
277     - C
278   *Greek Alphabets*
279     - Alpha
280     - Beta
281     - Gamma
282   #+html: </div>
283   #+html: <div style="width:50%;float:right;">
284   *Reversed English Alphabets*
285     - C
286     - B
287     - A
288   *Reversed Greek Alphabets*
289     - Gamma
290     - Beta
291     - Alpha
292   #+HTML: </div>
295 *** An Equation as Embeded MathML
296    A trigonometric equation embedded in *MathML*
298 #+begin_odt
299   <text:p>
300     <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">
301       <draw:object>
302         <math xmlns="http://www.w3.org/1998/Math/MathML">
303           <semantics>
304             <mrow>
305               <mi>sin</mi>
306               <mrow>
307                 <mrow>
308                   <mo stretchy="false">(</mo>
309                   <mrow>
310                     <mi>A</mi>
311                     <mo stretchy="false">+</mo>
312                     <mi>B</mi>
313                   </mrow>
314                   <mo stretchy="false">)</mo>
315                 </mrow>
316                 <mi mathvariant="normal">=</mi>
317                 <mi>sin</mi>
318               </mrow>
319               <mi mathvariant="italic">ACos</mi>
320               <mrow>
321                 <mi>B</mi>
322                 <mo stretchy="false">+</mo>
323                 <mi>cos</mi>
324               </mrow>
325               <mi>A</mi>
326               <mi>sin</mi>
327               <mi>B</mi>
328             </mrow>
329             <annotation encoding="StarMath 5.0">sin (A+B) = sin ACos B + cos A sin B
330             </annotation>
331           </semantics>
332         </math>
333       </draw:object>
334     </draw:frame>
335   </text:p>
336 #+end_odt
338 ** Lists
339 *** Simple Lists
340 **** Numbered List
341      
342      This is a numbered list.
343      
344      1. L1N1
345      2. L1N2
346      3. L1N3
347      
348 **** Bulleted List
349      
350      This is a bulleted list.
351      - L1B1
352      - L1B2
353      - L1B3
354      
355 **** Description List
356      
357      There is a nested description list down below
358      - Term-1 :: This is a definition for Term-1 which wraps around to
359                  the next line
360      - Term-2 :: This is a definition for Term-2 which wraps around to
361                  the next line
362        - Term-2.1 :: Definition for Term-2.1
363        - Term-2.2 :: Definition for Term-2.2
364      
365 **** A Complex List
366      
367      1. L1N1
368         1. L2N2
369         2. L2N3
370      2. L1N4
371         * L2B1
372         * L2B2
373           - L3B3
374             
375             First paragraph.
376             
377             Second paragraph.
378             
379           - L3B4
380      3. L1N5
381         1. L2N6
382            1. L3N7
384 *** A Very Complex List
385 **** Lord of the Rings
387      My favorite scenes are (in this order)
388      1. The attack of the Rohirrim
389      2. Eowyn's fight with the witch king
390         + this was already my favorite scene in the book
391         + I really like Miranda Otto.
392           - Definition-1 :: Description-1
393           - Definition-2 :: Description-2
394      3. Peter Jackson being shot by Legolas
395         He makes a really funny face when it happens.
396         - on DVD only
397      But in the end, no individual scenes matter but the film as a whole.
398      Important actors in this film are:
399      - Elijah Wood :: He plays Frodo
400      - Sean Austin :: He plays Sam, Frodo's friend.  I still remember
401                       him very well from his role as Mikey Walsh in
402                       The Goonies
403        - Embedded Definition 1 :: Embedded Description 1
404        - Embedded Definition 2 :: Embedded Description 2
405             
406 ** Images
407 *** Image URLs
408     See the You can see the official logo of Orgmode here:
409     [[http://orgmode.org/img/org-mode-unicorn.png]]
411 *** Inlined Images
412 **** A simple inlined image
414     [[./org-mode-unicorn.png]]
415     
416 **** A simple image with caption and label
417   
418 #+CAPTION: Unicorn Logo
419 #+LABEL: fig:1024
420   [[./org-mode-unicorn.png]]
422 **** An image that is explicitly sized
423 #+CAPTION: Unicorn Logo
424 #+LABEL: fig:1025
425 #+ATTR_ODT: (:width 10 :height 10)
426   [[./org-mode-unicorn.png]]
428 **** An image that is scaled
429 #+ATTR_ODT: (:scale 0.5)
430   [[./org-mode-unicorn.png]]
432 *** Thumbnails
433     This is a clickable image [[http://orgmode.org][./org-mode-unicorn.png]]
434    
436 *** Reference to an Image
437     Please refer to \ref{fig:1024} for further information.
438     
439 *** LaTeX Fragments 
441 **** LaTeX Fragment1
442 #   See org-format-latex-options
443     
444     There is a equation down below.
446    \begin{equation}
447      e = \frac{1}{2}mv^2
448    \end{equation}
449    
450 **** LaTeX Fragment2
451      
452      \begin{equation}
453      x=\sqrt{b} 
454      \end{equation}
455      
456      If $a^2=b$ and \( b=2 \), then the solution must be either $$
457      a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].
459 ** File URLs
460 *** Relative URL
461     [[../../../lisp/org-html.el][This is a relative link to org-html.el]]
463 *** Absolute URL
464     [[file:~/src/orgmode.org/contrib/odt/OrgOdtStyles.xml][This is an absolute link to styles file]]
466 ** Links
467 *** Targets
468 **** Fuzzy Target
469 **** Target with CUSTOMID
470      :PROPERTIES:
471      :CUSTOM_ID: aabbccddeeff
472      :END:
473      
474 **** Dedicated Target Style1
475 #   <<Dedicated Target>>    
476     
477 **** Dedicated Target Style2
479      There is a dedicated target at the end of this sentence -
480      <<Dedicated Target1>>.
481      
482 **** <<<Radioed Target>>>
483      
484 *** References
485 **** References to Fuzzy Target
487      This is a link to [[Fuzzy Target]].
488      
489 **** References to CUSTOMID links
491      This is a link to [[#aabbccddeeff][Target with CUSTOMID]]. This is nodesc link to [[#aabbccddeeff]].
492      
493 **** References to Dedicated Target
495      There is a link to nodesc [[Dedicated Target]] here. There is a link
496      to [[Dedicated%20Target][Jump to Dedicated Target]] here.
497      
498      There is a link to [[Dedicated%20Target1][Dedicated Target1]] here.
499      
500 **** References to Radioed Links
502      This section has references to Radioed Target. One more reference
503      to Radioed Target.
505 ** Tables
506 *** A simple Orgmode Table
507     
508     | EST | New York | -5:00 |
509     | IST | Madras   | +5:30 |
510     | AST | Bahrain  |       |
513 *** A formatted Orgmode Table
515 #+CAPTION: An Example Table
516 #+LABEL:   table:10
518     |     Labels | C1          | C2            |           C3 |
519     |------------+-------------+---------------+--------------|
520     |          / | <           | >             |           <> |
521     |        <r> | <l>         | <c>           |          <r> |
522     | R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
523     |         R2 | R2C1        | R2C2          |         R2C3 |
524     |------------+-------------+---------------+--------------|
525     |         R3 | R3C1        | R3C2          |         R3C3 |
526     |         R4 | R4C1        | R4C2          |         R4C3 |
527     |------------+-------------+---------------+--------------|
528     |         R5 | R5C1        | R5C2          |         R5C3 |
529     |         R6 | R6C1        | R6C2          |         R6C3 |
530     |         R7 | R7C1        | R7C2          |              |
531     |------------+-------------+---------------+--------------|
533 *** Table.el Table with no Spanning
534 # See org-export-prefer-native-exporter-for-tables
536     +---------------+---------------+
537     |Term           |Percentage     |
538     +---------------+---------------+
539     |Quarter        |25%            |
540     |One-Fourth     |               |
541     +---------------+---------------+
542     |Half           |50%            |
543     |One-by-Two     |               |
544     +---------------+---------------+
545     |Three-Quarters |75%            |
546     |Three-Fourths  |               |
547     +---------------+---------------+
548     |Full           |100%           |
549     |Whole          |               |
550     +---------------+---------------+
551     
552 *** Table.el Table with Spanning
553      
554     +----------+---------------------+----------+
555     |Name      |cmd        calls     |Percentage|
556     +----------+                     +----------+
557     |rgb       |93         534       |46%       |
558     +----------+                     +----------+
559     |Xah       |82         090       |40%       |
560     +----------+                     +----------+
561     |total     |203        118       |100%      |
562     +----------+---------------------+----------+
563     
564 *** Another Table.el Table with Spanning
566     +-----------+----------+
567     |   R1C1    |   R1C2   |
568     +-----------+----------+
569     |      R2C1 R2C2       |
570     +-----------+----------+
571     |   R3C1    |   R3C2   |
572     |           +----------+
573     |   R4C1    |   R4C2   |
574     +-----------+----------+
576 ** Table Referenced
578    Please refer to \ref{table:10} for further information.
580 ** Footnote Definitions (Part 1)
582 [fn:XYZ] There is a link to [[http://Orgmode.org][Orgmode.org]].
584 ** Footnote Usage
585 *** Plain Footnotes
587     This paragraph has multiple references to the same footnote. This
588     is the first reference to a footnote [1]. This is a second
589     reference to the same footnote [1].
590     
591 *** Named Footnotes
593     Footnote named XYZ [fn:XYZ].
595 *** Inlined Footnote
597     Inlined footnote [fn:: inline definition]
598     
599 *** Named and Inlined Footnote
601    Named and Inlined footnote [fn:name: named definition]
604 # Footnote Definitions (Part 2)
605 [1] Quick brown fox jumps over the lazy dog. Quick brown fox jumps ove
606 the lazy dog. 
608 ** About Orgmode
609    Org is a mode for keeping notes, maintaining TODO lists, and doing
610    project planning with a fast and effective plain-text system.
612    Org develops organizational tasks around NOTES files that contain
613    lists or information about projects as plain text. Org is
614    implemented on top of Outline mode, which makes it possible to keep
615    the content of large files well structured. Visibility cycling and
616    structure editing help to work with the tree. Tables are easily
617    created with a built-in table editor. Org supports TODO items,
618    deadlines, timestamps, and scheduling. It dynamically compiles
619    entries into an agenda that utilizes and smoothly integrates much of
620    the Emacs calendar and diary. Plain text URL-like links connect to
621    websites, emails, Usenet messages, BBDB entries, and any files
622    related to the projects. For printing and sharing of notes, an Org
623    file can be exported as a structured ASCII file, as HTML, or (TODO
624    and agenda items only) as an iCalendar file. It can also serve as a
625    publishing tool for a set of linked web pages.
627    As a project planning environment, Org works by adding metadata to
628    outline nodes. Based on this data, specific entries can be extracted
629    in queries and create dynamic agenda views.
631    Org mode contains the Org Babel environment which allows you to work
632    with embedded source code blocks in a file, to facilitate code
633    evaluation, documentation, and tangling.
635    Org's automatic, context-sensitive table editor with spreadsheet
636    capabilities can be integrated into any major mode by activating the
637    minor Orgtbl mode. Using a translation step, it can be used to
638    maintain tables in arbitrary file types, for example in LaTeX. The
639    structure editing and list creation capabilities can be used outside
640    Org with the minor Orgstruct mode.
642    Org keeps simple things simple. When first fired up, it should feel
643    like a straightforward, easy to use outliner. Complexity is not
644    imposed, but a large amount of functionality is available when you
645    need it. Org is a toolbox and can be used in different ways and for
646    different ends, for example:
648    -  an outline extension with visibility cycling and structure editing
649    -  an ASCII system and table editor for taking structured notes
650    -  a TODO list editor
651    -  a full agenda and planner with deadlines and work scheduling
652    -  an environment in which to implement David Allen's GTD system
653    -  a simple hypertext system, with HTML and LaTeX export
654    -  a publishing tool to create a set of interlinked webpages
655    -  an environment for literate programming
657    There is a website for Org which provides links to the newest
658    version of Org, as well as additional information, frequently asked
659    questions (FAQ), links to tutorials, etc. This page is located at
660    http://orgmode.org.