- Notifications
You must be signed in to change notification settings - Fork7
Containers for building TCG specifications using Pandoc/LaTeX
License
TrustedComputingGroup/pandoc
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
These Docker containers contain the dependencies needed to build TCGMarkdown-based documents. The main anticipated consumer of thesecontainers isthe Markdown action,but anyone can download and use the containers with Docker.
The interesting dependencies are:
- Pandoc
- LaTeX /TexLive(a dependency of Pandoc for PDF generation)
- Eisvogel(Pandoc/LaTeX template, with some TCG-specific modifications)
- Mermaid /mermaid-filter (for rendering diagrams)
- aasvg (for rendering ASCII art diagrams)
See theGuide (In PDF form on theReleases page).A template repository is available athttps://github.com/trustedcomputinggroup/specification-example.
Your workflow may prefer local development and rendering. Due to the complexity of the various Pandocand LaTeX dependencies at work, it's easiest to use the Docker containers published athttps://github.com/trustedcomputinggroup/pandoc/pkgs/container/pandoc from this repository.
docker pull ghcr.io/trustedcomputinggroup/pandoc:latest./docker_run --pdf=guide.pdf guide.tcg
Note that the.tcg extension is a convention and is not required.
You may wish to send a PR to this repository, to add a feature or fix an issue with the tools.To do so, it can be helpful to build and test the Docker container.
Another reason to build locally is if you are running on an architecture that is not builtand published tohttps://github.com/trustedcomputinggroup/pandoc/pkgs/container/pandoc(e.g., arm64).
This project uses Dockerbuildxto support cross-platform builds. Install it, then enable it using:
docker buildx install
To build the container:
docker build --tag working.DOCKER_IMAGE=working:latest ./docker_run --pdf=guide.pdf guide.tcgYou may wish to provide your own LaTeX template, as well as other resources like images or style documents.Suppose you have a directorymy_resource_dir with the following contents:
img/cover_page_background.pngreference_doc.docxreference_style.csltemplate.tex
template.tex and any input files can refer to files inmy_resource_dir, for exampleby using\includegraphics{img/cover_page_background.png}.
You can then run the following:
./docker_run \ --resourcedir my_resource_dir \ --template /my_resource_dir/template.tex"\ --reference_doc /my_resource_dir/reference_doc.docx" \ --csl /my_resource_dir/reference_style.csl \ --pdf output.pdf \ input.tcg
HTML support is experimental. Known issues:
- Mermaid figures currently render as fixed-width.
To render a document to HTML:
./docker_run \ --resourcedir my_resource_dir \ --template_html /my_resource_dir/html.template \ --html_stylesheet /my_resource_dir/style1.css \ --html_stylesheet /my_resource_dir/style2.css \ --html output.html \ input.tcg
About
Containers for building TCG specifications using Pandoc/LaTeX
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.