-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for seeing original, markup, and edited versions for HTML and PDF #5
base: main
Are you sure you want to change the base?
Conversation
So this is something I was hoping to get to when I find time (see here for people interest as well) so thank you so much for doing the heavy lifting. My only question is, is it really worth the trouble to output multiple documents. I would think that in practice, people would work with the "tab view" HTML output then once done, just outputs the edited version to publication format. But that's really nitpicking |
My use case for this is for a collaboration where some people like working with Quarto and some people prefer to keep an eye on the changes with PDF and give verbal feedback. I agree most people wouldn't care about outputting the multiple versions. |
Ok sounds good. Happy with this and happy to merge and burn new version |
I won't be able to add the documentation for a week or so. Feel free to merge it now if you want, or I think you can steal the branch and add documentation. Also, right now the watermark on the PDF is always shown, but probably it should only be shown for the "all" output. So that's a future work. |
@mloubout I updated the README with some information from this PR. I'm fine with it being merged anytime. Let me know if there's something you'd like me to change before merging. |
This PR adds a meta variable
critic-markup-version
that can specify the output format. It can be "all", "markup", "edited", or "original". It's default value of "all" does the normal thing of showing all three formats.This format option is especially useful for looking at the edited or original form of the PDF, which previously, only supported the "markup" output.
Unfortunately, outputting multiple versions with the same file extension is difficult with Quarto.
Since the pandoc modifier has to be used for PDF, I simplified the syntax to allow the
critic-markup-version
variable to be read from the output file name. So if the modifier is a validcritic-markup-version
value, it is read as the default instead of using "all" as the default.Here's is an example of what the pdf format looks like for each version:
This PR also essentially disables the filter for Quarto output formats other than HTML, PDF, and Latex, thereby fixing a bug that caused the filter to break other Quarto output formats.
@mloubout I'd like to get your opinion on these changes before I update the documentation and mark this PR as ready.