|
@@ 147-162 (lines=16) @@
|
| 144 |
|
RawInline(u'tex', u'\\phantomsection\\addcontentsline{exercise}{exercise}{\\protect\\numberline {1}{\\ignorespaces Exercise}}'), |
| 145 |
|
Span( |
| 146 |
|
[u'exercise:1', ['pandoc-numbering-text', 'exercise'], []], |
| 147 |
|
[Strong(createListStr(u'Exercise 1'))] |
| 148 |
|
) |
| 149 |
|
]) |
| 150 |
|
|
| 151 |
|
assert pandoc_numbering.numbering(src['t'], src['c'], 'latex', {}) == dest |
| 152 |
|
|
| 153 |
|
init() |
| 154 |
|
|
| 155 |
|
src = Para(createListStr(u'Exercise (The title) #')) |
| 156 |
|
dest = Para([ |
| 157 |
|
RawInline(u'tex', u'\\phantomsection\\addcontentsline{exercise}{exercise}{\\protect\\numberline {1}{\\ignorespaces The title}}'), |
| 158 |
|
Span( |
| 159 |
|
[u'exercise:1', ['pandoc-numbering-text', 'exercise'], []], |
| 160 |
|
[ |
| 161 |
|
Strong(createListStr(u'Exercise 1')), |
| 162 |
|
Space(), |
| 163 |
|
Emph(createListStr(u'(') + createListStr(u'The title') + createListStr(u')')) |
| 164 |
|
] |
| 165 |
|
) |
|
@@ 366-379 (lines=14) @@
|
| 363 |
|
Span( |
| 364 |
|
[u'exercise:2.2.1', ['pandoc-numbering-text', 'exercise'], []], |
| 365 |
|
[Strong(createListStr(u'Exercise 2.1'))] |
| 366 |
|
) |
| 367 |
|
]) |
| 368 |
|
|
| 369 |
|
assert pandoc_numbering.numbering(src['t'], src['c'], '', meta) == dest |
| 370 |
|
|
| 371 |
|
def test_numbering_sectioning_map(): |
| 372 |
|
init() |
| 373 |
|
|
| 374 |
|
meta = getMeta2() |
| 375 |
|
|
| 376 |
|
sectioning(meta) |
| 377 |
|
|
| 378 |
|
src = Para([Str(u'Exercise'), Space(), Str(u'#')]) |
| 379 |
|
dest = Para([ |
| 380 |
|
Span( |
| 381 |
|
[u'exercise:2.2.1', ['pandoc-numbering-text', 'exercise'], []], |
| 382 |
|
[Strong(createListStr(u'Exercise 2.1'))] |