I’m writing a codex book in markdown, the one explained here: Code of Canon Law
and a standard html page from which I extract the text is i.e. C.I.C. from Vatican web site- Book 1, Title 8
I used:
- H1 for the general book title:
.# Code of Canon Law - H2s are used for ‘SubBooks’ (they are called ‘book’ too but only all seven formed an indivisible ‘unicum’):
.## Book I. General Norms (Cann. 1–203)
…
.## Book VII. Processes (Cann. 1400–1752) - H3s are used for ‘Parts’ (in which every ‘SubBooks’ should be divided):
.### Part I
.### Part II
… - H4s are used for ‘Sections’ (in which every ‘Part’ should be divided):
.#### Section I
.#### Section II
… - H5s are used for ‘Titles’ (two or more for every ‘Section’):
.##### Title I
.##### Title II
… - H6s are used to indicate if there are one or more ‘Articles’ that compose a ‘Title’:
.##### Article I
.##### Article II
…
Now I’m looking for a way to write others three subheaders in which every articles is divided:
- ‘Canons’ (that are 1752)
- ‘Paragraph’ (not in all ‘Canons’ but in the most of its)
- ‘Numbers’ (same as ‘Paragraph’)
Here an example of the above last 3:
Can. 135 - §1. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
§2. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
§3. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
§4. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
( <br> are used by me only to structurate text as in the original way)
A Js script running in Firefox Consolle extract all text from the Web page and when finished I got:
Can. 135
§1. Lorem ipsum...
§2. Lorem ipsum...
§3. Lorem ipsum...
§4. Lorem ipsum...
What I’m trying to do
How to link all Canons, Paragraph and Numbers if I’ll find in other part of text or in other file?
So I try to give a ‘anchor’ to all as shown:
\n
Can. 135 ^ccar-cic-c135\n
\n
§1. Lorem ipsum ^ccar-cic-c135-c1\n
\n
§2. Lorem ipsum ^ccar-cic-c135-c2\n
\n
§3. Lorem ipsum ^ccar-cic-c135-c3\n
\n
§4. Lorem ipsum ^ccar-cic-c135-c4\n
\n
\n
As You can see,
- ‘ccar-cic’ is the file name: ccar-cic.md
- ‘-c135’ is the 'Canon number
- ‘-c1’ is the paragraph number (in Italian is called ‘Comma’, that’s because the ‘c’)
\nare indicated to show You where are the real end lines.
All this is wrote for me by the Js script, not all done by hand!
Now… If I link this anchor in other file, ‘Paragraphs’ are render well, i.e. :
As ‘Blockquote’
Test link Can. 135, ![[/ccar-cic#^ccar-cic-c135-c1]]
Test link Can. 135, ![[/ccar-cic#^ccar-cic-c135-c2]]
Test link Can. 135, ![[/ccar-cic#^ccar-cic-c135-c3]]
Test link Can. 135, ![[/ccar-cic#^ccar-cic-c135-c4]]
As ‘Internal link’, same: with CTRL + Mouse hover Paragraphs are evidenced well
Test link [[/ccar-cic#^ccar-cic-c135-c1|Can. 135, §1]]
Test link [[/ccar-cic#^ccar-cic-c135-c2|Can. 135, §2]]
Test link [[/ccar-cic#^ccar-cic-c135-c3|Can. 135, §3]]
Test link [[/ccar-cic#^ccar-cic-c135-c4Can. 135, §4]]
But… If I try to anchor ‘Canon’… nothing to do. 'Cause this:
Can. 135 ^ccar-cic-c135 only show me ‘Can. 135’ and not all 4s Paragraphs.
If I move ‘^ccar-cic-c135’ at the end of the block, before Can. 136 same…
Any help or idea to achieve the above’ll be very usefoul.
thanks in advance
Emanuele Tinari