Planungskompendium Energieverteilung:Syntax: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
K (1 Version importiert: Syntax pages - exported from PPR-FR) |
(kein Unterschied)
|
Version vom 7. Dezember 2021, 10:08 Uhr
This page provides details on the syntax to be used in the Electrical Installation Wiki, in particular for elements that are specific to this wiki.
Some of the more complex elements are detailed in subpages:
Fig.xx
Use the syntax below to add "Fig.XX" inside the text, when referring to a figure. This ensures to always have the same look&feel (same acronym/text, green color ...)
See Fig.xx
Syntax:
{{FigRef|<fignum>}} where <fignum> is the figure number (example: A14)
result: Abb. A14
See Figure xx
Almost the same syntax:
{{FigureRef|<fignum>}}
result: Abbildung A14
Reference to several figures
Just add more parameters:
{{FigRef|A11|A12|A22}}
result: Abb. A11, A12 und A22
Highlight Boxes
These are the "boxes" added in the left column of the book in PDF, to highlight an important point. Below is the syntax for their equivalent in the wiki.
syntax
{{Highlightbox | text= This is the text for the highlight box }}
example:
This is the text for the highlight box
If the text to highlight is short, it is possible to put everything on one line:
{{Highlightbox | text=This is the text for the highlight box}}
It is also possible to skip the "text =" part of the syntax, but this is not recommended as it will not work properly if the text to highlight contains an "=" sign
syntax for "local specific" highlight boxes (French wiki)
see #For local specific Highlightbox
Section TOCs (table of contents)
These "section TOCs" can be added in "introductory pages", eg pages with a short text introduction (or not), followed by the contents of this section = the "sub-pages" included in this "section"
syntax:
{{Section-TOC}}
example: not possible to show an example, it only works in a "real" page inside the wiki content hierarchy
Images
Gallery of images
Tables
Footnotes
Syntax to add a footnote call (place it just after the last character of the related word, without a space)
{{fn|<footnote-number>}} where: <footnote-number> = 1 2 3 4 ...
Syntax to add the Notes at the end of the page:
{{footnotes}} <references> {{fn-detail|1|This is text for note 1}} {{fn-detail|2|This is text for note 2}} </references>
Example:
This is my text with footnote one[1]. This is some more text, referencing note two[2]
And this is another place referencing nte one[1].
Notes
Math formulas
Use the same syntax as previous wikis (copy / paste formulas). Just see below § "Special characters"
To know more, see Help page about Mathematical formulas
Multiplication sign
In synthesis, the rules to apply for the multiplication sign are:
- for formula written with
<math> ... </math>
syntax:- use
\cdot
for formulas with variable names (Ib, ka, ...). Example:<math>\sqrt 3\cdot U_0</math>
gives [math]\displaystyle{ \sqrt 3\cdot U_0 }[/math] - use
\times
for formulas where you only have figures. Example:<math>X = 0.08 \times 5</math>
gives [math]\displaystyle{ X = 0.08 \times 5 }[/math]
- use
- for formula written in normal text:
- use special character (symbol) • for formulas with variable names. Example: In = Σ (Ib • ks)
- use standard letter x for formulas where you only have figures. Example: 123 x 8.2
"textual" formulas
see previous § for multiplication sign, and refer to #Special characters for other characters that can be used for "textual" formulas, such as √, Ω or Δ
Characters with special meaning in <math> ... </math>
formulas
Important: the following symbols are reserved characters that either have a special meaning under LaTeX or are not available in all the fonts.
If you enter them directly in the text of your <math> ... </math>
formula, they will normally not render properly, but rather do things you did not intend.
# $ % ^ & _ { } ~ \
Important in particular is the % sign, which is used in some formulas.
These characters can be entered in a formula, anyway, but you need to add a prefix backslash:
\# \$ \% \textasciicircum{} \& \_ \{ \} \~{} \textbackslash{}
Math formula - other specific cases to take care of (for wiki-to-PDF export, in particular)
While exporting the (French) wiki into a PDF, in a few cases a formula that looks OK in the wiki is not rendered properly.
Here are the problematic syntax cases detected, and the recommended solution:
X^'d
: pb is that not only the ' is considered as the exponent, but also all following characters (here would result as X'd)- solution: use the syntax
X^{'}d
- solution: use the syntax
65%
: % is a special characters, as mentioned in previous paragraphs, and should always be preceded by a \- solution: use the syntax
65\%
- solution: use the syntax
\vartriangle
: this works in the wiki but not in export (not found in TeX reference doc also)- solution: as it is used for a Delta symbol, use the syntax
\Delta
- solution: as it is used for a Delta symbol, use the syntax
Vertical alignment of formulas with text
For vertical alignment of formulas that are included "inline" with text:
- use a syntax like: <math style="vertical-align:-70%;"...> and play with the value in %
- for more details: check here
Local Specific contents (for French wiki)
To highlight the contents that are specific to local standards/regulations/habits, use the syntax below
Just for a small text
{{Local-specific|this is the local specific text}}
this is the local specific text
For a long specific section
NOTE : pages using this syntax can only be modified with wikitext editor (not Visual editor).
{{Local-specific|start}} this is the migrated content wich is french specific ... ... use usual syntax for wiki contents ... .... .... {{Local-specific|end}}
this is the migrated content wich is french specific ...
... use usual syntax for wiki contents ...
....
....
For local specific Highlightbox
{{Highlightbox-specific | This is the text for the french specific highlight box }}
example:
This is the text for the french specific highlight box
For a local specific cell in a table
{{tb-start | id=Tab1001 | num=A1 | title=This is my table title | cols=3}} {| class="wikitable" |- ! header ! header |- | a normal cell | {{Local-specific}} | a cell with '''local specific''' content |}
Result:
header | header |
---|---|
a normal cell | a cell with local specific content |
Other points
Warning: template "parameters" with an = sign in it
Any time there is an = sign in the content of a table title, figure title, table note ... passed using one of my templates, (for example {{TableEnd ...}})
you will need to replace the = sign by {{=}}
Basic Text and paragraph headings
Description | You type | You get |
---|---|---|
colspan="3" Vorlage:Tb HC1 | Character (inline) formatting – applies anywhere | ||
Italic text | ''italic''
|
italic |
Bold text | '''bold'''
|
bold |
Bold and italic | '''''bold & italic'''''
|
bold & italic |
Escape wiki markup | <nowiki>no ''markup''</nowiki>
|
no ''markup'' |
colspan="3" Vorlage:Tb HC1 | Section formatting – only at the beginning of the line | ||
Headings of different levels | =level 1= ==level 2== ===level 3=== ====level 4==== =====level 5===== ======level 6====== An article with 4 or more headings automatically creates a table of contents. |
Level 1
Level 2
Level 3 Level 4Level 5 Level 6
|
Horizontal rule | ----
|
|
Bullet list |
* one * two * three ** three point one ** three point two Inserting a blank line will end the first list and start another. |
|
indent text |
: Single indent :: Double indent ::::: Multiple indent This workaround may be controversial from the viewpoint of accessibility. |
|
Paragraphs
MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tags <br />
.
Titles, sub-titles ...
The wiki page title (defined when creating a page) is using the first title level (h1)
So when the book content to migrate includes "paragraphs", "sub-paragraphs" ... their titles should use wiki syntax for level 2 (== title ==), level 3 (=== sub-paragraph ===) etc
bullet lists - with content longer than just one sentence
Bullet list |
* one * two ** two point one ** two point two * three : continued :* three point one (:* syntax rather than **) * four : text paragraph inside bullet four : several continued sentences is possible : can also be used for an image that is part of bullet point :[[File:Blogs icon.png|none]] :* four point one (:* syntax rather than **) Inserting a blank line will end the first list and start another. nota: there is a small bug with wiki CSS, so inside tables following text does not have proper font size ==> not a problem as should never happen in tables |
|
It is not recommended to have more than 2 nested levels of bullet lists.
If there are more than 2 bullet list levels (maybe sometimes also for 2 levels), it is recommended to change the first level of bullet list to a sub-paragraph level
Special characters
less/greater than or equal
- Replace the GraphSch character used in the book by standard existing characters: ≤ and ≥
- You can just paste it in a wiki page (you can copy it from here), or when editing you can use the codes
≤
and≥
giving same results ≤ and ≥
star and delta symbols
- for star I migrated the source from figB20.ai, insert it using
[[File:star_symbol.svg]]
which gives this result: Datei:Star symbol.svg - for delta you can paste directly this character: Δ or use the code
Δ
which gives the same result: Δ
ohm symbol
- Ω
- html code :
Ω
giving same result Ω
square root symbol
- √
- html code:
√
giving same result √