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
|
# xintsession README #
Release: 0.3b (2021-07-01)
## Usage ##
xintsession.tex is to be used with etex (or pdftex or the other engines
with Plain as preloaded format) *interactively on the command line*.
It will load [xintexpr](http://www.ctan.org/pkg/xint) and
[polexpr](http://www.ctan.org/pkg/polexpr).
To start a session:
1. Execute `etex xintsession`, or if available, `rlwrap etex xintsession`
to benefit from arrow keys navigation and other improvements such
as parentheses highlighting.\
\
Alternatively, execute `rlwrap etex` and enter `xintsession` at the `**`
prompt.\
\
One can also use the `-jobname` option of `etex` at this step.\
\
At my locale I added `alias xs="rlwrap etex xintsession"` to my `.bashrc`
so I only have to type `xs` at the command line.
2. An `>>>` invite appears, and computations can begin!\
\
Start entering input, terminate it via a semi-colon `;`.
Say `&help` for help and `&bye` to quit.
The above explanations have been tested on a Unixen (Mac OS), and probably
`rlwrap` is not available on all platforms, but it is not a requirement.
Here is a sample session (spaces do not matter):
>>> 1+1/2+1/3+1/4+1/5;
@_1 137/60
>>> @_^3;
@_2 2571353/216000
>>> add(1/i, i=1..50);
@_3 13943237577224054960759/3099044504245996706400
>>> &fp
fp mode (16 digits)
>>> @_;
@_4 4.499205338329425
>>> add(1/i, i=1..1000);
@_5 7.485470860550346
>>> 1
... +
... \message{xintsession is great!}
(executing \message {xintsession is great!} in background)
xintsession is great!
... 2
... ;
@_6 3.0
>>> &bye
Did I say something wrong?
Session transcript written on xintsession-210531_09h08.tex
)
No pages of output.
Transcript written on xintsession.log.
As this example illustrates, the computational engine can work in
various modes: exact, fp, int, and pol. Say `&fp=number` at the
`>>>` prompt to activate floating point mode with `number` digits
of precision.
If ill-formed input drops you deep into TeX error interaction mode,
try hitting `S` as it may work to bring you back to normal session.
For additional explanations, enter `&help` at the `>>>` prompt.
## Change log ##
- 0.3b (2021-07-01)
- fix output still uses `(@_<n>)` when a variable is defined
but the parentheses were dropped a while ago in general
- 0.3a (2021-06-08)
- fix extremely weird `0.3` breakage of user function definition
interface, caused by last line being `\endinput\xintsession`,
and the latter using `\scantokens` in certain circumstances
- fix extra `(` in a help panel
- 0.3 (2021-05-31)
- implement `>>>` primary and `...` secondary invite prompts
- breaking: rename `\xintresume` into `\xintsession`
- 0.2b (2021-05-23)
- use `\errorcontextlines=0` regime (if not paused)
- load `xintexpr` with `\newlinechar` set to `10` to activate
nicer error messages coming with `xintexpr 1.4g`
- add help panel navigation via `n`, `p`, `q` and `1`, ..., `5`
- fix catcode of @ was set to letter
- fix version was not updated to `0.2a` in banner
- fix some spaces in help and welcome panels
- 0.2a (2021-05-06)
- fix help panels mentioning topics obsoleted by `xintexpr 1.4f`
- 0.2 (2021-05-05)
- fix typos in help panels, improve welcome panel
- fix "can't send `\par` to background typesetting"
- track `xintexpr 1.4f`
- add `&fp=N` parameterized floating point mode interface
- 0.1 (2021-04-13)
Initial release
## License ##
Copyright (c) 2021 Jean-François Burnol
See documentation of package [xintexpr](http://www.ctan.org/pkg/xint) for
contact information.
This Work may be distributed and/or modified under the conditions of the
LaTeX Project Public License version 1.3c. This version of this license
is in
> <http://www.latex-project.org/lppl/lppl-1-3c.txt>
and version 1.3 or later is part of all distributions of LaTeX version
2005/12/01 or later.
This Work has the LPPL maintenance status author-maintained.
The Author of this Work is Jean-François Burnol.
This Work consists of the package files xintsession.tex and README.md
|