Repository navigation
0.23.0
Eight features: saved views, export of the written area or the selection, dimensional analysis of formulas, balancing of chemical reactions, an automatic formula sheet, a welcome-back card, notebooks ordered by the active term and clean-up of pen hooks and stray dots. The notebook format moves to version 21 (saved views): the migration from version 20 is automatic, and 0.22 and older open a v21 notebook read-only and never overwrite it. Two independent review rounds are folded in (see Review fixes).
Saved views and document format 21
- Saved views (#264) and document format 21. Save current view… keeps what is on screen (the page, the part of it that is in view and the zoom) under a name; Go to saved view… lists them and one tap brings you back. Rename, update to the current view, move up or down and remove from the menu of a row; each change is one undo step. A view of a page that was deleted is shown as Page missing and can be removed (Undo of the page deletion makes it work again). The views are kept in the notebook, so they travel with the file; recalling puts the middle of the saved region in the middle of the screen at the same zoom relative to the page width, so it works on another screen size. Copies of pages and pages moved to another notebook take no views along; merging a conflicted copy adds the views it has that the notebook lacks. In the sheet, the notebook menu and the palette; English and Italian.
- Document format v21. One optional notebook-level key,
views({ id, name, page, x, y, width, height, zoom }, at most 100, page coordinates only). The v20 to v21 migration is the identity plus the version, the reader drops invalid views and counts them, the writer refuses malformed ones, large v20 files are still read page by page, repair keeps the views; a notebook saved as v21 opens read-only in 0.22. The schema is nowdocs/schema/notebook-v21.schema.json(docs/format.mdand the format test follow). Tests:tests/model-v21.test.ts; harnesssavedviews.
Export the written area or the selection
- Export only the written area, or the selection, as a transparent picture (#280). Export written area… (page sheet, notebook menu and command) crops the current page to everything written on it, with a small margin; the Export selection as picture action on the selection bar does the same for the selected items alone (a selected collapsed sticky note brings its ink). Both write a PNG with a transparent background at 1x, 2x or 3x, or a vector SVG (every pen, the highlighter and marker transparency, text boxes with their link labels), next to the notebook, never overwriting, and remember the file as written by the plugin. Copy puts the picture on the clipboard where the device allows it. The sheet, the PDF or picture background and the paper are never drawn. An empty page says so and writes nothing. The document format is unchanged.
Dimensional analysis of formulas
- Dimensional analysis of formulas (#293). A quiet hint in the equation editor, under the preview, when the units of a formula do not agree: adding metres to seconds, an equation whose two sides differ (force against energy), a function or an exponent applied to something with a dimension. It reads units written with
\mathrm,\textor\SI(SI base units, prefixes from yocto to quetta, the named derived units N, J, W, Pa, Hz, C, V, Ω, S, F, H, T, Wb, lm, lx, Bq, Gy, Sv, kat and common others such as min, h, L, t, eV, bar, atm, cal, Wh, ft, in, mi, lb), follows dimensions through + − × ÷ ^, roots, fractions, derivatives (\frac{dx}{dt}), integrals, sums and limits, and takes the dimension of a symbol from the value it is set equal to (m = 2\,\mathrm{kg}) or from a line[v] = m/s. A symbol it knows nothing about is never flagged. Only dimensions are compared, not scales (3 m + 2 kmis fine). When the units agree it shows a muted tick line. Nothing is stored and the document format is unchanged. - Setting. Settings > Writing > Check units in equations (on by default).
- Code. Pure, Node-tested engine in
src/math/dimensions.ts(noobsidianimport; also reads plain text such as5 m + 3 s); the words insrc/view/dimension-hint.ts; English and Italian.
Balancing chemical reactions
- Balancing of typed chemical reactions (#294). Select a text box or an equation that holds a reaction and tap Balance reaction in the selection bar (or the command): a preview shows each line before and after, and Balance replaces the text with the smallest whole coefficients in one undo step. Formulas with parentheses and brackets, hydrates (
CuSO4·5H2O), charges (Fe^3+,SO4^2-,Fe³⁺,e^-) and arrows (->,→,⇌,=) are read; the species keep the spelling they were typed in. The coefficients come from an exact rational nullspace of the element and charge matrix (no rounding). A reaction that cannot be balanced says why (an element on one side only, unknown element, unclear charge, no positive solution, a species that cannot take part) and one with several answers says so instead of picking one. Locked elements and locked pages are never changed. An equation becomes\ce{...}. No format change.
Automatic formula sheet
- Automatic formula sheet (#249). Formula sheet… (page sheet, notebook menu, command Build formula sheet) collects every equation of the notebook in reading order and writes
<Notebook> — Formulas.mdnext to it: a heading with a link per page and a$$…$$block per formula (\tag{n}for numbered ones). The note is owned by the plugin throughnotebook-formulasmarkers that record the notebook's path and document id; a rebuild replaces only that region (re-read insidevault.process), and a note without markers, with an unpaired marker or recording another notebook is never rewritten. No document format change; the notebook file is never written.
Welcome-back card
- Welcome-back card when you reopen a notebook (#420). After a notebook has stayed closed on this device for a while (default 8 hours; Settings > Study > Timetable > Welcome back card and Offer it after, 1 to 168 hours), a quiet card at the top centre offers the way back to where you were (the notebook's stored reading position, named slide N when that page shows a PDF page) and the first open questions and gaps already marked in the notebook (question and gap markers that are not resolved; the rest is counted as plain text). Every row is a button that goes there. The card appears once per opening, goes away on the first stroke, on the close button or when a row is taken, steps aside while the Referenced on list is open, and stacks below the symbols strip, the Back to slide pill and the Referenced on chip. The only thing stored is the time the notebook was last open, in this device's local storage (bounded to 80 notebooks, corrupt data read as empty); the notebook file, the format and the settings file of other devices are untouched. Pure selection logic:
src/model/welcome-back.ts,tests/welcome-back.test.ts; view:src/view/welcome-back.ts.
Notebooks ordered by the active term
- Notebooks ordered by the active term (#416). The Library sort menu has Active term (Semestre in corso): notebooks linked to a course of the term that includes today come first, the one whose next class is soonest first (then course order in the timetable), then notebooks of the courses whose term is over or not yet started, then every other notebook, each group by last change. The link is the one the timetable already has (a class's notebook or course folder); nothing new is stored and the document format is unchanged. The option is hidden without a timetable and falls back to last-modified. It becomes the default only when a class has dates around today and you have never chosen a sort; picking any sort (or having one saved) keeps your choice.
Clean up hooks and stray dots
- Clean up hooks and stray dots (#314). Clean up strokes in the contextual bar of an ink selection (and in the All actions sheet and the command palette) trims the small hook a pen leaves where it lands or lifts, and removes the stray dot a bouncing pen leaves touching the end of a stroke, as ONE undo step. A notice says how many hooks and dots went. Only the points at the very start or end of a stroke are cut; the stroke keeps its id, style, group and nib, and its place in the page order.
- Conservative on purpose. A hook is a tick of at most a few pen widths (6 pt at most) and a tenth of the stroke that turns back at 120 degrees or more against a straight run of line. Real corners (the foot of an L, a check mark, an arrow barb, a Z or a W), curves and circles are never cut. A dot is removed only when it is a single tiny mark in the same pen, colour, width and nib as the stroke written just before or after it and touches one of its ends: the dot of an "i" or "j" and a full stop sit apart from the stroke and stay. Grouped dots and hidden ink are left alone.
- Respects the page. Groups come whole, the ink a collapsed sticky note keeps hidden is never touched, a locked page refuses the step and says so, and the selection stays on the cleaned strokes (also across pages).
- Setting Trim hooks as you write (Settings > Writing, off by default). When the pen lifts, the stroke is committed as written and a hook at its start or end is cut as a step of its own, with stricter limits than the manual clean-up; one Undo gives the written stroke back. The live input and the rendering are not touched, and a snapped or recognised stroke is left as it is.
- Code. Pure
src/ink/hook-clean.ts(findHooks,trimHooks,isStrayDot,planCleanup), tested with synthetic strokes intests/hook-clean.test.ts. No document format change.
Review fixes
- Balance reaction keeps the rest of an equation. Only the lines of an equation that are a reaction and get balanced are rewritten (as mhchem, written with the ce command); other maths, text, spacing, a reaction that is balanced already or cannot be balanced are kept character for character, and the preview shows the whole resulting source. When a step is refused the notice names the real reason; the "page is locked" message appears only when the page is locked.
- Trim hooks as you write is undoable. The stroke is committed as written and the trim is its own undo step (one Undo gives back the stroke you wrote, a second removes it; a late side-button press takes the whole contact back). The writing-time rule is stricter than the manual clean-up (only a near reversal of a very short hook), so the exit tail of a printed a, d or u stays.
- Clean up strokes never edits hidden ink. The ink a collapsed sticky note keeps hidden is left alone, and a hidden stroke is never taken for the neighbour of a dot.
- Saved views. A unique name (" 2", " 3"…) never leaves a double space, so a conflict merge of two views with a long name is not refused by the content guard. A view cannot be saved or updated for a page whose id is over 200 characters (the "could not be saved" notice appears instead of a guard error). The merge summary counts saved views that differ in the copy (the notebook's stay) and views that did not fit the list of 100, and says that the copy stays in place in that case. Repair keeps the view lines it can read when the
viewslist itself is damaged. - Formula sheet. A dollar sign after a double-backslash line break is escaped, so it cannot end the maths block of the note. A note of yours with the same name and no markers (or with one marker missing) is never touched and the sheet goes to the next free name (
Formulas (2)) instead of failing; an empty note is filled. - Trim as you write, round 2. The trim is worked out before the stroke is committed, so the renderer draws the trimmed stroke at once and the trim step holds that same object: no full redraw of the page after each pen-up. The first Undo after a trim now says "Hook put back. Undo again to remove the stroke." (English and Italian). A take-back of a stroke and its trim redraws and saves whenever a step was undone, even if the second step is refused. The view side lives in
src/view/commit-trim.tsand is tested with a real history (tests/commit-trim.test.ts) and in the hookclean harness. - Balance reaction keeps
&. A row of an aligned environment with one&right before the arrow is balanced as\ce{left} &\ce{arrow right}, so the columns still line up; a row with any other&is left as written. - Merge message. "Saved views differ in the copy" no longer names a backup (the copy is only moved when you ask): the copy's versions stay in the copy.
- Tests.
tests/review-w23-data.test.ts, plus new cases intests/hook-clean.test.ts,tests/chem-balance.test.ts,tests/chem-tools.test.tsandtests/formula-sheet.test.ts.