টেমপ্লেট:TOC row l
এই টেমপ্লেটটি টেমপ্লেট শৈলী ব্যবহার করে: |
Usage
সম্পাদনাThese templates are designed to aid in producing tables of contents (TOCs) using a standardised set of table sections. They are begun with a {{TOC begin}} and are ended with {{TOC end}}.
The aim of these templates is to divorce the TOC from the underlying code. If you have a new circumstance to format, perhaps the best option is to make a new template, rather than hack an old one to fit.
TOC begin
সম্পাদনা- Parameters
- align: alignment of the table on the page, defaults to central (optional)
- width: table width (optional, any CSS units),
| width = 100%
- max-width: table max-width (optional, any CSS units),
| max-width = 35em
- sc: applies small-caps to the entire table (optional),
| sc = yes
- style: applies any other free-form style to the entire table (optional/no default),
| style = line-height:1
- plus: allows addition of separate code (optional), e.g. to set table attributes
| plus = cellpadding {{=}} 5
( refer Template:= )
Naming convention
সম্পাদনাTemplate are named by the colspan of their cells (in order) and the salient feature of any cells that are not "normal".
For example, a row of three single cells is {{TOC row 1-1-1}}, and a row with a colspan-2 cell followed by a single cell is {{TOC row 2-1}}. If a cell has no colspan but a salient feature, the "1" from that cell is omitted: {{TOC row 1-out-1}}
Special cases
সম্পাদনা- {{TOC row l}}: a single cell, text left-aligned, with a colspan given in the first parameter, and contents in the second.
- {{TOC row c}}: a single cell, text centred, with a colspan given in the first parameter, and contents in the second.
- {{TOC row r}}: a single cell, text right-aligned, with a colspan given in the first parameter, and contents in the second.
3-column tables
সম্পাদনা3-column tables are perhaps the most common type. The "normal" condition is for the first and last columns to be right-aligned, and the middle column to be left aligned.
- {{TOC row 1-1-1}}: three single cells, right-left-right aligned, respectively
- {{TOC row 2-1}}: a
colspan=2
cell and a normal cell. Left and right aligned respectively.
- Hanging indents
- {{TOC row 1-out-1}}: three single cells, but the middle cell has a {{hanging indent}} applied.
- {{TOC row 2out-1}}: same as "2-1", but the first cell has a hanging indent.
- {{TOC row 1-dot-1}}: same as "1-out-1", but the middle cell also has a dot-leader
- Optional: use symbol to set dot character(s) and spaces to set number of spaces (default: one dot and 5 spaces)
- {{TOC row 2dot-1}}: same as "2out-1", but the first cell is the "main" cell and has a dot-leader appended. Example en:Page:Pierre and Jean - Clara Bell - 1902.djvu/73
- Different alignment of the main cell
- {{TOC row 1-r-1}}: three single cells, left-right-right aligned, respectively.
- {{TOC row 1-c-1}}: three single cells, left-center-right aligned, respectively.
Example
সম্পাদনা
{{TOC begin|width=60em}}
{{TOC row c | 3 | {{x-larger|Table of Contents:}} }}
{{TOC row 2-1 | Introduction, Preface and Other Front Matter :|1}}
{{TOC row 1-1-1 | 1 |Chapter 1: Chapter Name|2}}
{{TOC row 1-1-1 | 2 |Chapter 2: Chapter Name|3}}
{{TOC row r | 3 | Plates illustrating various things }}
{{TOC row 1-out-1 |3 |Chapter 3: Chapter Name|4}}
{{TOC row 2out-1 | Chapter Name| 5}}
{{TOC row 1-dot-1 |4 |Chapter 4: Chapter Name|6}}
{{TOC row 2dot-1 |Chapter Name|7}}
{{TOC end}}
Table of Contents: | ||
Introduction, Preface and Other Front Matter : | 1 | |
1 | Chapter 1: Chapter Name | 2 |
2 | Chapter 2: Chapter Name | 3 |
Plates illustrating various things | ||
3 | Chapter 3: Chapter Name | 4 |
Chapter Name | 5 | |
4 | Chapter 4: Chapter Name |
6 |
Chapter Name |
7 |
4-column tables
সম্পাদনাThe "normal" condition is for the first, second and last columns to be right-aligned, and the third column to be left aligned.
- {{TOC row 1-1-1-1}}
- {{TOC row 2-1-1}}
Table of Contents: {{TOC row c}} | |||
Prefatory Notice {{TOC row 3-1}} | i | ||
Introduction | {{TOC row 2-1-1}} | 1 | |
1 | a | Section 1: {{TOC row 1-1-1-1}} | 2 |
b | Section 2: {{TOC row 1-1-1-1}} বেজায় গরম। গাছতলায় দিব্যি ছায়ার মধ্যে চুপচাপ শুয়ে আছি, তবু ঘেমে অস্থির। ঘাসের উপর রুমালটা ছিল, ঘাম মুছবার জন্য যেই সেটা তুলতে গিয়েছি অমনি রুমালটা বলল, ‘ম্যাও!’ কি আপদ! রুমালটা ম্যাও করে কেন? চেয়ে দেখি রুমাল তো আর রুমাল নেই, দিব্যি মোটা-সোটা লাল টক্টকে একটা বেড়াল গোঁফ ফুলিয়ে প্যাট্-প্যাট্ করে আমার দিকে তাকিয়ে আছে। আমি বললাম, ‘কি মুশকিল! ছিল রুমাল, হয়ে গেল একটা বেড়াল।’ অমনি বেড়ালটা বলে উঠল, ‘মুশকিল আবার কি? ছিল একটা ডিম, হয়ে গেল দিব্যি একটা প্যাঁক্পেঁকে হাঁস। এ তো হামেশাই হচ্ছে।’ আমি খানিক ভেবে বললাম, ‘তা হলে তোমায় এখন কি বলে ডাকব? তুমি তো সত্যিকারের বেড়াল নও, আসলে তুমি হচ্ছ রুমাল।’ বেড়াল বলল, ‘বেড়ালও বলতে পার, রুমালও বলতে পার, চন্দ্রবিন্দুও বলতে পার।’ | 3 |
Ragged-row tables
সম্পাদনাSome works have TOCs which have a variably-sized right column, with the left column of other rows sometimes overlapping it. This is often found in periodicals where multiple parts of a serial work are listed on the same line.
- {{TOC row ragged}}:
- 1 is the left-aligned main content
- 2 is the right "column".
- colspan is the colspan of the whole row to allow it to work with other row templates. Default is 3 (so it will work by default with {{TOC row 1-1-1}}, for example).
- margin is the size of the inset of the entry from left. Default is 2em.
- indent is the size of the overhang of the first line. Default is 2em.
Letter to the Editor respecting the New Monthly Magazine
1
| ||
Grimm's Ghost, Letter X.
38, XI. 199, XII. 365
|
If a single ragged entry spans multiple pages, the templates {{TOC row ragged/s}} and {{TOC row ragged/e}} should be used, with the page numbers specified as parameter 1 of {{TOC row ragged/e}}. The margin parameters of {{TOC row ragged/e}} and {{TOC row ragged/s}} should be the same.
Page breaking
সম্পাদনাIf a table is broken across multiple, as is common for long TOCs, you need to add a {{nop}} to the top of every page body, to prevent the transclusion running the last line of the previous page into the first line of that page. You also need to put a {{TOC begin}} in the header of the page to make it render properly in the Page: namespace, and you should close the table in the footer of every page except the last:
- First page body
{{TOC begin}} {{TOC row.....}}
- First page footer
{{TOC end}}
- Middle page header
{{TOC begin}}
- Middle pages body
{{nop}} {{TOC row.......}} {{TOC row.......}}
- Middle pages footer
{{TOC end}}
- Last page header
{{TOC begin}}
- Last page body
{{nop}} {{TOC row....}} {{TOC end}}
More Exaple
সম্পাদনাTOC
সম্পাদনাExample 3-column
সম্পাদনা{{TOC begin|width=60em}} {{TOC row c | 3 | {{x-larger|Table of Contents:}} }} {{TOC row 2-1 | Introduction, Preface and Other Front Matter :|1}} {{TOC row 2-1 | Introduction, Preface and Other Front Matter :|10}} {{TOC row 2-1 | Introduction, Preface and Other Front Matter :|15}} {{TOC end}}
Table of Contents: | ||
Introduction, Preface and Other Front Matter : | 1 | |
Introduction, Preface and Other Front Matter : | 10 | |
Introduction, Preface and Other Front Matter : | 15 |
{{TOC begin|width=60em}} {{TOC row c | 3 | {{x-larger|Table of Contents:}} }} {{TOC row 1-1-1 | 1 |Chapter 1: Chapter Name|1}} {{TOC row 1-1-1 | 2 |Chapter 2: Chapter Name|2}} {{TOC row 1-1-1 | 3 |Chapter 3: Chapter Name|3}} {{TOC row 1-1-1 | 4 |Chapter 4: Chapter Name|4}} {{TOC end}}
Table of Contents: | ||
1 | Chapter 1: Chapter Name | 1 |
2 | Chapter 2: Chapter Name | 2 |
3 | Chapter 3: Chapter Name | 3 |
4 | Chapter 4: Chapter Name | 4 |
{{TOC begin|width=60em}} {{TOC row c | 3 | {{x-larger|Table of Contents:}} }} {{TOC row 1-out-1 |1 |Chapter 1: Chapter Name|1}} {{TOC row 1-out-1 |2 |Chapter 2: Chapter Name|2}} {{TOC row 1-out-1 |3 |Chapter 3: Chapter Name|3}} {{TOC row 1-out-1 |4 |Chapter 3: Chapter Name|4}} {{TOC end}}
Table of Contents: | ||
1 | Chapter 1: Chapter Name | 1 |
2 | Chapter 2: Chapter Name | 2 |
3 | Chapter 3: Chapter Name | 3 |
4 | Chapter 3: Chapter Name | 4 |
{{TOC begin|width=60em}} {{TOC row c | 3 | {{x-larger|Table of Contents:}} }} {{TOC row 2out-1 | Chapter Name 1| 1}} {{TOC row 2out-1 | Chapter Name 2| 2}} {{TOC row 2out-1 | Chapter Name 3| 3}} {{TOC row 2out-1 | Chapter Name 4| 4}} {{TOC end}}
Table of Contents: | ||
Chapter Name 1 | 1 | |
Chapter Name 2 | 2 | |
Chapter Name 3 | 3 | |
Chapter Name 4 | 4 |
{{TOC begin|width=60em}} {{TOC row c | 3 | {{x-larger|Table of Contents:}} }} {{TOC row 1-dot-1 |1 |Chapter 1: Chapter Name|1}} {{TOC row 1-dot-1 |2 |Chapter 2: Chapter Name|2}} {{TOC row 1-dot-1 |3 |Chapter 3: Chapter Name|3}} {{TOC row 1-dot-1 |4 |Chapter 4: Chapter Name|4}} {{TOC end}}
Table of Contents: | ||
1 | Chapter 1: Chapter Name |
1 |
2 | Chapter 2: Chapter Name |
2 |
3 | Chapter 3: Chapter Name |
3 |
4 | Chapter 4: Chapter Name |
4 |
{{TOC begin|width=60em}} {{TOC row c | 3 | {{x-larger|Table of Contents:}} }} {{TOC row 2dot-1 | Chapter Name 1|1}} {{TOC row 2dot-1 | Chapter Name 2|2}} {{TOC row 2dot-1 | Chapter Name 3|3}} {{TOC row 2dot-1 | Chapter Name 4|4}} {{TOC end}}
Table of Contents: | ||
Chapter Name 1 |
1 | |
Chapter Name 2 |
2 | |
Chapter Name 3 |
3 | |
Chapter Name 4 |
4 |
{{TOC begin|width=60em}} {{TOC row c | 3 | {{x-larger|Table of Contents:}} }} {{TOC row 2-1 | Introduction, Preface and Other Front Matter :|1}} {{TOC row 1-1-1 | 1 |Chapter 1: Chapter Name|2}} {{TOC row 1-1-1 | 2 |Chapter 2: Chapter Name|3}} {{TOC row r | 3 | Plates illustrating various things }} {{TOC row 1-out-1 |3 |Chapter 3: Chapter Name|4}} {{TOC row 2out-1 | Chapter Name|5}} {{TOC row 1-dot-1 |4 |Chapter 4: Chapter Name|6}} {{TOC row 2dot-1 | Chapter Name|7}} {{TOC end}}
Table of Contents: | ||
Introduction, Preface and Other Front Matter : | 1 | |
1 | Chapter 1: Chapter Name | 2 |
2 | Chapter 2: Chapter Name | 3 |
Plates illustrating various things | ||
3 | Chapter 3: Chapter Name | 4 |
Chapter Name | 5 | |
4 | Chapter 4: Chapter Name |
6 |
Chapter Name |
7 |
Example 4-column
সম্পাদনা{{TOC begin|width=60em}} {{TOC row c | 4 | {{x-larger|Table of Contents:}} }} {{TOC row 3-1 | Prefatory Notice|I}} {{TOC row 3-1 | Prefatory Notice|II}} {{TOC row 3-1 | Prefatory Notice|III}} {{TOC row 3-1 | Prefatory Notice|IV}} {{TOC end}}
Table of Contents: | |||
Prefatory Notice | I | ||
Prefatory Notice | II | ||
Prefatory Notice | III | ||
Prefatory Notice | IV |
{{TOC begin|width=60em}} {{TOC row c | 4 | {{x-larger|Table of Contents: {{tl|TOC row c}}}} }} {{TOC row 2-1-1 | Introduction |Introduction1 |1}} {{TOC row 2-1-1 | Introduction |Introduction2 |2}} {{TOC row 2-1-1 | Introduction |Introduction3 |3}} {{TOC row 2-1-1 | Introduction |Introduction4 |4}} {{TOC end}}
Table of Contents: {{TOC row c}} | |||
Introduction | Introduction1 | 1 | |
Introduction | Introduction2 | 2 | |
Introduction | Introduction3 | 3 | |
Introduction | Introduction4 | 4 |
{{TOC begin|width=60em}} {{TOC row c | 4 | {{x-larger|Table of Contents:}} }} {{TOC row 1-1-1-1| 1 | a |Section 1: |1}} {{TOC row 1-1-1-1| 2 | b |Section 2: |2}} {{TOC row 1-1-1-1| 3 | c |Section 3: |3}} {{TOC row 1-1-1-1| 4 | d |Section 3: |4}} {{TOC end}}
Table of Contents: | |||
1 | a | Section 1: | 1 |
2 | b | Section 2: | 2 |
3 | c | Section 3: | 3 |
4 | d | Section 3: | 4 |
{{TOC begin|width=60em}} {{TOC row c | 4 | {{x-larger|Table of Contents:}} }} {{TOC row 1-1-1-1| | a |Section 1: |1}} {{TOC row 1-1-1-1| | b |Section 2: |2}} {{TOC row 1-1-1-1| | c |Section 3: |3}} {{TOC row 1-1-1-1| | d |Section 3: |4}} {{TOC end}}
Table of Contents: | |||
a | Section 1: | 1 | |
b | Section 2: | 2 | |
c | Section 3: | 3 | |
d | Section 3: | 4 |
{{TOC begin|width=60em}} {{TOC row c | 4 | {{x-larger|Table of Contents:}} }} {{TOC row 3-1 | Prefatory Notice |i}} {{TOC row 2-1-1 | Introduction |Introduction|1}} {{TOC row 1-1-1-1| 1 | a |Section 1: |2}} {{TOC row 1-1-1-1| | b |Section 2: |3}} {{TOC end}}
Table of Contents: | |||
Prefatory Notice | i | ||
Introduction | Introduction | 1 | |
1 | a | Section 1: | 2 |
b | Section 2: | 3 |
Ragged-row tables
সম্পাদনা{{TOC begin|width=25em}} {{TOC row ragged|Letter to the Editor respecting the New Monthly Magazine1|1}} {{TOC row ragged|Letter to the Editor respecting the New Monthly Magazine2|2}} {{TOC row ragged|Letter to the Editor respecting the New Monthly Magazine3|3}} {{TOC row ragged|Letter to the Editor respecting the New Monthly Magazine4|4}} {{TOC end}}
Letter to the Editor respecting the New Monthly Magazine1
1
| ||
Letter to the Editor respecting the New Monthly Magazine2
2
| ||
Letter to the Editor respecting the New Monthly Magazine3
3
| ||
Letter to the Editor respecting the New Monthly Magazine4
4
|
{{TOC begin|width=25em}} {{TOC row ragged|Grimm's Ghost, Letter X.|38, XI. 199, XII. 365}} {{TOC row ragged|Grimm's Ghost, Letter X.|38, XI. 199, XII. 365}} {{TOC row ragged|Grimm's Ghost, Letter X.|38, XI. 199, XII. 365}} {{TOC row ragged|Grimm's Ghost, Letter X.|38, XI. 199, XII. 365}} {{TOC end}}
Grimm's Ghost, Letter X.
38, XI. 199, XII. 365
| ||
Grimm's Ghost, Letter X.
38, XI. 199, XII. 365
| ||
Grimm's Ghost, Letter X.
38, XI. 199, XII. 365
| ||
Grimm's Ghost, Letter X.
38, XI. 199, XII. 365
|
Table
সম্পাদনাExporting
সম্পাদনাThese templates should export well:
- They produce a single contiguous table, which means alignment should be maintained even in simple HTML engines (unlike, for example, {{TOCstyle}})
- The CSS is designed to enable reasonably responsive design compared to "minimally-styled" tables. For example:
- A
max-width:100%;
is applied to prevent the table extending off the right of a narrow page. - Vertical alignments are set to avoid "middle-floating" cells when one cell wraps. Many TOCs will start wrapping on Mobile or e-reader screens when they do not on the desktop web interface.
- Text wrapping is disabled by default for the "small" cells: some engines will attempt to hyphenate longer numbers like "1234" or "xxxviii" otherwise.
- A
Dot-leaders are disabled on export, as in the other dot-leader templates, because no known e-reader engine displays anything other than a field of dots.
See also
সম্পাদনাNavigation templates are used to help a reader navigate through or between texts.
Template | You type | You get | Notes | |||||||||
{{TOC}} | {{TOC}} | Used to provide a compact TOC to an alphabetical listing. | ||||||||||
{{AuxTOC}} | {{AuxTOC| * [[/Chapter 1/]]}} |
পরিচ্ছেদসমূহ (মূল গ্রন্থে নেই)
|
Used when the work does not include an original Table of Contents. | |||||||||
{{TOC begin}}, {{TOC end}} and all {{TOC row....}}'s |
{{TOC begin}} |
|
Used to easily format existing TOCs in the original. |
উপরোক্ত নথিটি টেমপ্লেট:TOC templates/doc থেকে প্রতিলিপ্ত। (সম্পাদনা | ইতিহাস) ব্যবহারকারীগণ খেলাঘর (তৈরি করুন | আয়না) এবং পরীক্ষা পাতায় (তৈরি করুন) এই টেমপ্লেট সংক্রান্ত পরীক্ষা-নিরীক্ষা করতে পারেন। এই টেমপ্লেটের উপপাতাসমূহ। |