-
Notifications
You must be signed in to change notification settings - Fork 7
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
misc #125
Merged
Merged
misc #125
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We still respect Vassili Bykov for authoring the original version of the Regex package, but we can't maintain a list of all authors for each package in the Trunk.
Adapting all screenshots for high-dpi aware dimensions is yet to come ...
This did it: | matcher files | matcher := '%%\{(SBESqueakPicture)(([^\r\n]*([\r\n]|\r\n))%%)*(])\}' asRegex. files := SBEScriptBuilder getTexFilesIn: SBEScriptBuilder resourceDirectory. files collect: [:file | file -> (SBEScriptBuilder collectScriptsFromFile: file)] as: Dictionary. files do: [:file | file writeStreamDo: [:stream | | translated | translated := matcher copy: file contents translatingMatchesUsing: [:s | '\begin{ExecuteSmalltalkScript}' , (matcher subexpression: 5) , (((matcher subexpressions: 2) , (matcher subexpressions: 4) , (matcher subexpressions: 6)) join) , (matcher subexpression: 5) , '\end{ExecuteSmalltalkScript}']. stream reset; nextPutAll: translated]]
Regex: SBESqueakPicture( writeTo: .* (frame: .* ))using:(?= \[) -> SBEScreenshotRecorder$1building:
…SBEFigureBuilder class>>#buildFiguresWith:)
This did it (thanks Copilot!): > const fs = require('fs') > const path = require('path') > const glob = require('glob') > const replace = require('replace-in-file') > var options = { files: glob.sync('**/*.tex', {ignore: ['**/node_modules/**']}), from: /(?<=\\begin\{ExecuteSmalltalkScript\}((?<!\\end\{ExecuteSmalltalkScript\})[\s\S\n\r])*(?<!(fraction:(\s*\d+(\.\d+)?\s*@\s*)?|crtab:|selection:|selectAt:|to:|by:|\/|\*|[<>])\s?)(?<!-|-?\d+\.\d*)\(?-?\d+(\.\d+)?(?! px)(?!(\d*\.)?\d))(?!\.png)(?![\}'"])(?!\s*to:)/gi, to: ' px', } > replace.sync(options)
In high-dpi mode, saving of scenes may actually take more than 5 seconds.
…positions and tails
Basically, we must not use \includegraphics.scale any longer to avoid assumptions on the current scaleFactor for the screenshots.
…with ClassTemplate
dynamic names are possible but hard to read
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A mix of minor styling, code-related, and content-related changes that should hopefully not need much discussion. :-)