Clean up the "User Interface" section

This commit is contained in:
Veronica Berglyd Olsen
2025-05-26 22:39:03 +02:00
parent acfef7b4cb
commit caa1a7653d
8 changed files with 161 additions and 156 deletions
+73 -69
View File
@@ -20,8 +20,7 @@ Editing a Document
To edit a document, double-click it in the project tree, press the :kbd:`Return` key while having
it selected, or drag and drop it onto the editor panel. This will open the document in the document
editor. The editor uses a Markdown-like syntax for some features, and a novelWriter-specific syntax
for others.
editor.
The editor has a maximise button, which toggles the **Focus Mode**, and a close button in the
top--right corner. On the top--left side you will find a tools button that opens a toolbar with a
@@ -37,35 +36,33 @@ be shown. This can be set in **Preferences**.
Clicking on the document title bar will select the document in the project tree and thus reveal
its location there, making it easier to find in a large project.
Any references in the editor can be opened in the viewer by moving the cursor to
the label and pressing :kbd:`Ctrl+Return`. You can also control-click them with your mouse.
Any references in the editor can be opened in the viewer by moving the cursor to the label and
pressing :kbd:`Ctrl+Return`. You can also control-click them with your mouse.
Spell Checking
--------------
A third party library called Enchant is used for spell checking in the editor. The controls for
spell checking can be found in the **Tools** menu. You can also set spell checking language in
spell checking are found in the **Tools** menu. You can also set spell checking language in
**Project Settings**.
This spell checking library comes with support for custom words that you can add by selecting
"Add Word to Dictionary" from the context menu when a word is highlighted by the spell checker as
misspelled. The custom words are managed on a per-project basis, and can the list of words can be
misspelled. The custom words are managed on a per-project basis, and the list of words can be
edited from the **Project Word List** tool available from the **Tools** menu.
.. note::
Generally, spell checking dictionaries are collected from your operating system, but on Windows
they are not. See :ref:`docs_more_custom_dict` for how to add spell checking dictionaries on Windows.
.. versionadded:: 2.2
they are not. See :ref:`docs_more_custom_dict` for how to add spell checking dictionaries on
Windows.
Word Counts
-----------
A character, word and paragraph count is maintained for each document, as well as for each section
A character, word, and paragraph count is maintained for each document, as well as for each section
of a document following a heading. The word count and change of words in the current session is
displayed in the footer of any document open in the editor, and all stats are shown in the details
panel below the project tree for any document selected in the project or novel trees.
@@ -74,57 +71,18 @@ The word counts are not updated in real time, but run in the background every fe
long as the document is being actively edited.
A total project word count is displayed in the status bar. The total count depends on the sum of
the values in the project tree, which again depend on an up to date project index. If the
counts seem wrong, a full project word recount can be initiated by rebuilding the project's index.
Either from the **Tools** menu, or by pressing :kbd:`F9`.
the values in the project tree, which again depend on an up to date project index. If the counts
seem wrong, a full project word recount can be initiated by rebuilding the project's index. Either
from the **Tools** menu, or by pressing :kbd:`F9`.
The rules for how the counts are made is covered in more detail in :ref:`docs_more_counting`.
.. tip::
.. _docs_ui_edit_view_view:
For some languages, character count is the more interesting statistics. You can select to
display character count instead of word count in the user interface in **Preferences**.
Viewing a Document
==================
.. figure:: images/fig_viewer.png
A screenshot of the Document Viewer panel.
Any document in the project tree can also be viewed in parallel in a right hand side document
viewer. To view a document, press :kbd:`Ctrl+R`, select **View Document** in the menu or context
menu, or drag and drop the document onto the viewer panel. If you have a middle mouse button,
middle-clicking on the document will also open it in the viewer.
The document viewed does not have to be the same document as the one currently being edited.
However, If you *are* viewing the same document, pressing :kbd:`Ctrl+R` from the editor will update
the document with your latest changes. You can also press the reload button in the top--right
corner of the viewer panel, next to the close button, to achieve the same thing.
In the viewer `references<reference>` become clickable links. Clicking them will replace the
content of the viewer with the content of the document the reference points to.
The document viewer keeps a history of viewed documents, which you can navigate with the arrow
buttons in the top--left corner of the viewer. If your mouse has backward and forward navigation
buttons, these can be used as well. They work just like the backward and forward features in a
browser. The left-most button is a dropdown menu for quickly navigation between headings in the
document. The edit button on the right will open the viewed document in the editor.
At the bottom of the view panel there is a **References** panel. (If it is hidden, click the button
on the left side of the footer area to reveal it.) This panel contains a References tab with links
to all documents referring back to the one you're currently viewing, if any has been defined. If
you have created root folders and tags for various story elements like characters and plot points,
these will appear as additional tabs in this panel.
.. note::
The **References** panel relies on an up-to-date `index<project index>` of the project.
The index is maintained automatically. However, if anything is missing, or seems wrong, the
index can always be rebuilt by selecting **Rebuild Index** from the **Tools** menu, or by
pressing :kbd:`F9`.
.. versionadded:: 2.2
The reference panel was redesigned and the additional tabs added.
.. versionadded:: 2.7
.. _docs_ui_edit_view_search:
@@ -150,12 +108,6 @@ document when reaching the end. There is also a switch that will try to match th
when the replacement is made. That is, it will try to keep the word upper, lower, or capitalised to
match the word being replaced.
.. seealso::
For more information on the capabilities of the Regular Expression option, see the Qt
documentation for the `QRegularExpression <https://doc.qt.io/qt-6/qregularexpression.html>`_
class.
.. _docs_ui_edit_view_auto:
@@ -171,14 +123,66 @@ auto-replace feature from **Preferences**. You can also disable this feature ent
the :guilabel:`Insert` menu, and via :ref:`docs_features_shortcuts_insert`. You may also be
using a `Compose Key`_ setup, which means you may not need the auto-replace feature at all.
The editor is able to replace two and three hyphens with short and long dashes, triple points with
ellipsis, and replace straight single and double quotes with user-defined quote symbols. It will
also try to determine whether to use the opening or closing symbol, although this feature isn't
always accurate. Especially distinguishing between closing single quote and apostrophe can be
tricky for languages that use the same symbol for these, like English does.
The editor is able to replace two and three hyphens with short and long dashes, four dashes with a
horizontal bar, three dots with ellipsis, and replace straight single and double quotes with
user-defined quote symbols. It will also try to determine whether to use the opening or closing
symbol, although this feature isn't always accurate. Especially distinguishing between closing
single quote and apostrophe can be tricky for languages that use the same symbol for these, like
English does.
.. tip::
If the auto-replace feature changes a symbol when you did not want it to change, pressing
:kbd:`Ctrl+Z` once after the auto-replacement will undo it without undoing the character
you typed before it.
you typed.
.. _docs_ui_edit_view_view:
Viewing a Document
==================
.. figure:: images/fig_viewer.png
A screenshot of the Document Viewer panel.
Any document in the project tree can also be viewed in parallel in a right hand side document
viewer. To view a document, press :kbd:`Ctrl+R`, select **View Document** in the menu or context
menu, or drag and drop the document onto the viewer panel. If you have a middle mouse button,
middle-clicking on the document will also open it in the viewer.
The document viewed does not have to be the same document as the one currently being edited.
However, If you *are* viewing the same document, pressing :kbd:`Ctrl+R` from the editor will update
the document with your latest changes. You can also press the reload button in the top--right
corner of the viewer panel, next to the close button, to achieve the same thing.
In the viewer, references become clickable links. Clicking them will replace the content of the
viewer with the content of the document the reference points to.
The document viewer keeps a history of viewed documents, which you can navigate with the arrow
buttons in the top--left corner of the viewer. If your mouse has backward and forward navigation
buttons, these can be used as well. They work just like the backward and forward features in a
browser. The left-most button is a dropdown menu for quickly navigation between headings in the
document. The edit button on the right will open the viewed document in the editor.
.. _docs_ui_edit_view_view_references:
Document References
-------------------
At the bottom of the viewer panel you will find a **References** panel. (If it is hidden, click the
button on the left side of the footer area to reveal it.) This panel contains a References tab with
links to all documents referring back to the one you're currently viewing, if any has been defined.
If you have created root folders and tags for various story elements like characters and plot
points, these will appear as additional tabs in this panel.
.. note::
The **References** panel relies on an up-to-date project index. The index is maintained
automatically. However, if anything is missing, or seems wrong, the index can always be rebuilt
by selecting **Rebuild Index** from the **Tools** menu, or by pressing :kbd:`F9`.
.. versionadded:: 2.2
The reference panel was redesigned and the additional tabs added.