diff --git a/docs/source/images/fig_build_settings_headings.png b/docs/source/images/fig_build_settings_headings.png index bba80c308..810930481 100644 Binary files a/docs/source/images/fig_build_settings_headings.png and b/docs/source/images/fig_build_settings_headings.png differ diff --git a/docs/source/images/fig_build_settings_selections.png b/docs/source/images/fig_build_settings_selections.png index c9b4cb91b..b92e7a962 100644 Binary files a/docs/source/images/fig_build_settings_selections.png and b/docs/source/images/fig_build_settings_selections.png differ diff --git a/docs/source/images/fig_manuscript_build.png b/docs/source/images/fig_manuscript_build.png index b6a92bfc0..24e53670d 100644 Binary files a/docs/source/images/fig_manuscript_build.png and b/docs/source/images/fig_manuscript_build.png differ diff --git a/docs/source/images/fig_manuscript_build_outline.png b/docs/source/images/fig_manuscript_build_outline.png index 1ec9ffad7..fe857bb19 100644 Binary files a/docs/source/images/fig_manuscript_build_outline.png and b/docs/source/images/fig_manuscript_build_outline.png differ diff --git a/docs/source/images/screenshot_dark.png b/docs/source/images/screenshot_dark.png index 03433a382..dd2cbf847 100644 Binary files a/docs/source/images/screenshot_dark.png and b/docs/source/images/screenshot_dark.png differ diff --git a/docs/source/images/screenshot_light.png b/docs/source/images/screenshot_light.png index bb7e22c72..51ce2f7fa 100644 Binary files a/docs/source/images/screenshot_light.png and b/docs/source/images/screenshot_light.png differ diff --git a/docs/source/int_glossary.rst b/docs/source/int_glossary.rst index 7e9bd5090..c8777923e 100644 --- a/docs/source/int_glossary.rst +++ b/docs/source/int_glossary.rst @@ -13,7 +13,7 @@ Glossary see :ref:`a_proj_roots`. Novel Documents - These are documents that are created under a "Novel" :term:`root folder`. They behave + These are documents that are created under a "Novel" :term:`Root Folder`. They behave differently than :term:`Project Notes`, and have some more restrictions. For instance, they can not exist in folders intended only for project notes. See the :ref:`a_struct` chapter for more details. diff --git a/docs/source/int_howto.rst b/docs/source/int_howto.rst index efb5c4cad..0a393f40b 100644 --- a/docs/source/int_howto.rst +++ b/docs/source/int_howto.rst @@ -16,7 +16,7 @@ This is a list of hopefully helpful little tips on how to get the most out of no Managing the Project ==================== -.. dropdown:: Create a Project from a Template +.. dropdown:: How do I create a project from a template? :animate: fade-in-slide-down On the Welcome dialog's **Create New Project** form, you can select to "Prefill Project" from @@ -24,7 +24,7 @@ Managing the Project dedicated to be a template project. If you have a structure and settings you want to use for every new project, this is the best solution. -.. dropdown:: Merge Multiple Documents Into One +.. dropdown:: How do I merge multiple documents into one? :animate: fade-in-slide-down If you need to merge a selection of documents in your project into a single document, you can @@ -35,28 +35,18 @@ Managing the Project In the dialog that pops up, the documents will be in the same order as in the folder, but you can rearrange them here of you wish. See :ref:`a_ui_tree_split_merge` for more details. - -Layout Tricks -============= - -.. dropdown:: Align Paragraphs with Line Breaks +.. dropdown:: How do I share status or importance labels between projects? :animate: fade-in-slide-down - If you have line breaks in you paragraphs, and also want to apply additional text alignment or - indentation, you must apply the alignment tags to the first line. - - For example, this will centre the two lines. - - .. code-block:: md - - >> Line one is centred. << - Line two is also centred. + The status or importance labels you have defined in a project can be exported from **Project + Settings** from the respective configuration tabs. You can then import these labels in another + project. - This text is not centred, because it is a new paragraph. - See :ref:`a_fmt_align` for more details. +Layout Tricks +============= -.. dropdown:: Create a Simple Table +.. dropdown:: How do I create a table? :animate: fade-in-slide-down The formatting tools available in novelWriter don't allow for complex structures like tables. @@ -69,12 +59,22 @@ Layout Tricks This is most suitable for your notes, as the result in exported documents cannot be guaranteed to match. Especially if you don't use the same font in your manuscript as in the editor. -.. dropdown:: Turn Off First Line Indent for a Paragraph +.. dropdown:: How do I force a line break when line breaks are ignored in my manuscript? + :animate: fade-in-slide-down + + In the **Manuscript Build Settings** you can choose to ignore line breaks within paragraphs in + your text. However, some times you still need those breaks. Like for instance on the cover page + where you may need to add your name and address. In such cases, you can add ``[br]`` where you + want line breaks. These breaks cannot be ignored by any settings and will always be respected. + + .. versionadded:: 2.6 + +.. dropdown:: How do I turn off first line indent for a specific paragraph? :animate: fade-in-slide-down If you have first line indent enabled, but have a specific paragraph that you don't want - indented, you can disable the indentation by explicitly add text alignment. Aligned paragraphs - are not indented. For instance by adding ``<<`` to the end to left-align it, + indented, you can disable the indentation by explicitly adding text alignment. For instance by + adding ``<<`` to the end to left-align it. Aligned paragraphs are not indented. See :ref:`a_fmt_align` for more details. @@ -82,7 +82,7 @@ Layout Tricks Organising Your Text ==================== -.. dropdown:: Add Introductory Text to Chapters +.. dropdown:: How do I add introductory text to chapters? :animate: fade-in-slide-down Sometimes chapters have a short preface, like a brief piece of text or a quote to set the stage @@ -92,7 +92,7 @@ Organising Your Text such text. Separating chapter and scene files also allows you to make scene files child documents of the chapter. -.. dropdown:: Distinguishing Soft and Hard Scene Breaks +.. dropdown:: How do I distinguishing between soft and hard scene breaks? :animate: fade-in-slide-down Depending on your writing style, you may need to separate between soft and hard scene breaks @@ -101,8 +101,8 @@ Organising Your Text In such cases you may want to use different scene headings for hard and soft scene breaks. The **Build Manuscript** tool will let you define a different format for scenes using the ``###`` and ``###!`` heading codes when you generate your manuscript. You can for instance add the - common "``* * *``" for hard breaks and select to soft scene breaks, which will just insert an - empty paragraph in their place. See :ref:`a_manuscript_settings` for more details. + common "``* * *``" for hard breaks and select to hide soft scene breaks, which will just insert + an empty paragraph in their place. See :ref:`a_manuscript_settings` for more details. .. versionadded:: 2.4 @@ -110,7 +110,7 @@ Organising Your Text Other Tools =========== -.. dropdown:: Convert Project to/from yWriter Format +.. dropdown:: How do I convert my project to/from the yWriter format? :animate: fade-in-slide-down There is a tool available that lets you convert a `yWriter `_ diff --git a/docs/source/int_introduction.rst b/docs/source/int_introduction.rst index ca20986e3..ab50a55b0 100644 --- a/docs/source/int_introduction.rst +++ b/docs/source/int_introduction.rst @@ -39,7 +39,8 @@ your notes about your characters, your world building, and so on. You can at any point split the individual documents by their headings up into multiple documents, or merge multiple documents into a single document. This makes it easier to use variations of the Snowflake_ method for writing. You can start by writing larger structure-focused documents, like -for instance one document per act, and later effortlessly split these up into chapters or scenes. +for instance one document per act, and later effortlessly split these up into individual chapter or +scene documents. .. _a_intro_features: @@ -53,7 +54,7 @@ Below are some key features of novelWriter. The aim of the user interface is to let you focus on writing instead of spending time formatting text. Formatting is therefore limited to a small set of formatting tags for simple things like text emphasis and paragraph alignment. Additional shortcodes are available for special - formatting cases. + formatting cases when you need them. When you really want to focus on just writing, you can switch the editor into **Focus Mode** where only the text editor panel itself is visible, and the project structure view is hidden @@ -78,19 +79,19 @@ Below are some key features of novelWriter. Your main story text lives in the "Novel" root folder. You can have multiple such folders in a project, and rename them to whatever you want. This allows you to keep a series of individual novels with the same characters and world building in the same project, and create manuscripts - for them individually. + for them separately. **Keep track of your story elements** - All notes in your project can be assigned a :term:`tag` that you can then :term:`reference` from - any other document or note. In fact, you can add a new tag under each heading of a note if you - need to be able to reference specific sections of it, or you want to keep several topics in the - same note. + All documents in your project can be assigned a :term:`tag` that you can then :term:`reference` + from any other document or note. In fact, you can add a new tag under each heading of a note if + you need to be able to reference specific sections of it, or you want to keep several topics or + scenes in the same document. **Get an overview of your story** It is not the documents themselves that define the chapters and scenes of your story, but the - headings that separate them. In the **Outline View** on the main window you can see an outline - of all the chapter and scene headings of each novel root folder in your project. If they have - any references in them, like which character is in what chapter and scene, these are listed in + headings within them. In the **Outline View** on the main window you can see an outline of all + the chapter and scene headings of each novel root folder in your project. If they have any + references in them, like which character is in what chapter and scene, these are listed in additional columns. You can also add a synopsis to each chapter or scene, which can be listed here as well. You have @@ -107,9 +108,9 @@ Below are some key features of novelWriter. Whether you want to assemble a manuscript, or export all your notes, or generate an outline of your chapters and scenes with a synopsis included, you can use the **Build Manuscript** tool to do so. The tool lets you select what information you want to include in the generated document, - and how it is formatted. You can send the result to a printer or PDF, or generate an Open - Document file that can be opened by most office type word processors. You can also generate the - result as HTML, or Markdown, both suitable for further conversion to other formats. + and how it is formatted. You can send the result to a printer, or generate an Open Document or + Word Document file that can be opened by most office type word processors. You can also generate + the result as HTML, or Markdown, both suitable for further conversion to other formats. .. _a_intro_screenshots: diff --git a/docs/source/int_overview.rst b/docs/source/int_overview.rst index db450b5c7..1f6b61762 100644 --- a/docs/source/int_overview.rst +++ b/docs/source/int_overview.rst @@ -5,10 +5,10 @@ What to Read First ****************** The documentation of novelWriter is quite extensive. There are a lot of features to get used to, -but you don't need all of them to get started. +but you don't need to know all of them to get started. The chapters below labelled "Essential Information" are the ones you need to know to use the -application correctly. By "correctly", it is meant: in a way so novelWriter understands the basic +application correctly. By "correctly" it is meant: in a way so novelWriter understands the basic structure of your text. It collects a lot of information from your text and uses it to display the structure of it in various ways to help you get an overview of your writing. @@ -23,7 +23,7 @@ Using novelWriter ================= In order to use novelWriter effectively, you need to know the basics of how it works. The following -chapters will explain the main principles. It starts with the basics, and gets more detailed as you +chapters will explain the main principles. They start with the basics, and get more detailed as you read on. :ref:`a_breakdown` – Essential Information diff --git a/docs/source/int_started.rst b/docs/source/int_started.rst index d361de2fe..fe2502ae9 100644 --- a/docs/source/int_started.rst +++ b/docs/source/int_started.rst @@ -4,7 +4,7 @@ Setup and Installation ********************** -.. _Enchant: https://abiword.github.io/enchant/ +.. _Enchant: http://rrthomas.github.io/enchant/ .. _GitHub: https://github.com/vkbo/novelWriter .. _Downloads page: https://download.novelwriter.io .. _PPA: https://launchpad.net/~vkbo/+archive/ubuntu/novelwriter @@ -15,7 +15,7 @@ Setup and Installation .. _AppImage: https://appimage.org/ Ready-made packages and installers for novelWriter are available for all major platforms, including -Linux, Windows and MacOS, from the `Downloads page`_. See below for install additional instructions +Linux, Windows and MacOS, from the `Downloads page`_. See below for additional install instructions for each platform. You can also install novelWriter from the Python Package Index (PyPi_). See :ref:`a_started_pip`. @@ -40,12 +40,6 @@ If you have any issues, try uninstalling the previous version and making a fresh already had a version installed via a different method, you should uninstall that first as having multiple installations has been known to cause problems. -.. note:: - The novelWriter installer is not signed because Microsoft doesn't currently provide a way for - non-profit open source projects to properly sign their installers. The novelWriter project - doesn't have the funding to pay for commercial software signing certificates. You will therefore - see an additional warning about this when you download and run the installer. - .. _a_started_linux: @@ -93,10 +87,6 @@ Then run the update and install commands as for Ubuntu: sudo apt update sudo apt install novelwriter -.. note:: - You may need to use the Ubuntu 20.04 (focal) packages for Debian 11 or earlier. The newer Ubuntu - packages use a different compression algorithm that may not be supported. - .. tip:: If you get an error message like ``gpg: failed to create temporary file`` when importing the key from the Ubuntu keyserver, try creating the folder it fails on, and import the key again: @@ -142,7 +132,7 @@ done by holding down the option key on your keyboard and clicking on the applica .. note:: The novelWriter DMG is not signed because Apple doesn't currently provide a way for non-profit open source projects to properly sign their installers. The novelWriter project doesn't have the - funding to pay for commercial software signing certificates. + funding to pay for a commercial software signing certificate. .. _a_started_pip: diff --git a/docs/source/project_manuscript.rst b/docs/source/project_manuscript.rst index 4f4657bc9..18e644418 100644 --- a/docs/source/project_manuscript.rst +++ b/docs/source/project_manuscript.rst @@ -11,6 +11,7 @@ from the text in your project. All of this is handled by the **Manuscript Build* activate it from the sidebar, the **Tools** menu, or by pressing :kbd:`F5`. .. versionadded:: 2.1 + This tool is new for version 2.1. A simpler tool was used for earlier versions. The simpler tool only allows you to define a single set of options for the build, but otherwise had much the same functionality. @@ -58,6 +59,7 @@ Each build definition can be edited by opening it in the **Manuscript Build Sett either by double-clicking or by selecting it and pressing the edit button in the toolbar. .. tip:: + You can keep the **Manuscript Build Settings** dialog open while testing the different options, and just hit the :guilabel:`Apply` button. You can test the result of your settings by pressing the :guilabel:`Preview` button in the main **Manuscript Build** window. When you're happy with @@ -177,21 +179,34 @@ Open Document Format flat version of the document format as a single XML file. Most rich text editors support the former, and only a few the latter. +Microsoft Word Document Format + The Microsoft Word Document format writes a single ``.docx`` file. It uses a fairly basic format + that should be compatible with most rich text editors. + +Portable Document Format (PDF) + The PDF is generated from a copy of the preview document, and should have the same formatting + capabilities as the preview. It's identical to what is produced if you select the print option + and print to PDF. + novelWriter HTML The HTML format writes a single ``.htm`` file with minimal style formatting. The HTML document is suitable for further processing by document conversion tools like Pandoc_, for importing in word processors, or for printing from browser. +Standard/Extended Markdown + The Markdown format comes in both Standard and Extended flavour. The *only* difference in terms + of novelWriter functionality is the support for strike through text, which is not supported by + the Standard flavour. + novelWriter Markup This is simply a concatenation of the project documents selected by the filters into a ``.txt`` file. The documents are stacked together in the order they appear in the project tree, with comments, tags, etc. included if they are selected. This is a useful format for exporting the project for later import back into novelWriter. -Standard/Extended Markdown - The Markdown format comes in both Standard and Extended flavour. The *only* difference in terms - of novelWriter functionality is the support for strike through text, which is not supported by - the Standard flavour. +.. versionadded:: 2.6 + + Microsoft Word and PDF output options were added. Additional Formats @@ -211,13 +226,14 @@ file can be imported directly into a Python dict object or a PHP array, to menti .. _a_manuscript_print: -Print and PDF -============= +Printing +======== The :guilabel:`Print` button allows you to print the content in the preview window. You can either print to one of your system's printers, or select PDF as your output format from the printer icon on the print dialog. .. note:: + The paper format should in all cases default to whatever your system default is. If you want to change it, you have to select it from the **Print Preview** dialog. diff --git a/docs/source/project_overview.rst b/docs/source/project_overview.rst index eb169b47b..0fe083276 100644 --- a/docs/source/project_overview.rst +++ b/docs/source/project_overview.rst @@ -115,19 +115,17 @@ Root Folder Types options. Tags in this folder type can be references using the ``@custom`` keyword. The root folders are closely tied to the tags and reference system. Each folder type corresponds to -the categories of tags that can be used to reference them. For more information about the tags -listed, see :ref:`a_references_references`. +categories of tags that can be used to reference them. For more information about the tags listed, +see :ref:`a_references_references`. There is also a ``@mention`` keyword that can be used to reference any tag. See :ref:`a_references_references` for more details. .. note:: + You can rename root folders to whatever you want. However, this doesn't change the reference keyword or what they do. -.. versionadded:: 2.0 - As of version 2.0, you can make multiple root folders of each kind to split up your project. - .. _a_proj_roots_del: @@ -170,11 +168,10 @@ The folders are there purely as a way for you to organise the documents in meani to be able to collapse and hide them in the project tree when you're not working on those documents. -.. versionadded:: 2.0 - As of version 2.0 it is possible to add child documents to other documents. This is particularly - useful when you create chapters and scenes. If you add separate scene documents, you should also - add separate chapter documents, even if they only contain a chapter heading. You can then add - scene documents as child items to the chapters. +In addition to using folders. it is also possible to add child documents to other documents. This +is particularly useful when you create chapters and scenes. If you add separate scene documents, +you should also add separate chapter documents, even if they only contain a chapter heading. You +can then add scene documents as child items to the chapters. .. _a_proj_roots_orphaned: @@ -185,7 +182,7 @@ Recovered Documents If novelWriter crashes or otherwise exits without saving the project state, or if you're using a file synchronisation tool that runs out of sync, there may be files in the project storage folder that aren't tracked in the core project file. These files, when discovered, are recovered and added -back into the project. +back into the project when a project is opened. The discovered files are scanned for metadata that give clues as to where the document may previously have been located in the project. The project loading routine will try to put them back @@ -205,19 +202,21 @@ be named after its internal key, which is a string of characters and numbers. Project Lockfile ---------------- -To prevent lost documents caused by file conflicts when novelWriter projects are synchronised via -file synchronisation tools, a project lockfile is written to the project storage folder when a -project is open. If you try to open a project which already 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 given the option to ignore this warning, and continue opening the project at -your own risk. +To prevent data loss caused by file conflicts when novelWriter projects are synchronised via file +synchronisation tools, a project lockfile is written to the project storage folder when a project +is open. If you try to open a project which already 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 given the option to ignore this warning, and continue opening the project at your own +risk. .. note:: + If, for some reason, novelWriter or your computer crashes, the lock file may remain even if there are no other instances keeping the project open. In such a case it is safe to ignore the lock file warning when re-opening the project. .. warning:: + 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 project files, potentially resulting in loss of data and orphaned files. You are not likely to @@ -318,9 +317,14 @@ use these to indicate at what stage of completion each novel document is, or how content of a note is to the story. 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. +Both status and importance labels can be exported and imported so you can share them between +projects, or define a standard set for all your writing projects. When you import labels to a +project, they are always added as *new* labels. + See also :ref:`a_ui_tree_status`. .. note:: + The status or importance level currently in use by one or more documents cannot be deleted, but they can be edited. @@ -384,6 +388,7 @@ also export the filtered data to a JSON file or to a CSV file that can be opened application like for instance Libre Office Calc or Excel. .. versionadded:: 1.2 + As of version 1.2, the log file also stores how much of the session time was spent idle. The definition of idle here is that the novelWriter main window loses focus, or the user hasn't made any changes to the currently open document in five minutes. The number of minutes can be altered @@ -400,4 +405,5 @@ If you do not wish to see the timer, you can click on it once to hide it. The ic visible. Click the icon once more to display the timer again. .. versionadded:: 2.6 + As of version 2.6, clicking the timer text or icon in the status bar will toggle its visibility. diff --git a/docs/source/project_references.rst b/docs/source/project_references.rst index 2a0911dfc..1bea77b2d 100644 --- a/docs/source/project_references.rst +++ b/docs/source/project_references.rst @@ -15,8 +15,9 @@ applications. It is therefore not always obvious to new users how this is suppos this chapter hopes to explain in more detail how to use this tags and references system. .. tip:: + If you find the Tags and Reference system difficult to follow just from reading this chapter, - you can create a new project in the **Welcome** dialog's New project form and select "Create an + you can create a new project in the **Welcome** dialog's New project form and select "Create an example project" from the "Pre-fill project" option. The example project contains several examples of tags and references. @@ -39,7 +40,8 @@ documents up using the document split feature. See :ref:`a_ui_tree_split_merge` You can do the same with your notes. You can treat each heading as an independent element of your notes that can be referenced somewhere else. That way you can collect all your minor or background characters in a single note file, and still be able to reference them individually by separating -them with headings and assigning each a tag. +them with headings and assigning each a tag. Or, you can lay out your plot in a single document and +have a tag for each plot stage under separate headings. .. _a_references_tags: @@ -82,13 +84,20 @@ to the manuscript, or an outline document. If you want to compile a single docum notes, you can do this from the **Manuscript Build** tool. .. versionadded:: 2.2 + Tags are no longer case sensitive. The tags are by default displayed with the capitalisation you use when defining the tag, but you don't have to use the same capitalisation when referencing it later. .. versionadded:: 2.3 + Tags can have an optional display name for manuscript builds. +.. versionadded:: 2.6 + + You can now add tags also to Novel Documents. These can be used for cross-referencing between + chapters and scenes, and also from notes if desired. + Example of a heading with a tag for a character of the story: .. code-block:: md @@ -168,15 +177,21 @@ reference keywords allow multiple values. it. This can be useful when checking for consistency later. Any tag in any root note folder can be listed under mentions. +``@story`` + This is used when referencing a Novel Document, like a scene or chapter, from somewhere else in + your project. + The syntax highlighter will alert the user that the tags and references are used correctly, and that the tags referenced exist. .. note:: + 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 **Rebuild Index** from the **Tools** menu. In general, the index for a document is regenerated when it is saved, so this shouldn't normally be necessary. .. tip:: + If you add a reference in the editor to a tag that doesn't yet exist, you can right-click it and select **Create Note for Tag**. This will generate a new project note automatically with the new tag defined. In order for this to be possible, a root folder for that category of references @@ -192,6 +207,7 @@ meaningful if you want to be able to click-navigate between them, or of course i highlight that two notes are related. .. tip:: + If you cross-reference between notes and export your project as an HTML document using the **Manuscript Build** tool, the cross-references become clickable links in the exported HTML document as well. diff --git a/docs/source/project_structure.rst b/docs/source/project_structure.rst index e344ecd89..ea78cc4a9 100644 --- a/docs/source/project_structure.rst +++ b/docs/source/project_structure.rst @@ -11,8 +11,8 @@ Active novel documents can only live in a **Novel** type root folder. You can al **Archive** and **Trash** of course, where they become inactive. The project tree can distinguish between the different heading levels of the novel documents using -coloured icons, and optionally add emphasis on the label, set in **Preferences** for easier -identification. +coloured icons, and optionally add emphasis on the label. Emphasis can be enabled in +**Preferences**. .. _a_struct_heads: @@ -27,6 +27,7 @@ Four levels of headings are supported, signified by the number of hashes (``#``) title. See also the :ref:`a_fmt` section for more details about the markup syntax. .. note:: + The heading levels are not only important when generating the manuscript, they are also used by the indexer when building the outline tree in the **Outline View** as well as in the **Novel Tree**. Each heading also starts a new region where new Tags and References can be defined. See @@ -60,16 +61,25 @@ The syntax for the four basic heading types, and the three special types, is lis mid-scene, like if you change the point-of-view character. You are free to use sections as you wish, and you can filter them out of the final manuscript. -Page breaks can be automatically added before partition, chapter and scene headings from the -**Manuscript Build** tool when you build your project to a format that supports page breaks. If you -want page breaks in other places, you have to specify them manually. See :ref:`a_fmt_break`. +Page breaks can be automatically added before titles, partition, chapter and scene headings from +the **Manuscript Build** tool when you build your project to a format that supports page breaks. If +you want page breaks in other places, you have to specify them manually. See :ref:`a_fmt_break`. .. tip:: + There are multiple options of how to process novel headings when building the manuscript. For instance, chapter numbers can be applied automatically, and so can scene numbers if you want them in a draft manuscript. You can also insert point-of-view character names in chapter titles. See the :ref:`a_manuscript` page for more details. +.. note:: + + As of 2.6, the heading levels internally in novelWriter do not map directly to heading levels in + manuscript documents. In manuscript documents, chapters are considered the top level heading, + and partitions become plain text paragraphs with a larger font. + + .. versionadded:: 2.6 + .. _a_struct_heads_title: @@ -77,15 +87,28 @@ Novel Title and Front Matter ---------------------------- It is recommended that you add a document at the very top of each **Novel** root folder with the -novel title as the first line. You should modify the level 1 heading format code with an ``!`` in -order to render it as a document title that is excluded from any automatic Table of Content in a -manuscript build document, like so: +novel title in it. You should modify the level 1 heading format code with an ``!`` in order to +render it as a document title that is excluded from any automatic Table of Content in a manuscript +build document. + +You can also add the author name and address above this if this is required by the manuscript +format you use, and additional space added before the title. + +This is the title page novelWriter generates automatically for a new project as of version 2.6: .. code-block:: md + Jane Doe[br] + Address 1[br] + Address 2 << + + [vspace:5] + #! My Novel - >> _by Jane Doe_ << + >> **By Jane Doe** << + + >> Word Count: [field:textWords] << The title is by default centred on the page. You can add more text to the page as you wish, like for instance the author's name and details. diff --git a/docs/source/usage_breakdown.rst b/docs/source/usage_breakdown.rst index 814a445bc..d4bc5fad5 100644 --- a/docs/source/usage_breakdown.rst +++ b/docs/source/usage_breakdown.rst @@ -7,6 +7,8 @@ How it Works .. _Fusion: https://doc.qt.io/qt-6/gallery.html .. _Pandoc: https://pandoc.org/ .. _Open Document: https://en.wikipedia.org/wiki/OpenDocument +.. _Office Open XML: https://en.wikipedia.org/wiki/Office_Open_XML +.. _version control: https://en.wikipedia.org/wiki/Version_control The main features of novelWriter are listed in the :ref:`a_intro` chapter. In this chapter, we go into some more details on how they are implemented. This is intended as an overview. Later on in @@ -42,9 +44,10 @@ views you can switch between, a quick link to the **Build Manuscript** tool, and project-related tools and quick access to settings at the bottom. .. versionadded:: 2.2 + A number of new formatting options were added in 2.2 to allow for some special formatting cases. At the same time, a small formatting toolbar was added to the editor. It is hidden by default, - but can be opened by pressing the button in the top right corner of the editor header. + but can be opened by pressing the button in the top--left corner of the editor header. Project Tree and Editor View @@ -54,9 +57,9 @@ Project Tree and Editor View A screenshot of the Project Tree and Editor View. -When the application is in **Project Tree View** mode, the main work area of the main window is -split in two, or optionally three, panels. The left-most panel contains the project tree and all -the documents in your project. The second panel is the document editor. +When the application is in **Project Tree View** mode, the work area of the main window is split in +two, or optionally three, panels. The left-most panel contains the project tree and all the +documents in your project. The second panel is the document editor. An optional third panel on the right side contains a document viewer which can view any document in your project independently of what is open in the document editor. This panel is not intended as a @@ -68,6 +71,14 @@ The editor also has a **Focus Mode** you can toggle either from the menu, from t editor's header, or by pressing :kbd:`F8`. When **Focus Mode** is enabled, all the user interface elements other than the document editor itself are hidden away. +The project tree will highlight with a different background colour the document that is currently +open in the editor. + +.. versionadded:: 2.6 + + You can now drag and drop documents from the project tree onto the editor or viewer panels to + open them. + Novel View and Editor View -------------------------- @@ -110,21 +121,20 @@ Novel Outline View A screenshot of the Novel Outline View. -When the application is in **Novel Outline View** mode, the tree, editor and viewer will be -replaced by a large table that shows the entire novel structure with all the tags and references -listed. Pretty much all collected meta data is available here in different columns. +When the application is in **Novel Outline View** mode, the tree, editor and viewer are replaced by +a large table that shows the entire novel structure with all the tags and references listed. Pretty +much all collected meta data is available here in different columns. You can select which novel root folder to display from the dropdown box, and you can select which columns to show or hide from the menu button. You can also rearrange the columns by drag and drop. -The app will remember your column order and size between sessions, and for each individual project. +The app remembers your column order and sizes between sessions, and for each individual project. Colour Themes ------------- -By default, novelWriter will use the colour theme provided by the Qt library, which is determined -by the Fusion_ style setting. You can also choose between a standard dark and light theme that have -neutral colours from **Preferences**. +By default, novelWriter uses a light colour theme. You can also choose between a standard dark +theme that have neutral colours, or a series of other included themes, from **Preferences**. If you wish, you *can* create your own colour themes, and even have them added to the application. See :ref:`a_custom_theme` for more details. @@ -134,6 +144,7 @@ separate colour selectable from the "Document colour theme" setting in **Prefere separated because there are a lot more options to choose from for the editor and viewer. .. note:: + If you switch between light and dark mode on the GUI, you should also switch editor theme to match, otherwise icons may be hard to see in the editor and viewer. @@ -155,11 +166,11 @@ If the project or novel view does not have focus, pressing :kbd:`Ctrl+T` switche whichever of the two is visible. If one of them already has focus, the key press will switch between them instead. -Likewise, pressing :kbd:`Ctrl+E` with switch focus to the document editor or viewer, or if any of +Likewise, pressing :kbd:`Ctrl+E` will switch focus to the document editor or viewer, or if any of them already have focus, it will switch focus between them, -These two shortcuts makes it possible to jump between all these GUI elements without having to -reach for the mouse or touchpad. +These two shortcuts make it possible to jump between all these GUI elements without having to reach +for the mouse or touchpad. .. _a_breakdown_project: @@ -167,7 +178,7 @@ reach for the mouse or touchpad. Project Layout ============== -This is a brief introduction to how you structure your writing projects. All of this will be +This is a brief introduction to how you should structure your writing projects. All of this will be covered in more detail later. The main point of novelWriter is that you are free to organise your project documents as you wish @@ -193,12 +204,19 @@ This heading level structure is only taken into account for :term:`novel documen :term:`project notes`, the heading levels have no structural meaning, and you are free to use them however you want. See :ref:`a_struct` and :ref:`a_references` for more details. -.. versionadded:: 2.0 +.. tip:: + You can add documents as child items of other documents. This is often more useful than adding folders, since you anyway may want to have the chapter heading in a separate document from your individual scene documents so that you can rearrange scene documents freely without affecting chapter placement. +.. versionadded:: 2.6 + + The heading levels for partitions, chapters and scenes only apply within novelWriter. When you + generate your manuscript, chapters are considered as the topmost heading level, with scenes + below it. Partitions are inserted as text elements in most formats. + .. _a_breakdown_export: @@ -206,22 +224,24 @@ Building a Manuscript ===================== The project can at any time be assembled into a range of different formats through the -**Build Manuscript** tool. Natively, novelWriter supports `Open Document`_, HTML5, and -various flavours of Markdown. +**Build Manuscript** tool. Natively, novelWriter supports `Open Document`_, Microsoft Word Document +(known as `Office Open XML`_), HTML5, and various flavours of Markdown. You can also generate a PDF +document. The HTML5 format is suitable for conversion by a number of other tools like Pandoc_, or for -importing into word processors if the Open Document format isn't suitable. The Open Document format -is supported by most office type applications. In addition, printing is also possible. Print to PDF -is available from the print dialog. +importing into word processors if the Open Document or Word Document format isn't suitable. The +Open Document format is supported by most office type applications, so is the Word Document format. +In addition, printing is also possible. For advanced processing, you can export the content of the project to a JSON file. This is useful if you want to write your own custom processing script in for instance Python, as the entire novel can be read into a Python dictionary with a couple of lines of code. The JSON file can be populated -with either HTML formatted text, or with the raw text as typed into the novel documents. +with either HTML formatted text, or with the raw text as typed it into the novel documents. See :ref:`a_manuscript` for more details. .. versionadded:: 2.1 + You can now define multiple build definitions in the **Build Manuscript** tool. This allows you to define specific settings for various types of draft documents, outline documents, and manuscript formats. See :ref:`a_manuscript` for more details. @@ -234,8 +254,8 @@ Project Storage The files of a novelWriter project are stored in a dedicated project folder. The project structure is kept in a file at the root of this folder called ``nwProject.nwx``. All the document files and -associated meta data is stored in other folders below the project folder. For more technical -details about what all the files mean and how they're organised, see the :ref:`a_storage` section. +associated meta data are stored in other folders below the project folder. For a more technical +description of what all the files mean and how they're organised, see the :ref:`a_storage` section. This way of storing data was chosen for several reasons. @@ -247,17 +267,19 @@ crashes. Secondly, having multiple small files means it is very easy to synchronise them between computers with standard file synchronisation tools. -Thirdly, if you use version control software to track the changes to your project, the file formats -used for the files are well suited. All the JSON documents have line breaks and indents as well, -which makes it easier to track them with version control software. +Thirdly, if you use `version control`_ software to track the changes to your project, the file +formats used for the files are well suited. All the JSON documents have line breaks and indents as +well, which makes it easier to track them with version control software. .. note:: + Since novelWriter has to keep track of a bunch of files and folders when a project is open, it may not run well on some virtual file systems. A file or folder must be accessible with exactly the path it was saved or created with. An example where this is not the case is the way Google Drive is mapped on Linux Gnome desktops using gvfs/gio. .. caution:: + You should not add additional files to the project folder yourself. Nor should you, as a rule, manually edit files within it. If you really must manually edit the text files, e.g. with some automated task you want to perform, you need to rebuild the :term:`Project Index` when you open diff --git a/docs/source/usage_format.rst b/docs/source/usage_format.rst index b87ab3a9a..c57a10fb3 100644 --- a/docs/source/usage_format.rst +++ b/docs/source/usage_format.rst @@ -14,6 +14,10 @@ In addition to formatting codes, novelWriter allows for comments, a synopsis tag keyword and value sets used for :term:`tags` and :term:`references`. There are also some codes that apply to whole paragraphs. See :ref:`a_fmt_text` for more details. +URLs should also be highlighted and become clickable. However, only URLs starting with "http" or +"https" are recognised. In the editor, you must hold down the :kbd:`Ctrl` key when clicking a URL +to follow it. + .. _a_fmt_hlight: @@ -76,14 +80,13 @@ For headings level one through three, adding a ``!`` modifies the meaning of the ``#! Title Text`` This tells the build tool that the level one heading is intended to be used for the novel or - notes folder's main title, like for instance on the front page. When building the manuscript, - this will use a different styling and will exclude the title from, for instance, a Table of - Contents in Libre Office. + notes folder's main title, like for instance the novel title on the cover page. When building + the manuscript, this will use a different styling. ``##! Title Text`` This tells the build tool to not assign a chapter number to this chapter title if automatic - chapter numbers are being used. Such titles are useful for a prologue for instance. See - :ref:`a_struct_heads_unnum` for more details. + chapter numbers are being used. Such titles are useful for prologues and epilogues for instance. + See :ref:`a_struct_heads_unnum` for more details. ``###! Title Text`` This is an alternative scene heading that can be formatted differently in the **Manuscript @@ -92,6 +95,7 @@ For headings level one through three, adding a ``!`` modifies the meaning of the details. .. note:: + The space after the ``#`` or ``!`` character is mandatory. The syntax highlighter will change colour and font size when the heading is correctly formatted. @@ -118,10 +122,18 @@ Non-breaking spaces are highlighted by the syntax highlighter with an alternate background, depending on the selected theme. .. tip:: + Non-breaking spaces are for instance the correct type of space to separate a number from its unit. Generally, non-breaking spaces are used to prevent line wrapping algorithms from adding line breaks where they shouldn't. +.. note:: + + You should not manually apply text indentation in your paragraphs in the editor. These can be + added automatically in the **Manuscript Build** tool if you want to have them in the manuscript. + Each new paragraph should be separated from the previous content by an empty line and with no + indentation. + .. _a_fmt_emph: @@ -160,6 +172,7 @@ In addition, the following rules apply: allow for formatting, and any formatting markup will be rendered as-is. .. tip:: + novelWriter supports standard escape syntax for the emphasis markup characters in case the editor misunderstands your intended usage of them. That is, ``\*``, ``\_`` and ``\~`` will generate a plain ``*``, ``_`` and ``~``, respectively, without interpreting them as part of the @@ -216,8 +229,8 @@ In addition to the above formatting features, novelWriter also allows for commen The text of a comment is always ignored by the word counter. The text can also be filtered out when building the manuscript or viewing the document. -The first word of a comment, followed by a colon, can be one of a small set of modifiers that -indicates the comment is intended for a specific purpose. For instance, if the comment starts with +The first word of a comment, followed by a colon, can be one of a set of modifiers that indicates +the comment is intended for a specific purpose. For instance, if the comment starts with ``Synopsis:``, the comment is treated in a special manner and will show up in the :ref:`a_ui_outline` in a dedicated column. The word ``synopsis`` is not case sensitive. If it is correctly formatted, the syntax highlighter will indicate this by altering the colour of the word. @@ -246,6 +259,7 @@ The different styles of comments are as follows: use them in your text. .. note:: + Only one comment can be flagged as a synopsis or short comment for each heading. If multiple comments are flagged as synopsis or short comments, the last one will be used and the rest ignored. @@ -365,6 +379,7 @@ Examples: "``> Left/right indented text <``", "The text has both margins increased." .. note:: + The text editor will not show the alignment and indentation live. But the viewer will show them when you open the document there. It will of course also be reflected in the document generated from the manuscript build tool as long as the format supports paragraph alignment. @@ -373,18 +388,15 @@ Examples: Alignment with Line Breaks -------------------------- -If you have line breaks in the paragraph, like for instance when you are writing verses, the -alignment markers must be applied to the first line. Markers on the other lines are ignored. The -markers for the first line are used for all the other lines. - -For the following text, all lines will be centred, not just the first: +If you have line breaks in the paragraph, the markers for all the lines are combined and used for +the entire paragraph. For the following text, all lines will be centred: .. code-block:: md - >> I am the very model of a modern Major-General << + >> I am the very model of a modern Major-General I've information vegetable, animal, and mineral I know the kings of England, and I quote the fights historical - From Marathon to Waterloo, in order categorical + From Marathon to Waterloo, in order categorical << Alignment with First Line Indent @@ -424,6 +436,7 @@ If you need to add a page break somewhere, put the text ``[new page]`` on a line the text you wish to start on a new page. .. note:: + The page break code is applied to the text that follows it. It adds a "page break before" mark to the text when exporting to HTML or Open Document. This means that a ``[new page]`` which has no text following it, it will not result in a page break. @@ -442,3 +455,16 @@ the text you wish to start on a new page. [new page] This text will start on a new page if the build format has pages. + + +.. _a_fmt_stats: + +Inserting Word Counts in the Text +================================= + +The cover page of a manuscript normally has the word count stated on it. Any statistics value +collected by novelWriter can be inserted into any document. You can generate the code for this from +the **Insert** menu under **Word/Character Count**. + +The value inserted is the actual count for your entire manuscript, so it is not populated until you +run the **Manuscript Build** tool. Until then they will show up as "0" in the viewer panel. diff --git a/docs/source/usage_project.rst b/docs/source/usage_project.rst index 7a1a89486..0a19c7bdb 100644 --- a/docs/source/usage_project.rst +++ b/docs/source/usage_project.rst @@ -63,6 +63,7 @@ currently selected item. This panel also includes the latest paragraph and chara addition to the word count. .. tip:: + If you want to set the label of a document to be the same as a header within it, you can right-click a header in the document when it is open in the editor and select :guilabel:`Set as Document Name` from the context menu. @@ -140,23 +141,19 @@ lives in. If it's in a **Novel** type folder, it uses the "Status" flag, otherwi Project Tree Drag & Drop ------------------------ -The project tree allows drag & drop to a certain extent to allow you to reorder your documents and -folders. Moving a document in the project tree will affect the text's position when you assemble -your manuscript in the **Manuscript Build** tool. +The project tree allows drag & drop to allow you to reorder your documents and folders. Moving a +document in the project tree will affect the text's position when you assemble your manuscript in +the **Manuscript Build** tool. .. versionadded:: 2.2 + You can now select multiple items in the project tree by holding down the :kbd:`Ctrl` or :kbd:`Shift` key while selecting items. -You can drag and drop documents and regular folders, but not root folders. If you select multiple -items, they can only be dragged and dropped if they are siblings. That is, they have the same -parent item in the project. This limitation is due to the way drag and drop is implemented in the -user interface framework novelWriter is built upon. - Documents and their folders can be rearranged freely within their root folders. If you move a **Novel Document** out of a **Novel** folder, it will be converted to a **Project Note**. Notes can be moved freely between all root folders, but keep in mind that if you move a note into a **Novel** -type root folder, its "Importance" setting will be switched with a "Status" setting. See +type root folder, its "Importance" setting will be replaced by a "Status" setting. See :ref:`a_ui_tree_status`. The old value will not be overwritten though, and should be restored if you move it back at some point. @@ -164,6 +161,10 @@ Root folders in the project tree cannot be dragged and dropped at all. If you wa you can move them up or down with respect to each other from the arrow buttons at the top of the project tree, or by pressing :kbd:`Ctrl+Up` or :kbd:`Ctrl+Down` when they are selected. +.. tip:: + + You can drag and drop documents onto the editor or viewer panel to open them. + .. _a_ui_tree_novel: @@ -180,6 +181,7 @@ the view in the **Outline View**. It is convenient when you want to browse the s story itself rather than the document files. .. note:: + You cannot reorganise the entries in the novel view, or add any new documents, as that would imply restructuring the content of the document files themselves. Any such editing must be done in the project tree. However, you can add new headings to existing documents, or change @@ -208,6 +210,7 @@ You can select which novel folder to display from the dropdown menu. You can opt to show a combination of all novel folders. .. note:: + Since the internal structure of the novel does not depend directly on the folder and document structure of the project tree, this view will not necessarily look the same, depending on how you choose to organise your documents. See the :ref:`a_struct` page for more details. @@ -218,6 +221,7 @@ the menu button in the toolbar. The order of the columns can also be rearranged a different position. You column settings are saved between sessions on a per-project basis. .. note:: + The **Title** column cannot be disabled or moved. The information viewed in the outline is based on the :term:`project index`. While novelWriter does diff --git a/docs/source/usage_writing.rst b/docs/source/usage_writing.rst index b59ff19fc..064365fa6 100644 --- a/docs/source/usage_writing.rst +++ b/docs/source/usage_writing.rst @@ -18,10 +18,10 @@ Editing a Document A screenshot of the Document Editor panel. -To edit a document, double-click it in the project tree, or press the :kbd:`Return` key while -having it selected. 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. The syntax -format is described in the :ref:`a_fmt` chapter. +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. The syntax format is described in the :ref:`a_fmt` chapter. 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 @@ -33,6 +33,7 @@ header at the top of the edit or view panel. Optionally, the full project path t be shown. This can be set in **Preferences**. .. tip:: + 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. @@ -79,14 +80,14 @@ Viewing a Document 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`, or select **View Document** in the menu or context -menu. If you have a middle mouse button, middle-clicking on the document will also open it in the -viewer. +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` again 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. +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 :term:`references` become clickable links. Clicking them will replace the content of the viewer with the content of the document the reference points to. @@ -95,7 +96,7 @@ The document viewer keeps a history of viewed documents, which you can navigate 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. +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 @@ -104,12 +105,14 @@ you have created root folders and tags for various story elements like character these will appear as additional tabs in this panel. .. note:: + The **References** panel relies on an up-to-date :term:`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. @@ -136,10 +139,8 @@ 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. -The regular expression search is somewhat dependant on which version of Qt your system has. If you -have Qt 5.13 or higher, there is better support for Unicode symbols in the search. - .. seealso:: + For more information on the capabilities of the Regular Expression option, see the Qt documentation for the `QRegularExpression `_ class. @@ -154,6 +155,7 @@ A few auto-replace features are supported by the editor. You can control every a auto-replace feature from **Preferences**. You can also disable this feature entirely if you wish. .. tip:: + If you don't like auto-replacement, all symbols inserted by this feature are also available in the :guilabel:`Insert` menu, and via :ref:`a_kb_ins`. You may also be using a `Compose Key`_ setup, which means you may not need the auto-replace feature at all. @@ -165,6 +167,22 @@ always accurate. Especially distinguishing between closing single quote and apos 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. + + +.. _a_ui_edit_dialogue: + +Dialogue Highlighting +===================== + +The editor and viewer can optionally highlight character dialogue in your novel documents. By +default, this feature is set to display text in double quotes as dialogue. In **Preferences**, you +can change this to support various other dialogue markers that instead uses dashes to indicate +dialogue, like those used in Spanish, Portuguese, Polish, etc. + +Various styles are supported by changing the settings under "Text Highlighting" in **Preferences**. + +It is also possible to include the dialogue highlighting in your manuscripts. diff --git a/novelwriter/config.py b/novelwriter/config.py index 5c7bf0a0d..0b038272a 100644 --- a/novelwriter/config.py +++ b/novelwriter/config.py @@ -112,7 +112,7 @@ def __init__(self) -> None: # General GUI Settings self.guiLocale = self._qLocale.name() - self.guiTheme = "default" # GUI theme + self.guiTheme = "default_light" # GUI theme self.guiSyntax = "default_light" # Syntax theme self.guiFont = QFont() # Main GUI font self.guiScale = 1.0 # Set automatically by Theme class diff --git a/tests/reference/baseConfig_novelwriter.conf b/tests/reference/baseConfig_novelwriter.conf index 3bd03bbe2..0f30fe3ff 100644 --- a/tests/reference/baseConfig_novelwriter.conf +++ b/tests/reference/baseConfig_novelwriter.conf @@ -1,9 +1,9 @@ [Meta] -timestamp = 2024-12-29 17:30:10 +timestamp = 2025-01-26 18:17:44 [Main] font = -theme = default +theme = default_light syntax = default_light localisation = en_GB hidevscroll = False diff --git a/tests/test_gui/test_gui_theme.py b/tests/test_gui/test_gui_theme.py index b4a45659c..7cd9c0c13 100644 --- a/tests/test_gui/test_gui_theme.py +++ b/tests/test_gui/test_gui_theme.py @@ -20,6 +20,8 @@ """ from __future__ import annotations +import sys + from pathlib import Path import pytest @@ -144,16 +146,17 @@ def testGuiTheme_Theme(qtbot, monkeypatch, nwGUI, tstPaths): # Load Default Theme # ================== - # Set a mock colour for the window background - mainTheme._guiPalette.color(QPalette.ColorRole.Window).setRgb(0, 0, 0, 0) + if sys.platform != "win32": + # Set a mock colour for the window background + mainTheme._guiPalette.color(QPalette.ColorRole.Window).setRgb(0, 0, 0, 0) - # Load the default theme - CONFIG.guiTheme = "default" - assert mainTheme.loadTheme() is True + # Load the default theme + CONFIG.guiTheme = "default" + assert mainTheme.loadTheme() is True - # This should load a standard palette - wCol = QApplication.style().standardPalette().color(QPalette.ColorRole.Window).getRgb() - assert mainTheme._guiPalette.color(QPalette.ColorRole.Window).getRgb() == wCol + # This should load a standard palette + wCol = QApplication.style().standardPalette().color(QPalette.ColorRole.Window).getRgb() + assert mainTheme._guiPalette.color(QPalette.ColorRole.Window).getRgb() == wCol # Mock Dark Theme # ===============