Manuscript notation for IdeoType is not much different from HTML, other than a few exceptions and extensions. (All these mappings are preliminary and may change in future.)
head/title
is title (for colophon, no style allowed).
<head> <title>Foo Tutorial</title> </head>
head/meta
can set some meta info (e.g. name="author" content="John Doe"
, name="date" content="2038-02-31"
)
<head> <meta name="author" content="John Doe"/> </head>
h1
is title (for front page, style allowed).
<h1><em>Foo</em> Tutorial</h1>
h2 is chapter, h3 section, h4 subsection, ...
p
is paragraph. class="continued"
suppresses indentation of the first line.
<p>First paragraph.</p> <p>Second paragraph.</p> <p class="continued">Second paragraph continued.</p>First paragraph.
Second paragraph.
Second paragraph continued.
address
, blockquote
, div
are same as HTML.
<address>info@example.org</address><blockquote> <p>If you do not think about the future, you cannot have one. -- John Galsworthy</p> </blockquote><div> does not do much without class specified.</div>info@example.orgIf you do not think about the future, you cannot have one. -- John Galsworthy
div does not do much without class specified.
pre
is preformatted code block, usually in typewriter font.
<pre>#include <stdio.h> int main(void) { printf("hello, world\n"); return 0; }</pre>#include <stdio.h> int main(void) { printf("hello, world\n"); return 0; }
abbr
and acronym
make their title
to be inserted as footnote.
<abbr title="World Wide Web">WWW</abbr> is an abbreviation while <acronym title="radio detecting and ranging">rader</acronym> is an acronym.WWW is an abbreviation while rader is an acronym.
br
is linebreak. Do not abuse it, as it causes an error in inappropriate places.
First line<br/> and the second line.First line
and the second line.
cite
is a citation. Its title
attribute becomes the key to lookup.
<cite title="doe2000">John Doe, "Foo Bar"</cite>John Doe, "Foo Bar"
code
is inline program code, usually in typewriter font.
function <code>foo()</code>.function
foo()
.
dfn
automatically generates index entry. If class
includes noindexterm
, indexing will be suppressed.
<dfn>HTML</dfn> stands for Hypertext Markup language.HTML stands for Hypertext Markup language.
em
is to emphasize, strong
puts more emphasis.
<em>emphasized</em> or <strong>strong</strong>.emphasized or strong.
kbd
is user input (usually emphasized and in typewriter font). samp
is output from computer (usually in typewriter font).
Type <kbd>echo foo</kbd> at the terminal.Type echo foo at the terminal.
q
is inline quotation.
She say <q>Good bye</q>, I say <q>Hello</q>.She say
Good bye, I sayHello.
span
plays various roles depending on what class
is specified.
<span class="foo">class</span> is used for expanding features.class is used for expanding features.
a href="http://..."
inserts the URL as footnote.
See <a href="http://example.org/">Example.org</a>.See Example.org.
a href="#..."
inserts cross reference.
We will discuss the meaning of foo <a href="#sec-foo">later</a>.We will discuss the meaning of foo later.
* id="..."
is an identifier for cross reference and document inclusion.
<p id="sec-foo">Foo is a sample name of anything.</p>Foo is a sample name of anything.
var
is variable usually in italic.
Variable <var>fname</var> refers to a filename.Variable fname refers to a filename.
del
is deletion (strikethrough) and ins
is insertion (underline).
<del>Deleted</del> and <ins>inserted</ins>.
Deletedand inserted.
Lists (dl
, ul
, ol
) are the same as ones in HTML. Do not nest too deep though.
dl
is definition list. Multiple terms for single description is not supported yet.
<dl> <dt>running head</dt> <dt>running title</dt> <dd>A heading printed at the top of every (other) page of a book.</dd> <dt>date</dt> <dd>Specific time that can be named.</dd> <dd>A person with whom you are dating.</dd> <dd>Fruit of the date palm.</dd> </dl>
- running head
- running title
- A heading printed at the top of every (other) page of a book.
- date
- Specific time that can be named.
- A person with whom you are dating.
- Fruit of the date palm.
applet
, object
, map
are ignored.
form
is ignored.
b
, big
, i
, small
, sub
, sup
, tt
) are obsolete, though not ignored for now. Use alternatives instead, such as em
.
a name="..."
is obsolete, though not ignored for now. Use id
attribute instead.
Note:
--force-conventional-resolution
option in ideotype.rb
.
img src="..."
is inline graphics.
<img src="booklogo-small.eps" alt="book logo"/>Book logo.Book logo.
div class="figure"
makes floating figure.
div class="figure" / p class="caption"
is caption.
<div class="figure" id="fig-photo"> <img src="tritonia-lusitania-1935.jpg" alt="J. Peress' 1-atm dive suit, Tritonia" width="640px"/> <p class="caption"> J. Peress' 1-atm dive suit, Tritonia, explored the Lusitania wreck in 1935. </p> </div>
Table support is preliminary. Avoid using tables if you can. You can always draw a table in drawing tool and embed it as figure.
table
is table.
table / caption
is table caption.
<table summary="table comparison"> <caption>Comparison of tables.</caption> <tr><th></th><th>float</th><th>caption</th><th>nestable</th></tr> <tr><th>HTML table</th><td>no</td><td>yes</td><td>yes</td></tr> <tr><th>LaTeX tabular</th><td>no</td><td>no</td><td>yes</td></tr> <tr><th>LaTeX table</th><td>yes</td><td>yes</td><td>no</td></tr> </table>
Comparison of tables. float caption nestable HTML table no yes yes LaTeX tabular no no yes LaTeX table yes yes no
Mathematical expressions are supported using MathML. Do not forget to put namespace identifier.
math xmlns="http://www.w3.org/1998/Math/MathML" display="block"
is display (block) math.
math xmlns="http://www.w3.org/1998/Math/MathML" display="block" id="foo"
is display math with number.
math xmlns="http://www.w3.org/1998/Math/MathML"
is inline math.
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block" id="eqn-block"> <mfrac> <mrow><mi>d</mi></mrow> <mrow><mi>d</mi><mi>x</mi></mrow> </mfrac> <msubsup><mo>∫</mo><mi>a</mi><mi>x</mi></msubsup> <mi>f</mi> <mfenced> <msup><mi>x</mi><mrow><mo>′</mo></mrow></msup> </mfenced> <mi>d</mi><msup><mi>x</mi><mo>′</mo></msup> <mo>=</mo> <mi>f</mi><mfenced><mi>x</mi></mfenced> </math>
<p>The same <a href="#eqn-block">equation</a> can be placed inline: <math xmlns="http://www.w3.org/1998/Math/MathML" id="eqn-inline"> <mfrac> <mrow><mi>d</mi></mrow> <mrow><mi>d</mi><mi>x</mi></mrow> </mfrac> <msubsup><mo>∫</mo><mi>a</mi><mi>x</mi></msubsup> <mi>f</mi> <mfenced> <msup><mi>x</mi><mrow><mo>′</mo></mrow></msup> </mfenced> <mi>d</mi><msup><mi>x</mi><mo>′</mo></msup> <mo>=</mo> <mi>f</mi><mfenced><mi>x</mi></mfenced> </math> as well.</p>The same equation can be placed inline: as well.
div class="frontmatter"
indicates the beginning of frontmatter. In frontmatter in general, section headings has no numbers and Roman numerals are used for page number.
div class="mainmatter"
indicates the end of frontmatter and the beginning of frontmatter.
div class="appendix"
indicates the end of normal chapters and the beginning of appendices. Appendices have section numbering different from normal chapters (e.g. Chapter 1 and Appendix A).
div class="backmatter"
indicates the end of mainmatter and the beginning of backmatter.
<div class="frontmatter"/>Frontmatter (title, colophon, dedication, foreword, preface, acknowledgments, table of contents, etc)
<div class="mainmatter"/>Chapters
<div class="appendix"/>Appendices
<div class="backmatter"/>Backmatter (index, etc.)
div class="toc"
inserts table of contents.
<div class="toc"/>
div class="index"
inserts index.
<div class="index"/>
a class="indexterm"
makes index entry.
<a class="indexterm">some term</a>
You can explicitly specify sort key by title
attribute.
If you need a hierarchical index, specify parent entry by href
and rel
attribute.
Sing and play are both <a class="indexterm" title="verb" id="idx-verb">verbs</a>. <a class="indexterm" title="sing" href="#idx-verb" rel="parent">Singing</a> is fun.
a
with include
class causes file inclusion.
a href="foo" class="include"
inserts the file as plain text.
a href="foo#..." class="include"
inserts the file as partial manuscript (inclusion starts at the element with that id).
Elements with exclude
class causes the element to be excluded from the output. Labels (anchors) for cross reference are ommited regardless of id
attribute. When you need labels, specify label
class explicitly.
<p>We have apples<span class="exclude"> and bananas</span>.</p> <p class="label exclude" id="orange">They have oranges.</p>We have apples and bananas.
They have oranges.
Elements with noescape
class will be passed on to the backend without escaping. Use with caution.
<p>Escaped (default): \fbox{\LaTeX?}. Not escaped: <span class="noescape">\fbox{\LaTeX?}</span>.</p>Escaped (default): \fbox{\LaTeX?}. Not escaped: \fbox{\LaTeX?}.
a
is also used for footnotes.
a href="#foo" class="footnotemark"
inserts a footnote mark.
ul class="footnotes" / li class="footnotetext"
is footnote text.
<p> Footnote <a href="#fn-fnmark" class="footnotemark">marks</a> and footnote <a href="#fn-fntext" class="footnotemark">texts</a> must be in pairs. </p> <ul class="footnotes"> <li class="footnotetext" id="fn-fnmark">Footnote mark.</li> <li class="footnotetext" id="fn-fntext">Footnote text.</li> </ul>Footnote marks and footnote texts must be in pairs.
- Footnote mark.
- Footnote text.
Manuscript elements can be filtered by xml:lang
attribute. This is useful for translation project.
* xml:lang="..."
sets language.
<p> <span xml:lang="en">English text.</span> <span xml:lang="ja">日本語のテキスト。</span> </p>English text.