# This is a demo of a blog post shown on
# http://doconce.blogspot.com
# http://doconce.shoutwiki.com/wiki/DocOnce_demo
# http://doconcedemo.jumpwiki.com/wiki/First_demo

# #ifndef BLOG
# #define BLOG
# #endif

Here is some simple mathematics:

!bt
\begin{align}
f(x) &= \frac{1}{1 + x^2},
label{eq:f}\\
f'(x) & =-\frac{2x}{(1+x^2)^2}
label{eq:df}
\end{align}
!et
which can be implemented in a computer code:

@@@CODE Runges_func.py

A plot of the function $f(x)$
# #if FORMAT in ("html", "latex", "pdflatex", "sphinx")
defined in (ref{eq:f})
# #endif
appears below.

FIGURE: [https://raw.github.com/hplgit/doconce/master/doc/src/blog/f_plot.png, width=400]

Here is the derivative $f'(x)$ (with figure caption and label, which enables
referring to the figure later):

FIGURE: [https://raw.github.com/hplgit/doconce/master/doc/src/blog/df_plot.png, width=400] The derivative of Runge's function. label{fig:Runge:dfdx}

Movies can also be embedded:

MOVIE: [http://www.youtube.com/watch?v=75Ju0eM5T2c]

The elements above are generated by the following
"DocOnce": "https://github.com/hplgit/doconce" code.

!bc
Here is some simple mathematics:

|bt
\begin{align}
f(x) &= \frac{1}{1 + x^2},
label{eq:f}\\
f'(x) & =-\frac{2x}{(1+x^2)^2}
label{eq:df}
\end{align}
|et
which can be implemented in a computer code:

@@@CODE Runges_func.py

A plot of the function $f(x)$
# #if FORMAT in ("html", "latex", "pdflatex")
defined in (ref{eq:f})
# #endif
appears below.

FIGURE: [https://raw.github.com/hplgit/doconce/master/doc/src/blog/f_plot.png, width=400]

Here is the derivative $f'(x)$ (with figure caption and label, which enables
referring to the figure later):

FIGURE: [https://raw.github.com/hplgit/doconce/master/doc/src/blog/df_plot.png, width=400] The derivative of Runge's function. label{fig:Runge:dfdx}

Movies can also be embedded:

MOVIE: [http://www.youtube.com/watch?v=75Ju0eM5T2c]
!ec

!bnotice

# #if BLOG == "google"
 o There must be no title, author, or date in the document.
 o If the DocOnce code above is stored in a file
   "`demo.do.txt`": "https://github.com/hplgit/doconce/blob/master/doc/src/blog/demo.do.txt", run
   `doconce format html demo` to produce the HTML code, stored in
   "`demo.html`": "https://github.com/hplgit/doconce/blob/master/doc/src/blog/demo.html.html".
 o Copy the text in `demo.html` into the blog post's text area on
   URL: "http://doconce.blogspot.com" site, , using *HTML* mode.
 o Remember to first choose the *HTML-code* tab (and not just *Write*)
   and to place the copied text between the `div` tags.
# #elif BLOG == "wordpress"
 o There must be no title, author, or date in the document.
 o If the DocOnce code above is stored in a file
   "`demo.do.txt`": "https://github.com/hplgit/doconce/blob/master/doc/src/blog/demo.do.txt.html", run
   `doconce format html demo --wordpress` to produce the HTML code, stored in
   "`demo.html`": "https://github.com/hplgit/doconce/blob/master/doc/src/blog/demo_wordpress.html.html".
 o Copy the text in `demo.html` into the blog post's text area on
   URL: "http://doconce.wordpress.com" site, using *Text* mode (not *Visual*!).
 o Remember to first choose the *HTML-code* tab (and not just *Write*)
   and to place the copied text between the `div` tags.
# #endif
!enotice


