summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck2
-rw-r--r--examples/website/website.md3
-rw-r--r--reference.md-disabled9
-rw-r--r--src/bin/subplot.rs7
-rw-r--r--src/style.rs2
-rwxr-xr-xstress2
-rw-r--r--subplot.md84
7 files changed, 37 insertions, 72 deletions
diff --git a/check b/check
index 755a483..9cfc0bd 100755
--- a/check
+++ b/check
@@ -320,7 +320,6 @@ def check_subplots(r):
base = os.path.basename(subplot)
base, _ = os.path.splitext(subplot)
base = os.path.join(output, base)
- r.docgen(subplot, doc_template, base + ".pdf", cwd=dirname)
r.docgen(subplot, doc_template, base + ".html", cwd=dirname)
@@ -344,7 +343,6 @@ def check_tooling(r):
"dot",
"pandoc",
"pandoc-citeproc",
- "pdflatex",
"plantuml",
"rustc",
"rustfmt",
diff --git a/examples/website/website.md b/examples/website/website.md
index e85249a..dab4d4f 100644
--- a/examples/website/website.md
+++ b/examples/website/website.md
@@ -68,11 +68,10 @@ download [website.md][], [website.yaml][], and [website.py][].
## Generate typeset documents
To generate typeset versions of this document, run the following
-commands:
+command:
~~~
$ subplot docgen website.md -o website.html
-$ subplot docgen website.md -o website.pdf
~~~
Open up the files to see what they look like.
diff --git a/reference.md-disabled b/reference.md-disabled
index 25e4189..744b852 100644
--- a/reference.md-disabled
+++ b/reference.md-disabled
@@ -7,15 +7,6 @@ documents.
# Subplot
-## Produce a PDF
-
-~~~scenario
-given an installed subplot
-given a clone of https://gitlab.com/subplot/subplot.git in src at 96371571338767e776f7de583ddbea4512ceeba1
-when I docgen subplot.md to test.pdf, in src
-then file src/test.pdf exists
-~~~
-
## Produce HTML page
~~~scenario
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs
index 7f51b5c..f4057d9 100644
--- a/src/bin/subplot.rs
+++ b/src/bin/subplot.rs
@@ -12,7 +12,6 @@ use time::{format_description::FormatItem, macros::format_description, OffsetDat
use clap::{CommandFactory, FromArgMatches, Parser};
use std::convert::TryFrom;
-use std::ffi::OsString;
use std::fs::{self, write};
use std::io::Write;
use std::path::{Path, PathBuf};
@@ -251,11 +250,7 @@ impl Docgen {
}
fn run(&self) -> Result<()> {
- let mut style = Style::default();
- if self.output.extension() == Some(&OsString::from("pdf")) {
- trace!("PDF output chosen");
- style.typeset_links_as_notes();
- }
+ let style = Style::default();
let mut doc = load_linted_doc(&self.input, style, self.template.as_deref(), self.merciful)?;
let mut pandoc = pandoc::new();
diff --git a/src/style.rs b/src/style.rs
index 95f1109..9f7c801 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -12,7 +12,7 @@ impl Style {
///
/// A link is like the HTML `<a>` element. The choice of footnote
/// versus endnote is made by the typesetting backend. HTML uses
- /// endnotes, PDF uses footnotes.
+ /// endnotes, a paged media like PDF would use footnotes.
pub fn links_as_notes(&self) -> bool {
self.links_as_notes
}
diff --git a/stress b/stress
index acda0ed..43b17c0 100755
--- a/stress
+++ b/stress
@@ -30,7 +30,7 @@ start="$(ts 0)"
./stressgen s "$NSCEN" "$NSTEP"
gen="$(ts "$start")"
-docgen s.md s.pdf
+docgen s.md s.html
doc="$(ts "$start")"
codegen s.md test.py
diff --git a/subplot.md b/subplot.md
index d64b93b..a294573 100644
--- a/subplot.md
+++ b/subplot.md
@@ -63,7 +63,7 @@ technical text that's aimed at all your stakeholders.
## Subplot architecture
Subplot reads an input document, in Markdown, and generates a typeset
-output document, as PDF or HTML, for all stakeholders to understand.
+output document, as HTML, for all stakeholders to understand.
Subplot also generates a test program, in Python, that verifies the
acceptance criteria are met, for developers and testers and auditors
to verify the system under test meets its acceptance criteria. The
@@ -85,9 +85,6 @@ impl [shape=box];
subplot [label="Subplot"];
subplot [shape=ellipse];
-pdf [label="foo.pdf \n PDF (generated)"]
-pdf [shape=note];
-
html [label="foo.html \n HTML (generated)"]
html [shape=note];
@@ -100,7 +97,6 @@ report [shape=note];
md -> subplot;
bindings -> subplot;
impl -> subplot;
-subplot -> pdf;
subplot -> html;
subplot -> testprog;
testprog -> report;
@@ -109,7 +105,7 @@ testprog -> report;
[Pandoc]: https://pandoc.org/
-Subplot uses the [Pandoc][] software for generating PDF and HTML
+Subplot uses the [Pandoc][] software for generating HTML
output documents. In fact, any output format supported by Pandoc can
be requested by the user. Depending on the output format, Pandoc may
use, for example, LaTeX. Subplot interprets parts of the Markdown
@@ -140,9 +136,6 @@ docgen [shape=ellipse];
codegen [label="subplot codegen"];
codegen [shape=ellipse];
-pdf [label="foo.pdf \n PDF (generated)"]
-pdf [shape=note];
-
html [label="foo.html \n HTML (generated)"]
html [shape=note];
@@ -157,7 +150,6 @@ bindings -> docgen;
md -> codegen;
bindings -> codegen;
impl -> codegen;
-docgen -> pdf;
docgen -> html;
codegen -> testprog;
testprog -> report;
@@ -772,7 +764,7 @@ will emit a warning if the file is not found, and subplot codegen will emit an e
Bindings can contain an `impl` map which connects the binding with zero or more
language templates. If a binding has no `impl` entries then it can still be
-used to `docgen` a PDF or HTML document from a subplot document. This permits a
+used to `docgen` a HTML document from a subplot document. This permits a
workflow where requirements owners / architects design the validations for a
project and then engineers implement the step functions to permit the
validations to work.
@@ -802,8 +794,6 @@ given file badfilename.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen --merciful badfilename.subplot -o foo.pdf
-then file foo.pdf exists
when I try to run subplot codegen --run badfilename.md -o test.py
then command fails
```
@@ -1074,7 +1064,7 @@ def foobar_was_done(ctx):
### Smoke test
The scenario below uses the input files defined above to run some tests
-to verify that Subplot can build a PDF and an HTML document, and
+to verify that Subplot can build an HTML document, and
execute a simple scenario successfully. The test is based on
generating the test program from an input file, running the test
program, and examining the output.
@@ -1085,8 +1075,6 @@ given file simple.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf exists
when I run subplot docgen simple.subplot -o simple.html
then file simple.html exists
when I run subplot codegen --run simple.subplot -o test.py
@@ -1174,8 +1162,6 @@ given file allkeywords.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen allkeywords.subplot -o foo.pdf
-then file foo.pdf exists
when I run subplot codegen --run allkeywords.subplot -o test.py
then scenario "All keywords" was run
and step "given precondition foo" was run
@@ -1262,8 +1248,6 @@ given file continuationmisuse.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen continuationmisuse.subplot -o foo.pdf
-then file foo.pdf exists
when I try to run subplot codegen --run continuationmisuse.subplot -o test.py
then command fails
~~~
@@ -1300,8 +1284,8 @@ section. This scenario verifies that all markup works.
given file title-markup.subplot
given file title-markup.md
given an installed subplot
-when I run subplot docgen title-markup.subplot -o foo.pdf
-then file foo.pdf exists
+when I run subplot docgen title-markup.subplot -o foo.html
+then file foo.html exists
~~~
~~~~{#title-markup.subplot .file .yaml .numberLines}
@@ -1325,8 +1309,6 @@ given file emptylines.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen emptylines.subplot -o emptylines.pdf
-then file emptylines.pdf exists
when I run subplot docgen emptylines.subplot -o emptylines.html
then file emptylines.html exists
when I run subplot codegen --run emptylines.subplot -o test.py
@@ -1957,13 +1939,13 @@ given file simple.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf exists
-when I remember metadata for file simple.pdf
+when I run subplot docgen simple.subplot -o simple.html
+then file simple.html exists
+when I remember metadata for file simple.html
and I wait until 1 second has passed
-and I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf has same metadata as before
-and only files simple.subplot, simple.md, b.yaml, f.py, simple.pdf exist
+and I run subplot docgen simple.subplot -o simple.html
+then file simple.html has same metadata as before
+and only files simple.subplot, simple.md, b.yaml, f.py, simple.html exist
~~~
### Do typeset if output is older than subplot
@@ -1974,13 +1956,13 @@ given file simple.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf exists
-when I remember metadata for file simple.pdf
+when I run subplot docgen simple.subplot -o simple.html
+then file simple.html exists
+when I remember metadata for file simple.html
and I wait until 1 second has passed
and I touch file simple.subplot
-and I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf has changed from before
+and I run subplot docgen simple.subplot -o simple.html
+then file simple.html has changed from before
~~~
### Do typeset if output is older than markdown
@@ -1991,13 +1973,13 @@ given file simple.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf exists
-when I remember metadata for file simple.pdf
+when I run subplot docgen simple.subplot -o simple.html
+then file simple.html exists
+when I remember metadata for file simple.html
and I wait until 1 second has passed
and I touch file simple.md
-and I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf has changed from before
+and I run subplot docgen simple.subplot -o simple.html
+then file simple.html has changed from before
~~~
### Do typeset if output is older than functions
@@ -2008,13 +1990,13 @@ given file simple.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf exists
-when I remember metadata for file simple.pdf
+when I run subplot docgen simple.subplot -o simple.html
+then file simple.html exists
+when I remember metadata for file simple.html
and I wait until 1 second has passed
and I touch file f.py
-and I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf has changed from before
+and I run subplot docgen simple.subplot -o simple.html
+then file simple.html has changed from before
~~~
### Do typeset if output is older than bindings
@@ -2025,13 +2007,13 @@ given file simple.md
and file b.yaml
and file f.py
and an installed subplot
-when I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf exists
-when I remember metadata for file simple.pdf
+when I run subplot docgen simple.subplot -o simple.html
+then file simple.html exists
+when I remember metadata for file simple.html
and I wait until 1 second has passed
and I touch file b.yaml
-and I run subplot docgen simple.subplot -o simple.pdf
-then file simple.pdf has changed from before
+and I run subplot docgen simple.subplot -o simple.html
+then file simple.html has changed from before
~~~
## Document structure
@@ -3188,7 +3170,7 @@ into SVGs such as this one.
~~~pikchr
arrow right 200% "Markdown" "Source"
box rad 10px "Subplot" "Document Generator" "(subplot docgen)" fit
-arrow right 200% "HTML+SVG/PDF" "Output"
+arrow right 200% "HTML+SVG" "Output"
arrow <-> down 70% from last box.s
box same "Pikchr" "Formatter" "(docs.rs/pikchr)" fit
~~~