Moves the cursor to the right non-destructively, Control- B moves theĬursor to the left non-destructively, etc.).Īn end-of-file on input is passed back as the string 'EOF'.Īn interpreter instance will recognize a command name foo if and only if it To the last command, Control- N forward to the next one, Control- F If the readline module is loaded, input will automatically inheritīash-like history-list editing (e.g. Prompt (this overrides the intro class attribute). The optional argument is a banner or intro string to be issued before the first Received input, and dispatch to action methods, passing them the remainder of Repeatedly issue a prompt, accept input, parse an initial prefix off the Use_rawinput attribute to False, otherwise stdin will beĪ Cmd instance has the following methods: Cmd. If you want a given stdin to be used, make sure to set the instance’s If not specified, they will default to sys.stdin and Objects that the Cmd instance or subclass instance will use for input and The optional arguments stdin and stdout specify the input and output file Readline is available, command completion is done automatically. The optional argument completekey is the readline name of a completion To inherit Cmd’s methods and encapsulate action methods. It’s useful as a superclass of an interpreter class you define yourself in order There is no good reason to instantiate Cmd itself rather, Cmd ( completekey = 'tab', stdin = None, stdout = None ) ¶Ī Cmd instance or subclass instance is a line-oriented interpreterįramework. Tools, and prototypes that will later be wrapped in a more sophisticated These are often useful for test harnesses, administrative The Cmd class provides a simple framework for writing line-orientedĬommand interpreters. Most notably, characterĪctive characters resemble macros: they are single characters that will expand before any other command.Cmd - Support for line-oriented command interpreters ¶ If you redefine catcodes in your document, make sure to do it after the preamble to prevent clashes with package loading.Įverything not listed in the other catcodes. Should you redefine any catcode in a class or in a style file, make sure to revert it back at the end of your file. However, this is not recommended, as it can make code difficult to read. There are 16 category codes in TeX.Ī powerful feature of TeX is its ability to redefine the language itself, since there is a \catcode function that will let you change the category code of any characters. To distinguish between different meanings of the characters, TeX splits them into category codes, or catcodes for short. In TeX some characters have a special meaning that is not to print the associated glyph.įor example, \ is used to introduce a control sequence, and will not print a backslash by default. There may be more terms, but we hope that it will do it for now. A counter is a register containing a number. A glue is a certain amount of space that is put between boxes when they are being concatenated.Anything that ends on the paper is a box: letters, paragraphs, pages. A box is an object that is made for printing.A font is a control sequence that refers to a font file.A length is a control sequence that contains a length (a number followed by a unit).They are limited in numbers (256 for each type of register in classic TeX, 32767 in e-TeX). A register is the TeX way to handle variables.A primitive is a command that is hard coded in the TeX engine, i.e.A command (or function or macro) is a control sequence that may expand to text, to (re)definition of control sequences, etc.It is not printed as is, it is expanded by the TeX engine according to its type. A control sequence is anything that begins with a \.A token is a character, a control sequence, or a group.A group is everything after an opening brace and before the matching closing brace.To avoid confusion it seems necessary to explain some terms. Up to a few exceptions, you can use the full Plain TeX language within a valid LaTeX document whereas the opposite is false. Plain TeX is much more low-level, it has much more capabilities at the cost of a steep learning curve and complex programming. In fact, LaTeX is a set of Plain TeX macros and most packages use Plain TeX code. You may wonder how all these packages you are using every day have been implemented with so little. While you play with LaTeX macros, you will notice that it is quite limited. Collaborative Writing of LaTeX Documents.Scientific Reports (Bachelor Report, Master Thesis, Dissertation).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |