Search code examples
htmllatexparagraphequivalent

\subparagraph{} equivalent in html


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?


Solution

  • 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>