Difference between revisions of "Template:Q"
Jump to navigation
Jump to search
(→Number at the end) |
(→Reverse option) |
||
| Line 32: | Line 32: | ||
! Code !! Expected !! Actual | ! Code !! Expected !! Actual | ||
|- | |- | ||
| − | | <code><nowiki>{{q|Isn't this nice?|r}}</nowiki></code> || <div id="question1">[[#paragraph1|Isn't this nice? 1]]</div> | + | | <code><nowiki>{{q|1|Isn't this nice?|r}}</nowiki></code> || <div id="question1">[[#paragraph1|Isn't this nice? 1]]</div> |
|| {{q|1|Isn't this nice?|r}} | || {{q|1|Isn't this nice?|r}} | ||
|} | |} | ||
Revision as of 17:15, 18 April 2020
q - stands for Question
This template is recommended to be used whenever a literature question is needed.
Contents
Parameters
first - number of the question.
second - the actual text of the question.
third - optional option.
Options
r - reverse. Puts number of question at the end of the question.
One question - one paragraph
{{q|25|Isn't this nice?}}
It will automatically link the question to the 25 paragraph.
Tests
| Code | Expected | Actual |
|---|---|---|
{{q|1|Isn't this nice?}} |
||
{{q|25|Isn't this nice?}} |
||
{{q|105|Isn't this nice?}} |
Reverse option
| Code | Expected | Actual |
|---|---|---|
{{q|1|Isn't this nice?|r}} |
One question - multiple paragraphs
{{q|25-27|Isn't this nice?}}
It will automatically link the question to the 25 paragraph.
Tests
| Code | Expected | Actual |
|---|---|---|
{{q|7-9|Isn't this nice?}} |
||
{{q|7-10|Isn't this nice?}} |
||
{{q|10-12|Isn't this nice?}} |
||
{{q|99-101|Isn't this nice?}} |
||
{{q|101-105|Isn't this nice?}} |
Reverse option
| Code | Expected | Actual |
|---|---|---|
{{q|7-9|Isn't this nice?|r}} |