Tab tests
An example topic that is referenced in a nested TOC. It contains more tests for the tabbed code examples.
Code examples with implicit titles
The tab labels are derived from the code block's language code.
var foo= 7.0f;
foo = foo + 3.2f;
float foo = 7.0F;
foo += 3.2f;
float foo = 7;
foo = foo + 2.4;
Code examples with explicit titles
You can assign titles to the tabs by surrounding each code block with a <div class="tab-section" title="Custom Title">.
var foo= 7.0f;
foo = foo + 3.2f;
// What code line wrap looks like:
LongVariableType LongVariableName = LongType.Chained.WithALong.SeriesOfFunctions(foo, bar, baz).EvenMore(blat).LongType.Chained.WithALong.SeriesOfFunctions(foo, bar, baz).EvenMore(blat).LongType.Chained.WithALong.SeriesOfFunctions(foo, bar, baz).EvenMore(blat);
float foo = 7.0F;
foo += 3.2f;
float foo = 7;
foo = foo + 2.4;
Tabbed sections without code examples
<div class="tab-section" title="A Title"> can be used without code blocks, too. Any markdown within the div element is part of the tab section.
Lorem Opsam
Lorem ipsum.
Magic words
Hocus pocus
Important
This is only an example, not real magic words.
Note
Headings within each tab section exist within the normal page structure, so the heading level should be based on what is before the tab group (but doesn't need to consider other sections in the same group).
- Orange
- Apple
- Grape
| Juice | sugar content |
|---|---|
| Apple | 30 gm |
| Grape | 34 gm |
| Orange | 40 kg |
Nested tab groups
Tab groups can be nested inside tab groups. This has only been tested to one level of nesting. Any deeper is unsupported.
var foo= 7.0f;
foo = foo + 3.2f;
float foo = 7.0F;
foo += 3.2f;
float foo = 7;
foo = foo + 2.4;
Lorem Opsam
Lorem ipsum.
Magic section
Hocus pocus
Important
This is only an example, not real magic words.
Note
Headings within each tab section exist within the normal page structure, so the heading level should be based on what is before the tab group (but doesn't need to consider other sections in the same group).
- Orange
- Apple
- Grape
| Juice | sugar content |
|---|---|
| Apple | 30 gm |
| Grape | 34 gm |
| Orange | 40 kg |
var foo= 7.0f;
foo = foo + 3.2f;
float foo = 7.0F;
foo += 3.2f;
float foo = 7;
foo = foo + 2.4;