Closed gbuehler closed 7 months ago
[source,turtle]
and [source,sparql]
should indeed be working if they are supported in Rouge. I will investigate. If it works as pre
without a language, but loses formatting with those languages, that suggests a bug—some Rouge output that Metanorma is not expecting. But won't know until I have some dedicated time to check.
I can't replicate:
with Asciidoc source:
== Clause
[source,turtle]
----
@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix my: <http://example.org/ApplicationSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sf: <http://www.opengis.net/ont/sf#> .
my:PlaceOfInterest a rdfs:Class ;
rdfs:subClassOf geo:Feature .
----
[source,sparql]
----
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
ASK
WHERE {
?g geo:hasMetricPerimeterLength ?p ;
geo:dimension ?d .
FILTER (?d < 2)}
----
Compiling https://github.com/opengeospatial/ogc-geosparql.git locally...
I've compiled the site, and it indents correctly, but does not introduce colouring—or rather, it introduces only generic colouring:
The green in quotes is what you get when Rouge has no idea what the language is, and it falls back on generic. I suspect that's what's happening with the Turtle too...
The source I got from https://github.com/opengeospatial/ogc-geosparql has [source,RDF]
and [source,shell]
, not [source,turtle]
or [source,sparql]
.
Changing the first two examples to the correct language markup is giving me correct syntax colouring.
I'm afraid I can't help further here. The issue you've just had with a PDF update in https://github.com/metanorma/metanorma-ogc/issues/628 suggests that your Docker has out of date code, and you will need to scrutinise which version of metanorma-ogc and docker is being used. The mangling of indentation also suggests out of date code. But that is outside my domain.
I can only say that debugging https://github.com/metanorma/metanorma-ogc/issues/628 will likely debug this as well. I'm moving this issue to pending, please confirm compilation after Monday release.
@gbuehler Release should now be out, could you please let me know current behaviour, and what version of Metanorma your Docker instance is running?
Discussed 2024-03-19
Greg will try deleting the cached images and re-pulling the latest docker image.
@gbuehler Did deleting the cached images and re-pulling the latest docker image work?
Yes, this now works. Sorry, I missed this.
The new version of OGC's GeoSPARQL Standard has many source code blocks of turtle and SPARQL snippets. In a previous version, which was done in straight Asciidoc and produced with Asciidoctor, the HTML results look like this:
Using the source code syntax for Metanorma:
[ source,turtle]
or[source,sparql]
the results are not very visual:If I change the language to something not recognized, I can get the
<pre>
, but not the highlighting:I have looked up Rouge and it seems to handle both of these languages, but I can't figure out how to get them to work.