-
Notifications
You must be signed in to change notification settings - Fork 123
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
Is inline colouring possible? #154
Comments
Hey. Yes, that would be a good feature. The absolute positioning makes that pretty tricky at the moment, so it would be better to be done automatically under the hood. It would require some kind of markdown-like parser, which might be a bit involved. Is there a simple syntax that already exists that might suit (to cover things like underline, strike through, colour etc...)? Right now there isn't a trivial answer - you'd have to break it up yourself externally and then build each element separately with absolute positioning. Possible, but awkward. |
I can't think of any markup-like format that would perfect fit this library's needs. A custom format might be a reasonable choice though. Something as simple as pairs of square brackets. Content in the first square brackets dictate what the style is, and content in the second is the text. This would make writing a parser easy. So:
|
That markdown system seems ok. It'd be nice if there was something semi-standard that we could use, rather than inventing another new one. But traditional markdown is too complex for this scenario I think. I don't have time at the moment to implement this parser though, so I'm not sure when this will get actioned. |
Lets say I wanted to emphasis or colourize mid part of the sentence.
[default black]This is an example[now red]of inline colouring[now black]within the same sentence in a PDF document.
I'm asking since you're supposed to position manually just like how it is with postscript (and in turn, PDF) creation, I feel it would be a pain to manually place multiple strings on the same line.
The text was updated successfully, but these errors were encountered: