Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Containers for building TCG specifications using Pandoc/LaTeX

License

NotificationsYou must be signed in to change notification settings

TrustedComputingGroup/pandoc

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:

How to Use

How to Use with GitHub Specs

See theGuide (In PDF form on theReleases page).A template repository is available athttps://github.com/trustedcomputinggroup/specification-example.

How to Run Locally

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.

How to Build Locally

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.tcg

How to customize the template

You 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.png
  • reference_doc.docx
  • reference_style.csl
  • template.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

Rendering HTML (experimental)

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

Stars

Watchers

Forks

Packages

 
 
 

[8]ページ先頭

©2009-2025 Movatter.jp