The scrjura.sty is part of the KOMA-script bundle. I'm using it to draft contracts.

Often I have to deliver a word file. So I'm using tex4ht to produce it from my *.tex file. Let's say, the name of the tex-file is contract.tex, this MWE:

\documentclass[pagesize, ngerman, fontsize=12pt, parskip=half]{scrartcl}
\usepackage{babel, scrjura}



  \Clause{title=Eine Paragraphenüberschrift}

  Dieser Paragraph hat nur einen Absatz und der Text ist kurz.

  \Clause{title=Zweite Überschrift}

Dieser Paragraph hat zwei Absätze, dieser Satz hier ist der erste.

Und hier haben wir den zweiten Absatz. 



Then I call tex4ht:

htlatex contract.tex "scrjura" " -cunihtf"

A friendly soul wrote scrjura.cfg years ago, it is a small file:




  {\HCode{<div class=\qtchr contract\qtchr>}}


  {\HCode{<div class=\qtchr paragraph\qtchr>}}


   {\EndP\HCode{<p class=\qtchr para\qtchr>
    <span class=\qtchr sentence\qtchr>}}

 \Css{.sentence{margin-left:2em; padding-top: .5em;}}
 \Css{.paragraph{margin: 1em;}}
 \Css{.para{margin: .5em;}}




The trouble is: If a clause only consists of the heading and one paragraph, there is no \par between heading and text. This screenshot is taken from the contract.html:

Image displaying two clauses

The usage of the words paragraph in the German text is confusing, just ignore it.

Question: How to change scrjura.cfg to get a \par between heading and paragraph, even if the clause only consists of a heading and one paragraph.

You need to know one thing: If a clause only has one paragraph, scrjura.sty does not enumerate it. If a clause has more than one paragraph, they get numbers.

I really hope I have described my wish clearly. If in doubt, please ask!


The configuration file in the MWE hooks to parformat in order to insert <p> and <span> tags that create the paragraphs on the html page. parformat (which prints the sentence number) is not used for a single-sentence paragraph and therefore the html tags are not inserted in this case.

A possible solution would be to hook to \Clause or to \par but this is left as an exercise (i.e. I have no clue how to do that).

A workaround is to slightly modify scrjura.sty to call parformat in all cases. To keep the current output (no number for single sentences) the definition of parformat itself should also be modified to display an argument, allowing it to be called with an empty argument for single sentences and with the sentence number for multiple sentences.

When parformat is modified the use of the argument must be indicated in scrjura.cfg, by using defI instead of def.



\newcommand*{\parformat}[1]{#1} % was: \newcommand*{\parformat}{(\thepar)}
\ifnum \@tempcnta>\@ne    %at the end of \newcommand*{\contract@everypar}
    {\usekomafont{parnumber}{\parformat{(\thepar)}\nobreakspace}}% % modified %
    \parformat{}% % modified/added (originally empty clause) %
    {\usekomafont{parnumber}{\parformat{(\thepar)}\nobreakspace}}% % modified %




enter image description here

  • Thank you! Works! I'll ask the maintainer if he could adapt scrjura without side effects. And maybe Michal H. has an idea, too... – Keks Dose Oct 30 '17 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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