Skip to content

Commit f683824

Browse files
add ToogleMapSuperSub
1 parent 311c339 commit f683824

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ texprintln(tex::String; [lw])::String
3939

4040
texsetascii()
4141
texsetunicode()
42+
textogglesupersub()
4243
```
4344

4445
The documentation of every one of these can be consulted in help mode in the

src/LibTeXPrintf.jl

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ using Base: ImmutableDict
55
include("wrapper.jl")
66
using .libtexprintf
77

8-
export texstring, texprint, texprintln, texsymbols, texfonts, texsetfont!, texgetfont, texsetascii, texsetunicode
8+
export texstring, texprint, texprintln, texsymbols, texfonts, texsetfont!, texgetfont,
9+
texsetascii, texsetunicode, textogglesupersub
910

1011
# set line width
1112
texsetlw!(lw) = libtexprintf.TEXPRINTF_LW[] = lw
@@ -148,6 +149,12 @@ texsetascii() = libtexprintf.SetStyleASCII()
148149

149150
texsetunicode() = libtexprintf.SetStyleUNICODE()
150151

152+
const MAPSUPERSUB = Ref(true)
153+
function textogglesupersub()
154+
libtexprintf.ToggleMapSuperSub()
155+
MAPSUPERSUB[] = ~MAPSUPERSUB[];
156+
end
157+
151158
@doc raw"""
152159
texerrors()
153160

src/wrapper.jl

+15-12
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,19 @@ function __init__()
4747
@load! TEXPRINTF_ERR
4848
end
4949

50-
# *name* : *signature (type(type1,type2,...))* -> *side effect* |
51-
# ----------------+---------------------------------------++--------------------------------------+
52-
# texstring : char*(const char *tex) -> memory associated to output (char*) +-->+
53-
# texprintf : int(const char *format, ...) -> c_stdout // (ignored) | |
54-
# stexprintf : char*(const char *format, ...) -> memory associated to output (char*) +-->+
55-
# ftexprintf : int(FILE *f, const char *format, ...) -> f // (ignored) | |
56-
# texboxtree : void(const char *format, ...) -> c_stdout // for debugging | |
57-
# texlistsymbols : void() -> c_stdout // called from __init__ | |
58-
# texerrors : void() -> c_stderr // does a fflush! | v
59-
# texfree : void(void *ptr) -> ptr-associated memory // to release +<--+
60-
# SetStyleASCII : void() -> STYLE_UNI // Not exported global |
61-
# SetStyleUNICODE : void() -> STYLE_ASC // Not exported global |
50+
# *name* : *signature (type(type1,type2,...))* -> *side effect* |
51+
# ------------------+---------------------------------------++--------------------------------------+
52+
# texstring : char*(const char *tex) -> memory associated to output (char*) +-->+
53+
# texprintf : int(const char *format, ...) -> c_stdout // (ignored) | |
54+
# stexprintf : char*(const char *format, ...) -> memory associated to output (char*) +-->+
55+
# ftexprintf : int(FILE *f, const char *format, ...) -> f // (ignored) | |
56+
# texboxtree : void(const char *format, ...) -> c_stdout // for debugging | |
57+
# texlistsymbols : void() -> c_stdout // called from __init__ | |
58+
# texerrors : void() -> c_stderr // does a fflush! | v
59+
# texfree : void(void *ptr) -> ptr-associated memory // to release +<--+
60+
# SetStyleASCII : void() -> style // Not exported global |
61+
# SetStyleUNICODE : void() -> style // Not exported global |
62+
# ToggleMapSuperSub : void() -> style // Not exported global |
6263

6364
texstring(str) = @ccall LibTeXPrintf_jll.libtexprintf.texstring(str::Cstring)::Cstring
6465

@@ -70,4 +71,6 @@ SetStyleASCII() = @ccall LibTeXPrintf_jll.libtexprintf.SetStyleUNICODE()::Cvoid
7071

7172
SetStyleUNICODE() = @ccall LibTeXPrintf_jll.libtexprintf.SetStyleUNICODE()::Cvoid
7273

74+
ToggleMapSuperSub() = @ccall LibTeXPrintf_jll.libtexprintf.ToggleMapSuperSub()::Cvoid
75+
7376
end

0 commit comments

Comments
 (0)