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