-
Notifications
You must be signed in to change notification settings - Fork 0
/
remarkable.tex
128 lines (119 loc) · 4.17 KB
/
remarkable.tex
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
% Copyright (c) 2021 The Toltec Contributors
% SPDX-License-Identifier: MIT
%
% Library of reMarkable-related TikZ shapes for illustrating the documentation
% of community projects
\usetikzlibrary{calc}
\colorlet{rM border}{black!60}
\colorlet{rM screen}{black!6}
\colorlet{rM overscreen}{black!10}
\colorlet{rM annotation}{black!70}
\tikzset{
% Shape of a reMarkable 1 tablet
% Arguments: <width> by <height> border <border thickness>
rM1 left fill/.initial={white},
rM1 home fill/.initial={white},
rM1 right fill/.initial={white},
pics/rM1/.style args={#1 by #2 border #3}{
code={
\node[
fill=rM border,
rounded corners=0.25,
minimum width={2 * #3 cm},
minimum height=2pt,
yshift=-.25pt,
inner sep=0pt,
] at (.5 * #1, #2) (-key-power) {};
\draw[
draw=rM border, fill=white,
rounded corners=1,
] (0, 0) rectangle (#1, #2);
\fill[rM screen]
(#3, 4 * #3)
coordinate (-screen-bottom-left)
rectangle (#1 - #3, #2 - 2 * #3)
coordinate (-screen-top-right);
\coordinate (-screen-center)
at ($(-screen-bottom-left)!.5!(-screen-top-right)$);
\tikzset{
lower key/.style={
draw=rM border, rectangle,
line width=.3,
rounded corners=0.25,
minimum width={2 * #3 cm},
minimum height={2 * #3 cm},
inner sep=0pt,
},
}
\node[
lower key,
fill=\pgfkeysvalueof{/tikz/rM1 left fill},
] at (2 * #3, 2 * #3) (-key-left) {};
\node[
lower key,
fill=\pgfkeysvalueof{/tikz/rM1 home fill},
] at (.5 * #1, 2 * #3) (-key-home) {};
\node[
lower key,
fill=\pgfkeysvalueof{/tikz/rM1 right fill},
] at (#1 - 2 * #3, 2 * #3) (-key-right) {};
}
},
%
% Shape of a reMarkable pen
% Arguments: <pen width> by <pen length>
pics/rM pen/.style args={#1 by #2}{
code={
\draw[rM annotation, fill=white] (0, 0)
to [out=135, in=-90] ++(-.5 * #1, #1)
to ++(0, #2) to ++(#1, 0)
to ++(0, -#2)
to [out=-90, in=45] ++(-.5 * #1, -#1);
}
},
pics/rM pen/.default={.12 by .8},
pics/rM1/.default={1.75 by 2.55 border .1},
%
% Symbol representing a tap on a touch screen
% Arguments: <inner radius>/<outer radius>/<cut angle>
pics/tap/.style args={#1/#2/#3}{
code={
\draw[rM annotation, semithick] (0, 0) circle (#1);
\draw[rM annotation] (#2, 0)
arc[radius=#2, start angle=0, delta angle=#3]
(#2, 0)
arc[radius=#2, start angle=0, delta angle=-#3];
\draw[rM annotation] (-#2, 0)
arc[radius=#2, start angle=180, delta angle=#3]
(-#2, 0)
arc[radius=#2, start angle=180, delta angle=-#3];
}
},
pics/tap/.default={.15/.22/50},
%
% Symbol representing a horizontal swipe in any direction
% Arguments: none
pics/scroll x/.style={
code={
\draw[rM annotation, semithick] (0, 0) circle (#1);
\draw[rM annotation, ultra thick, -{Latex[length=2.2mm]}]
(-#1, 0) -- ++(-.4, 0);
\draw[rM annotation, ultra thick, -{Latex[length=2.2mm]}]
(#1, 0) -- ++(.4, 0);
}
},
pics/scroll x/.default={.15},
%
% Symbol representing a vertical swipe in any direction
% Arguments: none
pics/scroll y/.style={
code={
\draw[rM annotation, semithick] (0, 0) circle (#1);
\draw[rM annotation, ultra thick, -{Latex[length=2.2mm]}]
(0, -#1) -- ++(0, -.4);
\draw[rM annotation, ultra thick, -{Latex[length=2.2mm]}]
(0, #1) -- ++(0, .4);
}
},
pics/scroll y/.default={.15},
}