-
Notifications
You must be signed in to change notification settings - Fork 14
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
Handle color using attributes #57
Closed
Closed
Changes from 35 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
d7c6c4b
Allocation of Lua functions (pseudoprimitives)
vlasakm c2b3d69
Handle color using attributes
vlasakm e3e46e8
test branch colors
olsak c34e9f9
add debug print
vlasakm 8c40acd
Perform color setting in TeX
vlasakm 750a557
Only set stroke color when necessary
vlasakm 834d3e7
Add back support for \onlyrgb and \onlycmky
vlasakm e12b8c3
\onlyrgb, \onlycmyk corrected
olsak d26f6f9
branch marked in the banner
olsak 3492b66
grouping in \table items changed
olsak 83d211e
Define \preshipout and use callback
vlasakm 36e0562
Simplify \incircle thanks to attributes
vlasakm 3ac7e6d
Remove unnecessary grouping in \coloron
vlasakm 306a467
Implement (no)localcolor in terms of \_colorprefix
vlasakm 98f48a7
Save a few bytes in manually specified colors
vlasakm ab7003d
Fix typo
vlasakm ce57344
Prepare for luaotfload's color font feature
vlasakm fb457bb
Set luaotfload's current handler to use attributes
vlasakm 324d1f8
documentation actualized
olsak ba74a8e
Remove unneeded local assignments, minor cleanup
vlasakm c6b9784
Use private variants of commands
vlasakm 198c865
Add explanation of stroke color handling
vlasakm d4952b2
Improve luaotfload color handler
vlasakm d48c2d5
subsections in optex.lua added
olsak 68c6ea3
colors.opm: shortening of documentation
olsak cfec5d7
Make "color change needed" calculation more robust
vlasakm 1eb51b2
Don't care about the color of PDF literals
vlasakm a26c350
Trick 0004: annoying spaces removed
vlasakm 9620813
Trick 0004: convert to new \_setcolor
vlasakm e81a2c6
Trick 0004: remove unnecessary grouping
vlasakm 4a0e8c6
Trick 0004: use bp to prevent rounding
vlasakm 7eea14e
Trick 0004: fix bugs
vlasakm cb1281b
Trick 0004: better safe than sorry (0.3bp overlap)
vlasakm 44cd823
Fix example in tables.opm
vlasakm adc30e7
Fix mistake, small improvements
vlasakm a8e33d3
10pt is better in the \morecolors example
olsak 5de705e
Remove debug print
vlasakm eb5bc02
Fix coloring of leader rules
vlasakm eb1b3f9
OpTeX trick 0063 added
olsak 8365aa4
Trick 0063: use local, even if its only debugging
vlasakm f36feaa
Update documentation for `colorize`
vlasakm 532b0c9
Finally handle discretionary nodes
vlasakm 57e619a
Simplify `is_color_needed` a little bit
vlasakm d5c26a9
Spare a call to `colorize` for no replacement list
vlasakm 23d94f9
Trick 0004: update documentation
vlasakm 104f4c4
Fix OpTeX tricks info about colorstacks
vlasakm 409c2d9
Add generic creator of pre-shipout injectors
vlasakm 0314851
Add transparency pre-shipout injector
vlasakm bc6482b
Add font outline pre-shipout injector
vlasakm 891dca1
Manage graphics states
vlasakm 9137981
Use the new ExtGState management
vlasakm cb273c4
Use double colon for the color->attribute mapping
vlasakm 0657980
Attempt to improve color documentation
vlasakm 43bfbaa
Revert transparency etc. (to be an OpTeX trick)
vlasakm a9e64d8
Delete unneeded `node.subtype`
vlasakm befddab
Make `pdfliteral` available outside of `optex.lua`
vlasakm 6fd6316
Fix luaotfload hook
vlasakm a336ff7
Add OpTeX trick 0064
vlasakm 5019077
Don't ever reset color globally
vlasakm a00db07
Fix double colons yet again
vlasakm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ OpTeX including development versions. | |
|
||
See http://petr.olsak.net/optex/ | ||
|
||
branch colors | ||
|
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Should we keep this?
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.
For example
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.
With the current state, even with your suggestion added, the old (documented) idiom
\let\yourmacro=\_currentcolor
->\_setcolor\yourmacro
wouldn't really work -\_setcolor
expects now something like{0}gG
, while\cs{_color:\_the\_colorattr}
would expand to0 g
.I think that with the power of grouping, the concept of saving colors is not needed. But I am not sure about the right interface if it has to be kept.