The third beta for Zettlr 4.0 is here! This one again fixes a large amount of issues and comes with some good performance improvements. For a full list of all changes in this beta, please refer to the Changelog below. Notably, what has changed since the second beta release:
- We have fully rewritten the FSAL, heavily improving performance and load times. This also fixed a large amount of issues users have reported with recognizing files and detecting remote changes to folders, such as:
- Directory sorting now works reliably again and is almost instant
- Changes to files are detected much faster
- Many successive remote changes are now correctly detected and reflected by the app
- Zettlr now finally hides both the titlebar and the toolbar if you enter the distraction free mode while the app is in fullscreen.
- Horizontal scrolling to switch between the file list and file tree with the "Thin" file manager mode is no longer restricted to macOS. Windows and Linux users will now also be able to scroll horizontally with a mouse with a horizontal scrollwheel, or the trackpad.
- We have increased the size of the dropzone that appears when you drag files around to split the editor area.
- Zettlr doesn't show disrupting error boxes if it cannot check for updates due to timeouts (which happens if you work on a work laptop with a restrictive VPN setup, for example).
- Headers level 1 will now be displayed without Markup in various places (file manager, document tabs, etc.)
- Update to Electron 39
- Switch nightly version indicator to the build flag. This allows users of nightly releases to properly switch to newer beta releases.
- Emit fullscreen info for CSS purposes so that you can style the app depending on if its in fullscreen.
Changelog
Full TableEditor Rewrite
This release contains a full rewrite of the TableEditor. The old implementation
of the TableEditor had many bugs and inconveniences that made working with
Markdown tables barely less cumbersome than having to deal with raw Markdown
tables. Users criticized volatile data handling and experienced frequent data
loss. This is why we redesigned the TableEditor from the ground up. With this
release, we are finally able to give the new experience to you.
The most important improvement is that now data loss should be a thing of the
past. The new TableEditor makes full use of the available features of the editor
to keep the data as safe as possible. But we didn't want to stop there. Because
the TableEditor hadn't received a face lift in years, we asked ourselves what
else the TableEditor was missing.
From a user perspective, we have kept the design of the TableEditor as close to
the former UX as possible, while also fixing a few oddities. Specifically, the
buttons of the TableEditor have been fully redesigned to be more minimalist.
Also gone is the infamous "Save" button that was not able to help prevent data
loss. The new TableEditor now features proper syntax highlighting so that you
can more easily verify that you are authoring proper Markdown. In addition, the
new TableEditor is now faster, more memory efficient, and it should be simpler
to fill entire tables with data.
Lastly, one big improvement of the new TableEditor is that you don't have to use
it to be more efficient in authoring tables. Specifically, we decided to
implement all functionality fully keyboard-oriented. This means that for any
modification you may want to make there is now a shortcut. Adding and removing
rows and columns; clearing data from rows, columns, or the entire table;
aligning column text left, right, or center; swapping rows or columns; etc.
Anything is now possible either with the new built-in context menu, or a quick
keyboard shortcut.
There is only one thing we stopped to support: grid tables. Given that their
structure can be much more difficult to parse we wanted to err on the side of
caution. However, some keyboard shortcuts such as navigating between cells will
still work with grid tables. Since users will most of the time only edit simple
tables, we believe this to be an acceptable compromise — while not completely
ruling out supporting grid tables, especially since Pandoc has started heavily
investing in an improvement of their grid table support.
In any case, we hope that the new TableEditor will finally fix the issues you
experienced over the past years — and we would like to apologize that it took us
so long to fix all of these issues at once!
Changes to the snippet $FILENAME variable
In this update, we have implemented a change in which the $FILENAME variable
no longer includes the filename extension. This means that, while $FILENAME
has in the past resolved to my-file.md, it will now only include my-file.
If you rely on the $FILENAME-variable in any of your snippets, please make
sure to update it by adding the variable $EXTENSION behind it. In other
words, everywhere you need only the filename without its extension, you can
keep $FILENAME, but wherever you need both the file name and its file
extension, please use $FILENAME$EXTENSION. (The latter variable includes
the leading period of the extension, so do not write $FILENAME.$EXTENSION.)
Image Viewer and PDF Viewer
This update brings with it a great new feature for Zettlr: A built-in image
viewer and PDF viewer. Once you have selected in the settings that you wish to
open images or PDF files in Zettlr instead of the default behavior to open it
externally, Zettlr will open them in editor panes just like the editors. You can
rearrange them just like you can other files, and you have some options
available to inspect the files.
For images, the viewer offers various options to zoom and fit the images so that
you can view every detail of them while having other files open side-by-side.
In addition, the image viewer offers four background modes to accommodate
transparency and difficult-to-view colors in the images better: transparent
(the default), a black background, white background, and a translucent
checkerboard background.
The PDF viewer likewise allows you to preview PDF files using Chromium's built-
in PDF viewer that you may already know if you have opened PDF files in Google
Chrome or Edge. Due to restrictions in how this works, however, you will have to
manually "enable" such a viewer before being able to scroll it by clicking into
it. Whether an iframe is interactive is indicated by a small border around the
iframe.
Note that both image and PDF viewers are just that: viewers. As Zettlr is a text
app, we do not plan on implementing any ways of editing images or PDF files. To
annotate your PDF files, please continue using your existing workflow.
New Citation Parser
This release of Zettlr ships with a fully rewritten citation parser. We have
decided to do so because the existing citation parser was very coarse. It would
only detect and indicate entire citation nodes, but it could not distinguish
between the various parts of citations (such as prefix, citekey, and suffix). In
addition, there were quite many inefficiencies in how Zettlr would parse
citations.
The new citation parser aims at fixing these issues. It now mounts individual
nodes into the document for all individual parts of a citation node.
Specifically, it now detects formatting characters, the @-sign, the suppress-
author-flag (a hyphen preceding the @-sign), prefix, suffix, and the locator
individually. This not just makes styling individual citation parts possible,
but also makes all processing within Zettlr more efficient and faster.
Especially in documents with a lot of citations, you should be able to observe a
performance improvement.
Lastly, we took this opportunity to align the parser more with how Pandoc
Citeproc processes citations. Most notably, this includes relaxing some
requirements such as having to place commas after the citekey, and support for
curly brackets, which allows you more flexibility in defining citekeys (e.g.,
@{AuthorYear}) and locators (e.g., {pp. 23-24, 66-69}),
If you prefer to style Zettlr using Custom CSS, you can now style the individual
parts of your citations, using the following CSS classes:
cm-citation: The entire citation nodecm-citation-mark: Formatting characters ({}[];) except the@-sign and
the suppress-author-flagcm-citation-prefix: The citation prefixcm-citation-suppress-author-flag: The suppress-author-flagcm-citation-at-sign: The@-sign in front of your citekeycm-citation-citekey: The actual cite key (sans surrounding curly brackets)cm-citation-locator: The locator after your citekeycm-citation-suffix: The citation suffix
Modified Zettelkasten Link Workflow
With this update, we have updated the Zettelkasten link insertion workflow. This
is due to the new capabilities of Zettlr to understand link labels. To do so, we
have removed the previous settings "Link with filename only" and "When linking
files, add the document name …". Instead, we have added two new settings,
"Always use the file title as label for internal links" and "Use the file ID as
link target if possible."
The new workflow applies when you autocomplete a filename, and works as follows:
- If "Use the file ID" is enabled, Zettlr will use a file's ID, if the file has
one, and fall back to the filename only where no ID is available. If it is
disabled, Zettlr will always use the filename to generate internal Wikilinks. - If "Always use the file title" is enabled, Zettlr will add the file's title
(YAML frontmatter title; first heading level 1; filename) as the link label.
If it is disabled, Zettlr will never add a link label automatically.
Footnote Workflow Improvements
This update improves the footnote handling workflow a lot. Until now, Zettlr was
only able to properly insert new footnotes. However, the footnote deletion
process still required you to manually delete both the footnote label and its
accompanying reference.
We have now implemented a few new functions that help you manage footnotes.
First, when you delete text by pressing Backspace, and you reach a footnote
label, Zettlr will now select the entire footnote label instead of deleting the
closing bracket of the label. When you press Backspace a second time, it will
remove the entire label at once. This gives you both a visual indication that
you are about to delete a footnote, and make it easier (since it requires you to
press Backspace only twice, instead of at least four times).
Note that some functionality does not apply to footnote labels that contain text
other than numbers.
Rewritten FSAL
A change that is more subtle to note is a full rewrite of the File System
Abstraction Layer (FSAL). For more technical details, see the "Under the hood"
section below. For you, what should change is that Zettlr should now feel
snappier once it's booted up. We have cleaned up a lot of code under he hood
which will make changes to any file appear much faster across the app. In
addition, Zettlr should now have no issues detecting dozens of file changes in
quick succession; something that has not worked perfectly in the past.
GUI and Functionality
- Feature: Full TableEditor Rewrite. The new TableEditor keeps most
functionality of the previous version, with the exception of more safeguards
against data loss, and more ergonomic usage. - Feature: Image and PDF previews. Zettlr has now two dedicated viewers that
allow users to open common image types and PDF files right from within the app
for preview purposes (#5501). - Feature: Fully rewritten citation parser (#5902).
- Feature: Full-text (aka. global) search runs can now be cancelled via a
dedicated button. You can now also trigger a new search while another search
is already running. - Feature: Individual global search results can now be copied to the
clipboard (#2070). - Feature: The file manager can now show and display other file types as
opposed to having those only in the sidebar. Images and PDF files can be
opened directly in Zettlr, while other files will be opened using the system
default application. You can use the appropriate section in the advanced
settings to customize this. By default, none of the new file types will be
displayed in the file manager (#5501). - Feature: Zettlr now provides a Liquid Glass icon for macOS 26.
- Feature: A new option has been added to allow a simple switching between a
raw Markdown syntax mode and a preview mode ("WYSIWYG"), both in the settings
and in the statusbar. Clicking it will toggle Markdown files between a pure
syntax view, and a mode in which those items which you have selected will be
pre-rendered/previewed (#4514). - Feature: Zettlr now ships with a brand-new onboarding wizard that helps
new users tweak some central settings immediately without having to scour the
preferences. - Feature: macOS users with an Apple Silicon chip can now access Writing
Tools from context menus. - Feature: Allow turning off the behavior of Zettlr to automatically open
files upon successful export (#5609). - Feature: Added a simple setting that forcefully enables Pandoc's
mark-
extension when exporting from Markdown if that is not already enabled. This
ensures that==highlighted==spans are properly considered in any output
format. - Feature: Improved the calendar view in the statistics window to better
convey the numbers. It now features a gradient heatmap, only considers the
numbers from the visible year, and logs the numbers to spread out the
distribution across the new, ten activity levels. - Feature: Improved the statistics chart to better help you contextualize
your writing flow. It now shows you your current word count for this week, and
compares it to this and last years's averages. - Feature: The LanguageTool integration is now more performant and allows
ignoring of certain rules (#5910). Whenever you ignore a rule, it shows up in
the spellchecking preferences section alongside some additional info. From
this section you can re-enable it by removing it from the list of ignored
rules. - Feature: "Hide heading characters" now properly hides the characters
instead of replacing them with another element, bringing Zettlr's renderer
closer to a true WYSIWYG experience. The heading level is now indicated to the
left side in its own gutter element. - Feature: You can now show line numbers in Markdown files via a new setting
(#5917). - Feature: Zettlr has now improved support for reference-style links. This
support extends to the link context-menu (which now supports handling links
from both link and link reference), the tooltips (which accurately show link
previews), rendering (which accounts for link labels), to any action (such as
copying or removing a link) (#5142). - Feature: Zettlr now supports loading BibLaTeX libraries as well (#460).
- Feature: Zettlr now correctly displays crossref-style citations (#248).
- Feature: You can now collapse and un-collapse the files and workspace
sections in the file manager. This can be helpful if you are working with both
a lot of individual files and workspaces. Your choice is remembered (#5916). - Feature: Extended the scope and application of vibrancy on macOS.
- Feature: Working with footnotes is now more convenient than ever. Zettlr
now has an update listener that constantly scans the document for any rogue
footnotes and references (which are missing their corresponding reference or
footnote), and ensures that the numbering is always correct. This means that
you can delete a footnote, and be certain that Zettlr will have removed the
now-dangling reference, too. The same applies if you remove a reference that
you no longer need. Lastly, deleting footnotes becomes more convenient. Now,
if you delete characters and reach a footnote, Zettlr will first select the
entire footnote to visually indicate that you are about to delete a footnote,
then a second deletion will remove the entire footnote at once. - Feature: Fully hide both titlebar and toolbar if the setting "Hide
toolbar in distraction free" is on, the user has activated distraction free
and the window is in fullscreen. This means that, while Zettlr is not in
fullscreen, there will always be either a titlebar or toolbar to move the
window around, but in fullscreen, the editor can take up the entire window
area (#3999). - Change: Zettlr now monitors your documents and will automatically remove
footnotes and references without the corresponding reference or footnote. If
you have any documents in which you have un-referenced footnotes, or
references that are currently unused, please make sure to change this before
updating. - Change: Snippets: The
$FILENAMEvariable now does not contain the file
extension anymore. Users who also want the extension should update their
snippets to$FILENAME$EXTENSION(#4191). - Change: The word and character counters in the statusbar now always show
both counts. - Change: Modified the Zettelkasten link insertion workflow. The previous
settings "Link with filename only" and "When linking files, add the document
name …" have been removed. Instead, there are two new settings, "Always use
the file title as label for internal links" and "Use the file ID as link
target if possible." The first new setting will always insert the detected
file title (YAML frontmatter title; first heading level 1; filename) as the
link label. If disabled, Zettlr will always create links without labels. The
second setting controls whether Zettlr will always use filenames to link to
files, or use IDs where available. - A11y: Zettlr now respects if you choose to reduce transparency in system
settings and no longer add window vibrancy on macOS. - Snippets can now be nested (#5939).
- You can now show an item in Finder/Explorer/file browser when right-clicking a
document tab (#5914). - Fixed inline math not rendering when transforming Markdown to HTML (e.g., in
footnotes). - The diagnostics info field in the statusbar now toggles the lint panel,
instead of only opening the panel (#5847). - Fixed WebP images not rendering from relative paths (#5181).
- Fixed the behavior when clicking widgets (citations, etc.) to accurately
select only the widget's source text (#5682). - Update
it-ITtranslations (#5831). - Update
da-DAtranslations (#5868). - Update
de-DEtranslations. - Added support for
nixsyntax highlighting (#5954). - Fixed incorrect cursor position after inserting IDs (#5846).
- The toolbar word counter no longer wraps (#5774; #5881).
- Fix context menu entry "Insert table" not working (#5835).
- The keyboard shortcuts for snippets no longer require the field, thus
preventing errors inEditorViews that map the corresponding shortcuts but
don't have snippets installed. - The three-way-toggle for the file manager and global search does not wrap on
Windows anymore (#5876). - The toolbar can now scroll left and right if the main window is too narrow
(#5873; #5022). - Popovers (especially in the toolbar) will now properly close when clicking the
associated toolbar button a second time (#5870). - Style improvements: linter panel dark mode (#5882); drop cursor (#5883);
export, pomodoro, and tags popover (#5895); spacing in file manager tree view
(#5891); global search (#5894). - Switched the icons for code and comments in the formatting toolbar (#5901).
- The word counter now uses a proper segmenter that will make the word count
more accurate for languages that do not use spaces to separate words (#5898). - Fixed the tutorial pages not correctly opening on first start.
- Improved the macOS tray icon display.
- Single clicks on the tray icon now activate the app (#4267).
- Fixed footnote placing edge cases.
- Due to updates in Apple's Human Interface Guidelines, the main process now no
longer removes accelerators/keyboard shortcuts from the menus. - The recent documents provider now uses the OS API to return a list of recent
documents. The provider is only retained for Linux at this point. - Improved performance for documents with many and/or large tables (#5903).
- Fixes print functionality by completely abandoning the
iframeapproach and
switching to the built-in Markdown-to-HTML parser. - Fixed the user dictionary not persisting to disk under certain conditions
(#5922). - The toolbar update button now includes a clearly visible label indicating that
an update is available, making it less likely to miss it. - Improved the styling and labelling of the additional attachment extensions
setting in the advanced settings - The citation context menu now shows rendered citations instead of the raw
citation keys, and utilizes macOS'ssublabelfeature to describe the context
menu items. - Changed default config settings for new installations:
- Dark mode is now preset to true if the OS reports that it uses dark colors.
- Vibrancy on macOS is now set to true only if the user does not prefer
reduced transparency.
- Improved drag-and-drop behavior in the table of contents (#5871).
- Improved the layout of the assets window (#5942).
- Improved performance impact of references tab by only updating the
bibliography on save, not on every keystroke (#5518). - Fixed images with brackets in the filename from not showing up (#3825).
- Switched the window controls on Windows computers to the native controls. This
will enable a set of additional OS-level functionality (such as hovering over
the maximize-button to show a split-screen menu). - Fixed a bug that would not assign the correct footnote body class to footnote
bodies. Now, footnotes will be rendered in a smaller font size and can be
styled as a block. - Made the dark editor background less black, and increase contrast of the dark
selection background for the Karl-Marx-Stadt theme. - Indentation preferences from the main settings now also apply to code editors
where applicable. - The emphasis renderer now also hides formatting characters for footnote
reference labels. - Images and links will now be detected more robustly (#5964).
- Improved parsing footnotes (especially with multi-paragraph contents) (#5968).
- Improved Markdown-to-HTML conversion (#5968).
- Fixed image parsing for images with no ALT-text (#5963).
- Horizontal scrolling in the "thin" file manager mode is no longer restricted
to macOS, and also available on Linux and Windows. - Fixed the config provider never announcing to the renderers when the user
added or removed a workspace/root file. - Fixed an issue where the sorting doesn't automatically re-apply (#5938;
#5184). - Fixed an issue where not all file-links have been reported to the file
autocomplete (#5920). - Fixed some issues with the file manager not properly reacting to changes in
the loaded files (#5784; #5773; #5594). - Fixed an issue with deleting files outside of loaded workspaces (#5345).
- Increased the dropzone size for moving files around and splitting/merging the
various editor panes. - The Update provider does not show error boxes anymore if the update check
failed due to a timeout (#5944). - Links in headers are now properly accounted for (#5983).
- Headers level 1 will now be rendered to plain text for the purpose of
displaying in various places (document tabs, file manager, etc.) (#5983). - Newly created defaults files will now be directly selected so that you can
directly start editing them. - Fixed the selected directory not uncollapsing upon boot (#5156).
- Fixed the smooth cursor animation, which stopped working in Zettlr 3.0 due to
the switch from CodeMirror 5 to CodeMirror 6.
Under the Hood
- Update Electron to version
39.0.0. - Update Pandoc to version
3.8.2.1. - Feature/Change: Full rewrite of the File System Abstraction Layer (FSAL).
The rewrite has fully transformed the file abstraction logic to remove any
tree structures, and instead mostly treat all loaded files as a single, long
list of files and folders. Any type of tree structure is now purely visual and
left where it needs to be (that is, the file tree and file list components
that do show the files in a tree structure). In addition, we have implemented
a set of improvements that should make everything work much smoother; in no
particular order:- Remove any tree data structures pertaining to the loaded files. This
includes the full removal of theWorkspacesProvider, whose job it
essentially only was to maintain those tree structures. We now treat files
as well as the change events emitted by the watchdog (to observe any remote
changes) as a flat stream of events. - Rewrote the
WorkspaceStorein the renderer to reflect this change, thus
reducing the store's size by a lot. The store now only maintains a big list
of loaded paths, as well as all descriptors in aMapstructure. - The events from the file watchers are now emitted directly from the FSAL;
there is no round trip through the WorkspaceProvider anymore. - Notably,
DirDescriptorstructures no longer contain any reference to
children, since we do not read in any descriptors recursively anymore.
Instead, consumers ofDirDescriptors will now make a second roundtrip to
fetch any direct descendants of a directory. Recursion is now implicit in
the way the tree-like structures in the Vue components have been
implemented. - Sorting has now been pushed to the edge in that the main process does no
longer concern itself with sorting. That only happens right where it's
needed from now on; that is: the file manager and the project properties.
This makes sorting more reactive to configuration changes (since it now
happens automagically due to Vue's reactivity instead of having to listen
for relevant events and not forget to manually do it in main), and
maintenance much easier. - Removed the
rootproperty on descriptors, since this is not dependent on
the file system state and can easily be computed on demand.
- Remove any tree data structures pertaining to the loaded files. This
- Since CSS has become quite powerful, move all LESS-files to CSS.
- Debounce the splash screen update frequency to at most 60fps to reduce the
load on the IPC pipe while the screen is shown. - Added new
curlyrule to ESLint, enforcing curly brackets for block-statement
declarations (if,for,while, etc.). - The
enabledproperty of context menu items is now optional, and defaults to
true. EditorPanes will no longer load all documents at the same time, and instead
reuse the existingMarkdownEditorcomponent for a single document. This
greatly reduces memory consumption, especially for very full tab bars, since
only a single document will be actively rendered at any one time.- Moved the previously shared common types for the context menu in the renderer
into the correct module to colocate the code. The shared types have been a
remnant from a time before TypeScript supported thetypekeyword, and will
subsequently be removed. - Moved the
DirectedGraphclass from the link provider to the stats window. - Switched back from
electron-devtools-assemblerto
electron-devtools-installer; now the Vue.js devtools extension works again. - Style groups in form builder fields now support a label that will be rendered
atop of these groups. - Zettlr now records and remembers the binary's build date. This information is
shown in the debug info to help pinpoint from when a version is. In addition,
this information is now used to disambiguate nightly versions so that both the
FSAL cache will be cleared more regularly, and you get a visual indicator that
you did update your nightly release. - The AST parser now properly detects task lists, and the Markdown-to-HTML
converter appropriately handles them. - Improved list form controls. They now allow customizing the delete label and
provide a custom "No records" message. - The
rangeInSelectionutility function now accepts an optional parameter that
allows inclusion of adjacent selection ranges in calculating the result. This
allows, e.g., renderers to detect whether a selection touches a node-to-be-
rendered. - Added a loading spinner component that can be used to indicate that something
is loading. - Context menu items now can have an
actionproperty, which is a simple
function that will be called when the item is clicked. Those items do not have
to have an ID (which is now an optional property). Items with IDs and without
actions will still call the provided callback function. - The Markdown AST parser now also emits
labelFromandlabelTo-properties
for footnote references for easy access to the reference label. - If loading a window fails due to whatever reason, the corresponding error will
now be shown to the user using an error dialog. - Aligned the math parser to the internal CodeMirror APIs (#5971).
- Zettlr now declares nightly releases via the build flags instead of prerelease
(e.g.,4.0.0-beta+nightlyinstead of4.0.0-beta-nightly), since the
previous way of declaring betas would make the internal semver check would
declare4.0.0-beta-nightlyto be the same as4.0.0-beta.1-nightly. - Zettlr now properly offers updating to a newer prerelease versions if users
are on a nightly version (e.g.,beta->beta.1). - Log any error output from the Pandoc update script if the process failed
(#5864). - The window manager now emits fullscreen state change events to the main
windows. This allows Custom CSS and other parts of the state to subscribe to
whether thebodyhas thefullscreenclass and perform changes.
New Contributors
Full Changelog: v4.0.0-beta.1...v4.0.0-beta.2