Skip to content

Commit 5825844

Browse files
committed
fix: AsciiDoc sectioning and misplaced captions
- some table captions were coming up as orphan text in the next sections - subsection styling did not look right, requiring one more depth level - get rid of unnecessary whitespaces as the rendered doc has too much
1 parent f420e7f commit 5825844

File tree

6 files changed

+9
-22
lines changed

6 files changed

+9
-22
lines changed

dqgen/resources/asciidoc_templates/instance.jinja2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% call mc.render_fetch_results(content, error) %}
88
{% set compress_uris = simplify_uri_columns_in_tabular(data_frame=content,namespace_inventory=namespaces,error_fail=False) %}
99
{% endraw %}
10-
== {{ operation|title }} {{ class_name }}s
10+
=== {{ operation|title }} {{ class_name }}s
1111

1212
The table below lists the {{ operation }} *{{ cls }}*
1313

@@ -17,5 +17,4 @@ The table below lists the {{ operation }} *{{ cls }}*
1717
{% raw %}
1818
{% endcall %}
1919
{% endif %}
20-
{% endraw %}
21-
20+
{% endraw %}

dqgen/resources/asciidoc_templates/main.jinja2

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{% import "macros.adoc" as mc %}
44
{% block content %}
55
{% endraw %}
6-
76
This report is automatically generated from the {% raw %}{{ conf.dataset_name }}{% endraw %} RDF dataset on {% raw %}{{ conf.timestamp }}{% endraw %}
87
and aims at presenting the difference between two versions of an RDFS/OWL vocabulary following the {% raw %}{{ conf.application_profile }}{% endraw %} application profile.
98

@@ -42,8 +41,6 @@ and aims at presenting the difference between two versions of an RDFS/OWL vocabu
4241
{% endfor %}
4342
{% raw %}
4443
== Prefixes
45-
4644
{{ mc.render_namespaces(namespaces.namespaces_as_dict()) }}
4745
{% endblock %}
4846
{% endraw %}
49-

dqgen/resources/asciidoc_templates/property.jinja2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% call mc.render_fetch_results(content, error) %}
88
{% set compress_uris = simplify_uri_columns_in_tabular(data_frame=content,namespace_inventory=namespaces,error_fail=False) %}
99
{% endraw %}
10-
=== {{ operation|title }} {{ property_name }}
10+
==== {{ operation|title }} {{ property_name }}
1111

1212
The table below lists the {{ operation }} *{{ property }}*
1313

@@ -17,5 +17,4 @@ The table below lists the {{ operation }} *{{ property }}*
1717
{% raw %}
1818
{% endcall %}
1919
{% endif %}
20-
{% endraw %}
21-
20+
{% endraw %}

dqgen/resources/asciidoc_templates/reified_property.jinja2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% call mc.render_fetch_results(content, error) %}
88
{% set compress_uris = simplify_uri_columns_in_tabular(data_frame=content,namespace_inventory=namespaces,error_fail=False) %}
99
{% endraw %}
10-
=== {{ operation|title }} reified {{ property_name }}
10+
==== {{ operation|title }} reified {{ property_name }}
1111

1212
The table below lists the {{ operation }} *{{ property }} / {{ object_property }}*
1313

@@ -17,5 +17,4 @@ The table below lists the {{ operation }} *{{ property }} / {{ object_property }
1717
{% raw %}
1818
{% endcall %}
1919
{% endif %}
20-
{% endraw %}
21-
20+
{% endraw %}

dqgen/resources/asciidoc_templates/static/macros.adoc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
{% endif %}
2222
{%- endmacro %}
2323

24-
2524
{% macro pandas_table(df, caption, column_labels={}) -%}
2625
{% if (df is defined) and (df is not none) %}
2726
{% set df = df.fillna(value="") %}
27+
.{{ caption }}
2828
[cols="{{ df.columns|length }}*", options="header"]
2929
|===
3030
{% for column in df.columns %}
@@ -47,8 +47,6 @@
4747
4848
{% endfor %}
4949
|===
50-
51-
.{{ caption }}
5250
{% else %}
5351
{{ render_error("How did you get here? did you forget to use 'render_fetch_results' macro?") }}
5452
{% endif %}
@@ -63,6 +61,7 @@
6361
{% endmacro %}
6462
6563
{% macro render_namespaces(namesapces_dist) %}
64+
.Prefixes
6665
[cols="1,3", options="header"]
6766
|===
6867
|Namespace
@@ -74,7 +73,4 @@
7473
7574
{% endfor %}
7675
|===
77-
78-
.Prefixes
7976
{% endmacro %}
80-

dqgen/resources/asciidoc_templates/statistics.jinja2

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{% import "macros.adoc" as mc %}
33
{% endraw %}
44
== Statistics
5-
65
{% for class_key , class_data in data_source.items() %}
76
=== {{ class_data.label }}
87
{% if class_data.description is not undefined %}
@@ -52,6 +51,4 @@
5251
{% endfor %}
5352
{% endfor %}
5453
|===
55-
56-
{% endfor %}
57-
54+
{% endfor %}

0 commit comments

Comments
 (0)