# jemdoc: menu{MENU}{modelines.html}, showsource, analytics{UA-2725246-3}
= jemdoc -- modelines

jemdoc includes a mechanism for specifying options inside a source file. It is
called a /modeline/, after the same concept in [http://www.vim.org vim].  To use
a modeline, start your jemdoc source file (on the first line) with the exact
string +\#~jemdoc:+. Follow this string with one or more /modeline options/,
separated with commas (and any amount of white space).

Multiple modelines can be included if they are all at the beginning of the file,
and start with the same string. The modeline can be omitted altogether.

== Modeline options
=== General
- +menu{MENUFILENAME}{CURRENTFILENAME}+\n
  Place a [menu.html menu] at the left of the page.
- +nodefaultcss+\n
  Clear the list of CSS stylesheets included by the page.
- +addcss{CSSSHEET}+\n
  Explicitly include an additional custom CSS stylesheet.
- +addjs{scriptname}+\n
  Explicitly include the javascript file %scriptname.js%.
- +fwtitle+\n
  Makes the page title /full width/ so the menu /and/ the body lie underneath
  the title.
- +title{NEW TITLE}+\n
  Manually sets the titlebar text to +NEW TITLE+.

=== Extras
- +analytics{ANALYTICS KEY}+\n
  Adds Google Analytics support. The key is typically in the form
  %UA-0000000-0%. Sign up for Google Analytics
  [http://www.google.com/analytics/ here].

=== Footers
- +notime+\n
  Withhold the time from the `Page generated' footer.
- +nodate+\n
  Withhold the date and the time from the `Page generated' footer.
- +showsource+\n
  Include a link, in the footer, to the jemdoc source.
- +nofooter+\n
  Withhold the footer altogether (overrides the above options).

=== Equations
- +noeqs+\n
  Disable LaTeX equation support.
- +eqsize{SIZE}+\n
  Adjust the size of the equations (default +130+).
- +eqdir{EQDIR}+\n
  Adjust the equation directory (default +eqs+).
- +noeqcache+\n
  Disable equation caching.
- +addpackage{LATEX\_PACKAGE\_NAME}+\n
  Includes support for +LATEX\_PACKAGE\_NAME+ when compiling the equations.

== Examples
~~~
{This page}{}
# jemdoc: menu{MENU}{modelines.html}, showsource
~~~

~~~
{Use a different stylesheet altogether}{}
# jemdoc: nodefaultcss, addcss{custom.css}
~~~

~~~
{Combine various options}{}
# jemdoc: nodefaultcss, addcss{custom.css}{another.css}
# jemdoc: showsource, addcss{yetanother.css}
~~~
