Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Minimal example is posted under this question How to Convert XeTeX to Html

\bv
तपः स्वाध्यायनिरताम् तपस्वी वाग्विदाम् वरम् |          \\ 
नारदम् परिपप्रच्छ वाल्मीकिर्मुनिपुङ्गवम् ॥ १.१.१ ॥
\ev

\bfns  \blt \hline
तपस्वी & = &  sagacious thinker & वाल्मीकि: & = &  Sage [Poet]  वाल्मीकि & तपः & = & in thoughtful-meditation  \\
स्व अध्याय & = & in self, study of scriptures & निरतम् & = & always - who is eternally studious in scriptures& वाक् & = & in speaking [in enunciation] \\

विदाम् & = & among expert enunciators & वरम् & = & sublime one - with नारद & मुनि पुन्गवम् & = & with sage, paragon, with such a paragon sage Naarada \\

नारदम्  & = &  with [such a sage] Naarada & परिपप्रच्छ  & = &  verily [inquisitively,] inquired about

\elt \efns

सर्व गुण समिष्टि रूपम् पुरुषम्  all, merited endowments, composite, in form - about such a man.] 
A thoughtful-mediator, an eternally studious sage in scriptures about the Truth a ...[1-1-1]

Above shown text is one verse, my document has hundreds of such units.

My question: Is it possible to put some sort of delimiters to let LaTeX know about the start and the end of each verse unit and then convert each unit into a PDF or HTML. The name of the output file can start from 001 and increment by one. Currently there are no delimiters but if it works for one then I can insert the delimiters later.

share|improve this question
    
This is probably possible using the TikZ external library. Each verse would have to be in a tikzpicture environment. –  qubyte Feb 14 '12 at 14:44
1  
The preview package should be helpful here. It can produce a PDF which has every verse on a single, tightly cropped page. You can then split the multi-page PDF into multiple single-page PDFs using a tool like pdftk. –  Martin Scharrer Feb 14 '12 at 14:46
    
tex.stackexchange.com/q/1507/2036 –  Aku Feb 14 '12 at 16:57
add comment

1 Answer

I suppose that every verse starts with bv, then you can redefine this command that it also does a \newpage.

\let\BV\bv
\def\bv{\newpage\BV}

Then you'll get one verse per page. With \pagestyle{empty} you can crop all the whitespace from every page with running pdfcrop <file>. With pdftk or any other pdf tool you can extract all pages to single pdf files.

share|improve this answer
    
worked great for pdf, not for html, may be I am doing something wrong. –  Aku Feb 15 '12 at 0:38
    
did you tried pdftohtml? –  Herbert Feb 15 '12 at 7:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.