trustedcomputinggroup / pandoc Goto Github PK
View Code? Open in Web Editor NEWContainers for building TCG specifications using Pandoc/LaTeX
License: BSD 3-Clause "New" or "Revised" License
Containers for building TCG specifications using Pandoc/LaTeX
License: BSD 3-Clause "New" or "Revised" License
From #32:
I agree with @williamcroberts's feedback here; we may be able to delete the markdown repo entirely in favor of a GH action hosted in this repo.
Composite Workflows
IIUC it's a composite workflow others are using to generate the markdown rendering. However, it requires users to setup the docker container. I think if we move to a reusable workflow, we can move all of the setup into a reusable workflow so callers of the workflow don't have to do anything but use it. Additionally we can just use docker_run, no real need for the docker actions as docker run will pull the image.
markdown project
Do we need this? The pandoc project builds out the samples anyways, couldn't we just coalesce them or is the markdown project exist soley to test the action.yml composite workflow? It seems confusing to have so much stuff spread out, i'm not seeing the value in the decomposition.
media/image37.drawio -> 16bc37e7b42c122aa1aa9cfc76aab7f4544ede37.temp.pdf
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
[6553:0212/151627.958938:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
<sub>
doesn't workguide.pdf's list of tables starts with Table 3, because there are two unlisted tables that still contributed to the counter.
I tried to improve this with #69, but then it messed up the links.
From #32:
The PR builds and publishes docker container
a. Requires perms on incoming PRs which should be treated as untrusted even through it's inter-org. Don't trust Bill.
b. PRs race on publishing the image
Proposal: for PRs and pushes, do a docker build and docker run manually. The images for github actions contain all the
docker things, no need to really use the composite actions or reusable workflows for that. Only on push should publish the
container to the registry. Do we really need to publish and check-in the generated files?
We use pdflscape to rotate landscape pages on electronic displays while printing them as expected (i.e., without shrinking or cropping). The TPMWG asked for the .landscape
option to rotate the other way. I thought this would be easy, but it is not an existing option of the latex package we are using.
Prior art:
https://tex.stackexchange.com/questions/699688/pdflscape-counterclockwise-landscape-with-section
Pull requests for this would be welcome, but I don't have bandwidth to work on this.
It would be neat to have something like
<!-- Table: some-file.csv -->
and have a checked-in csv file get turned into a table.
Another possibility would be to have a tag on the table in native Markdown that makes the tools automatically generate a CSV file from the contents of the table.
It’s like there is an empty caption being added, which wastes vertical space.
We should try to make the Word output more similar to the PDF output by supporting landscape orientation pages.
I made a little progress on this, but had to set it aside.
These Pandoc lua elements will manipulate section breaks and page orientations.
local wordStartLandscape = pandoc.RawBlock(
'openxml',
'<w:pPr><w:sectPr><w:pgSz w:w="12240" w:h="15840"/></w:sectPr></w:pPr><w:lastRenderedPageBreak/>'
)
local wordEndLandscape = pandoc.RawBlock(
'openxml',
'<w:br w:type="page"/><w:pPr><w:sectPr><w:pgSz w:w="15840" w:h="12240" w:orient="landscape"/></w:sectPr></w:pPr><w:p>TEST</w:p><w:lastRenderedPageBreak/>'
)
Repro:
The table I added:
# Table
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Table: Zebra
---
inside code blocks gets replaced with \newpage
.
from section numbersNot many TCG docs have footnotes, but why not support it?
On page 4 (of V0.10.4) it has a paragraph on "Key Words" and one for "Statement Type". These don't exist in current Guidance - which this document is. These should be removed.
We've gotten some feedback that users would prefer that words not get broken up across lines during typesetting.
Each drawio takes a couple of seconds to render. It should be possible to:
Add about 3 points above and subtract about 3 points below.
This allows github diffs.
(Suggestion by @AndreasFuchsTPM)
Idea would be (in bash)
gitver=($(git describe --tags --always | tr '-' ' '))
specversion=”${gitver[0]}”
if [ “$(git branch)” = “main” ] then
specrevision=”${gitver[1]}”
else
specrevision=”${gitver[1]}-${gitver[2]}”
fi
Such that on the main branch we would only ever have version and revision (as number of commits since tag), but on branches where revision is not unique the commit id gets added as well.
Colspan (a row which spans multiple columns) is not possible in markdown tables.
As an alternative, it is possible to embed HTML in your markdown doc and use HTML attributes to achieve this. Is there any guidance on how markdown docs should be authored (i.e. features you should/shouldn't use)?
As a backlog item, we should consider general guidance on how TCG docs should be authored (best practices) to achieve certain desired formatting. Maybe that should go in the markdown repo though
If there is a ::: Note
inside of a table cell, it's not placed vertically far enough from the line above it.
Sometimes the cached aux files need to be deleted in order for rendering to succeed:
Rendering PDF
Latexmk: Sometimes, the -f option can be used to get latexmk
to try to force complete processing.
But normally, you will need to correct the file(s) that caused the
error, and then rerun latexmk.
In some cases, it is best to clean out generated files before rerunning
latexmk after you've corrected the files.
PDF output failed
Elapsed time: 4 seconds
! Undefined control sequence.
l.1 \xpginauxfiletrue
?
! Emergency stop.
l.1
The workaround is to delete the caches from actions/caches
and re-run the workflow, but this isn't very user-friendly.
Future versions of the tool should automatically recover from this state.
The GitHub releasing UI now has a "previous tag" option, which is used to generate release notes based on PRs since the given release. We should investigate if we can query this value during the release action, and generate the docx from the previous version and current version to automatically create a nice diff-doc.
#103 is nice from a style perspective but it does limit the type of markdown blocks that can be in a table cell. We should augment our filter to support at least lists inside table cells.
A table cell's width doesn't seem to take the column separator width into account, so it wraps very close to the column line.
A version that only has a git hash gets marked Published instead of Draft.
If you have two rowspan cells next to each other, the vertical line between them is not fully drawn.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.