% latex generated by the script '/home/project-web/bumble/cgi-bin/text2latex.cgi' % with help from the sed script 'text2latex.sed' % query string: 'books/format-book/eg' % sFileName= 'eg' % sDirName = 'books/format-book' % 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} \\&\\& The LaTeX Book Transformation Script ---------------------------------: This is a test file for the "booktex" script which is "supposed" to render a text file into latex. \\#\\#(comments can appear on a line by themselves) Comments: \\#\\#(can be preceded as well) @@ bumble.sf.net A site about language @@ \url{http://www.vim.org} The Vim text editor @@ \url{http://www.google.com} The search engine \title{} \author{bumble.sourceforge.net} \maketitle \tableofcontents>> escape codes .. \\$\\backslash\\$ - The command character, and others .. \\$ - Math typesetting, delimiter, .. \\%, The comment - character, .. \\^, Math superscript character, .. \\^, Actual carrot, .. \\&, Tabular column separator, .. \\_, Math superscript character, .. \\$\\verb|~|, Non-breaking space; to put the tilde over a letter, .. \\#, Macro parameter symbol, .. \{, Argument start delimiter .. \}, Argument end delimiter .., THE GOTCHAS * be careful about white space in bash statements >> d=2 NOT d = 2 >> if [ \\$a -le 5 ] NOT if [ \\$a -le 5] * scripts with MS Windows newlines \\$\\backslash\\$r\\$\\backslash\\$n will not run >> \\#!/bin/bash\\$\\backslash\\$r\\$\\backslash\\$n \\#\\#(doesnt work, use 'dos2unix' tool) OTHER PROBLEMS .... * be careful about special characters ------------------------------------- This forms part of a multiline block which should be displayed 'literally' \\&, \\^ \\% \\$\\backslash\\$begin \\$\\backslash\\$end special characters should not be "escaped" within "verbatim" blocks ,,, COLOURS Colours on the screen can be obtained using Ansi escape sequences and the 'echo' command * show redish text >> echo -e "\\$\\backslash\\$033[47m\\$\\backslash\\$033[1;31m Light Red on a grey background" >> echo -e "\\$\\backslash\\$033[1;31m Light Red " \title{} \author{bumble.sourceforge.net} \maketitle \tableofcontents a list of colour escape codes .. .. Black, 0;30 .. Dark Gray, 1;30 .. Red, 0;31 .. Bold Red, 1;31 ..; .. A CGI SCRIPT * make a cgi script to display the query string ----------------------------------------------- \\#!/bin/sh echo "Content-Type: text/html\\$\\backslash\\$n\\$\\backslash\\$n" echo "
the query string is \\$QUERY\\_STRING" 2>\\&1 ,,, SEARCHING TEXT * search for comment lines in a file >> grep '\\^\\#'