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.

I am using HTML to LaTeX programme to convert large quantity of HTML files. A typical example:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Title</title>
 <style type="text/css">
.poem {
    margin-left:10%;
    margin-right:10%;
    text-align: left;
}

.poem .stanza {margin: 1em 0em 1em 0em;}

.poem span.i0 {
    display: block;
    margin-left: 0em;
    padding-left: 3em;
    text-indent: -3em;
}

.poem span.i2 {
    display: block;
    margin-left: 2em;
    padding-left: 3em;
    text-indent: -3em;
}
    </style>

</head>
<body>

<h1>Chapter One</h1>

<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

<div class="poem"><div class="stanza">
<span class="i0">"I pass'd without the city gate,<br /></span>
<span class="i2">I linger'd by the way;<br /></span>
<span class="i0">The palm was bending to her mate,<br /></span>
<span class="i2">And thus I heard her say,<br /></span>
</div></div>

<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>

</body>
</html>

The conversion process is controlled by config.xml (view here)

For <elements> conversions, it works brilliantly, i.e. <h1> <blockqoute> etc.

However, as the above sample show, I would like to convert the Poem into LaTeX's Verse. In the Property I set up this following:

    <property name='margin'>
  <value name='1em 0em 1em 0em' start='\begin{verse}' end='\end{verse}' />
</property>

The output doesn't have the verse tag at all but this:

\\I linger'd by the way;
\\The palm was bending to her mate,
\\And thus I heard her say,
\\

I play around of DIV tag a bit, still no luck. any suggestions?

share|improve this question

closed as off-topic by Joseph Wright Aug 11 '13 at 10:58

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

3  
This is I suspect off topic for this site as it is about generating tex rather than about any problems with tex itself. css can get complicated so it may make sense to pre-process with a full css engine eg as found in phantomjs and get that to export a version of the document with the computed style of each DOM node explict. –  David Carlisle Mar 29 '13 at 21:23
    
This question appears to be off-topic because it is about HTML/CSS, not TeX. –  Joseph Wright Aug 11 '13 at 10:58

Browse other questions tagged or ask your own question.