asciidoctor-mdpp 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,66 @@
1
+ <!-- #mdp-includes -->
2
+ ## File Includes
3
+
4
+ A File Include statement points to another Markdown++ file and imports the file's contents at the location of the statement. This enables multi-file structure in a single document.
5
+
6
+ <!--style:BQ_Learn-->
7
+ > ### Syntax
8
+ >
9
+ > An Include statement is created by writing a path to a Markdown++ document between `<!--include:` and `-->`. Relative paths and absolute paths are both valid path values. Web paths are not supported. The include statement must be the only thing on a line.
10
+ >
11
+ > #### Basics
12
+ >
13
+ > A basic Include statement. The Include must be written on it's own line to work properly.
14
+ > ```
15
+ > <!--include:my_file.md-->
16
+ > ```
17
+ >
18
+ > Relative paths and absolute paths are fine to use.
19
+ > ```
20
+ > <!--include:my_file.md-->
21
+ > ```
22
+ >
23
+ > ```
24
+ > <!--include:C:/Users/Me/Docs/my_file.md-->
25
+ > ```
26
+ >
27
+ > Multiple includes can be used in the same document.
28
+ > ```
29
+ > <!--include:my_file.md-->
30
+ >
31
+ > <!--include:doc_2.md-->
32
+ > ```
33
+
34
+ ### File Includes Behavior
35
+
36
+ When ePublisher detects a File Include statement, the file is read, and the Include tag is replaced with the content of the file. If the no file is found at the path given, the Include tag will be passed through to the output as an HTML Comment.
37
+
38
+ #### Using a File Include
39
+
40
+ To use an Include statement, all that needs to be done is write the tag where the file's content is to be imported. Below, an include statement is written below a Title.
41
+
42
+ ```
43
+ Learning ePublisher
44
+ ===================
45
+
46
+ <!--include:epublisher_basics.md-->
47
+
48
+ ```
49
+
50
+ This can even be done inside of documents used in an Include statement, as long as it is not a [Recursive Include][mdp-includes-recursion]. Use this feature to create Map Files for many Markdown++ documents, or create documents needed for content re-use.
51
+
52
+ <!--#mdp-includes-recursion-->
53
+ #### Recursive Includes
54
+
55
+ If an Include statement tries to insert a document that has already been inserted by a parent file, ePublisher's generation log will display a message like this one:
56
+
57
+ ```
58
+ [Warning]
59
+ Skipping recursive include file:
60
+ 'C:\Users\Me\Documents\include_doc.md'
61
+ in file: 'C:\Users\Me\main_doc.md'
62
+ ```
63
+
64
+ This message displays because ePublisher cannot insert the document. Doing so would create a recursive loop and would break the generation. If this message is recieved, it's time to look at the layout of Includes in the source documents.
65
+
66
+ The message can be useful to track down the file in error. The first file path refers to the file in the attempted Include statement. The second file path refers to where the Include occured.
@@ -0,0 +1,235 @@
1
+ <!-- #mdp-multiline-tables -->
2
+ ## Multiline Tables in Markdown++
3
+
4
+ Multiline tables in Markdown++ provide an enhanced way to organize detailed content across multiple lines, allowing for more readable and flexible structures. Unlike standard tables, multiline tables allow rows to span multiple lines by using a special tag and structured spacing.
5
+
6
+ ### Introduction
7
+
8
+ Multiline tables are very similar to regular Markdown tables, but they are more flexible when it comes to the table structure. In Markdown++, multiline tables are indicated by placing a `<!-- multiline -->` tag directly above the table. Additionally, a new row is created by adding a row of cells that are either empty or contain only whitespace.
9
+
10
+ A key feature of multiline tables is that you can include full block Markdown elements within cells, such as lists, code blocks, or paragraphs. This makes multiline tables particularly useful when content within a cell becomes too detailed to fit conveniently on a single line. By utilizing multiline tables, writers can keep content organized and easier to edit.
11
+
12
+ <!--style:BQ_Learn-->
13
+ > ### Syntax
14
+ >
15
+ > Multiline tables in Markdown++ consist of the same main elements as standard tables:
16
+ >
17
+ > - A **header row**, which contains header cell content separated by `|` characters.
18
+ > - An **alignment row**, which indicates the alignment of the body cells' text. Each cell in this row contains at least 3 `-` characters, and an optional `:` character to indicate alignment. Each cell is separated by a `|` character.
19
+ > - Default alignment only uses `-` characters; 3 or more.
20
+ > - Left align the column by starting the cell with `:` and filling in the rest with `:` characters; 3 or more.
21
+ > - Right align the column by starting the cell with 3 or more `-` characters, ending with a `:` character.
22
+ > - Center align the column by starting and ending the cell with `:` characters. Put `-` characters between them; 3 or more.
23
+ > - 1 or more **body rows**, that contain body cell content separated by `|` characters.
24
+ >
25
+ > The key difference is the `<!-- multiline -->` tag and the ability to use blank rows to create new table rows, along with the capability to write full block Markdown inside cells.
26
+ >
27
+ > #### Multiline Tag
28
+ >
29
+ > To use a multiline table, add the following tag directly above your table:
30
+ > ```
31
+ > <!-- multiline -->
32
+ > ```
33
+ > This tag tells Markdown++ to treat the following table as a multiline table.
34
+ >
35
+ > #### Creating New Rows
36
+ >
37
+ > To create a new row, simply add a row of cells that are either empty or contain only whitespace. This indicates to Markdown++ that the next line of cells should be treated as part of a new row.
38
+ >
39
+ > #### Basics
40
+ >
41
+ > Below is an example of a multiline table:
42
+ > ```
43
+ > <!-- multiline -->
44
+ > | name | details |
45
+ > |------|--------------------------|
46
+ > | Bob | Lives in Dallas. |
47
+ > | | - Enjoys cycling |
48
+ > | | - Loves cooking |
49
+ > | | |
50
+ > | Mary | Lives in El Paso. |
51
+ > | | - Works as a teacher |
52
+ > | | - Likes painting |
53
+ > ```
54
+ >
55
+ > In this example, the empty row acts as a separator, creating a break before the next row. Notice how detailed information, including lists, is included within a cell.
56
+ >
57
+ > You can also use multiline tables without wrapping `|` characters:
58
+ > ```
59
+ > <!-- multiline -->
60
+ > name | details
61
+ > ------|--------------------------
62
+ > Bob | Lives in Dallas.
63
+ > | - Enjoys cycling
64
+ > | - Loves cooking
65
+ > |
66
+ > Mary | Lives in El Paso.
67
+ > | - Works as a teacher
68
+ > | - Likes painting
69
+ > ```
70
+ >
71
+ > #### Alignment in Multiline Tables
72
+ >
73
+ > Just like with standard tables, multiline tables can have different alignments for each column.
74
+ >
75
+ > Left-align the text of cells in a column by starting the alignment cell with `:`:
76
+ > ```
77
+ > <!-- multiline -->
78
+ > | name | details |
79
+ > |:-----|-------------------------|
80
+ > | Bob | Lives in Dallas. |
81
+ > | | - Enjoys cycling |
82
+ > | | - Loves cooking |
83
+ > | | |
84
+ > | Mary | Lives in El Paso. |
85
+ > | | - Works as a teacher |
86
+ > | | - Likes painting |
87
+ > ```
88
+ >
89
+ > Center-align the text of cells in a column by starting and ending the alignment cell with `:`:
90
+ > ```
91
+ > <!-- multiline -->
92
+ > | name | details |
93
+ > |:------:|-------------------------|
94
+ > | Bob | Lives in Dallas. |
95
+ > | | - Enjoys cycling |
96
+ > | | - Loves cooking |
97
+ > | | |
98
+ > | Mary | Lives in El Paso. |
99
+ > | | - Works as a teacher |
100
+ > | | - Likes painting |
101
+ > ```
102
+ >
103
+ > ##### Markdown In Multiline Tables
104
+ >
105
+ > Multiline tables can also include full Markdown blocks, such as code blocks or lists:
106
+ > ```
107
+ > <!-- multiline -->
108
+ > | name | hobbies |
109
+ > |----------|-------------------------|
110
+ > | **Bob** | - Biking |
111
+ > | | - Cooking |
112
+ > | | - Reading |
113
+ > | | |
114
+ > | **Mary** | Here is a code example: |
115
+ > | | |
116
+ > | | ``` |
117
+ > | | function greet() { |
118
+ > | | console.log("Hi"); |
119
+ > | | } |
120
+ > | | ``` |
121
+ > ```
122
+ >
123
+ > Including full Markdown blocks like code and lists helps emphasize complex content within cells, making tables more versatile.
124
+ >
125
+ > #### Markdown++ Custom Styles
126
+ >
127
+ > A custom Table Style can be given to a multiline Table using a Markdown++ style tag directly above the multiline tag. Additionally, multiple Markdown++ commands can be combined using `;`:
128
+ > ```
129
+ > <!--style:CustomTable; multiline -->
130
+ > | name | description |
131
+ > |------|-----------------------------|
132
+ > | Bob | - Loves biking |
133
+ > | | - Enjoys programming |
134
+ > | | |
135
+ > | Mary | A passionate teacher. |
136
+ > | | - Loves painting |
137
+ > | | - Enjoys hiking |
138
+ > ```
139
+ >
140
+ > ##### Content in Cells
141
+ >
142
+ > Inline text content can be further customized using the inline tag convention, and multiple commands can be used in a single tag:
143
+ > ```
144
+ > <!-- multiline -->
145
+ > | name | age | city |
146
+ > |-------------------------------|-----|---------|
147
+ > | <!--style:CustomText-->*Bob* | 42 | Dallas |
148
+ > | | | |
149
+ > | <!--style:CustomText-->*Mary* | 37 | El Paso |
150
+ > ```
151
+ >
152
+ > To learn more about Markdown++ tagging, see [Learning Markdown++][mdp-learning-mdp].
153
+
154
+ ### ePublisher Style Information
155
+
156
+ #### Style Behavior
157
+
158
+ In order to style a multiline Table and its cells in detail, the same styles are needed as with standard tables in ePublisher. A multiline table gets 3 styles when detected in a document: **Table**, **Table Cell Head**, and **Table Cell Body**.
159
+
160
+ ##### Table Style
161
+
162
+ The Table Style is the primary style that ePublisher adds when a multiline table is detected. The default name is **Table**, but this can be customized using a Markdown++ style tag.
163
+
164
+ ###### Customizing the Table Style
165
+
166
+ By adding a Markdown++ custom style tag, the Table Style name can be changed:
167
+
168
+ ```
169
+ <!--style:CustomTable; multiline -->
170
+ | name | age | city |
171
+ |------|-----|---------|
172
+ | Bob | 42 | Dallas |
173
+ | | | |
174
+ | Mary | 37 | El Paso |
175
+ ```
176
+
177
+ ##### Header & Body Cell Styles
178
+
179
+ Header and body cell styles function in the same way for multiline tables as they do for standard tables. Each header cell gets a **Table Cell Head** style, and each body cell gets a **Table Cell Body** style. These styles can also be customized if the Table Style is given a custom name:
180
+
181
+ ```
182
+ <!--style:CustomTable; multiline -->
183
+ | name | age | city |
184
+ |------|-----|---------|
185
+ | Bob | 42 | Dallas |
186
+ | | | |
187
+ | Mary | 37 | El Paso |
188
+ ```
189
+
190
+ #### Default Style Properties
191
+
192
+ Style Type: **Table**, **Paragraph**
193
+ Style Name: **Table**, **Table Cell Head**, **Table Cell Body**
194
+
195
+ ##### Table
196
+
197
+ Property | Value
198
+ ----------|-------
199
+ border top color | #222222
200
+ border top style | solid
201
+ border top width | 1px
202
+ border right color | #222222
203
+ border right style | solid
204
+ border right width | 1px
205
+ border bottom color | #222222
206
+ border bottom style | solid
207
+ border bottom width | 1px
208
+ border left color | #222222
209
+ border left style | solid
210
+ border left width | 1px
211
+
212
+ ##### Table Cell Head
213
+
214
+ Property | Value
215
+ ----------|-------
216
+ font family | Arial
217
+ font size | 11pt
218
+ font weight | bold
219
+ padding top | 6pt
220
+ padding right | 6pt
221
+ padding bottom | 6pt
222
+ padding left | 6pt
223
+
224
+ ##### Table Cell Body
225
+
226
+ Property | Value
227
+ ----------|-------
228
+ font family | Arial
229
+ font size | 11pt
230
+ padding top | 6pt
231
+ padding right | 6pt
232
+ padding bottom | 6pt
233
+ padding left | 6pt
234
+
235
+ If a custom style name is assigned to a multiline Table, the style names will still inherit all of the listed default style information.
@@ -0,0 +1,13 @@
1
+ # Markdown++ Specification Overview
2
+
3
+ This directory contains the specifications for Markdown++, an enhanced variant of standard Markdown. Markdown++ extends basic Markdown syntax with additional features designed to improve technical documentation capabilities.
4
+
5
+ ## File Extension and Compatibility
6
+
7
+ Markdown++ files utilize the standard `.md` file extension, rather than a unique `.mdpp` extension. This design choice is fundamental to Markdown++'s philosophy and offers several key advantages:
8
+
9
+ * **Seamless Integration**: By using the `.md` extension, Markdown++ files can be easily integrated into existing Markdown-based workflows, tools, and platforms without requiring special file type handling.
10
+ * **Backward Compatibility**: Markdown++ is designed to be fully backward compatible with standard Markdown. This means that any Markdown++ file can be processed by a standard Markdown parser, which will render the document as a regular Markdown file. While Markdown++-specific features may not be fully interpreted by standard parsers, they are implemented in a way that gracefully degrades (e.g., as HTML comments) to maintain readability and prevent rendering errors.
11
+ * **Enhanced Features**: Markdown++ introduces powerful features such as multiline tables, custom style tags, and file includes. These extensions are carefully designed to coexist with standard Markdown syntax, often leveraging HTML comments or other Markdown-compatible constructs to ensure broad compatibility.
12
+
13
+ This approach allows authors to create richer, more structured technical documentation using Markdown++ while ensuring that their content remains accessible and usable within the broader Markdown ecosystem.