Skip to content

Commit 311c339

Browse files
change to not capture and fixes
1 parent 19b02b4 commit 311c339

File tree

7 files changed

+124
-278
lines changed

7 files changed

+124
-278
lines changed

Project.toml

-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ authors = ["José Joaquín Zubieta Rico <[email protected]>"]
44
version = "0.2.0"
55

66
[deps]
7-
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
87
LibTeXPrintf_jll = "31c4d84e-4279-5ed4-9345-4512eef47f95"
9-
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
108

119
[compat]
12-
LaTeXStrings = "1"
1310
LibTeXPrintf_jll = "1"
1411
julia = "1.6"
1512

README.md

+9-21
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ julia> Pkg.add("LibTeXPrintf")
2323

2424
# Documentation
2525

26-
LibTeXPrintf.jl export eight functions
26+
LibTeXPrintf.jl export nine functions
2727

2828
```julia
2929
texfonts()::Vector{String}
@@ -32,11 +32,10 @@ texsetfont!(font::String)::String # modifies global state, doesn't modify its ar
3232

3333
texsymbols()::ImmutableDict{String, String}
3434

35-
texprintf(format::String, args...; [lw])::String
36-
texprintf(format::LaTeXString, args...; [lw])::String
35+
texstring(tex::String; [lw])::String
3736

38-
stexprintf(format::String, args...; [lw])::String
39-
stexprintf(format::LaTeXString, args...; [lw])::String
37+
texprint(tex::String; [lw])::String
38+
texprintln(tex::String; [lw])::String
4039

4140
texsetascii()
4241
texsetunicode()
@@ -45,18 +44,6 @@ texsetunicode()
4544
The documentation of every one of these can be consulted in help mode in the
4645
REPL (press `?` to change to help mode, `backspace` to exit).
4746

48-
### Format string
49-
50-
The `format` positional argument is interpreted as $\LaTeX$ code, but with the
51-
extra that format specifiers of `@printf` (or the `printf` function in the
52-
C language) are allowed inside.
53-
54-
The argument `format` can also be a `LaTeXString`, from
55-
[LaTeXStrings.jl](https://github.com/stevengj/LaTeXStrings.jl). Interpolation
56-
from `LaTeXString` will have precedence over substitution of variables. That
57-
is, if `%$expr` appears in a `LaTeXString` passed to `stexprintf`, `expr` will
58-
be interpolated into the string before being passed as argument.
59-
6047
**Note**
6148
: Newline character is not supported by libtexprintf. If you use it, it will not work or
6249
errors will appear.
@@ -68,29 +55,30 @@ julia> using LibTeXPrintf
6855

6956
julia> using LaTeXStrings
7057

71-
julia> stexprintf("\\frac{1}{%d}", 2)
58+
julia> texstring("\\frac{1}{2}")
7259
"1\n\n2"
7360

74-
julia> texprintf("\\sum_{i=0}^{10}{%c}^2", 'i')
61+
julia> texprintln("\\sum_{i=0}^{10}{i}^2")
7562
10
7663
⎯⎯
7764
2
7865
╱ i
7966
⎺⎺
8067
i=0
68+
8169
julia> texgetfont()
8270
"text"
8371

8472
julia> texsetfont!("mathbb")
8573
"mathbb"
8674

87-
julia> texprintf("This is a LaTeX string.")
75+
julia> texprintln("This is a LaTeX string.")
8876
𝕋𝕙𝕚𝕤 𝕚𝕤 𝕒 𝕃𝕒𝕋𝕖𝕏 𝕤𝕥𝕣𝕚𝕟𝕘.
8977

9078
julia> texsetfont!("text")
9179
"text"
9280

93-
julia> stexprintf("This is a LaTeX string.")
81+
julia> texprint("This is a LaTeX string.")
9482
"This is a LaTeX string."
9583
```
9684

0 commit comments

Comments
 (0)