-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.tex
More file actions
71 lines (69 loc) · 1.55 KB
/
test.tex
File metadata and controls
71 lines (69 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
%arara: xelatex
\documentclass[aa,bb=cc,dd]{ctexart}
\usepackage[aa,bb=cc,dd]{amsmath,amssymb,amsthm,bbm}
\usepackage{luacode}
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\newtheorem{problem}{Problem}
\newtheorem{solution}{Solution}
\everymath{\displaystyle}
\newlength\inlineHeight
\newlength\inlineWidth
\long\def\(#1\){%
\settoheight{\inlineHeight}{$#1$}%
\settowidth{\inlineWidth}{$#1$}%
\ifdim \inlineWidth > 0.5\textwidth%
$$#1$$%
\else%
\ifdim \inlineHeight > 1.5em%
$$#1$$%
\else%
$#1$%
\fi%
\fi%
}
\newcommand{\testd}[2][1]{
\ifmmode
\mathrm{#1#2}
\else
#1#2
\fi
}
%nvimtex: enable_parser_command_definition
\newcommand{\testa}[9][\mathbb{ABC}]{\mathrm{#1#2#3#4#5#6#7#8#9}}
\newcommand{\testb}[2][1]{
\ifmmode
\mathrm{#1#2}
\else
#1#2
\fi
}
%nvimtex: disable_parser_command_definition
\newcommand{\testc}[2][1]{
\ifmmode
\mathrm{#1#2}
\else
#1#2
\fi
}
\begin{document}
\(\testa[11]{1}{2}{3}{4}5678 \alpha \beta \testa abcdefgh\)
\(\testb{AAA} \)
\(\testc{AAA} \)
\(\testd{AAA} \)
\begin{aaa}[bbb]
\end{aaa}
aaa aaa \(a \alpha \beta \) aaaa
\(\alpha \beta\)
aaa \(\not \ni \in \)
\(\not 1 \)
a\(\alpha \beta \gamma \not a \)
\(\not a \)
aaaaaaaaaaaa\(\mathbb{A} \alpha \alpha \alpha \alpha\)
12345678901234\(\alpha \alpha \alpha \beta \alpha \alpha \alpha \alpha \alpha \alpha \alpha \alpha \alpha \alpha \alpha \alpha \alpha \alpha apl apl apl apl \alpha \alpha \alpha \alpha \alpha \alpha \)
\(\alpha \beta
\gamma \delta\)
\(\frac 12 12 \alpha \beta \)
\(\sqrt{1} \)
\(\test{AAA}\)
\end{document}