3

I have my habits with LaTeX, then in HTML I don’t know which element can replace the LaTeX’s \subparagraph{} command. <br /> isn’t a good idea because it is the equivalent of the blank line in LaTeX. I can create a special class “subparagraph” but before I want to know if HTML didn’t have a similar element.

The \subparagrahp{} LaTeX’s command is something between the paragraph and the HTML’s <br /> element. Overapi didn’t tell me more :/

Someone have any idea please?

Werner
  • 14,324
  • 7
  • 55
  • 77
fauve
  • 226
  • 1
  • 10
  • if I understand it correctly (don't know LaTeX), then this creates a sub section. you can do that with nested
    or

    tags. It you're doing this to get visual indentation you can use the margin and/or padding css styles

    – Ruben Verschueren Jan 21 '14 at 11:27
  • I am not searching a way to have an indentation, I know how to do it with css ☺ I explain you : I translate a LaTeX document to HTML. In LaTeX I have a big `\paragraph{}` area (in LaTeX we name that an “environment”) containing many \**sub**paragraph{} environment. I translate the `\paragraph{}` ton `

    ` but I don’t know how can I translate the `subparagraph{}`. In LaTeX the `subparagraph{}` command make a top and bottom margin a little bit smaller than `paragraph{}`. If I translate this tow command to a same HTML element I will have a leak of information.

    – fauve Jan 21 '14 at 20:05

2 Answers2

2

You could use a div element as the paragraph subsitute and p elements as subparagraphs, with additional class for styling, this could represent your LaTeX document structure.

\paragraph{Introfoo}
Introduction lorem lorem

  \subparagraph*{}
  Foobar lorem impsum ugh

  \subparagraph*{}
  Foobar lorem impsum ugh

would translate to: The h3 tag is just a suggestion, the level depends on your other structure around this.

<div class="paragraph">
  <h3 class="paragraph">Introfoo</h3>
  <p class="paragraph">    
    Introduction lorem lorem
  </p>
  <p class="subparagraph">
    Foobar lorem impsum ugh 1
  </p>

  <p class="subparagraph">
    Foobar lorem impsum ugh 2
  </p>
</div>
sternAndy
  • 505
  • 4
  • 6
  • Thank you, this way I final use. I what be sure that any other way is best than this one. Thank you. – fauve Jan 27 '14 at 19:27
2

LaTeX' \paragraph is a heading element, the next-to-smallest one, so I'd map it to <h5>, leaving <h6> for subparagraphs, and use CSS to give them display:inline-block (run-in headers) and appropriate other styling as desired. This will leavel h1-h4 for title-and-or-chapter, section, subsection, subsubsection.

Ulrich Schwarz
  • 7,598
  • 1
  • 36
  • 48