bundestag / gesetze

Bundesgesetze und -verordnungen
http://bundestag.github.io/gesetze/
The Unlicense
1.69k stars 156 forks source link

proper documentation on markdown encoding #56

Closed arademaker closed 6 years ago

arademaker commented 6 years ago

Do you have any documentation about the proper use of markdown to preserve the law structure?

hhirsch commented 6 years ago

Markdown is well documented and capable of structuring a document "close enough" or "well enough" for the use case. Go ahead and outline what particular feature is missing though. The project appears to be abandoned. I'd take over maintneance but I don't think there is a lot of public interest and the scope is too broad, wanting to be both a platform to display all the laws and at the same time wanting to be a platform to draft new laws.

AliSajid commented 6 years ago

I actually wonder if this can become part of something general. Effectively a machine-readable and machine-searchable law drafting platform with this being an implementation. A text-based database that is static sounds like a great idea.

hhirsch commented 6 years ago

@AliSajid Sadly it is unmaintained.

arademaker commented 6 years ago

We are trying to do something similar with Brazilian Laws. I am playing with org-mode and Markdown. At first, org-mode has the benefits to allow metadata in all headers (tags and properties). Markdown, on the other hand, is well supported and don't force anyone to use a particular editor. I wonder if this project had already some 'lessons learned' about how to handle the main document divisions (article,s chapters, titles etc), references to other laws, revisions, metadata etc.

Our take so far: https://github.com/own-pt/oab-exams/tree/master/lexml the original document posted in the official Brazilian Senate (http://www.planalto.gov.br/ccivil_03/Leis/L8906.htm).

stefanw commented 6 years ago

Hi everyone, thanks for the interest.

I did not create a standard for law in Markdown, I shoehorned the existing HTML version of German laws into Markdown. I wanted the law to be easily readable and writable by both humans (e.g. through PRs) and machines, that's why I chose Markdown. Obviously, Markdown was never meant for laws, it's only an easier to read/write subset of HTML.

Here are some lessons learned concerning the use of Markdown for annotating laws:

If laws were written with the restrictions of a Markdown dialect from the start, it could work. But realities are more complex and this leads to the current standard for storing laws: Akoma Ntoso. I can understand how it comes to complex standards, but I still believe there's hope for the idea that the law – even though it can be complex in its semantics – doesn't need to be complex in its (storage) format. After all what gives the law its power are not the XML-tags around it, but the people who read, write and change it.

This was the rough road map for this project:

  1. Find a good format to represent the law
  2. Find a good way to store changes with author and possibly procedural metadata in version control
  3. Keep it up to date with commits as changes to laws
  4. Build tools around the project and make professionals use it in their work
  5. Get it adopted by your parliament ;)

BundesGit had some promising prototypes for 4, but basically failed in step 3. I couldn't automate the semantic changes as separate commits.

So even though this project is unmaintained, I believe the idea of plaintext laws in version control lives on.

hhirsch commented 6 years ago

@arademaker If you want feature complete typesetting for law while having a free and open stack I'd opt for latex. As much as I love it, you'll never get non-emacs-users to use org-mode.