-
Notifications
You must be signed in to change notification settings - Fork 163
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
[INFRA] Auto adjust table fences before PDF conversion #560
[INFRA] Auto adjust table fences before PDF conversion #560
Conversation
…tream master branch)
(Development still ongoing)
…ned fences) before pdf generation
@sappelhoff I opened this PR to address automatically the table alignment issue in PDFs. |
awesome!
let me correct that. Look at these lines in bids-specification/.circleci/config.yml Lines 8 to 10 in d61b1aa
you add the same syntax in the build_docs_pdf job, and use pip to install numpy That is, insert the following lines:
directly after these lines: bids-specification/.circleci/config.yml Lines 46 to 48 in d61b1aa
|
Moved functions that fix tables into the process_markdowns.py script
Make the code more simple with less duplicates
Pip3 seems to be installed in https://github.com/dante-ev/docker-texlive/blob/master/Dockerfile
…ocker image version
…ocker image to latest version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a lot of good progress here! Some remarks below.
pdf_build_src/process_markdowns.py
Outdated
|
||
# Offset that can be used to ajust the correction of number of dashes in the first and | ||
# second columns by the number specified | ||
offset = [15, 5] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where do these numbers come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed really not trivial to readjust the tables and these offsets are very useful in adjusting columns where a few or a lot of characters are present. This would be ideal to get rid of them but I have not ended up with a golden rule for the moment. Any idea?
reviewed offset and character proportion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nitpicks with the docstrings, but I think that style is important and that's how it's done in many big python packages. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sappelhoff Seems at this point, tables are properly rendered in the PDF and all suggestions that you made have been incorporated 👍
I see now why the entity table is still buggy :-) --> I think you can fix that one as well, because with the automatic script we don't run into the problems I anticipated earlier when you were still doing manual fixes. also, the "submultiples" in the units section (appendix VI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
@sappelhoff I created the functions as suggested and re-factorized the code accordingly. I also removed |
@sappelhoff Seems my suggestion #562 (comment) (PR #562) works to fix #551 regarding emojis. |
0035c8f
to
0bcba77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sappelhoff This should resolve all remaining opened concerns 👍
@sebastientourbier do you know why from dd6545e onwards the diff is completely unreadable? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the output and only one table was screwed up (and the entity table, but that's fine).
for that single table, I submitted a fix in adbde72
Overall only 3 minor style comments, then I think we can merge this.
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
Co-authored-by: Stefan Appelhoff <stefan.appelhoff@mailbox.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great :-) Thanks a lot @sebastientourbier
This PR is dedicated to correct automatically the dashes and align table fences before generation of the PDF.
It takes over PR #553 (where the intention was a manual fix) and is dedicated to close #549