Created
November 24, 2015 22:17
-
-
Save anonymous/608858f78efac2133bf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- http://tex.stackexchange.com/q/187921/14066 --> | |
> can latex in principle be built with readline support for keyboard shell | |
> interaction? | |
Some clarification in advance, Latex is just a format running on some TeX | |
interpreter. That means: byte code, not native code. As such, Latex has no | |
concept of *linking* a library. That needs to be done one layer below. | |
------------------------------------------------------------------------------- | |
Linking readline would violate the core principles of Luatex and Pdftex. (I | |
don’t know about Xetex -- perhaps they don’t like the license.) On the one hand | |
it means introducing a runtime dependency, on the other hand the library remains | |
platform specific, regardless of how widespread and popular it is. Not the best | |
foundation for extending a feature as controversial as the interactive mode! | |
An interactive interpreter without readline is quite inconvenient, though. | |
Luckily, that usability gap can be closed quite easily by installing the | |
``rlwrap(1)`` utility. It takes an existing, dumb interpreter and transparently | |
adds a readline layer over the input. This does not affect the output except | |
for what readline would do, e. g. displaying the “insert mode” indicator | |
(``show-mode-in-prompt``) -- so best avoid it in your scripts. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment