@@ -11,17 +11,28 @@ the $ character in them, which is rather frequent in some applications.
1111Also, Unicode sequences are represented as in Swift, i.e. as ` \u{hexdigits} ` , where there
1212can be from 1 to 6 hex digits. This syntax eliminates having to worry about always outputting
13134 or 8 hex digits, to prevent problems with 0-9,A-F,a-f characters immediately following.
14- Finally, I have added two new ways of representing characters in the literal string,
15- ` \:emojiname: ` and ` \{latexname } ` .
14+ Finally, I have added four ways of representing characters in the literal string,
15+ ` \:emojiname: ` , ` \<latexname> ` , ` \&htmlname; ` and ` \N{UnicodeName } ` .
1616This makes life a lot easier when you want to keep the text of a program in ASCII, and
1717also to be able to write programs using those characters that might not even display
1818correctly in their editor.
1919
2020This now has some initial formatting capability, based on Tom Breloff's wonderful PR #10 to the
2121JuliaLang/Formatting.jl package (by Dahua Lin and other contributors).
22+
2223` \%(arguments) ` is interpolated as a call to fmt(arguments).
24+ This is especially useful when defaults have been set for the type of the first argument.
25+
26+ ` fmt_default!{T}(::Type{T}, syms::Symbol...; kwargs...) ` sets the defaults for a particular type.
27+ ` fmt_default!(syms::Symbol...; kwargs...) ` sets the defaults for all types.
28+ Symbols that can currently be used are: ` :ljust ` or ` :left ` , ` :rjust ` or ` :right ` , ` :commas ` ,
29+ ` :zpad ` or ` :zeropad ` , and ` :ipre ` or ` :prefix ` .
30+ ` reset!{T}(::Type{T}) ` resets the defaults for a particular type.
31+ ` defaultSpec(x) ` will return the defaults for the type of x, and
32+ ` defaultSpec{T}(::Type{T}) ` will return the defaults for the given type.
2333
24- I also plan on adding support for ` \%c(arguments) ` , where c is a C style formatting character.
25- I'm debating if I should make it take the full C style syntax, with leading 0, width/precision,
26- etc, before the single character.
34+ This also adds support for ` \%ccc(arguments) ` , where ccc is one or more characters of a
35+ single C style format specification, which is interpolated as a call to cfmt("ccc", arguments).
2736
37+ I'm also experimenting with adding Python style syntax (as much as possible), as
38+ u"\{ pythonformat}"
0 commit comments