-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SVG images for Chapter 7 figures 1 and 2 #551
base: main
Are you sure you want to change the base?
Conversation
@DocOtak I could re-created the figures directly as svg files (I created these figures in the first place). |
@neumannd How did you create the figures in the first place? It might it be worth adding the "source" to this repository. The pdf2svg tool does a pretty good job when the input is already a vector of some sort and these PDFs were. |
I created them with a small R script.
Sure. Sounds reasonable. To which location should I copy/push the code? Or just as a comment into the document?
OK. Then, I won't re-create them as SVG. |
We should open an issue/discussion to ask how and where the sources should be added. Did you make any other figures than these two? If it is easy to do, I'd like to know if the direct SVG output is smaller/more efficient than this conversion. The SVG output from this is about 60kb each, where the PDFs are 5kb each. |
Only these two -- as far as I remember.
The SVGs are slightly large than the PDFs but not 10x as large:
I attached them. |
@neumannd, while we decide what to do with the original scripts, could you please add both R scripts to the images directory and name them as follows:
Additionally, could you include a comment or header in each script indicating the R version and any dependencies, if applicable? |
Deletes the unused PDF versions
@DocOtak OK. I'll do so tomorrow or later today. As an extra PR refering to this on? |
@DocOtak I created a pull request to your branch DocOtak:svg_figures. Then, we have everything in this on PR to the cf-conventions. I added version requirements to the top of the R code. I am not sure whether the way I did conforms to any standard or not. Maybe, it works with lower version as well. |
@neumannd merged, it should update this PR automatically |
@DocOtak Worked. But, I forgot to update paths in the code => new PR to your branch. Sorry for that. |
This was inspired by the awesome work in #522
I've converted the two remaining png figured into svgs from the PDFs using svg2pdf from the cairo library. This saves about 300kb from the html build and about 100kb in the pdf builds. All while higher quality.
This is actually my first PR to the actual conventions repository, my change is just technical and I feel it does not need the addition of my name to the authors list.
See issue #XXX for discussion of these changes.
Release checklist
cf-conventions.adoc
? Add in two places: on line 3 and under.Additional Authors
inAbout the authors
.cf-conventions.adoc
up to date? Versioning inspired by SemVer.history.adoc
up to date?For maintainers
After the merge remember to delete the source branch.
Tags are set at the conclusion of the annual meeting; until then,
main
always is a draft for the next version.