[texhax] best way to create a short html or plain text document with a few references

CV Radhakrishnan cvr at river-valley.org
Sun Jan 23 08:41:28 CET 2011

On 23/01/11 11:01 AM, Chris Ryan wrote:

> For an onine class I am taking, I have to create a large number of 
> short (~500 word) essays, with references, and post them to our 
> Blackboard website. Blackboard offers a box into which to post the 
> text. I believe html source can be posted. The essays can't be pdf 
> attachments.
> It's simple enough to just compose in a text editor, typing the 
> references at the end. And that's probably what I should do.  But
> I already have a .bib file full of references, so I would like to
> use them if possible, and not have to re-type them. Plus I thought
> maybe I could learn some new LaTeX tricks.

I think, TeX4ht can be of help to you. You might keep each essay as a
separate section in your document. If you have relatively newer
version of TeX4ht installed, please issue the following command from
the terminal:

 htlatex <filename> "html,next,2"

You will get as many html files as your sections which is what you
wanted, I believe.

You can also make use of bibTeX database, run bibTeX in the usual way
to create the *.bbl file and run the above command. That should solve
the bibliography problem.

Given below is an example which you might test with the above command
and see for yourself if it meets your requirements. The numeral '2' in
the above command is to cut your document at every section. If you
increase the number to '3' you can cut at every subsection onwards.
You can go upto '7'.

% <------------- begin test.tex --------------->






\section{Section One}

\subsection{Subsection One.One}

\section{Section Two}

\section{Section Three}

\section{Section Four}


% <------------- End test.tex ----------------->

If you have any problems, please post your problems at the TeX4ht list:

  text4ht at tug.org

Best regards

Machines that have broken down will work perfectly
when the repairman arrives.

More information about the texhax mailing list