Updated the remaining sections of the docs

This commit is contained in:
Veronica K. B. Olsen
2021-01-01 19:44:17 +01:00
parent 92f44f0aaa
commit 8ad2da30ca
5 changed files with 200 additions and 173 deletions
+26 -23
View File
@@ -10,11 +10,11 @@ This section contains details of how novelWriter stores and handles the project
How Data is Stored How Data is Stored
================== ==================
All novelWriter files are written with utf-8 encoding. Since Python automatically converts Unix line All novelWriter files are written with utf-8 encoding. Since Python automatically converts Unix
endings to Windows line endings on Windows systems, novelWriter does not make any adaptations to the line endings to Windows line endings on Windows systems, novelWriter does not make any adaptations
formatting on Windows systems. This is handled entirely by the Python standard library. Python also to the formatting on Windows systems. This is handled entirely by the Python standard library.
handles this fairly well when working on the same files on both Windows and Unix-based operating Python also handles this fairly well when working on the same files on both Windows and Unix-based
systems. operating systems.
Main Project File Main Project File
@@ -44,29 +44,31 @@ Project Documents
The project documents are saved in a folder in the main project folder named ``content``. Each The project documents are saved in a folder in the main project folder named ``content``. Each
document has a file handle taken from the first 13 characters of a SHA256 hash of the system time document has a file handle taken from the first 13 characters of a SHA256 hash of the system time
when the file was first created. The documents are saved with a filename assembled from this hash when the document was first created. The documents are saved with a filename assembled from this
and the file extension ``.nwd``. hash and the file extension ``.nwd``.
If you wish to find the physical location of a file in the project, you can either look it up in the If you wish to find the physical location of a document in the project, you can either look it up
project XML file, select :guilabel:`Show File Details` from the :guilabel:`Document` menu when in the project XML file, select :guilabel:`Show File Details` from the :guilabel:`Document` menu
having the document open, or look in the ``ToC.txt`` file in the root of the project folder. when having the document open, or look in the ``ToC.txt`` file in the root of the project folder.
The ``ToC.txt`` file has a list of all document files in the project and where they are saved. The ``ToC.txt`` file has a list of all document files in the project and where they are saved.
The reason for this cryptic file naming is to avoid issues with file naming conventions and The reason for this cryptic file naming is to avoid issues with file naming conventions and
restrictions on different operating systems, and also to have a file name that does not depend on restrictions on different operating systems, and also to have a file name that does not depend on
what the user names the files, or changes it to. The file meta data in the tree view, except the what the user names the document within the project, or changes it to. The file meta data in the
file label, is only saved in the project XML file. project tree is mainly saved in the project XML file, although some basic meta data is added to the
header of each document file.
Each document file contains a plain text version of the text from the editor. The file can in Each document file contains a plain text version of the text from the editor. The file can in
principle be edited in any text editor, and is suitable for diffing and version control if so principle be edited in any text editor, and is suitable for diffing and version control if so
desired. Just make sure the file remains in utf-8 encoding, otherwise unicode chatracters may become desired. Just make sure the file remains in utf-8 encoding, otherwise unicode chatracters may
mangled when the file is opened in novelWriter again. become mangled when the file is opened in novelWriter again.
The first line of the file contains some meta data starting with the characters ``%%~``. This line The first lines of the file may contain some meta data starting with the characters ``%%~``. These
is mainly there to restore some information if it is lost from the project file, and the information lines are mainly there to restore some information if it is lost from the project file, and the
may be helpful if you do open the file in an external editor as it contains the file label as the information may be helpful if you do open the file in an external editor as it contains the
last entry. The line can be deleted without any consequences to the rest of the content of the file, document label and the document class and layout. The lines can be deleted without any consequences
and will be added back the next time the file is saved in novelWriter. to the rest of the content of the file, and will be added back the next time the document is saved
in novelWriter.
The File Saving Process The File Saving Process
@@ -75,8 +77,9 @@ The File Saving Process
When saving the project file, or any of the documents, the data is first saved to a temporary file. When saving the project file, or any of the documents, the data is first saved to a temporary file.
If successful, the old data file is removed, and the temporary file becomes the new file. This If successful, the old data file is removed, and the temporary file becomes the new file. This
ensures that the previously saved data is only replaced when the new data has been successfully ensures that the previously saved data is only replaced when the new data has been successfully
saved. saved to the storage medium.
For the project XML file, a ``.bak`` file is kept which will always contain the previous version of For the project XML file, a ``.bak`` file is in addition kept, which will always contain the
the file, although when auto-save is enabled, they may have the same content. If the opening of a previous version of the file, although when auto-save is enabled, they may have the same content.
project file fails, novelWriter will automatically try to open the ``.bak`` file instead. If the opening of a project file fails, novelWriter will automatically try to open the ``.bak``
file instead.
+29 -26
View File
@@ -23,12 +23,13 @@ a series of keywordreplace steps. They are all on the format ``%keyword%``.
``%ch%`` ``%ch%``
This is replaced by a chapter number. The number is incremented by one each time the build tool This is replaced by a chapter number. The number is incremented by one each time the build tool
sees a new heading of level two in a file with layout :guilabel:`Chapter`. If the file has layout sees a new heading of level two in a document with layout :guilabel:`Chapter`. If the document
:guilabel:`Unnumbered`, the counter is *not* incremented. The latter is useful for for instance has layout :guilabel:`Unnumbered`, the counter is *not* incremented. The latter is useful for
Prologue and Epilogue chapters. for instance Prologue and Epilogue chapters.
``%chw%`` ``%chw%``
This is like ``%ch%``, but the number is expressed as a word like for instance "One", "Two", etc. This is like ``%ch%``, but the number is expressed as a word like for instance "One", "Two",
etc.
``%chi%`` ``%chi%``
This is also like ``%ch%``, but the number is represented as a lower case Roman number. This is also like ``%ch%``, but the number is represented as a lower case Roman number.
@@ -49,7 +50,7 @@ a series of keywordreplace steps. They are all on the format ``%keyword%``.
This inserts a line break within the title. This inserts a line break within the title.
.. note:: .. note::
Header formatting only applies to novel files. Headings in note files will will be left as-is on Header formatting only applies to novel documents. Headings in notes will be left as-is on
export. However, heading levels 1 through 4 are converted to the correct heading level in the export. However, heading levels 1 through 4 are converted to the correct heading level in the
respective output formats. respective output formats.
@@ -65,8 +66,8 @@ a series of keywordreplace steps. They are all on the format ``%keyword%``.
Scene Separators Scene Separators
================ ================
If you don't want any titles for your scenes (and for your sections if you have them), you can leave If you don't want any titles for your scenes (or for your sections if you have them), you can leave
the boxes empty, and an empty paragraph will be inserted between the scenes or sections instead. the boxes empty. If so, an empty paragraph will be inserted between the scenes or sections instead.
Alternatively, if you want a separator between them, like the common ``* * *``, you can also enter Alternatively, if you want a separator between them, like the common ``* * *``, you can also enter
that in the box. In fact, if the format is a piece of static text, it will always be treated as a that in the box. In fact, if the format is a piece of static text, it will always be treated as a
@@ -78,10 +79,11 @@ separator.
File Selection File Selection
============== ==============
Which files are selected for export can also be controlled from the options on the left side of the Which document files are selected for export can be controlled from the options on the left side of
dialog window. The switch for :guilabel:`Include novel files` will select any file that isn't the dialog window. The switch for :guilabel:`Include novel files` will select any document that
classified as a note. The switch for :guilabel:`Include note files` will select any file that *is* isn't classified as a note. The switch for :guilabel:`Include note files` will select any document
a note. This is allows for exporting just the novel, just your notes, or both, as you see fit. that *is* a note. This is allows for exporting just the novel, just your notes, or both, as you see
fit.
In addition, you can select to export the synopsis comments, regular comments, keywords, and even In addition, you can select to export the synopsis comments, regular comments, keywords, and even
exclude the body text itself. exclude the body text itself.
@@ -91,11 +93,12 @@ exclude the body text itself.
keywords and synopsis export and disable body text, thus getting a document with each heading keywords and synopsis export and disable body text, thus getting a document with each heading
followed by the tags and references and the synopsis. followed by the tags and references and the synopsis.
If you need to exclude specific files from your exports, like draft files or files you want to take If you need to exclude specific documents from your exports, like draft documents or documents you
out of your manuscript, but don't want to delete, you can un-check the :guilabel:`Include when want to take out of your manuscript, but don't want to delete, you can un-check the
building project` option for each file in the project tree. An included file has a checkmark after :guilabel:`Include when building project` option for each document in the project tree. An included
the status icon in the :guilabel:`Flags` column. The :guilabel:`Build Novel Project` tool has a document has a checkmark after the status icon in the :guilabel:`Flags` column. The
switch to ignore this flag if you need to collectively override these settings. :guilabel:`Build Novel Project` tool has a switch to ignore this flag if you need to collectively
override these settings.
.. _a_export_formats: .. _a_export_formats:
@@ -107,26 +110,26 @@ Currently, six formats are supported for exporting.
OpenDocument Format OpenDocument Format
This produces an open document ``.odt`` file. The document produced has very little formatting, This produces an open document ``.odt`` file. The document produced has very little formatting,
and may require further editing afterwards. For a better formatted office document, you may get a and may require further editing afterwards. For a better formatted office document, you may get
better result with exporting to HTML and then import that HTML document into your office word a better result with exporting to HTML and then import that HTML document into your office word
processor. They are generally very good at importing HTML files. processor. They are generally very good at importing HTML documents.
PDF Format PDF Format
The PDF export is just a shortcut for print to file. For a better PDF result, you may instead The PDF export is just a shortcut for print to file. For a better PDF result, you may instead
want to export HTML, and use a word processor to convert the HTML document to PDF. want to export to HTML, and use a word processor to convert the HTML document to PDF.
novelWriter HTML novelWriter HTML
The HTML export format writes a single ``.htm`` file with minimal style formatting. The exported The HTML export format writes a single ``.htm`` file with minimal style formatting. The exported
HTML file is suitable for further processing by document conversion tools like Pandoc, for HTML document is suitable for further processing by document conversion tools like Pandoc, for
importing in word processors, or for printing from browser. It is generally the best formatted importing in word processors, or for printing from browser. It is generally the best formatted
export option and supports all features of novelWriter since it is entirely geenrated by the export option and supports all features of novelWriter since it is entirely geenrated by the
application and doesn't depend on Qt library features. application and doesn't depend on Qt library features.
novelWriter Markdown novelWriter Markdown
This is simply a concatenation of the files selected by the filters. The files in the project are This is simply a concatenation of the project documents selected by the filters. The documents
stacked together in the order they appear in the tree view, with comments, tags, etc. included if are stacked together in the order they appear in the project tree, with comments, tags, etc.
they are selected. This is a useful format for exporting the project for later import back into included if they are selected. This is a useful format for exporting the project for later
novelWriter. import back into novelWriter.
Standard Markdown Standard Markdown
If you have Qt 5.14 or higher, the option to export to plain markdown is available. This feature If you have Qt 5.14 or higher, the option to export to plain markdown is available. This feature
@@ -142,7 +145,7 @@ Additional Export Options
========================= =========================
In addition to the above document formats, the novelWriter HTML and Markdown formats can also be In addition to the above document formats, the novelWriter HTML and Markdown formats can also be
wrapped in a JSON file. The files will have a meta data entry and a body entry. For HTML, also the wrapped in a JSON file. These files will have a meta data entry and a body entry. For HTML, also
accompanying css styles are exported. accompanying css styles are exported.
The text body is saved in a two-level list. The outer list contains one entry per exported file, in The text body is saved in a two-level list. The outer list contains one entry per exported file, in
+21 -18
View File
@@ -4,15 +4,16 @@
Supporting Files (Notes) Supporting Files (Notes)
************************ ************************
novelWriter doesn't have a database and complicated forms to fill in all details about plot elements, novelWriter doesn't have a database and complicated forms to fill in all details about plot
characters, and all sorts of additional information that isn't a part of the novel text itself. elements, characters, and all sorts of additional information that isn't a part of the novel text
Instead, all such information is saved in notes. The relation between all these additional elements itself. Instead, all such information is saved in notes. The relation between all these additional
is extracted from these files by the project indexer based on the tags and references you set. elements is extracted from these documents by the project indexer based on the tags and references
you set.
These files are not required, but making at least minimal files for each such plot element, and adding These documents are not required, but making at least minimal files for each such plot element, and
a tag to them, makes it possible to use the :guilabel:`Outline` feature to see how each element adding a tag to them, makes it possible to use the :guilabel:`Outline` feature to see how each
intersects with each section of the novel itself, and adds clickable cross-references between element intersects with each section of the novel itself, and adds clickable cross-references
documents in the editor and viewer. between documents in the editor and viewer.
.. _a_notes_tags: .. _a_notes_tags:
@@ -20,9 +21,9 @@ documents in the editor and viewer.
Tags in Notes Tags in Notes
============= =============
Each new heading in a note file can have a tag associated with it. The format of a tag is Each new heading in a note can have a tag associated with it. The format of a tag is
``@tag: tagname``, where tagname is a unique identifier. Tags can then be referenced in the novel ``@tag: tagname``, where tagname is a unique identifier. Tags can then be referenced in the novel
files, or cross-referenced in other note files, and will show up in the outline view and in the documents, or cross-referenced in other notes, and will show up in the outline view and in the
back-reference panel when a document is being viewed. back-reference panel when a document is being viewed.
The syntax highlighter will alert the user that the keyword is correctly used and that the tag is The syntax highlighter will alert the user that the keyword is correctly used and that the tag is
@@ -30,15 +31,17 @@ allowed, that is, the tag is unique. Duplicate tags should be detected as long a
to date. An invalid tag should have a green wiggly line under it, and will not receive the syntax to date. An invalid tag should have a green wiggly line under it, and will not receive the syntax
colour that valid tags do. colour that valid tags do.
The tag is the only part of these files that the application uses. The rest of the file content is The tag is the only part of these notes that the application uses. The rest of the document content
there for the writer to use in whatever way they wish. Of course, the content of the files can be is there for the writer to use in whatever way they wish. Of course, the content of the documents
exported if you want to compile a single document of all your notes, or include them in an outline. can be exported if you want to compile a single document of all your notes, or include them in an
outline.
A note file can also reference other note files in the same way novel files do. When the note file A note can also reference other notes in the same way novel documents do. When the note is opened
is opened in the view panel, these become clickable links, making it easier to follow connections in in the view panel, the references become clickable links, making it easier to follow connections in
the plot. Note files don't show up in the outline view though, so referencing between notes is only the plot. Notes don't show up in the outline view though, so referencing between notes is only
meaningful if you want to be able to click-navigate between them. meaningful if you want to be able to click-navigate between them.
.. tip:: .. tip::
If you cross-reference between notes as well, and export your project as an HTML file using the If you cross-reference between notes and export your project as an HTML document using the
export tool, the cross-references become clickable in the exported document. :guilabel:`Build Novel Project` tool, the cross-references become clickable in the exported
HTML document as well.
+40 -30
View File
@@ -8,9 +8,11 @@ A novelWriter project requires a dedicated folder for storing its files on the l
See the :ref:`a_tech` page for further details on how files are organised. See the :ref:`a_tech` page for further details on how files are organised.
A new project can be created from the :guilabel:`Project` menu by selecting A new project can be created from the :guilabel:`Project` menu by selecting
:guilabel:`New Project`. A list of recently opened projects is maintained, and displayed in the :guilabel:`New Project`. This will open the :guilabel:`New Project Wizard` that will assist you in
:guilabel:`Open Project` dialog. A project can be removed from this list by selecting it and creating a barebone project suited to your needs.
pressing the :kbd:`Del` key.
A list of recently opened projects is maintained, and displayed in the :guilabel:`Open Project`
dialog. A project can be removed from this list by selecting it and pressing the :kbd:`Del` key.
The project specific settings are available in :guilabel:`Project Settings` in the The project specific settings are available in :guilabel:`Project Settings` in the
:guilabel:`Project` menu. See further details below in the :ref:`a_proj_settings` section. :guilabel:`Project` menu. See further details below in the :ref:`a_proj_settings` section.
@@ -28,7 +30,7 @@ The core novel files go into a root folder of type :guilabel:`Novel`. Other supp
into the other root folders. These other root folder types are intended for your notes on the into the other root folders. These other root folder types are intended for your notes on the
various elements of your story. Using these is of course entirely optional. various elements of your story. Using these is of course entirely optional.
A new project will not have all of the root folders present, but you can add the ones you want from A new project may not have all of the root folders present, but you can add the ones you want from
:guilabel:`Create Root Folder` in the :guilabel:`Project` menu. :guilabel:`Create Root Folder` in the :guilabel:`Project` menu.
The root folders are intended for the following use, but aside from the :guilabel:`Novel` folder, The root folders are intended for the following use, but aside from the :guilabel:`Novel` folder,
@@ -65,8 +67,8 @@ no restrictions are enforced by the application. You can use them however you wa
:guilabel:`Entities` :guilabel:`Entities`
Does your plot have many powerful organisations or companies? Or other entities that are part of Does your plot have many powerful organisations or companies? Or other entities that are part of
the plot? They can be organised here. Tags in this folder can be references using the ``@entity`` the plot? They can be organised here. Tags in this folder can be references using the
keyword. ``@entity`` keyword.
:guilabel:`Custom` :guilabel:`Custom`
The custom root folder can be used for tracking anything else not covered by the above options. The custom root folder can be used for tracking anything else not covered by the above options.
@@ -91,7 +93,7 @@ trash folder can then be deleted permanently, either individually, or by emptyin
the menu. Files in this folder are removed from the project index and cannot be referenced. the menu. Files in this folder are removed from the project index and cannot be referenced.
Folders and root folders can only be deleted when they are empty. Recursive deletion is not Folders and root folders can only be deleted when they are empty. Recursive deletion is not
supported. A document file or a folder can be deleted from the :guilabel:`project` menu, or by supported. A document file or a folder can be deleted from the :guilabel:`Project` menu, or by
pressing :kbd:`Ctrl`:kbd:`Del`. pressing :kbd:`Ctrl`:kbd:`Del`.
@@ -123,10 +125,11 @@ into the project if possible.
The discovered files are scanned for meta information that gives clues as to where the file may The discovered files are scanned for meta information that gives clues as to where the file may
previously have been located in the project. The project loading routines will try to put them back previously have been located in the project. The project loading routines will try to put them back
as close as possible to this location if it still exists. Generally, it will be appended to the end as close as possible to this location, if it still exists. Generally, it will be appended to the
of the folder where it previously was located. If that folder doesn't exist, it will try to add it end of the folder where it previously was located. If that folder doesn't exist, it will try to add
to the correct root folder. If it cannot figure out which root folder is correct, the file will be it to the correct root folder. If it cannot figure out which root folder is correct, the file will
added to the :guilabel:`Novel` root folder. be added to the :guilabel:`Novel` root folder. Only if the :guilabel:`Novel` folder is missing, it
will give up.
If the title of the file can be recovered, the word "Recovered:" will be added as a prefix. If the If the title of the file can be recovered, the word "Recovered:" will be added as a prefix. If the
title cannot be determined, the file will be named "Recovered File N" where N is a sequential title cannot be determined, the file will be named "Recovered File N" where N is a sequential
@@ -138,11 +141,11 @@ number.
Project Lockfile Project Lockfile
---------------- ----------------
To prevent orphaned files caused by file conflicts when novelWriter projects are synced with file To prevent lost files caused by file conflicts when novelWriter projects are synced with file
synchronisation tools, a project lockfile is written to the project folder. If you try to open a synchronisation tools, a project lockfile is written to the project folder. If you try to open a
project which has such a file present, you will be presented with a warning, and some information project which has such a file present, you will be presented with a warning, and some information
about where else novelWriter thinks the project is also open. You will be give the option to ignore about where else novelWriter thinks the project is also open. You will be give the option to ignore
this warning, and continue opening the project. this warning, and continue opening the project at your own risk.
.. note:: .. note::
If, for some reason, novelWriter crashes, the lock file may remain even if there are no other If, for some reason, novelWriter crashes, the lock file may remain even if there are no other
@@ -152,7 +155,8 @@ this warning, and continue opening the project.
.. warning:: .. warning::
If you choose to ignore the warning and continue opening the project, and multiple instances of If you choose to ignore the warning and continue opening the project, and multiple instances of
the project are in fact open, you are likely to cause inconsistencies and create diverging the project are in fact open, you are likely to cause inconsistencies and create diverging
project files, potentially resulting in loss of data and orphaned files. project files, potentially resulting in loss of data and orphaned files. You are not likely to
lose any actual text unless both instances have the same document open in the editor,
.. _a_proj_roots_dirs: .. _a_proj_roots_dirs:
@@ -178,18 +182,20 @@ Project Files
============= =============
New document files can be created from the :guilabel:`Document` menu, or by pressing New document files can be created from the :guilabel:`Document` menu, or by pressing
:kbd:`Ctrl`:kbd:`N` while in the Project Tree. This will create a new, empty file, and open the :kbd:`Ctrl`:kbd:`N` while in the project tree. This will create a new, empty file, and open the
:guilabel:`:Item Settings` dialog where the filename and various other settings can be changed. :guilabel:`:Item Settings` dialog where the filename and various other settings can be changed.
This dialog can also be opened again later from either the :guilabel:`Project` menu, selecting This dialog can also be opened again later from either the :guilabel:`Project` menu, selecting
:guilabel:`Edit Item`, or by pressing :kbd:`Ctrl`:kbd:`E` or :kbd:`F2` with the item selected. :guilabel:`Edit Project Item`, or by pressing :kbd:`Ctrl`:kbd:`E` or :kbd:`F2` with the item
selected.
The layout of the file is also defined here. For Novel files, the full list of layout options are The layout of the file is also defined here. For Novel files, the full list of layout options are
available. For non-Novel files, only "Note" is available. See :ref:`a_struct_layout` for more available. For non-Novel files, only "Note" is available. See :ref:`a_struct_layout` for more
details. details.
You can also select whether the file is by default included when building the project. This setting You can also select whether the document is by default included when building the project. This
can be overridden in the :guilabel:`Build Novel Project` tool if you wish to include them anyway. setting can be overridden in the :guilabel:`Build Novel Project` tool if you wish to include them
This is covered in the :ref:`a_export_files` section. anyway. This is covered in the :ref:`a_export_files` section. You can also toggle the included
state of a document from the right-click context menu.
.. _a_proj_files_counts: .. _a_proj_files_counts:
@@ -197,10 +203,10 @@ This is covered in the :ref:`a_export_files` section.
Word Counts Word Counts
----------- -----------
A character, word and paragraph count is maintained for each file, as well as for each section of a A character, word and paragraph count is maintained for each document, as well as for each section
file defined by a header. The word count, and change of words in the current session, is displayed of a document following a header. The word count, and change of words in the current session, is
in the footer of any document open in the editor, and all stats are shown in the details panel displayed in the footer of any document open in the editor, and all stats are shown in the details
below the project tree for any file selected. panel below the project tree for any file selected.
The word counts are not updated in real time, but run in the background every five seconds for as The word counts are not updated in real time, but run in the background every five seconds for as
long as the document is being actively edited. long as the document is being actively edited.
@@ -228,11 +234,11 @@ The :guilabel:`Settings` tab holds the project title and author settings.
The :guilabel:`Working Title` can be set to a different title than the :guilabel:`Book Title`. The The :guilabel:`Working Title` can be set to a different title than the :guilabel:`Book Title`. The
difference between them is simply that the :guilabel:`Working Title` is used for the GUI (main difference between them is simply that the :guilabel:`Working Title` is used for the GUI (main
window title) and for generating the backup files. The intention is that the :guilabel:`Working window title) and for generating the backup files. The intention is that the :guilabel:`Working
Title` should remain unchanged throughput the project, otherwise the name of exported files and Title` should remain unchanged throughout the project, otherwise the name of exported files and
backup files may change too. backup files may change too.
The :guilabel:`Book Title` and :guilabel:`Book Authors` settings are currently not used for The :guilabel:`Book Title` and :guilabel:`Book Authors` settings are currently not used for
anything, so setting then is just for the benefit of the author. Future, planned features will be anything, so setting then is just for the benefit of the author. Future, planned features may be
using them, and they are exported on some export formats in the :guilabel:`Build Novel Project` using them, and they are exported on some export formats in the :guilabel:`Build Novel Project`
tool. tool.
@@ -254,7 +260,7 @@ that can be applied to each file.
These are purely there for the user's convenience, and you are not required to use them for any These are purely there for the user's convenience, and you are not required to use them for any
other feature to work. No other part of novelWriter accesses this information. The intention is to other feature to work. No other part of novelWriter accesses this information. The intention is to
use these to indicate at what stage of completeion each novel file is, or how important the content use these to indicate at what stage of completion each novel file is, or how important the content
of a note file is to the plot. You don't have to use them this way, that's just what they were of a note file is to the plot. You don't have to use them this way, that's just what they were
intended for, but you can make them whatever you want. intended for, but you can make them whatever you want.
@@ -270,6 +276,9 @@ A set of automatically replaced keywords can be added in this tab. The keywords
will be replaced by the text in the right column when documents are opened in the viewer. They will will be replaced by the text in the right column when documents are opened in the viewer. They will
also be applied to exports. also be applied to exports.
The auto-replace feature will replace text in angle brackets that are also in this list. The syntax
highlighter will add an alternate colour to text marching the syntax.
.. note:: .. note::
A keyword cannot contain any spaces. The angle brackets are added by default, and when used in A keyword cannot contain any spaces. The angle brackets are added by default, and when used in
the text are a part of the keyword to be replaced. This is to ensure that parts of the text the text are a part of the keyword to be replaced. This is to ensure that parts of the text
@@ -298,17 +307,18 @@ Settings`.
:guilabel:`Project Settings`. This value is used to generate the folder name for the zip files. :guilabel:`Project Settings`. This value is used to generate the folder name for the zip files.
Without it, the backup will not run at all, but produce a warning message. Without it, the backup will not run at all, but produce a warning message.
.. _a_proj_stats: .. _a_proj_stats:
Writing Statistics Writing Statistics
================== ==================
When you work on your project, a log file records when you opened it, when you closed it, and how When you work on your project, a log file records when you opened it, when you closed it, and the
many words you added to your novel and note files during the session. You can view this file in the latest total word counts of your novel and note files after the session. You can view this file in
``meta`` folder in the directory where you saved your project. The file is named the ``meta`` folder in the directory where you saved your project. The file is named
``sessionStats.log``. ``sessionStats.log``.
A small tool to view the content of this file is available in the :guilabel:`Tools` menu under A tool to view the content of this file is available in the :guilabel:`Tools` menu under
:guilabel:`Writing Statistics`. You can also launch it by pressing :kbd:`F6`. :guilabel:`Writing Statistics`. You can also launch it by pressing :kbd:`F6`.
The tool will show a list of all your sessions, and a set of filters to apply to it. You can also The tool will show a list of all your sessions, and a set of filters to apply to it. You can also
+84 -76
View File
@@ -6,8 +6,8 @@ Novel Structure
This section covers the structure of a novel project. This section covers the structure of a novel project.
This section concerns files under the Novel type root folder only. There are some restrictions It concerns documents under the Novel type root folder only. There are some restrictions and
and features that only apply to these types of files. features that only apply to these types of documents.
.. _a_struct_heads: .. _a_struct_heads:
@@ -16,7 +16,7 @@ Importance of Headings
====================== ======================
Subfolders under root folders have no impact on the structure of the novel itself. The structure is Subfolders under root folders have no impact on the structure of the novel itself. The structure is
instead dictated by the heading level of the headers within the document files. instead dictated by the heading level of the headers within the documents.
Four levels of headings are supported, signified by the number of hashes preceding the title. See Four levels of headings are supported, signified by the number of hashes preceding the title. See
also the :ref:`a_ui_md` section for more details about the markdown syntax. also the :ref:`a_ui_md` section for more details about the markdown syntax.
@@ -31,29 +31,31 @@ way:
``# Header1`` ``# Header1``
Header level one signifies that the text refers to either the novel title or the name of a top Header level one signifies that the text refers to either the novel title or the name of a top
level partition when you want to split the manuscript up into books, parts, or acts. level partition useful when you want to split the manuscript up into books, parts, or acts.
``## Header2`` ``## Header2``
Header level two signifies a chapter level partition. Each time you want to start a new chapter, Header level two signifies a chapter level partition. Each time you want to start a new chapter,
you must add such a heading. If you choose to split your manuscript up into one file per scene, you must add such a heading. If you choose to split your manuscript up into one document per
you need a single chapter file with just the heading. You can of course also add a synopsis and scene, you need a single chapter document with just the heading. You can of course also add a
reference keywords to the chapter file. If you want to open the chapter with a quote, this is synopsis and reference keywords to the chapter document. If you want to open the chapter with a
also where you'd put the text for that. quote or other introductory text that isn't part of a scene, this is also where you'd put that
text.
``### Header3`` ``### Header3``
Header level three signifies a scene level partition. The title itself can be replaced with a Header level three signifies a scene level partition. You must provide a title text, but the
scene separator or just skipped entirely when you export your manuscript. title text can be replaced with a scene separator or just skipped entirely when you export your
manuscript.
``#### Header4`` ``#### Header4``
Header level four signifies a sub-scene level partition, usually called just a section in the Header level four signifies a sub-scene level partition, usually called just a section in the
documentation and user interface. These can be useful if you want to change tag references documentation and user interface. These can be useful if you want to change tag references
mid-scene, like if you change the point-of-view character. You are free to use sections as you mid-scene, like if you change the point-of-view character. You are free to use sections as you
wish also in novel files, and can filter the titles out of the final manuscript just like with wish, and can filter the titles out of the final manuscript just like with scene titles.
scene titles.
There are multiple options of how to process novel titles when exporting the manuscript. For .. tip::
instance, chapter numbers can be applied automatically, and so can scene numbers if you want them in There are multiple options of how to process novel titles when exporting the manuscript. For
a draft manuscript. See the :ref:`a_export` page for more details. instance, chapter numbers can be applied automatically, and so can scene numbers if you want
them in a draft manuscript. See the :ref:`a_export` page for more details.
.. _a_struct_heads_unnum: .. _a_struct_heads_unnum:
@@ -61,11 +63,11 @@ a draft manuscript. See the :ref:`a_export` page for more details.
Unnumbered Chapter Headings Unnumbered Chapter Headings
--------------------------- ---------------------------
If you use file layout types for your files, the automatic numbering feature for your chapters is If you use layout types for your documents, the automatic numbering feature for your chapters is
controlled by whether you use the :guilabel:`Chapter` or :guilabel:`Unnumbered` layout type for your controlled by whether you use the :guilabel:`Chapter` or :guilabel:`Unnumbered` layout type for
file. However, if you have a different file layout where this isn't practical, you can also switch your document. However, if you have a different document layout where this isn't practical, you can
off chapter numbering for a chapter by making the first character of the chapter title an ``*``. also switch off chapter numbering for a chapter by making the first character of the chapter title
Like so: an ``*``. Like so:
``## *Unnumbered Chapter Title`` ``## *Unnumbered Chapter Title``
@@ -74,7 +76,8 @@ removed before inserted at the location of the ``%title%`` label. See the :ref:`
more details. more details.
.. note:: .. note::
If you need the first character of the title to be an actual asterisk, you must escape it: ``\*``. If you need the first character of the title to be an actual asterisk, you must escape it like
so: ``\*``.
.. _a_struct_tags: .. _a_struct_tags:
@@ -82,12 +85,13 @@ more details.
Tag References Tag References
============== ==============
Each text section indicated by a heading of any level, can contain references to tags set in the Each text partition indicated by a heading of any level, can contain references to tags set in the
supporting files of the project. The references are gathered by the indexer and used to generate the supporting documents of the project. The references are gathered by the indexer and used to
outline view on the :guilabel:`Outline` tab of how the different parts of the novel are connected. generate the outline view on the :guilabel:`Outline` tab of how the different parts of the novel
are connected.
References and tags are also clickable in the document editor and viewer, making it easy to navigate References and tags are also clickable in the document editor and viewer, making it easy to
between reference notes while writing. Clicked links are always opened in the view panel. navigate between reference notes while writing. Clicked links are always opened in the view panel.
References are set as a keyword and a list of corresponding tags. The valid keywords are listed References are set as a keyword and a list of corresponding tags. The valid keywords are listed
below. The format of a reference line is ``@keyword: value1, [value2] ... [valueN]``. All keywords below. The format of a reference line is ``@keyword: value1, [value2] ... [valueN]``. All keywords
@@ -98,8 +102,8 @@ allow multiple values.
:guilabel:`Character` type root folder. :guilabel:`Character` type root folder.
``@char`` ``@char``
Other characters in the current section. The target must be a note tag in a :guilabel:`Character` Other characters in the current section. The target must be a note tag in a
type root folder. This should not include the point-of-view character(s). :guilabel:`Character` type root folder. This should not include the point-of-view character(s).
``@plot`` ``@plot``
The plot or subplot advanced in the current section. The target must be a note tag in a The plot or subplot advanced in the current section. The target must be a note tag in a
@@ -118,50 +122,50 @@ allow multiple values.
type root folder. type root folder.
``@entity`` ``@entity``
Entities present in the current section. The target must be a note tag in an :guilabel:`Entities` Entities present in the current section. The target must be a note tag in an
type root folder. :guilabel:`Entities` type root folder.
``@custom`` ``@custom``
Custom references in the current section. The target must be a note tag in a :guilabel:`Custom` Custom references in the current section. The target must be a note tag in a :guilabel:`Custom`
type root folder. type root folder.
The syntax highlighter will alert the user that the tags and references are used correctly, and that The syntax highlighter will alert the user that the tags and references are used correctly, and
the tags referenced exist. that the tags referenced exist.
The highlighter may be mistaken if the index of defined tags is out of date. If so, press :kbd:`F9` The highlighter may be mistaken if the index of defined tags is out of date. If so, press :kbd:`F9`
to regenerate it, or select :guilabel:`Rebuild Index` from the :guilabel:`Tools` menu. In general, to regenerate it, or select :guilabel:`Rebuild Index` from the :guilabel:`Tools` menu. In general,
the index for a file is regenerated when a file is saved, so this shouldn't normally be necessary. the index for a document is regenerated when it is saved, so this shouldn't normally be necessary.
.. _a_struct_layout: .. _a_struct_layout:
Novel File Layout Novel Document Layout
================= =====================
All files in a novelWriter project can have a layout format set. These layouts are important when All documents in a novelWriter project can have a layout format set. These layouts are important
the project is exported as they indicate how to treat the content in terms of formatting, headings, when the project is exported as they indicate how to treat the content in terms of formatting,
and page breaks. The layout for each file is indicated as the last set of characters in the headings, and page breaks. The layout for each document is indicated as the last set of characters
:guilabel:`Flags` column of the project tree. in the :guilabel:`Flags` column of the project tree.
Not all layout types are actually treated differently, but they also help to indicate what each file Not all layout types are actually treated differently, they also help to indicate what each
is for in your project. The :guilabel:`Book` layout is a generic novel file layout that is formatted document is for in your project. The :guilabel:`Book` layout is a generic novel document layout
identically to :guilabel:`Chapter` and :guilabel:`Scene` layout files, but may help to indicate what that is formatted identically to :guilabel:`Chapter` and :guilabel:`Scene` layout documents, but
files do in your project. may help to indicate what each document does in your project.
You can for instance lay out your project using :guilabel:`Book` files for each act, and then later You can for instance lay out your project using :guilabel:`Book` documents for each act, and then
split those into chapter or scene files by using the :guilabel:`Split Document` tool. Scenes can later split those into chapter or scene documents by using the :guilabel:`Split Document` tool.
also be contained within :guilabel:`Chapter` type files, but you lose the drag and drop feature that Scenes can also be contained within :guilabel:`Chapter` type documents, but you lose the drag and
comes with having them in separate files if you organise them this way. drop feature that comes with having them in separate documents if you organise them this way.
Some layouts *do* have implications on how the project is exported. Files with layout Some layouts *do* have implications on how the project is exported. Documents with layout
:guilabel:`Title Page` and :guilabel:`Partition` have all headings and text centred, while the :guilabel:`Title Page` and :guilabel:`Partition` have all headings and text centred, while the
:guilabel:`Unnumbered` layout disables the automatic chapter numbering feature for everything :guilabel:`Unnumbered` layout disables the automatic chapter numbering feature for everything
contained within it. The latter is convenient for Prologue and Epilogue type chapters. contained within it. The latter is convenient for Prologue and Epilogue type chapters.
All of the above layout formats are only usable in the Novel root folder. Files that are not a part The above layout formats are only usable in the Novel root folder. Documents that are not a part of
of the novel itself should have the Note layout. These files are not getting any special formatting, the novel itself should have the Note layout. These documents are not getting any special
and it is possible to collectively filter them out during export. Note files can be used anywhere formatting, and it is possible to collectively filter them out during export. Notes can be used
in the project, also in the Novel root folder. anywhere in the project, also in the Novel root folder.
Below is an overview of all available layout formats. Below is an overview of all available layout formats.
@@ -175,45 +179,49 @@ Below is an overview of all available layout formats.
exported with a page break before it. exported with a page break before it.
:guilabel:`Book` :guilabel:`Book`
This is the generic novel file format that in principle can be used for all novel files. Since This is the generic novel format that in principle can be used for all novel documents. Since
the internal structure of the novel is controlled by the heading levels, this file will produce the internal structure of the novel is controlled by the heading levels, this layout will
the same result as a collection of :guilabel:`Partition`, :guilabel:`Chapter` and produce the same result as a collection of :guilabel:`Partition`, :guilabel:`Chapter` and
:guilabel:`Scene` type files. However, it does not provide the functionality of the :guilabel:`Scene` layout documents. However, it does not provide the functionality of the
:guilabel:`Unnumbered` layout format. :guilabel:`Unnumbered` layout format by default, but this can still be achieved by prefixing the
chapter title with a ``*``.
:guilabel:`Partition` :guilabel:`Partition`
A partition can be used to split the novel into parts. Partition titles are indicated with a A partition can be used to split the novel into parts. Partition titles are indicated with a
level one heading. You can also add text and meta data to the page. The :guilabel:`Partition` level one heading. You can also add text and meta data to the page. The :guilabel:`Partition`
file layout will in addition force a page break before the heading, and centre all content on the layout will in addition force a page break before the heading, and centre all content on the
page. page.
:guilabel:`Chapter` :guilabel:`Chapter`
Signifies the start of a new chapter. If the text itself is contained in scene files, these files Signifies the start of a new chapter. If the text itself is contained in scene documents, these
should only contain the title, comments, synopsis, and tag references for characters, plot, etc. documents should only contain the title, comments, synopsis, and tag references for characters,
The heading for chapters should be level two. If you need an opening text, like a quote or other plot, etc. The heading for chapters should be level two. If you need an opening text, like a
leading text before the first scene, this is also where you'd want to add this text. quote or other leading text before the first scene, this is also where you'd want to add this
text.
:guilabel:`Unnumbered` :guilabel:`Unnumbered`
Same as :guilabel:`Chapter`, but when exporting the files and automatic chapter numbering is Same as :guilabel:`Chapter`, but when exporting the documents and automatic chapter numbering is
enabled, this file will not increment the chapter number. It also has a separate title enabled, documents with this layout will not increment the chapter number. It also has a
formatting setting. This makes the layout suitable for Prologue and Epilogue type chapters. separate title formatting setting. This makes the layout suitable for Prologue and Epilogue type
chapters.
:guilabel:`Scene` :guilabel:`Scene`
A scene file. This file should have a header of level three. Further sections can have headers Used for scenes. This document should have a header of level three. Further sections can have
of level four, but there are no file layout specifically for sections. headers of level four, but there are no layout specifically for sections.
:guilabel:`Note` :guilabel:`Note`
A generic file that is optionally ignored when the novel is exported. Use these files for A generic document that is optionally ignored when the novel is exported. Use this layout for
descriptions of content in the supporting root folders. Note files can also be added to the Novel descriptions of content in the supporting root folders. Notes can also be added to the
root folder if you need to insert notes there. Note file headers receive no special formatting :guilabel:`Novel` root folder if you need to insert notes there. Note headers receive no special
when building the project. They are always exported as-is. formatting when building the project. They are always exported as-is.
.. note:: .. note::
The layout granularity is entirely optional. In principle, you can write the entire novel in a The layout granularity is entirely optional. In principle, you can write the entire novel in a
single file with layout :guilabel:`Book`. You can also have a single file per chapter if that single document with layout :guilabel:`Book`. You can also have a single document per chapter if
suits you better. The :guilabel:`Outline` will show your structure of chapters and scenes that suits you better. The :guilabel:`Outline` will show your structure of chapters and scenes
regardless of how your files are organised. regardless of how your documents are organised.
.. tip:: .. tip::
You can always start writing with a coarse file layout with one or a few files, and then later You can always start writing with a coarse layout with one or a few documents, and then later
use the split tool to automatically split the files into chapter and scene files. use the split tool to automatically split the documents into separate chapter and scene
documents.