টেমপ্লেট:TOC row c

উইকিসংকলন থেকে
পরিভ্রমণে চলুন অনুসন্ধানে চলুন
নথি আইকন টেমপ্লেট নথি[দেখুন] [সম্পাদনা] [ইতিহাস] [শোধন]

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
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.


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}} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 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[সম্পাদনা]

ছবি লিঙ্ক
Carroll - Euclid and His Modern Rivals.djvu
https://en.wikisource.org/wiki/Page:Carroll_-_Euclid_and_His_Modern_Rivals.djvu/19
Journal of a Voyage to Greenland, in the Year 1821.djvu
https://en.wikisource.org/wiki/Page:Journal_of_a_Voyage_to_Greenland,_in_the_Year_1821.djvu/182
Alerielorvoyaget00lach.djvu
https://en.wikisource.org/wiki/Page:Alerielorvoyaget00lach.djvu/19
A Practical Treatise on Brewing (4th ed.).djvu
https://en.wikisource.org/wiki/Page:A_Practical_Treatise_on_Brewing_%284th_ed.%29.djvu/11
Once a Week Volume 5.djvu
https://en.wikisource.org/wiki/Page:Once_a_Week_Volume_5.djvu/9
The Book of the Thousand Nights and One Night, Vol 1.djvu
https://en.wikisource.org/wiki/Page:The_Book_of_the_Thousand_Nights_and_One_Night,_Vol_1.djvu/11
উদাহরণ উদাহরণ

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.

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}}
{{TOC row 1-1-1|...}}
{{TOC end}}

Preface i
I. Introduction xii
II. Chapter 1 1
Used to easily format existing TOCs in the original.