The Kalem Book GitHub

This Book describes Kalem's main branch, which may be ahead of the latest release.

PDF files, pictures and workbooks

PDF files, pictures and Excel workbooks open in viewers: plugins that run in Kalem's sandbox (see Plugins). None is built into Kalem: the first time you open such a file, Kalem says which plugin of getkalem/plugins opens it and offers to install it, then opens the file; Open with the System's Application is offered beside it, and kalem plugin install pdf-viewer (image-viewer, xlsx, docx) installs one ahead of time. New Workbook and the other commands that make a workbook offer its plugin the same way when it is missing. A file that is text, an SVG picture among them, opens as text; kalem view FILE shows a viewer's file on the command line.

The keys are a viewer's own while it has the focus: Page Down and Page Up, or n and p, go to the next and the previous page or frame, Home and End to the first and the last; + and - zoom, 0 fits the window, w the width and 1 shows the actual size; the arrows (or h j k l) pan; r turns the view; i shows the file's information; y copies the picture; Shift+N and Shift+P open the next and the previous file of the folder. Find (Ctrl+F) searches a PDF's text. The terminal editor draws a page or a picture through its terminal's graphics (kitty's, iTerm2's or Sixel), else in half-block cells, and with colors off shows its text.

PDF
Pages with their outline in the sidebar, their page labels and their links: one to a page turns to it, and a web address (or a mailto:) asks first and shows where it goes; a link to another file or program does nothing yet. In the window, text is selected with the mouse and copied (y, which copies the page's picture when nothing is selected). A PDF that LaTeX built goes back to its source line on Ctrl-click (Cmd-click on macOS). A PDF with a password asks for it, hidden as typed, and keeps it until Kalem quits.
Pictures
PNG and APNG, JPEG, GIF, WebP, BMP, TIFF, ICO, QOI, TGA, the PNM family, DDS, OpenEXR and Radiance HDR. An animation plays (. pauses it); a photograph is turned as its EXIF orientation says; the information names the camera, the lens and the exposure. A picture larger than 8,192 pixels on its longer side, or 40 megapixels over all its frames, is shown scaled down, and the information gives both sizes.
Workbooks
.xlsx, .xlsm, .xltx and .xltm open as their sheets, as grids with their styles, formulas and charts, and are edited as a spreadsheet is: typing in a cell, formulas recalculated, rows and columns inserted and deleted with every reference moved, sorting, filters, number formats, charts, and macros run when you ask for one by name. The menus have its commands where Excel has them, and a right click on a cell offers what is there (a note's, a link's, a table's, a pivot table's items); the status bar sums the cells selected: their Average, Count and Sum, the Numerical Count when some are not numbers, then their Min and Max. Saving writes only what you changed, every other part of the file copied byte for byte, and asks Excel to recalculate the formulas when it opens the file. An .ods is converted as it opens: Kalem asks before saving it back as .ods, saying what it keeps (number formats are lost). An .xls or .xlsb is shown read only. Save As .xlsx leaves the original alone. A workbook with a password to open asks for it, and is saved encrypted again with it (saved as .ods, it is not encrypted, and Kalem says so). Workbooks has the details.

Word documents (.docx, .docm, .dotx, .dotm) open through the docx plugin, installed from the plugin list: as a document of the editor, each paragraph a line with its style, typed into as text, its comments and tracked changes reviewed with the commands of the Review category. Word documents has the details.

A viewer that fails, runs past its time or out of its memory stops: the editor closes its document at once and says why, and goes on. A viewer that stops three times is turned off until it is updated, and a newer copy installed opens its files in its place, even one installed while Kalem runs: no restart is needed. kalem plugin enable ID turns it on again.