* [PATCH 3/3] secilc/docs: disable pandoc default css for html docs
@ 2022-08-28 12:14 bauen1
2022-08-31 11:55 ` James Carter
0 siblings, 1 reply; 3+ messages in thread
From: bauen1 @ 2022-08-28 12:14 UTC (permalink / raw)
To: selinux; +Cc: bauen1
Some time ago pandoc started shipping a default css file for html, while
that is nice, it limits the max-width of the body element to 36em. We
have a lot of tables, code examples, etc... in the manual that are too
big for that, requiring constant scrolling.
See https://github.com/jgm/pandoc/blob/master/data/templates/styles.html
for the default used.
While some styling, perhaps even dark/light mode support in the CSS
would be nice, I didn't manage to find a simple way to achieve this, so
for now just disable the CSS.
Expand the arguments for pandoc in the Makefile for better readability.
Signed-off-by: Jonathan Hettwer (bauen1) <j2468h@gmail.com>
---
secilc/docs/Makefile | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/secilc/docs/Makefile b/secilc/docs/Makefile
index a03ebeed..7e2ba40e 100644
--- a/secilc/docs/Makefile
+++ b/secilc/docs/Makefile
@@ -58,11 +58,25 @@ $(TMPDIR)/policy.cil: $(TESTDIR)/policy.cil
html: $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil secil.xml
mkdir -p $(HTMLDIR)
- $(PANDOC) --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) --syntax-definition=secil.xml --standalone --metadata title="CIL Reference Guide" -t html $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil -o $(HTMLDIR)/$(HTML_OUT)
+ $(PANDOC) \
+ --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) \
+ --syntax-definition=secil.xml \
+ --standalone \
+ --metadata title="CIL Reference Guide" \
+ --metadata document-css=false \
+ -t html \
+ $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil \
+ -o $(HTMLDIR)/$(HTML_OUT)
pdf: $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil secil.xml
mkdir -p $(PDFDIR)
- $(PANDOC) --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) --syntax-definition=secil.xml --standalone --toc $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil -o $(PDFDIR)/$(PDF_OUT)
+ $(PANDOC) \
+ --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) \
+ --syntax-definition=secil.xml \
+ --standalone \
+ --toc \
+ $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil \
+ -o $(PDFDIR)/$(PDF_OUT)
clean:
rm -rf $(HTMLDIR)
--
2.36.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] secilc/docs: disable pandoc default css for html docs
2022-08-28 12:14 [PATCH 3/3] secilc/docs: disable pandoc default css for html docs bauen1
@ 2022-08-31 11:55 ` James Carter
2022-09-01 19:58 ` James Carter
0 siblings, 1 reply; 3+ messages in thread
From: James Carter @ 2022-08-31 11:55 UTC (permalink / raw)
To: bauen1; +Cc: selinux
On Sun, Aug 28, 2022 at 8:16 AM bauen1 <j2468h@googlemail.com> wrote:
>
> Some time ago pandoc started shipping a default css file for html, while
> that is nice, it limits the max-width of the body element to 36em. We
> have a lot of tables, code examples, etc... in the manual that are too
> big for that, requiring constant scrolling.
>
> See https://github.com/jgm/pandoc/blob/master/data/templates/styles.html
> for the default used.
>
> While some styling, perhaps even dark/light mode support in the CSS
> would be nice, I didn't manage to find a simple way to achieve this, so
> for now just disable the CSS.
>
> Expand the arguments for pandoc in the Makefile for better readability.
>
> Signed-off-by: Jonathan Hettwer (bauen1) <j2468h@gmail.com>
Acked-by: James Carter <jwcart2@gmail.com>
> ---
> secilc/docs/Makefile | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/secilc/docs/Makefile b/secilc/docs/Makefile
> index a03ebeed..7e2ba40e 100644
> --- a/secilc/docs/Makefile
> +++ b/secilc/docs/Makefile
> @@ -58,11 +58,25 @@ $(TMPDIR)/policy.cil: $(TESTDIR)/policy.cil
>
> html: $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil secil.xml
> mkdir -p $(HTMLDIR)
> - $(PANDOC) --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) --syntax-definition=secil.xml --standalone --metadata title="CIL Reference Guide" -t html $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil -o $(HTMLDIR)/$(HTML_OUT)
> + $(PANDOC) \
> + --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) \
> + --syntax-definition=secil.xml \
> + --standalone \
> + --metadata title="CIL Reference Guide" \
> + --metadata document-css=false \
> + -t html \
> + $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil \
> + -o $(HTMLDIR)/$(HTML_OUT)
>
> pdf: $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil secil.xml
> mkdir -p $(PDFDIR)
> - $(PANDOC) --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) --syntax-definition=secil.xml --standalone --toc $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil -o $(PDFDIR)/$(PDF_OUT)
> + $(PANDOC) \
> + --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) \
> + --syntax-definition=secil.xml \
> + --standalone \
> + --toc \
> + $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil \
> + -o $(PDFDIR)/$(PDF_OUT)
>
> clean:
> rm -rf $(HTMLDIR)
> --
> 2.36.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] secilc/docs: disable pandoc default css for html docs
2022-08-31 11:55 ` James Carter
@ 2022-09-01 19:58 ` James Carter
0 siblings, 0 replies; 3+ messages in thread
From: James Carter @ 2022-09-01 19:58 UTC (permalink / raw)
To: bauen1; +Cc: selinux
On Wed, Aug 31, 2022 at 7:55 AM James Carter <jwcart2@gmail.com> wrote:
>
> On Sun, Aug 28, 2022 at 8:16 AM bauen1 <j2468h@googlemail.com> wrote:
> >
> > Some time ago pandoc started shipping a default css file for html, while
> > that is nice, it limits the max-width of the body element to 36em. We
> > have a lot of tables, code examples, etc... in the manual that are too
> > big for that, requiring constant scrolling.
> >
> > See https://github.com/jgm/pandoc/blob/master/data/templates/styles.html
> > for the default used.
> >
> > While some styling, perhaps even dark/light mode support in the CSS
> > would be nice, I didn't manage to find a simple way to achieve this, so
> > for now just disable the CSS.
> >
> > Expand the arguments for pandoc in the Makefile for better readability.
> >
> > Signed-off-by: Jonathan Hettwer (bauen1) <j2468h@gmail.com>
>
> Acked-by: James Carter <jwcart2@gmail.com>
>
This patch has been merged.
Thanks,
Jim
> > ---
> > secilc/docs/Makefile | 18 ++++++++++++++++--
> > 1 file changed, 16 insertions(+), 2 deletions(-)
> >
> > diff --git a/secilc/docs/Makefile b/secilc/docs/Makefile
> > index a03ebeed..7e2ba40e 100644
> > --- a/secilc/docs/Makefile
> > +++ b/secilc/docs/Makefile
> > @@ -58,11 +58,25 @@ $(TMPDIR)/policy.cil: $(TESTDIR)/policy.cil
> >
> > html: $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil secil.xml
> > mkdir -p $(HTMLDIR)
> > - $(PANDOC) --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) --syntax-definition=secil.xml --standalone --metadata title="CIL Reference Guide" -t html $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil -o $(HTMLDIR)/$(HTML_OUT)
> > + $(PANDOC) \
> > + --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) \
> > + --syntax-definition=secil.xml \
> > + --standalone \
> > + --metadata title="CIL Reference Guide" \
> > + --metadata document-css=false \
> > + -t html \
> > + $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil \
> > + -o $(HTMLDIR)/$(HTML_OUT)
> >
> > pdf: $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil secil.xml
> > mkdir -p $(PDFDIR)
> > - $(PANDOC) --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) --syntax-definition=secil.xml --standalone --toc $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil -o $(PDFDIR)/$(PDF_OUT)
> > + $(PANDOC) \
> > + --highlight-style=$(PANDOC_HIGHLIGHT_STYLE) \
> > + --syntax-definition=secil.xml \
> > + --standalone \
> > + --toc \
> > + $(PANDOC_FILE_LIST) $(TMPDIR)/policy.cil \
> > + -o $(PDFDIR)/$(PDF_OUT)
> >
> > clean:
> > rm -rf $(HTMLDIR)
> > --
> > 2.36.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-01 19:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-28 12:14 [PATCH 3/3] secilc/docs: disable pandoc default css for html docs bauen1
2022-08-31 11:55 ` James Carter
2022-09-01 19:58 ` James Carter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.