% latex generated by the script '/home/project-web/bumble/cgi-bin/text2latex.cgi'
% with help from the sed script 'text2latex.sed'
% query string: 'books/linux-document/linux-document-book'
% sFileName= 'linux-document-book'
% sDirName = 'books/linux-document'
% sName = '' -->
% latex by http://bumble.sourceforge.net/scripts/text2latex.sed
% this script is a work in progress
\documentclass[11pt]{article}
\usepackage[hmargin=2cm, vmargin=2cm]{geometry}
\usepackage{url}
\usepackage{hyperref}
\begin{document}
\\&\\& Writing and Publishing with Linux
------------------------------------,
MARKDOWN
The markdown system uses a minimalist structured text format to produce
html. 'markdown' is both a 'text format' and also a perl script used to
turn that format into html. Using pandoc it is possible to convert
markdown formatted text into other formats, such as pdf. Markdown may fill
a gap between enscript and latex, where the user wants more control over
how the produced document looks than can be obtained with 'enscript', but
doesnt wish to become mired down in the complexities of 'latex'
@@ \url{http://daringfireball.net/projects/markdown/}
details about the format of the source document (text file).
@@ \url{http://daringfireball.net/projects/markdown/dingus}
a page to actually try out markdown text syntax
@@ \url{http://six.pairlist.net/pipermail/markdown-discuss/}
the markdown discussion list archives
CONVERTING TO HTML ....
The 'markdown' perl script can only create html but 'pandoc' can produce
other formats from the same markdown source text document. Markdown
only seems to produce a 'fragment' of html (without head and body tags)
* display a text document converted to html with markdown
>> markdown document.txt | less
* convert a document to html and save as 'doc.html'
>> markdown doc.txt > doc.html
* convert a document and add html and body tags to make a complete page
>> (echo '
';markdown doc.txt;echo '') > out.html
>> markdown doc.txt|sed '1s/\\^//;\\$s.\\$..' > out.html
>> pandoc -s -o out.html doc.txt \\#\\#(the same but better, using pandoc)
MARKDOWN SYNTAX ....
The great advantage of markdown syntax is that the source document can be kept
'clean' without distracting or ugly markup codes. Normal html can be inserted
anywhere in a markdown document. If there is anything which markdown
cannot do (such as tables) just use html tags instead.
DOCUMENT HEADINGS ....
* create a 1st-level document heading (underline the text with '=' equals)
--------------------------------------------------------------------------
The Heading
\title{=========}
\author{bumble.sourceforge.net}
\maketitle
\tableofcontents
,,,
* create a markdown 2nd-level document heading
----------------------------------------------
A Second Level Heading
----------------------
,,,
* markup a 3rd level document heading 'Stone Fruit'
>> \\#\\#\\# Stone Fruit
* create a vim command ',ll' which underlines the current line with '-' dashes
>> map ,ll yyp:s/[ ]*\\$// \\$\\backslash\\$| s/[ ]*\\$// \\$\\backslash\\$| s/[\\^ ]/-/g \\$\\backslash\\$| s/- \texttt{/--/go}
\\#\\#(place in 'vimrc'. This mapping helps to write markdown 2nd level headings)
* create a vim command ',LL' which creates a markdown 1st level heading
>> map ,ll yyp:s/[ ]*\\$// \\$\\backslash\\$| s/[ ]*\\$// \\$\\backslash\\$| s/[\\^ ]/=/g \\$\\backslash\\$| s/= \texttt{/==/go}
\\#\\#(This mapping command underlines the current line with '=' equals)
* create a 'blockquote', that is text more indented than surrounding paragraphs
>> > \\#\\#(blockquotes can contain headings and paragraphs
TEXT EMPHASIS ....
* make a word or phrase emphasised
>> the following is *emphasised text*
>> the following is \\_emphasised text\\_ \\#\\#(more or less the same)
* strongly emphasise words or phrases
>> the following is **strongly emphasised text**
>> the following is \\_\\_strongly emphasised text\\_\\_
LISTS ....
The list marker can also be a '+' or a '*'. There is no difference
between these types of lists
* create an unordered (bulleted) list
-------------------------------------
- first item
- second item
- third and last
,,,
* create an nested unordered list
-------------------------------------
- first item
* sublist item 1
* sublist item 2
- second item
- third and last
,,,
* create an ordered list with a nested unordered list
-----------------------------------------------------
1. First
2. Second:
- Fee
- Fie
- Foe
3. Third
,,,
* create an unordered list with links to other parts of the page
----------------------------------------------------------------
- [Chapter One](\\#chap1)
- [Chapter Two](\\#chap2)
- [Chapter Three](\\#chap3)
...
...
,,,
\\#\\#(notice how normal html is used to create the anchors)
* create an ordered list
------------------------
1. first
2. second
3. third
,,,
LINKS ....
* create link in a document with the display text 'example link'
>> This is an [example link](http://example.com/)
\\#\\#(the html: this is an example link.)
* create link with a display text and also a 'title' (when the mouse hovers over)
>> [example link](http://example.com/ "With a Title")
* for pdf output the embedded code backtick may look best
>> `http://google.com` \\#\\#(displays the link in fixed pitch font in pdf)
* create and use a named link with display text 'Google'
--------------------------------------------------------
a search engine is [Google][1]
[1]: \url{http://www.google.com} "Google"
[2]: \url{http://www.yahoo.com} "Yahoo"
* create a reference link with a space in the name
--------------------------------------------------
I start my morning with a cup of coffee and
[The New York Times][NY Times].
[ny times]: \url{http://www.nytimes.com/}
,,,
IMAGES ....
* embedd an image file in the document, with an optional title
![a tree](/path/to/img.jpg "Title") \\#\\#(if the image is not found show 'tree')
* embedd an image in the document using the 'reference' style syntax
--------------------------------------------------------------------
![alt text][id]
[id]: \texttt{/path/to/img.jpg} "Title"
,,,
EMBEDDED CODE ....
* use backticks '`' to show code with special characters in it
>> dont use the `