@@ -125,8 +125,8 @@ background, depending on the selected theme.
125125
126126.. _a_fmt_emph :
127127
128- Text Emphasis
129- =============
128+ Text Emphasis with Markdown
129+ ===========================
130130
131131A minimal set of Markdown text emphasis styles are supported for text paragraphs.
132132
@@ -156,7 +156,7 @@ In addition, the following rules apply:
156156 outside, they violate rule 2.
1571574. Text emphasis does not span past line breaks. If you need to add emphasis to multiple lines or
158158 paragraphs, you must apply it to each of them in turn.
159- 5. Text emphasis can only be used in plain paragraphs. Comments, titles, and meta data tags don't
159+ 5. Text emphasis can only be used in comments and paragraphs. Headings and meta data tags don't
160160 allow for formatting, and any formatting markup will be rendered as-is.
161161
162162.. tip ::
@@ -168,8 +168,8 @@ In addition, the following rules apply:
168168
169169.. _a_fmt_shortcodes :
170170
171- Extended Formatting with Shortcodes
172- ===================================
171+ Formatting with Shortcodes
172+ ==========================
173173
174174For additional formatting options, you can use shortcodes. Shortcodes is a form of in-line codes
175175that can be used to change the format of the text that follows and opening code, and last until
@@ -197,6 +197,13 @@ word if you need to. You can also freely combine them to form more complex forma
197197The shortcodes are available from the **Format ** menu and in the editor toolbar, which can be
198198activated by clicking the left-most icon button in the editor header.
199199
200+ .. note ::
201+
202+ Shortcodes are not processed until you generate a preview or generate a manuscript document. So
203+ there is no highlighting of the text between the formatting markers. There is also no check that
204+ your markers make sense. You must ensure that you have both the opening and closing formatting
205+ markers where you want them.
206+
200207.. versionadded :: 2.2
201208
202209
@@ -217,44 +224,101 @@ correctly formatted, the syntax highlighter will indicate this by altering the c
217224
218225The different styles of comments are as follows:
219226
220- ``% Comment text ... ``
227+ ``% Your comment text ... ``
221228 This is a comment. The text is not rendered by default (this can be overridden), seen in the
222229 document viewer, or counted towards word counts. It is intended for you to make notes in your
223230 text for your own sake, whatever that may be, that isn't part of the story text. This is the
224231 general format of a comment.
225232
226- ``%Synopsis: Comment text ... ``
233+ ``%Synopsis: Your synopsis text ... ``
227234 This is a synopsis comment. It is generally treated in the same way as a regular comment, except
228235 that it is also captured by the indexing algorithm and displayed in the :ref: `a_ui_outline `. It
229236 can also be filtered separately when building the project to for instance generate an outline
230237 document of the whole project.
231238
232- ``%Short: Comment text ... ``
239+ ``%Short: Your short description ... ``
233240 This is a short description comment. It is identical to the synopsis comment (they are
234241 interchangeable), but is intended to be used for project notes. The text shows up in the
235242 Reference panel below the document viewer in the last column labelled **Short Description **.
236243
237- ``%~ Comment text ... ``
238- This can be used to exclude story text from your manuscript without having to delete it from
239- your text. Comments with the ``~ `` will *never * be included in the manuscript, even if you have
240- chosen to include comments in it. That is the main difference between these two formats.
244+ ``%Footnote.<key>: Your footnote text ... ``
245+ This is a special comment assigned to a footnote marker. See :ref: `a_fmt_footnote ` for how to
246+ use them in your text.
241247
242248.. note ::
243249 Only one comment can be flagged as a synopsis or short comment for each heading. If multiple
244250 comments are flagged as synopsis or short comments, the last one will be used and the rest
245251 ignored.
246252
247253
254+ .. _a_fmt_footnote :
255+
256+ Footnotes
257+ =========
258+
259+ Footnotes are added with a shortcode, paired with a matching comment for the actual footnote text.
260+ The matching is done with a key that links the two. If you insert a footnote from the **Insert **
261+ menu, a unique key is generated for you.
262+
263+ The insert feature will add the footnote shortcode marker at the position of your cursor in the
264+ text, and create the associated footnote comment right after the paragraph, and move the cursor
265+ there so you can immediately start typing the footnote text.
266+
267+ The footnote comment can be anywhere in the document, so if you wish to move them to, say, the
268+ bottom of the text, you are free to do so.
269+
270+ Footnote keys are only required to be unique within a document, so if you copy, move or merge text,
271+ you must make sure the keys are not duplicated. If you use the automatically generated keys from
272+ the **Insert ** menu, they are unique among all indexed documents. They are not guaranteed to be
273+ unique against footnotes in the Archive or Trash folder though, but the chance of accidentally
274+ generating the same key twice in a project is relatively small in the first place (1 in 810 000).
275+
276+ This is what a footnote inserted into a paragraph may look like when completed:
277+
278+ .. code-block :: md
279+
280+ This is a text paragraph with a footnote[footnote:fn1] in the middle.
281+
282+ %Footnote.fn1: This is the text of the footnote.
283+
284+ .. versionadded :: 2.5
285+
286+
287+ .. _a_fmt_ignore :
288+
289+ Ignored Text
290+ ============
291+
292+ If you want to completely ignore some of the text in your documents, but are not ready to delete
293+ it, you can add ``%~ `` before the text paragraph or line. This will cause novelWriter to skip the
294+ text entirely when generating previews or building manuscripts.
295+
296+ This is a better way of removing text than converting them to regular comments, as you may want to
297+ include regular comments in your previews or draft manuscript.
298+
299+ You can toggle the ignored text feature on and off for a paragraph by pressing :kbd: `Ctrl + Shift + D `
300+ on your keyboard with your cursor somewhere in the paragraph.
301+
302+ Example:
303+
304+ .. code-block :: md
305+
306+ %~ This text is ignored.
307+
308+ This text is a regular paragraph.
309+
310+
248311 .. _a_fmt_tags :
249312
250313Tags and References
251314===================
252315
253316The document editor supports a set of keywords used for setting tags, and making references between
254- documents.
317+ documents based on those tags .
255318
256- Tags use the keyword ``@tag: `` to define a tag. The tag can be set once per section defined by a
257- heading. Setting it multiple times under the same heading will just override the previous setting.
319+ You must use the keyword ``@tag: `` to define a tag. The tag can be set once per section defined by
320+ a heading. Setting it multiple times under the same heading will just override the previous
321+ setting.
258322
259323``@tag: value ``
260324 A tag keyword followed by the tag value, like for instance the name of a character.
@@ -306,6 +370,40 @@ Examples:
306370 from the manuscript build tool as long as the format supports paragraph alignment.
307371
308372
373+ Alignment with Line Breaks
374+ --------------------------
375+
376+ If you have line breaks in the paragraph, like for instance when you are writing verses, the
377+ alignment markers must be applied to the first line. Markers on the other lines are ignored. The
378+ markers for the first line are used for all the other lines.
379+
380+ For the following text, all lines will be centred, not just the first:
381+
382+ .. code-block :: md
383+
384+ >> I am the very model of a modern Major-General <<
385+ I've information vegetable, animal, and mineral
386+ I know the kings of England, and I quote the fights historical
387+ From Marathon to Waterloo, in order categorical
388+
389+
390+ Alignment with First Line Indent
391+ --------------------------------
392+
393+ If you have first line indent enabled in your Manuscript build settings, you probably want to
394+ disable it for text in verses. Adding any alignment tags will cause the first line indent to be
395+ switched off for that paragraph.
396+
397+ The following text will always be aligned against the left margin:
398+
399+ .. code-block :: md
400+
401+ I am the very model of a modern Major-General <<
402+ I've information vegetable, animal, and mineral
403+ I know the kings of England, and I quote the fights historical
404+ From Marathon to Waterloo, in order categorical
405+
406+
309407 .. _a_fmt_break :
310408
311409Vertical Space and Page Breaks
0 commit comments