[{"data":1,"prerenderedAt":5081},["ShallowReactive",2],{"navigation_docs":3,"-tables-and-graphics-tables":351,"-tables-and-graphics-tables-surround":5076},[4,31,45,83,109,147,197,215,253,291,329],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting Started","i-lucide-play","\u002Fgetting-started","01.getting-started",[10,14,18,22,26],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","01.getting-started\u002F01.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","01.getting-started\u002F02.installation",{"title":19,"path":20,"stem":21},"Installing Extra Packages","\u002Fgetting-started\u002Finstalling-extra-packages","01.getting-started\u002F03.installing-extra-packages",{"title":23,"path":24,"stem":25},"Basics","\u002Fgetting-started\u002Fbasics","01.getting-started\u002F04.basics",{"title":27,"path":28,"stem":29},"How to Get Help","\u002Fgetting-started\u002Fhow-to-get-help","01.getting-started\u002F05.how-to-get-help",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"AI Integration","i-lucide-bot","\u002Fai-integration","02.ai-integration",[37,41],{"title":38,"path":39,"stem":40},"Model Context Protocol (MCP)","\u002Fai-integration\u002Fmcp","02.ai-integration\u002F01.mcp",{"title":42,"path":43,"stem":44},"Agent Skills","\u002Fai-integration\u002Fskills","02.ai-integration\u002F02.skills",{"title":46,"icon":47,"path":48,"stem":49,"children":50,"page":30},"Document Fundamentals","i-lucide-file-text","\u002Fdocument-fundamentals","03.document-fundamentals",[51,55,59,63,67,71,75,79],{"title":52,"path":53,"stem":54},"Document Structure","\u002Fdocument-fundamentals\u002Fdocument-structure","03.document-fundamentals\u002F01.document-structure",{"title":56,"path":57,"stem":58},"Text Formatting","\u002Fdocument-fundamentals\u002Ftext-formatting","03.document-fundamentals\u002F02.text-formatting",{"title":60,"path":61,"stem":62},"Paragraph Formatting","\u002Fdocument-fundamentals\u002Fparagraph-formatting","03.document-fundamentals\u002F03.paragraph-formatting",{"title":64,"path":65,"stem":66},"Fonts","\u002Fdocument-fundamentals\u002Ffonts","03.document-fundamentals\u002F04.fonts",{"title":68,"path":69,"stem":70},"Colors","\u002Fdocument-fundamentals\u002Fcolors","03.document-fundamentals\u002F05.colors",{"title":72,"path":73,"stem":74},"List Structures","\u002Fdocument-fundamentals\u002Flist-structures","03.document-fundamentals\u002F06.list-structures",{"title":76,"path":77,"stem":78},"Special Characters","\u002Fdocument-fundamentals\u002Fspecial-characters","03.document-fundamentals\u002F07.special-characters",{"title":80,"path":81,"stem":82},"Internationalization","\u002Fdocument-fundamentals\u002Finternationalization","03.document-fundamentals\u002F08.internationalization",{"title":84,"icon":85,"path":86,"stem":87,"children":88,"page":30},"Page Design","i-lucide-layout","\u002Fpage-design","04.page-design",[89,93,97,101,105],{"title":90,"path":91,"stem":92},"Page Layout","\u002Fpage-design\u002Fpage-layout","04.page-design\u002F01.page-layout",{"title":94,"path":95,"stem":96},"Page Headers and Footers","\u002Fpage-design\u002Fcustomizing-page-headers-and-footers","04.page-design\u002F02.customizing-page-headers-and-footers",{"title":98,"path":99,"stem":100},"Title Creation","\u002Fpage-design\u002Ftitle-creation","04.page-design\u002F03.title-creation",{"title":102,"path":103,"stem":104},"Footnotes and Margin Notes","\u002Fpage-design\u002Ffootnotes-and-margin-notes","04.page-design\u002F04.footnotes-and-margin-notes",{"title":106,"path":107,"stem":108},"Rotations","\u002Fpage-design\u002Frotations","04.page-design\u002F05.rotations",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":30},"Tables and Graphics","i-lucide-table","\u002Ftables-and-graphics","05.tables-and-graphics",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Tables","\u002Ftables-and-graphics\u002Ftables","05.tables-and-graphics\u002F01.tables",{"title":120,"path":121,"stem":122},"Floats, Figures and Captions","\u002Ftables-and-graphics\u002Ffloats-figures-and-captions","05.tables-and-graphics\u002F02.floats-figures-and-captions",{"title":124,"path":125,"stem":126},"Importing Graphics","\u002Ftables-and-graphics\u002Fimporting-graphics","05.tables-and-graphics\u002F03.importing-graphics",{"title":128,"path":129,"stem":130},"Introducing Procedural Graphics","\u002Ftables-and-graphics\u002Fintroducing-procedural-graphics","05.tables-and-graphics\u002F04.introducing-procedural-graphics",{"title":132,"path":133,"stem":134},"PGF\u002FTikZ","\u002Ftables-and-graphics\u002Fpgf-tikz","05.tables-and-graphics\u002F05.pgf-tikz",{"title":136,"path":137,"stem":138},"PSTricks","\u002Ftables-and-graphics\u002Fpstricks","05.tables-and-graphics\u002F06.pstricks",{"title":140,"path":141,"stem":142},"MetaPost","\u002Ftables-and-graphics\u002Fmetapost","05.tables-and-graphics\u002F07.metapost",{"title":144,"path":145,"stem":146},"Picture","\u002Ftables-and-graphics\u002Fpicture","05.tables-and-graphics\u002F08.picture",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":30},"Technical Writing","i-lucide-flask-conical","\u002Ftechnical-writing","06.technical-writing",[153,157,161,165,169,173,177,181,185,189,193],{"title":154,"path":155,"stem":156},"Mathematics","\u002Ftechnical-writing\u002Fmathematics","06.technical-writing\u002F01.mathematics",{"title":158,"path":159,"stem":160},"Advanced Mathematics","\u002Ftechnical-writing\u002Fadvanced-mathematics","06.technical-writing\u002F02.advanced-mathematics",{"title":162,"path":163,"stem":164},"Theorems","\u002Ftechnical-writing\u002Ftheorems","06.technical-writing\u002F03.theorems",{"title":166,"path":167,"stem":168},"Algorithms","\u002Ftechnical-writing\u002Falgorithms","06.technical-writing\u002F04.algorithms",{"title":170,"path":171,"stem":172},"Source Code Listings","\u002Ftechnical-writing\u002Fsource-code-listings","06.technical-writing\u002F05.source-code-listings",{"title":174,"path":175,"stem":176},"Chemical Graphics","\u002Ftechnical-writing\u002Fchemical-graphics","06.technical-writing\u002F06.chemical-graphics",{"title":178,"path":179,"stem":180},"Linguistics","\u002Ftechnical-writing\u002Flinguistics","06.technical-writing\u002F07.linguistics",{"title":182,"path":183,"stem":184},"Bibliography Management","\u002Ftechnical-writing\u002Fbibliography-management","06.technical-writing\u002F08.bibliography-management",{"title":186,"path":187,"stem":188},"More Bibliographies","\u002Ftechnical-writing\u002Fmore-bibliographies","06.technical-writing\u002F09.more-bibliographies",{"title":190,"path":191,"stem":192},"Indexing","\u002Ftechnical-writing\u002Findices","06.technical-writing\u002F10.indices",{"title":194,"path":195,"stem":196},"Glossary","\u002Ftechnical-writing\u002Fglossary","06.technical-writing\u002F11.glossary",{"title":198,"icon":199,"path":200,"stem":201,"children":202,"page":30},"Cross-References and Links","i-lucide-link","\u002Fcross-references","07.cross-references",[203,207,211],{"title":204,"path":205,"stem":206},"Labels and Cross Referencing","\u002Fcross-references\u002Flabels-and-cross-referencing","07.cross-references\u002F01.labels-and-cross-referencing",{"title":208,"path":209,"stem":210},"Hyperlinks","\u002Fcross-references\u002Fhyperlinks","07.cross-references\u002F02.hyperlinks",{"title":212,"path":213,"stem":214},"Initials","\u002Fcross-references\u002Finitials","07.cross-references\u002F03.initials",{"title":216,"icon":217,"path":218,"stem":219,"children":220,"page":30},"Specialized Documents","i-lucide-file-badge","\u002Fspecialized-documents","08.specialized-documents",[221,225,229,233,237,241,245,249],{"title":222,"path":223,"stem":224},"Scientific Reports","\u002Fspecialized-documents\u002Fscientific-reports","08.specialized-documents\u002F01.scientific-reports",{"title":226,"path":227,"stem":228},"Letters","\u002Fspecialized-documents\u002Fletters","08.specialized-documents\u002F02.letters",{"title":230,"path":231,"stem":232},"Presentations","\u002Fspecialized-documents\u002Fpresentations","08.specialized-documents\u002F03.presentations",{"title":234,"path":235,"stem":236},"Teacher's Corner","\u002Fspecialized-documents\u002Fteachers-corner","08.specialized-documents\u002F04.teachers-corner",{"title":238,"path":239,"stem":240},"Curriculum Vitae","\u002Fspecialized-documents\u002Fcurriculum-vitae","08.specialized-documents\u002F05.curriculum-vitae",{"title":242,"path":243,"stem":244},"Academic Journals","\u002Fspecialized-documents\u002Facademic-journals","08.specialized-documents\u002F06.academic-journals",{"title":246,"path":247,"stem":248},"Xy-pic","\u002Fspecialized-documents\u002Fxy-pic","08.specialized-documents\u002F07.xy-pic",{"title":250,"path":251,"stem":252},"Creating 3D Graphics","\u002Fspecialized-documents\u002Fcreating-3d-graphics","08.specialized-documents\u002F08.creating-3d-graphics",{"title":254,"icon":255,"path":256,"stem":257,"children":258,"page":30},"Programming LaTeX","i-lucide-code","\u002Fprogramming","09.programming",[259,263,267,271,275,279,283,287],{"title":260,"path":261,"stem":262},"Macros","\u002Fprogramming\u002Fmacros","09.programming\u002F01.macros",{"title":264,"path":265,"stem":266},"Plain TeX","\u002Fprogramming\u002Fplain-tex","09.programming\u002F02.plain-tex",{"title":268,"path":269,"stem":270},"Creating Packages","\u002Fprogramming\u002Fcreating-packages","09.programming\u002F03.creating-packages",{"title":272,"path":273,"stem":274},"Creating Package Documentation","\u002Fprogramming\u002Fcreating-package-documentation","09.programming\u002F04.creating-package-documentation",{"title":276,"path":277,"stem":278},"Themes","\u002Fprogramming\u002Fthemes","09.programming\u002F05.themes",{"title":280,"path":281,"stem":282},"Modular Documents","\u002Fprogramming\u002Fmodular-documents","09.programming\u002F06.modular-documents",{"title":284,"path":285,"stem":286},"Collaborative Writing of LaTeX Documents","\u002Fprogramming\u002Fcollaborative-writing","09.programming\u002F07.collaborative-writing",{"title":288,"path":289,"stem":290},"Export To Other Formats","\u002Fprogramming\u002Fexport-to-other-formats","09.programming\u002F08.export-to-other-formats",{"title":292,"icon":293,"path":294,"stem":295,"children":296,"page":30},"Reference and Help","i-lucide-book-open","\u002Freference","10.reference",[297,301,305,309,313,317,321,325],{"title":298,"path":299,"stem":300},"FAQ","\u002Freference\u002Ffaq","10.reference\u002F01.faq",{"title":302,"path":303,"stem":304},"Tips and Tricks","\u002Freference\u002Ftips-and-tricks","10.reference\u002F02.tips-and-tricks",{"title":306,"path":307,"stem":308},"Errors and Warnings","\u002Freference\u002Ferrors-and-warnings","10.reference\u002F03.errors-and-warnings",{"title":310,"path":311,"stem":312},"Lengths","\u002Freference\u002Flengths","10.reference\u002F04.lengths",{"title":314,"path":315,"stem":316},"Counters","\u002Freference\u002Fcounters","10.reference\u002F05.counters",{"title":318,"path":319,"stem":320},"Boxes","\u002Freference\u002Fboxes","10.reference\u002F06.boxes",{"title":322,"path":323,"stem":324},"Rules and Struts","\u002Freference\u002Frules-and-struts","10.reference\u002F07.rules-and-struts",{"title":326,"path":327,"stem":328},"Command Glossary","\u002Freference\u002Fcommand-glossary","10.reference\u002F08.command-glossary",{"title":330,"icon":331,"path":332,"stem":333,"children":334,"page":30},"Appendices","i-lucide-bookmark","\u002Fappendices","11.appendices",[335,339,343,347],{"title":336,"path":337,"stem":338},"Package Reference","\u002Fappendices\u002Fpackage-reference","11.appendices\u002F01.package-reference",{"title":340,"path":341,"stem":342},"Sample LaTeX Documents","\u002Fappendices\u002Fsample-latex-documents","11.appendices\u002F02.sample-latex-documents",{"title":344,"path":345,"stem":346},"Links","\u002Fappendices\u002Flinks","11.appendices\u002F03.links",{"title":348,"path":349,"stem":350},"Authors","\u002Fappendices\u002Fauthors","11.appendices\u002F04.authors",{"id":352,"title":116,"body":353,"description":5070,"extension":5071,"links":5072,"meta":5073,"navigation":1019,"path":117,"seo":5074,"stem":118,"__hash__":5075},"docs\u002F05.tables-and-graphics\u002F01.tables.md",{"type":354,"value":355,"toc":5009},"minimark",[356,360,369,373,398,422,428,434,439,442,458,464,471,563,580,587,628,639,642,709,712,717,720,754,757,783,786,822,825,876,918,965,969,984,997,1000,1217,1220,1224,1234,1253,1265,1269,1276,1286,1290,1297,1306,1309,1321,1390,1393,1431,1435,1445,1488,1491,1502,1518,1527,1531,1538,1541,1584,1594,1624,1680,1705,1727,1736,1746,1790,1805,1809,1819,1831,1834,1863,1866,1898,1939,1943,1960,2014,2028,2033,2040,2150,2154,2168,2197,2201,2204,2208,2242,2327,2331,2350,2454,2461,2475,2479,2482,2557,2578,2581,2633,2637,2641,2654,2692,2695,2769,2776,2810,2814,2825,2853,2884,2887,2902,2912,2922,2925,2929,2945,3028,3042,3051,3054,3063,3067,3073,3116,3120,3129,3134,3137,3174,3181,3215,3229,3235,3248,3296,3319,3334,3385,3398,3454,3464,3534,3544,3550,3565,3571,3576,3631,3639,3645,3696,3699,3704,3709,3720,3738,3747,3751,3763,3781,3784,3849,3855,3875,3879,3882,3914,3917,3948,3952,3958,3967,3970,3979,3982,3991,3995,4003,4007,4030,4060,4064,4130,4136,4209,4214,4280,4294,4298,4312,4316,4333,4402,4405,4411,4437,4472,4478,4484,4492,4497,4502,4509,4518,4532,4542,4545,4559,4602,4605,4614,4619,4628,4631,4638,4714,4721,4734,4746,4750,4753,4840,4847,4852,4856,4859,5001,5005],[357,358,359],"p",{},"Tables are a common feature in academic writing, often used to summarize research results. Mastering the art of table construction in LaTeX is therefore necessary to produce quality papers and with sufficient practice one can print beautiful tables of any kind.",[357,361,362,363,368],{},"Keeping in mind that LaTeX is not a spreadsheet; it makes sense to use a dedicated tool to build tables and then to export these tables into the document. Basic tables are not too taxing, but anything more advanced can take a fair bit of construction; in these cases, more advanced packages can be very useful. However, first it is important to know the basics. Once you are comfortable with basic LaTeX tables, you might have a look at more advanced packages or the ",[364,365,367],"a",{"href":366},"#using-spreadsheets-and-data-analysis-tools","export options of your favorite spreadsheet",". Thanks to the modular nature of LaTeX, the whole process can be automated in a fairly comfortable way.",[370,371,11],"h2",{"id":372},"introduction",[357,374,375,376,380,381,384,385,387,388,390,391,394,395,397],{},"LaTeX has built-in support to typeset tables and provides two environments: ",[377,378,379],"code",{},"tabular"," and ",[377,382,383],{},"table",". To typeset material in rows and columns, the ",[377,386,379],{}," environment is needed; the optional ",[377,389,383],{}," environment is a container for floating material similar to ",[377,392,393],{},"figure",", into which a ",[377,396,379],{}," environment may be included.",[357,399,400,401,403,404,380,407,410,411,413,414,421],{},"The ",[377,402,383],{}," environment contains the caption and defines the float for the table, i.e., where in the document the table should be positioned and whether we want it to be displayed centered. The ",[377,405,406],{},"\\caption",[377,408,409],{},"\\label"," commands can be used in the same way as for pictures. For more information about the ",[377,412,383],{}," environment, see the ",[364,415,417,418],{"href":416},"#floating-with-table","Floating with ",[419,420,383],"em",{}," section.",[357,423,424,425,427],{},"In any case, the actual content of the table is contained within the ",[377,426,379],{}," environment.",[370,429,400,431,433],{"id":430},"the-tabular-environment",[377,432,379],{}," environment",[357,435,400,436,438],{},[377,437,379],{}," environment can be used to typeset tables with optional horizontal and vertical lines. LaTeX determines the width of the columns automatically.",[357,440,441],{},"The first line of the environment has the form:",[443,444,449],"pre",{"className":445,"code":446,"language":447,"meta":448,"style":448},"language-latex shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\\begin{tabular}[pos]{table spec}\n","latex","",[377,450,451],{"__ignoreMap":448},[452,453,456],"span",{"class":454,"line":455},"line",1,[452,457,446],{},[357,459,400,460,463],{},[377,461,462],{},"table spec"," argument tells LaTeX the alignment to be used in each column and the vertical lines to insert.",[357,465,466,467,470],{},"The number of columns does not need to be specified as it is inferred by looking at the number of arguments provided. It is also possible to add vertical lines between the columns here. The following symbols are available to describe the table columns (some of them require that the package ",[377,468,469],{},"array"," has been loaded):",[383,472,473,486],{},[474,475,476],"thead",{},[477,478,479,483],"tr",{},[480,481,482],"th",{},"Specifier",[480,484,485],{},"Description",[487,488,489,500,510,520,530,540,550,557],"tbody",{},[477,490,491,497],{},[492,493,494],"td",{},[377,495,496],{},"l",[492,498,499],{},"left-justified column",[477,501,502,507],{},[492,503,504],{},[377,505,506],{},"c",[492,508,509],{},"centered column",[477,511,512,517],{},[492,513,514],{},[377,515,516],{},"r",[492,518,519],{},"right-justified column",[477,521,522,527],{},[492,523,524],{},[377,525,526],{},"p{'width'}",[492,528,529],{},"paragraph column with text vertically aligned at the top",[477,531,532,537],{},[492,533,534],{},[377,535,536],{},"m{'width'}",[492,538,539],{},"paragraph column with text vertically aligned in the middle (requires array package)",[477,541,542,547],{},[492,543,544],{},[377,545,546],{},"b{'width'}",[492,548,549],{},"paragraph column with text vertically aligned at the bottom (requires array package)",[477,551,552,555],{},[492,553,554],{},"`",[492,556,554],{},[477,558,559,561],{},[492,560,554],{},[492,562],{},[357,564,565,566,568,569,572,573,576,577,579],{},"By default, if the text in a column is too wide for the page, LaTeX won’t automatically wrap it. Using ",[377,567,526],{}," you can define a special type of column which will wrap-around the text as in a normal paragraph. You can pass the width using any unit supported by LaTeX, such as 'pt' and 'cm', or ",[419,570,571],{},"command lengths",", such as ",[377,574,575],{},"\\textwidth",". You can find a list in chapter ",[364,578,310],{"href":311},".",[357,581,582,583,586],{},"The optional parameter ",[377,584,585],{},"pos"," can be used to specify the vertical position of the table relative to the baseline of the surrounding text. In most cases, you will not need this option. It becomes relevant only if your table is not in a paragraph of its own. You can use the following letters:",[383,588,589,597],{},[474,590,591],{},[477,592,593,595],{},[480,594,482],{},[480,596,485],{},[487,598,599,609,618],{},[477,600,601,606],{},[492,602,603],{},[377,604,605],{},"b",[492,607,608],{},"bottom",[477,610,611,615],{},[492,612,613],{},[377,614,506],{},[492,616,617],{},"center (default)",[477,619,620,625],{},[492,621,622],{},[377,623,624],{},"t",[492,626,627],{},"top",[357,629,630,631,634,635,638],{},"To specify a font format (such as bold, italic, etc.) for an entire column, you can add ",[377,632,633],{},">{\\format}"," before you declare the alignment. For example ",[377,636,637],{},"\\begin{tabular}{ >{\\bfseries}l c >{\\itshape}r }"," will indicate a three column table with the first one aligned to the left and in bold font, the second one aligned in the center and with normal font, and the third aligned to the right and in italic. The \"array\" package needs to be activated in the preamble for this to work.",[357,640,641],{},"In the first line you have pointed out how many columns you want, their alignment and the vertical lines to separate them. Once in the environment, you have to introduce the text you want, separating between cells and introducing new lines. The commands you have to use are the following:",[383,643,644,653],{},[474,645,646],{},[477,647,648,651],{},[480,649,650],{},"Command",[480,652,485],{},[487,654,655,672,682,692],{},[477,656,657,662],{},[492,658,659],{},[377,660,661],{},"\\\\",[492,663,664,665,667,668,671],{},"start new row (additional space may be specified after ",[377,666,661],{}," using square brackets, such as ",[377,669,670],{},"\\\\[6pt]",")",[477,673,674,679],{},[492,675,676],{},[377,677,678],{},"\\hline",[492,680,681],{},"horizontal line",[477,683,684,689],{},[492,685,686],{},[377,687,688],{},"\\newline",[492,690,691],{},"start a new line within a cell (in a paragraph column)",[477,693,694,699],{},[492,695,696],{},[377,697,698],{},"\\cline{i-j}",[492,700,701,702,705,706],{},"partial horizontal line beginning in column ",[419,703,704],{},"i"," and ending in column ",[419,707,708],{},"j",[357,710,711],{},"Note, any white space inserted between these commands is purely down to one's preferences. I personally add spaces between to make it easier to read.",[713,714,716],"h3",{"id":715},"basic-examples","Basic examples",[357,718,719],{},"This example shows how to create a simple table in LaTeX. It is a three-by-three table, but without any lines.",[443,721,723],{"className":445,"code":722,"language":447,"meta":448,"style":448},"\\begin{tabular}{ l c r }\n  1 & 2 & 3 \\\\\n  4 & 5 & 6 \\\\\n  7 & 8 & 9 \\\\\n\\end{tabular}\n",[377,724,725,730,736,742,748],{"__ignoreMap":448},[452,726,727],{"class":454,"line":455},[452,728,729],{},"\\begin{tabular}{ l c r }\n",[452,731,733],{"class":454,"line":732},2,[452,734,735],{},"  1 & 2 & 3 \\\\\n",[452,737,739],{"class":454,"line":738},3,[452,740,741],{},"  4 & 5 & 6 \\\\\n",[452,743,745],{"class":454,"line":744},4,[452,746,747],{},"  7 & 8 & 9 \\\\\n",[452,749,751],{"class":454,"line":750},5,[452,752,753],{},"\\end{tabular}\n",[357,755,756],{},"Expanding upon that by including some vertical lines:",[443,758,760],{"className":445,"code":759,"language":447,"meta":448,"style":448},"\\begin{tabular}{ l | c || r }\n  1 & 2 & 3 \\\\\n  4 & 5 & 6 \\\\\n  7 & 8 & 9 \\\\\n\\end{tabular}\n",[377,761,762,767,771,775,779],{"__ignoreMap":448},[452,763,764],{"class":454,"line":455},[452,765,766],{},"\\begin{tabular}{ l | c || r }\n",[452,768,769],{"class":454,"line":732},[452,770,735],{},[452,772,773],{"class":454,"line":738},[452,774,741],{},[452,776,777],{"class":454,"line":744},[452,778,747],{},[452,780,781],{"class":454,"line":750},[452,782,753],{},[357,784,785],{},"To add horizontal lines to the very top and bottom edges of the table:",[443,787,789],{"className":445,"code":788,"language":447,"meta":448,"style":448},"\\begin{tabular}{ l | c || r }\n  \\hline\n  1 & 2 & 3 \\\\\n  4 & 5 & 6 \\\\\n  7 & 8 & 9 \\\\\n  \\hline\n\\end{tabular}\n",[377,790,791,795,800,804,808,812,817],{"__ignoreMap":448},[452,792,793],{"class":454,"line":455},[452,794,766],{},[452,796,797],{"class":454,"line":732},[452,798,799],{},"  \\hline\n",[452,801,802],{"class":454,"line":738},[452,803,735],{},[452,805,806],{"class":454,"line":744},[452,807,741],{},[452,809,810],{"class":454,"line":750},[452,811,747],{},[452,813,815],{"class":454,"line":814},6,[452,816,799],{},[452,818,820],{"class":454,"line":819},7,[452,821,753],{},[357,823,824],{},"And finally, to add lines between all rows, as well as centering (notice the use of the center environment - of course, the result of this is not obvious from the preview on this web page):",[443,826,828],{"className":445,"code":827,"language":447,"meta":448,"style":448},"\\begin{center}\n  \\begin{tabular}{ l | c || r }\n    \\hline\n    1 & 2 & 3 \\\\ \\hline\n    4 & 5 & 6 \\\\ \\hline\n    7 & 8 & 9 \\\\\n    \\hline\n  \\end{tabular}\n\\end{center}\n",[377,829,830,835,840,845,850,855,860,864,870],{"__ignoreMap":448},[452,831,832],{"class":454,"line":455},[452,833,834],{},"\\begin{center}\n",[452,836,837],{"class":454,"line":732},[452,838,839],{},"  \\begin{tabular}{ l | c || r }\n",[452,841,842],{"class":454,"line":738},[452,843,844],{},"    \\hline\n",[452,846,847],{"class":454,"line":744},[452,848,849],{},"    1 & 2 & 3 \\\\ \\hline\n",[452,851,852],{"class":454,"line":750},[452,853,854],{},"    4 & 5 & 6 \\\\ \\hline\n",[452,856,857],{"class":454,"line":814},[452,858,859],{},"    7 & 8 & 9 \\\\\n",[452,861,862],{"class":454,"line":819},[452,863,844],{},[452,865,867],{"class":454,"line":866},8,[452,868,869],{},"  \\end{tabular}\n",[452,871,873],{"class":454,"line":872},9,[452,874,875],{},"\\end{center}\n",[443,877,879],{"className":445,"code":878,"language":447,"meta":448,"style":448},"\\begin{center}\n  \\begin{tabular}{ |l||c|||r }\n    \\hline\n    1 & 2 & 3 \\\\ \\hline\n    4 & 5 & 6 \\\\ \\hline\n    7 & 8 & 9 \\\\\n    \\hline\n  \\end{tabular}\n\\end{center}\n",[377,880,881,885,890,894,898,902,906,910,914],{"__ignoreMap":448},[452,882,883],{"class":454,"line":455},[452,884,834],{},[452,886,887],{"class":454,"line":732},[452,888,889],{},"  \\begin{tabular}{ |l||c|||r }\n",[452,891,892],{"class":454,"line":738},[452,893,844],{},[452,895,896],{"class":454,"line":744},[452,897,849],{},[452,899,900],{"class":454,"line":750},[452,901,854],{},[452,903,904],{"class":454,"line":814},[452,905,859],{},[452,907,908],{"class":454,"line":819},[452,909,844],{},[452,911,912],{"class":454,"line":866},[452,913,869],{},[452,915,916],{"class":454,"line":872},[452,917,875],{},[443,919,921],{"className":445,"code":920,"language":447,"meta":448,"style":448},"\\begin{tabular}{|r||l|}\n  \\hline\n  7C0 & hexadecimal \\\\\n  3700 & octal \\\\ \\cline{2-2}\n  11111000000 & binary \\\\\n  \\hline \\hline\n  1984 & decimal \\\\\n  \\hline\n\\end{tabular}\n",[377,922,923,928,932,937,942,947,952,957,961],{"__ignoreMap":448},[452,924,925],{"class":454,"line":455},[452,926,927],{},"\\begin{tabular}{|r||l|}\n",[452,929,930],{"class":454,"line":732},[452,931,799],{},[452,933,934],{"class":454,"line":738},[452,935,936],{},"  7C0 & hexadecimal \\\\\n",[452,938,939],{"class":454,"line":744},[452,940,941],{},"  3700 & octal \\\\ \\cline{2-2}\n",[452,943,944],{"class":454,"line":750},[452,945,946],{},"  11111000000 & binary \\\\\n",[452,948,949],{"class":454,"line":814},[452,950,951],{},"  \\hline \\hline\n",[452,953,954],{"class":454,"line":819},[452,955,956],{},"  1984 & decimal \\\\\n",[452,958,959],{"class":454,"line":866},[452,960,799],{},[452,962,963],{"class":454,"line":872},[452,964,753],{},[713,966,968],{"id":967},"text-wrapping-in-tables","Text wrapping in tables",[357,970,971,972,974,975,979,980,579],{},"LaTeX's algorithms for formatting tables have a few shortcomings. One is that it will not automatically wrap text in cells, even if it overruns the width of the page. For columns that will contain text whose length exceeds the column's desired width, it is recommended that you use the ",[377,973,357],{}," attribute and specify the desired width of the column (although it may take some trial-and-error to get the result you want). For a more convenient method, have a look at ",[364,976,978],{"href":977},"#the-tabularx-package","The tabularx package",", or ",[364,981,983],{"href":982},"#the-tabulary-package","The tabulary package",[357,985,986,987,989,990,993,994,996],{},"Instead of ",[377,988,357],{},", use the ",[377,991,992],{},"m"," attribute to have the lines aligned toward the middle of the box or the ",[377,995,605],{}," attribute to align along the bottom of the box.",[357,998,999],{},"Here is a simple example. The following code creates two tables with the same code; the only difference is that the last column of the second one has a defined width of 5 centimeters, while in the first one we didn't specify any width. Compiling this code:",[443,1001,1003],{"className":445,"code":1002,"language":447,"meta":448,"style":448},"\\documentclass{article} \n\\usepackage[english]{babel}\n\n\\begin{document}\n\nWithout specifying width for last column:\n\\begin{center}\n    \\begin{tabular}{ | l | l | l | l |}\n    \\hline\n    Day & Min Temp & Max Temp & Summary \\\\ \\hline\n    Monday & 11C & 22C & A clear day with lots of sunshine.\n    However, the strong breeze will bring down the temperatures. \\\\ \\hline\n    Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells \n    across most of Scotland and Northern Ireland, \n    but rain reaching the far northwest. \\\\ \\hline\n    Wednesday & 10C & 21C & Rain will still linger for the morning. \n    Conditions will improve by early afternoon and continue \n    throughout the evening. \\\\\n    \\hline\n    \\end{tabular}\n\\end{center}\n\nWith width specified:\n\\begin{center}\n    \\begin{tabular}{ | l | l | l | p{5cm} |}\n    \\hline\n    Day & Min Temp & Max Temp & Summary \\\\ \\hline\n    Monday & 11C & 22C & A clear day with lots of sunshine.  \n    However, the strong breeze will bring down the temperatures. \\\\ \\hline\n    Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells \n    across most of Scotland and Northern Ireland, \n    but rain reaching the far northwest. \\\\ \\hline\n    Wednesday & 10C & 21C & Rain will still linger for the morning. \n    Conditions will improve by early afternoon and continue \n    throughout the evening. \\\\\n    \\hline\n    \\end{tabular}\n\\end{center}\n\n\\end{document}\n",[377,1004,1005,1010,1015,1021,1026,1030,1035,1039,1044,1048,1054,1060,1066,1072,1078,1084,1090,1096,1102,1107,1113,1118,1123,1129,1134,1140,1145,1150,1156,1161,1166,1171,1176,1181,1186,1191,1196,1201,1206,1211],{"__ignoreMap":448},[452,1006,1007],{"class":454,"line":455},[452,1008,1009],{},"\\documentclass{article} \n",[452,1011,1012],{"class":454,"line":732},[452,1013,1014],{},"\\usepackage[english]{babel}\n",[452,1016,1017],{"class":454,"line":738},[452,1018,1020],{"emptyLinePlaceholder":1019},true,"\n",[452,1022,1023],{"class":454,"line":744},[452,1024,1025],{},"\\begin{document}\n",[452,1027,1028],{"class":454,"line":750},[452,1029,1020],{"emptyLinePlaceholder":1019},[452,1031,1032],{"class":454,"line":814},[452,1033,1034],{},"Without specifying width for last column:\n",[452,1036,1037],{"class":454,"line":819},[452,1038,834],{},[452,1040,1041],{"class":454,"line":866},[452,1042,1043],{},"    \\begin{tabular}{ | l | l | l | l |}\n",[452,1045,1046],{"class":454,"line":872},[452,1047,844],{},[452,1049,1051],{"class":454,"line":1050},10,[452,1052,1053],{},"    Day & Min Temp & Max Temp & Summary \\\\ \\hline\n",[452,1055,1057],{"class":454,"line":1056},11,[452,1058,1059],{},"    Monday & 11C & 22C & A clear day with lots of sunshine.\n",[452,1061,1063],{"class":454,"line":1062},12,[452,1064,1065],{},"    However, the strong breeze will bring down the temperatures. \\\\ \\hline\n",[452,1067,1069],{"class":454,"line":1068},13,[452,1070,1071],{},"    Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells \n",[452,1073,1075],{"class":454,"line":1074},14,[452,1076,1077],{},"    across most of Scotland and Northern Ireland, \n",[452,1079,1081],{"class":454,"line":1080},15,[452,1082,1083],{},"    but rain reaching the far northwest. \\\\ \\hline\n",[452,1085,1087],{"class":454,"line":1086},16,[452,1088,1089],{},"    Wednesday & 10C & 21C & Rain will still linger for the morning. \n",[452,1091,1093],{"class":454,"line":1092},17,[452,1094,1095],{},"    Conditions will improve by early afternoon and continue \n",[452,1097,1099],{"class":454,"line":1098},18,[452,1100,1101],{},"    throughout the evening. \\\\\n",[452,1103,1105],{"class":454,"line":1104},19,[452,1106,844],{},[452,1108,1110],{"class":454,"line":1109},20,[452,1111,1112],{},"    \\end{tabular}\n",[452,1114,1116],{"class":454,"line":1115},21,[452,1117,875],{},[452,1119,1121],{"class":454,"line":1120},22,[452,1122,1020],{"emptyLinePlaceholder":1019},[452,1124,1126],{"class":454,"line":1125},23,[452,1127,1128],{},"With width specified:\n",[452,1130,1132],{"class":454,"line":1131},24,[452,1133,834],{},[452,1135,1137],{"class":454,"line":1136},25,[452,1138,1139],{},"    \\begin{tabular}{ | l | l | l | p{5cm} |}\n",[452,1141,1143],{"class":454,"line":1142},26,[452,1144,844],{},[452,1146,1148],{"class":454,"line":1147},27,[452,1149,1053],{},[452,1151,1153],{"class":454,"line":1152},28,[452,1154,1155],{},"    Monday & 11C & 22C & A clear day with lots of sunshine.  \n",[452,1157,1159],{"class":454,"line":1158},29,[452,1160,1065],{},[452,1162,1164],{"class":454,"line":1163},30,[452,1165,1071],{},[452,1167,1169],{"class":454,"line":1168},31,[452,1170,1077],{},[452,1172,1174],{"class":454,"line":1173},32,[452,1175,1083],{},[452,1177,1179],{"class":454,"line":1178},33,[452,1180,1089],{},[452,1182,1184],{"class":454,"line":1183},34,[452,1185,1095],{},[452,1187,1189],{"class":454,"line":1188},35,[452,1190,1101],{},[452,1192,1194],{"class":454,"line":1193},36,[452,1195,844],{},[452,1197,1199],{"class":454,"line":1198},37,[452,1200,1112],{},[452,1202,1204],{"class":454,"line":1203},38,[452,1205,875],{},[452,1207,1209],{"class":454,"line":1208},39,[452,1210,1020],{"emptyLinePlaceholder":1019},[452,1212,1214],{"class":454,"line":1213},40,[452,1215,1216],{},"\\end{document}\n",[357,1218,1219],{},"Note that the first table has been cropped, since the output is wider than the page width.",[713,1221,1223],{"id":1222},"manually-broken-paragraphs-in-table-cells","Manually broken paragraphs in table cells",[357,1225,1226,1227,1229,1230,1233],{},"Sometimes it is necessary to not rely on the breaking algorithm when using the ",[377,1228,357],{}," specifier, but rather specify the line breaks by hand. In this case it is easiest to use a ",[377,1231,1232],{},"\\parbox",":",[443,1235,1237],{"className":445,"code":1236,"language":447,"meta":448,"style":448},"\\begin{tabular}{cc}\n  boring cell content & \\parbox[t]{5cm}{rather long par\\\\new par}\n\\end{tabular}\n",[377,1238,1239,1244,1249],{"__ignoreMap":448},[452,1240,1241],{"class":454,"line":455},[452,1242,1243],{},"\\begin{tabular}{cc}\n",[452,1245,1246],{"class":454,"line":732},[452,1247,1248],{},"  boring cell content & \\parbox[t]{5cm}{rather long par\\\\new par}\n",[452,1250,1251],{"class":454,"line":738},[452,1252,753],{},[357,1254,1255,1256,1258,1259,1261,1262,1264],{},"Here the ",[377,1257,624],{}," argument controls the placement of the text inside the box. Other allowed values are ",[377,1260,506],{}," for center and ",[377,1263,605],{}," for bottom.",[713,1266,1268],{"id":1267},"space-between-columns","Space between columns",[357,1270,1271,1272,1275],{},"To tweak the space between columns (LaTeX will by default choose very tight columns), one can alter the column separation: ",[377,1273,1274],{},"\\setlength{\\tabcolsep}{5pt}",".\nThe default value is 6pt.",[357,1277,1278,1279,1282,1283,579],{},"One can also introduce a horizontal space with hspace like this: ",[377,1280,1281],{},"\\begin{tabular}{r@{\\hspace{1in}}rr}"," There are different options for the hspace ",[364,1284,1285],{"href":311},"length",[713,1287,1289],{"id":1288},"space-between-rows","Space between rows",[357,1291,1292,1293,1296],{},"Re-define the ",[377,1294,1295],{},"\\arraystretch"," command to set the space between rows:",[443,1298,1300],{"className":445,"code":1299,"language":447,"meta":448,"style":448},"\\renewcommand{\\arraystretch}{1.5}\n",[377,1301,1302],{"__ignoreMap":448},[452,1303,1304],{"class":454,"line":455},[452,1305,1299],{},[357,1307,1308],{},"Default value is 1.0.",[357,1310,1311,1312,1315,1316,380,1318,1320],{},"An alternative way to adjust the rule spacing is to add ",[377,1313,1314],{},"\\noalign{\\smallskip}"," before or after the ",[377,1317,678],{},[377,1319,698],{}," commands:",[443,1322,1324],{"className":445,"code":1323,"language":447,"meta":448,"style":448},"\\begin{tabular}{ | l | l | r | }\n  \\hline\\noalign{\\smallskip}\n  \\multicolumn{2}{c}{Item} \\\\\n  \\cline{1-2}\\noalign{\\smallskip}\n  Animal & Description & Price (\\$) \\\\\n  \\noalign{\\smallskip}\\hline\\noalign{\\smallskip}\n  Gnat  & per gram & 13.65 \\\\\n        & each     &  0.01 \\\\\n  Gnu   & stuffed  & 92.50 \\\\\n  Emu   & stuffed  & 33.33 \\\\\n  Armadillo & frozen & 8.99 \\\\\n  \\noalign{\\smallskip}\\hline\n\\end{tabular}\n",[377,1325,1326,1331,1336,1341,1346,1351,1356,1361,1366,1371,1376,1381,1386],{"__ignoreMap":448},[452,1327,1328],{"class":454,"line":455},[452,1329,1330],{},"\\begin{tabular}{ | l | l | r | }\n",[452,1332,1333],{"class":454,"line":732},[452,1334,1335],{},"  \\hline\\noalign{\\smallskip}\n",[452,1337,1338],{"class":454,"line":738},[452,1339,1340],{},"  \\multicolumn{2}{c}{Item} \\\\\n",[452,1342,1343],{"class":454,"line":744},[452,1344,1345],{},"  \\cline{1-2}\\noalign{\\smallskip}\n",[452,1347,1348],{"class":454,"line":750},[452,1349,1350],{},"  Animal & Description & Price (\\$) \\\\\n",[452,1352,1353],{"class":454,"line":814},[452,1354,1355],{},"  \\noalign{\\smallskip}\\hline\\noalign{\\smallskip}\n",[452,1357,1358],{"class":454,"line":819},[452,1359,1360],{},"  Gnat  & per gram & 13.65 \\\\\n",[452,1362,1363],{"class":454,"line":866},[452,1364,1365],{},"        & each     &  0.01 \\\\\n",[452,1367,1368],{"class":454,"line":872},[452,1369,1370],{},"  Gnu   & stuffed  & 92.50 \\\\\n",[452,1372,1373],{"class":454,"line":1050},[452,1374,1375],{},"  Emu   & stuffed  & 33.33 \\\\\n",[452,1377,1378],{"class":454,"line":1056},[452,1379,1380],{},"  Armadillo & frozen & 8.99 \\\\\n",[452,1382,1383],{"class":454,"line":1062},[452,1384,1385],{},"  \\noalign{\\smallskip}\\hline\n",[452,1387,1388],{"class":454,"line":1068},[452,1389,753],{},[357,1391,1392],{},"You may also specify the skip after a line explicitly using glue after the line terminator",[443,1394,1396],{"className":445,"code":1395,"language":447,"meta":448,"style":448},"\\begin{tabular}{ll}\n\\hline\nMineral & Color \\\\[1cm]\nRuby & red \\\\\nSapphire & blue \\\\\n\\hline\n\\end{tabular}\n",[377,1397,1398,1403,1408,1413,1418,1423,1427],{"__ignoreMap":448},[452,1399,1400],{"class":454,"line":455},[452,1401,1402],{},"\\begin{tabular}{ll}\n",[452,1404,1405],{"class":454,"line":732},[452,1406,1407],{},"\\hline\n",[452,1409,1410],{"class":454,"line":738},[452,1411,1412],{},"Mineral & Color \\\\[1cm]\n",[452,1414,1415],{"class":454,"line":744},[452,1416,1417],{},"Ruby & red \\\\\n",[452,1419,1420],{"class":454,"line":750},[452,1421,1422],{},"Sapphire & blue \\\\\n",[452,1424,1425],{"class":454,"line":814},[452,1426,1407],{},[452,1428,1429],{"class":454,"line":819},[452,1430,753],{},[713,1432,1434],{"id":1433},"other-environments-inside-tables","Other environments inside tables",[357,1436,1437,1438,1441,1442,1233],{},"If you use some LaTeX environments inside table cells, like ",[377,1439,1440],{},"verbatim"," or ",[377,1443,1444],{},"enumerate",[443,1446,1448],{"className":445,"code":1447,"language":447,"meta":448,"style":448},"\\begin{tabular}{c c}\n    \\hline\n    \\begin{verbatim}\n    code\n    \\end{verbatim}\n    & description\n    \\\\ \\hline\n\\end{tabular}\n",[377,1449,1450,1455,1459,1464,1469,1474,1479,1484],{"__ignoreMap":448},[452,1451,1452],{"class":454,"line":455},[452,1453,1454],{},"\\begin{tabular}{c c}\n",[452,1456,1457],{"class":454,"line":732},[452,1458,844],{},[452,1460,1461],{"class":454,"line":738},[452,1462,1463],{},"    \\begin{verbatim}\n",[452,1465,1466],{"class":454,"line":744},[452,1467,1468],{},"    code\n",[452,1470,1471],{"class":454,"line":750},[452,1472,1473],{},"    \\end{verbatim}\n",[452,1475,1476],{"class":454,"line":814},[452,1477,1478],{},"    & description\n",[452,1480,1481],{"class":454,"line":819},[452,1482,1483],{},"    \\\\ \\hline\n",[452,1485,1486],{"class":454,"line":866},[452,1487,753],{},[357,1489,1490],{},"you might encounter errors similar to",[443,1492,1496],{"className":1493,"code":1494,"language":1495,"meta":448,"style":448},"language-output shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","! LaTeX Error: Something's wrong--perhaps a missing \\item.\n","output",[377,1497,1498],{"__ignoreMap":448},[452,1499,1500],{"class":454,"line":455},[452,1501,1494],{},[357,1503,1504,1505,1509,1510,1512,1513,1441,1515,1517],{},"To solve this problem, change ",[364,1506,1508],{"href":1507},"#the-tabular-environment","column specifier"," to \"paragraph\" (",[377,1511,357],{},", ",[377,1514,992],{},[377,1516,605],{},").",[443,1519,1521],{"className":445,"code":1520,"language":447,"meta":448,"style":448},"\\begin{tabular}{m{5cm} c}\n",[377,1522,1523],{"__ignoreMap":448},[452,1524,1525],{"class":454,"line":455},[452,1526,1520],{},[713,1528,1530],{"id":1529},"defining-multiple-columns","Defining multiple columns",[357,1532,1533,1534,1537],{},"It is possible to define many identically aligned columns at once using the ",[377,1535,1536],{},"*{num}{str}"," syntax. This is particularly useful when your table has many columns.",[357,1539,1540],{},"Here is a table with six centered columns flanked by a single column on each side:",[443,1542,1544],{"className":445,"code":1543,"language":447,"meta":448,"style":448},"\\begin{tabular}{l*{6}{c}r}\nTeam              & P & W & D & L & F  & A & Pts \\\\\n\\hline\nManchester United & 6 & 4 & 0 & 2 & 10 & 5 & 12  \\\\\nCeltic            & 6 & 3 & 0 & 3 &  8 & 9 &  9  \\\\\nBenfica           & 6 & 2 & 1 & 3 &  7 & 8 &  7  \\\\\nFC Copenhagen     & 6 & 2 & 1 & 3 &  5 & 8 &  7  \\\\\n\\end{tabular}\n",[377,1545,1546,1551,1556,1560,1565,1570,1575,1580],{"__ignoreMap":448},[452,1547,1548],{"class":454,"line":455},[452,1549,1550],{},"\\begin{tabular}{l*{6}{c}r}\n",[452,1552,1553],{"class":454,"line":732},[452,1554,1555],{},"Team              & P & W & D & L & F  & A & Pts \\\\\n",[452,1557,1558],{"class":454,"line":738},[452,1559,1407],{},[452,1561,1562],{"class":454,"line":744},[452,1563,1564],{},"Manchester United & 6 & 4 & 0 & 2 & 10 & 5 & 12  \\\\\n",[452,1566,1567],{"class":454,"line":750},[452,1568,1569],{},"Celtic            & 6 & 3 & 0 & 3 &  8 & 9 &  9  \\\\\n",[452,1571,1572],{"class":454,"line":814},[452,1573,1574],{},"Benfica           & 6 & 2 & 1 & 3 &  7 & 8 &  7  \\\\\n",[452,1576,1577],{"class":454,"line":819},[452,1578,1579],{},"FC Copenhagen     & 6 & 2 & 1 & 3 &  5 & 8 &  7  \\\\\n",[452,1581,1582],{"class":454,"line":866},[452,1583,753],{},[713,1585,1587,1588,380,1591],{"id":1586},"column-specification-using-cmd-and-cmd","Column specification using ",[377,1589,1590],{},">{\\cmd}",[377,1592,1593],{},"\u003C{\\cmd}",[357,1595,1596,1597,1599,1600,1603,1604,1607,1608,1611,1612,1615,1616,1619,1620,1623],{},"The column specification can be altered using the ",[377,1598,469],{}," package.  This is done in the\nargument of the tabular environment using ",[377,1601,1602],{},">{\\command","} for commands executed right\n",[419,1605,1606],{},"before"," each column element and ",[377,1609,1610],{},"\u003C{\\command","} for commands to be executed right\n",[419,1613,1614],{},"after"," each column element.\nAs an example: to get a column in math mode enter: ",[377,1617,1618],{},"\\begin{tabular}{>{$}c\u003C{$} }",".\nAnother example is changing the font: ",[377,1621,1622],{},"\\begin{tabular}{>{\\small}c}|"," to print the column in a small font.",[357,1625,1626,1627,380,1630,1633,1634,380,1637,1640,1641,1644,1645,1648,1649,1652,1653,1656,1657,380,1660,1663,1664,1667,1668,1671,1672,1675,1676,1679],{},"The argument of the ",[377,1628,1629],{},">|",[377,1631,1632],{},"\u003C|"," specifications must be correctly balanced when it comes to ",[377,1635,1636],{},"{|",[377,1638,1639],{},"}|"," characters. This means that ",[377,1642,1643],{},">{\\bfseries}|"," is valid, while ",[377,1646,1647],{},">{\\textbf}|"," will not work and ",[377,1650,1651],{},"{\\textbf{} }"," is not valid. If there is the need to use the text of the table as an argument (for instance, using the ",[377,1654,1655],{},"\\textbf|"," to produce bold text), one should use the ",[377,1658,1659],{},"\\bgroup|",[377,1661,1662],{},"\\egroup|"," commands: ",[377,1665,1666],{},">{\\textbf\\bgroup}c\u003C{\\egroup}|"," produces the intended effect. This works only for some basic LaTeX commands. For other commands, such as ",[377,1669,1670],{},"\\underline|"," to underline text, it is necessary to temporarily store the column text in a box using ",[377,1673,1674],{},"lrbox|",". First, you must define such a box with ",[377,1677,1678],{},"\\newsavebox{\\boxname}|"," and then you can define:",[443,1681,1683],{"className":445,"code":1682,"language":447,"meta":448,"style":448},">{\\begin{lrbox}{\\boxname} }%\nl%\n\u003C{\\end{lrbox}%\n  \\underline{\\unhbox\\boxname} }%\n",[377,1684,1685,1690,1695,1700],{"__ignoreMap":448},[452,1686,1687],{"class":454,"line":455},[452,1688,1689],{},">{\\begin{lrbox}{\\boxname} }%\n",[452,1691,1692],{"class":454,"line":732},[452,1693,1694],{},"l%\n",[452,1696,1697],{"class":454,"line":738},[452,1698,1699],{},"\u003C{\\end{lrbox}%\n",[452,1701,1702],{"class":454,"line":744},[452,1703,1704],{},"  \\underline{\\unhbox\\boxname} }%\n",[357,1706,1707,1708,1711,1712,1715,1716,1718,1719,1722,1723,1726],{},"This stores the text in a box and afterwards, takes the text out of the box with ",[377,1709,1710],{},"\\unhbox|"," (this destroys the box, if the box is needed again one should use ",[377,1713,1714],{},"\\unhcopy|"," instead) and passing it to ",[377,1717,1670],{},". (For LaTeX2e, you may want to use ",[377,1720,1721],{},"\\usebox{\\boxname}|"," instead of ",[377,1724,1725],{},"\\unhbox\\boxname|",".)",[357,1728,1729,1730,1722,1733,1735],{},"This same trick done with ",[377,1731,1732],{},"\\raisebox|",[377,1734,1670],{}," can force all lines in a table to have equal height, instead of the natural varying height that can occur when e.g. math terms or superscripts occur in the text.",[357,1737,1738,1739,380,1742,1745],{},"Here is an example showing the use of both ",[377,1740,1741],{},"p{...}|",[377,1743,1744],{},">{\\centering}|"," :",[443,1747,1751],{"className":1748,"code":1749,"language":1750,"meta":448,"style":448},"language-tex shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\\begin{tabular}{>{\\centering}p{3.5cm}>{\\centering}p{3.5cm} }\nGeometry  & Algebra\n\\tabularnewline\n\\hline\n Points & Addition \n\\tabularnewline\n Spheres & Multiplication \n\\end{tabular}\n","tex",[377,1752,1753,1758,1763,1768,1772,1777,1781,1786],{"__ignoreMap":448},[452,1754,1755],{"class":454,"line":455},[452,1756,1757],{},"\\begin{tabular}{>{\\centering}p{3.5cm}>{\\centering}p{3.5cm} }\n",[452,1759,1760],{"class":454,"line":732},[452,1761,1762],{},"Geometry  & Algebra\n",[452,1764,1765],{"class":454,"line":738},[452,1766,1767],{},"\\tabularnewline\n",[452,1769,1770],{"class":454,"line":744},[452,1771,1407],{},[452,1773,1774],{"class":454,"line":750},[452,1775,1776],{}," Points & Addition \n",[452,1778,1779],{"class":454,"line":814},[452,1780,1767],{},[452,1782,1783],{"class":454,"line":819},[452,1784,1785],{}," Spheres & Multiplication \n",[452,1787,1788],{"class":454,"line":866},[452,1789,753],{},[357,1791,1792,1793,1722,1796,1799,1800,1804],{},"Note the use of ",[377,1794,1795],{},"\\tabularnewline|",[377,1797,1798],{},"\\\\|"," to avoid a ",[1801,1802,1803],"samp",{},"Misplaced \\noalign"," error.",[713,1806,1808],{"id":1807},"and-expressions","@ and ! expressions",[357,1810,1811,1812,1441,1815,1818],{},"The column separator can be specified with the ",[377,1813,1814],{},"@{...}",[377,1816,1817],{},"!{...}"," constructs.",[357,1820,1821,1822,1824,1825,1827,1828,579],{},"It typically takes some text as its argument, and when appended to a column, it will automatically insert that text into each cell in that column before the actual data for that cell. The ",[377,1823,1814],{}," command kills the inter-column space and replaces it with whatever is between the curly braces. To keep the initial space, use ",[377,1826,1817],{},". To add space, use ",[377,1829,1830],{},"@{\\hspace{*width*}}",[357,1832,1833],{},"Admittedly, this is not that clear, and so will require a few examples to clarify. Sometimes, it is desirable in scientific tables to have the numbers aligned on the decimal point. This can be achieved by doing the following:",[443,1835,1837],{"className":445,"code":1836,"language":447,"meta":448,"style":448},"\\begin{tabular}{r@{.}l}\n  3   & 14159 \\\\\n  16  & 2     \\\\\n  123 & 456   \\\\\n\\end{tabular}\n",[377,1838,1839,1844,1849,1854,1859],{"__ignoreMap":448},[452,1840,1841],{"class":454,"line":455},[452,1842,1843],{},"\\begin{tabular}{r@{.}l}\n",[452,1845,1846],{"class":454,"line":732},[452,1847,1848],{},"  3   & 14159 \\\\\n",[452,1850,1851],{"class":454,"line":738},[452,1852,1853],{},"  16  & 2     \\\\\n",[452,1855,1856],{"class":454,"line":744},[452,1857,1858],{},"  123 & 456   \\\\\n",[452,1860,1861],{"class":454,"line":750},[452,1862,753],{},[357,1864,1865],{},"The space-suppressing qualities of the @-expression actually make it quite useful for manipulating the horizontal spacing between columns. Given a basic table, and varying the column descriptions:",[443,1867,1869],{"className":445,"code":1868,"language":447,"meta":448,"style":448},"\\begin{tabular}{ |l|l| }\n  \\hline\n  stuff & stuff \\\\ \\hline\n  stuff & stuff \\\\\n  \\hline\n\\end{tabular}\n",[377,1870,1871,1876,1880,1885,1890,1894],{"__ignoreMap":448},[452,1872,1873],{"class":454,"line":455},[452,1874,1875],{},"\\begin{tabular}{ |l|l| }\n",[452,1877,1878],{"class":454,"line":732},[452,1879,799],{},[452,1881,1882],{"class":454,"line":738},[452,1883,1884],{},"  stuff & stuff \\\\ \\hline\n",[452,1886,1887],{"class":454,"line":744},[452,1888,1889],{},"  stuff & stuff \\\\\n",[452,1891,1892],{"class":454,"line":750},[452,1893,799],{},[452,1895,1896],{"class":454,"line":814},[452,1897,753],{},[383,1899,1900,1910],{},[474,1901,1902],{},[477,1903,1904,1907],{},[480,1905,1906],{},"Column Specifier",[480,1908,1909],{},"Visual",[487,1911,1912,1919,1926,1933],{},[477,1913,1914,1917],{},[492,1915,1916],{},"`{",[492,1918,496],{},[477,1920,1921,1923],{},[492,1922,1916],{},[492,1924,1925],{},"@{}l",[477,1927,1928,1930],{},[492,1929,1916],{},[492,1931,1932],{},"@{}l@{}",[477,1934,1935,1937],{},[492,1936,1916],{},[492,1938,1932],{},[713,1940,1942],{"id":1941},"aligning-columns-at-decimal-points-using-dcolumn","Aligning columns at decimal points using dcolumn",[357,1944,1945,1946,1949,1950,1956,1957,1959],{},"Instead of using @-expressions to build columns of decimals aligned to the decimal point (or equivalent symbol), it is possible to center a column on the decimal separator using the ",[377,1947,1948],{},"dcolumn"," package, which provides a new column specifier for floating point data. See the ",[364,1951,1955],{"href":1952,"rel":1953},"http:\u002F\u002Fanorien.csc.warwick.ac.uk\u002Fmirrors\u002FCTAN\u002Fmacros\u002Flatex\u002Frequired\u002Ftools\u002Fdcolumn.pdf",[1954],"nofollow","dcolumn package documentation"," for more information, but a simple way to use ",[377,1958,1948],{}," is as follows.",[443,1961,1963],{"className":445,"code":1962,"language":447,"meta":448,"style":448},"\\usepackage{dcolumn}\n\\ldots\n\\newcolumntype{d}[1]{D{.}{\\cdot}{#1} }\n%the argument for d specifies the maximum number of decimal places\n\\begin{tabular}{l r c d{1} }\nLeft&Right&Center&\\mathrm{Decimal}\\\\\n1&2&3&4\\\\\n11&22&33&44\\\\\n1.1&2.2&3.3&4.4\\\\\n\\end{tabular}\n",[377,1964,1965,1970,1975,1980,1985,1990,1995,2000,2005,2010],{"__ignoreMap":448},[452,1966,1967],{"class":454,"line":455},[452,1968,1969],{},"\\usepackage{dcolumn}\n",[452,1971,1972],{"class":454,"line":732},[452,1973,1974],{},"\\ldots\n",[452,1976,1977],{"class":454,"line":738},[452,1978,1979],{},"\\newcolumntype{d}[1]{D{.}{\\cdot}{#1} }\n",[452,1981,1982],{"class":454,"line":744},[452,1983,1984],{},"%the argument for d specifies the maximum number of decimal places\n",[452,1986,1987],{"class":454,"line":750},[452,1988,1989],{},"\\begin{tabular}{l r c d{1} }\n",[452,1991,1992],{"class":454,"line":814},[452,1993,1994],{},"Left&Right&Center&\\mathrm{Decimal}\\\\\n",[452,1996,1997],{"class":454,"line":819},[452,1998,1999],{},"1&2&3&4\\\\\n",[452,2001,2002],{"class":454,"line":866},[452,2003,2004],{},"11&22&33&44\\\\\n",[452,2006,2007],{"class":454,"line":872},[452,2008,2009],{},"1.1&2.2&3.3&4.4\\\\\n",[452,2011,2012],{"class":454,"line":1050},[452,2013,753],{},[357,2015,2016,2017,2020,2021,2024,2025],{},"A negative argument provided for the number of decimal places in the new column type allows unlimited decimal places, but may result in rather wide columns.  Rounding is not applied, so the data to be tabulated should be adjusted to the number of decimal places specified.  Note that a decimal aligned column is typeset in math mode, hence the use of \\mathrm for the column heading in the example above.  Also, text in a decimal aligned column (for example the header) will be right-aligned before the decimal separator (assuming there's no decimal separator in the text).  While this may be fine for very short text, or numeric column headings, it looks cumbersome in the example above.  A solution to this is to use the ",[377,2018,2019],{},"\\multicolumn"," command described below, specifying a single column and its alignment. For example to center the header ",[419,2022,2023],{},"Decimal"," over its column in the above example, the first line of the table itself would be ",[377,2026,2027],{},"Left&Right&Center&\\multicolumn{1}{c}{Decimal}\\\\",[2029,2030,2032],"h4",{"id":2031},"bold-text-and-dcolumn","Bold text and dcolumn",[357,2034,2035,2036,2039],{},"To draw attention to particular entries in a table, it may be nice to use bold text.  Ordinarily this is easy, but as dcolumn needs to ",[419,2037,2038],{},"see"," the decimal point it is rather harder to do.  In addition, the usual bold characters are wider than their normal counterparts, meaning that although the decimals may align nicely, the figures (for more than 2--3 digits on one side of the decimal point) will be visibly misaligned.  It is however possible to use normal width bold characters and define a new bold column type, as shown below.",[443,2041,2043],{"className":445,"code":2042,"language":447,"meta":448,"style":448},"\\usepackage{dcolumn}\n%here we're setting up a version of the math fonts with normal x-width\n\\DeclareMathVersion{nxbold} \n\\SetSymbolFont{operators}{nxbold}{OT1}{cmr} {b}{n}\n\\SetSymbolFont{letters}  {nxbold}{OML}{cmm} {b}{it}\n\\SetSymbolFont{symbols}  {nxbold}{OMS}{cmsy}{b}{n}\n\n\\begin{document}\n\\makeatletter\n\\newcolumntype{d}{D{.}{.}{-1} } %decimal column as before\n%wide bold decimal column\n\\newcolumntype{B}[3]{>{\\boldmath\\DC@{#1}{#2}{#3} }c\u003C{\\DC@end} } \n%normal width bold decimal column\n\\newcolumntype{Z}[3]{>{\\mathversion{nxbold}\\DC@{#1}{#2}{#3} }c\u003C{\\DC@end} } \n\\makeatother\n\\begin{tabular}{l l d}\n    Type &M & \\multicolumn{1}{c}{N} \\\\\n    Normal & 1 & 22222.222 \\\\\n    Bold (standard)&10 & \\multicolumn{1}{B{.}{.}{-1} }{22222.222}\\\\\n    Bold (nxbold)&100 & \\multicolumn{1}{Z{.}{.}{-1} }{22222.222}\\\\\n\\end{tabular}\n\\end{document}\n",[377,2044,2045,2049,2054,2059,2064,2069,2074,2078,2082,2087,2092,2097,2102,2107,2112,2117,2122,2127,2132,2137,2142,2146],{"__ignoreMap":448},[452,2046,2047],{"class":454,"line":455},[452,2048,1969],{},[452,2050,2051],{"class":454,"line":732},[452,2052,2053],{},"%here we're setting up a version of the math fonts with normal x-width\n",[452,2055,2056],{"class":454,"line":738},[452,2057,2058],{},"\\DeclareMathVersion{nxbold} \n",[452,2060,2061],{"class":454,"line":744},[452,2062,2063],{},"\\SetSymbolFont{operators}{nxbold}{OT1}{cmr} {b}{n}\n",[452,2065,2066],{"class":454,"line":750},[452,2067,2068],{},"\\SetSymbolFont{letters}  {nxbold}{OML}{cmm} {b}{it}\n",[452,2070,2071],{"class":454,"line":814},[452,2072,2073],{},"\\SetSymbolFont{symbols}  {nxbold}{OMS}{cmsy}{b}{n}\n",[452,2075,2076],{"class":454,"line":819},[452,2077,1020],{"emptyLinePlaceholder":1019},[452,2079,2080],{"class":454,"line":866},[452,2081,1025],{},[452,2083,2084],{"class":454,"line":872},[452,2085,2086],{},"\\makeatletter\n",[452,2088,2089],{"class":454,"line":1050},[452,2090,2091],{},"\\newcolumntype{d}{D{.}{.}{-1} } %decimal column as before\n",[452,2093,2094],{"class":454,"line":1056},[452,2095,2096],{},"%wide bold decimal column\n",[452,2098,2099],{"class":454,"line":1062},[452,2100,2101],{},"\\newcolumntype{B}[3]{>{\\boldmath\\DC@{#1}{#2}{#3} }c\u003C{\\DC@end} } \n",[452,2103,2104],{"class":454,"line":1068},[452,2105,2106],{},"%normal width bold decimal column\n",[452,2108,2109],{"class":454,"line":1074},[452,2110,2111],{},"\\newcolumntype{Z}[3]{>{\\mathversion{nxbold}\\DC@{#1}{#2}{#3} }c\u003C{\\DC@end} } \n",[452,2113,2114],{"class":454,"line":1080},[452,2115,2116],{},"\\makeatother\n",[452,2118,2119],{"class":454,"line":1086},[452,2120,2121],{},"\\begin{tabular}{l l d}\n",[452,2123,2124],{"class":454,"line":1092},[452,2125,2126],{},"    Type &M & \\multicolumn{1}{c}{N} \\\\\n",[452,2128,2129],{"class":454,"line":1098},[452,2130,2131],{},"    Normal & 1 & 22222.222 \\\\\n",[452,2133,2134],{"class":454,"line":1104},[452,2135,2136],{},"    Bold (standard)&10 & \\multicolumn{1}{B{.}{.}{-1} }{22222.222}\\\\\n",[452,2138,2139],{"class":454,"line":1109},[452,2140,2141],{},"    Bold (nxbold)&100 & \\multicolumn{1}{Z{.}{.}{-1} }{22222.222}\\\\\n",[452,2143,2144],{"class":454,"line":1115},[452,2145,753],{},[452,2147,2148],{"class":454,"line":1120},[452,2149,1216],{},[370,2151,2153],{"id":2152},"row-specification","Row specification",[357,2155,2156,2157,2159,2160,2163,2164,2167],{},"It might be convenient to apply the same command over every cell of a row, just as for column. Unfortunately the ",[377,2158,379],{}," environment cannot do that by default.\nWe will need ",[377,2161,2162],{},"tabu"," instead, which provides the ",[377,2165,2166],{},"\\rowfont"," option.",[443,2169,2171],{"className":445,"code":2170,"language":447,"meta":448,"style":448},"\\begin{tabu}{XX}\n\\rowfont{\\bfseries\\itshape\\large} Header1 & Header2 \\\\\n\\hline\nCell2 & Cell2\n\\end{tabu}\n",[377,2172,2173,2178,2183,2187,2192],{"__ignoreMap":448},[452,2174,2175],{"class":454,"line":455},[452,2176,2177],{},"\\begin{tabu}{XX}\n",[452,2179,2180],{"class":454,"line":732},[452,2181,2182],{},"\\rowfont{\\bfseries\\itshape\\large} Header1 & Header2 \\\\\n",[452,2184,2185],{"class":454,"line":738},[452,2186,1407],{},[452,2188,2189],{"class":454,"line":744},[452,2190,2191],{},"Cell2 & Cell2\n",[452,2193,2194],{"class":454,"line":750},[452,2195,2196],{},"\\end{tabu}\n",[370,2198,2200],{"id":2199},"spanning","Spanning",[357,2202,2203],{},"To complete this tutorial, we take a quick look at how to generate slightly more complex tables. Unsurprisingly, the commands necessary have to be embedded within the table data itself.",[713,2205,2207],{"id":2206},"rows-spanning-multiple-columns","Rows spanning multiple columns",[357,2209,2210,2211,2214,2215,2218,2219,2222,2223,1512,2225,1512,2227,2229,2230,2233,2234,2237,2238,2241],{},"The command for this looks like this: ",[377,2212,2213],{},"\\multicolumn{num_cols}{alignment}{contents}",". ",[377,2216,2217],{},"num_cols"," is the number of subsequent columns to merge; ",[377,2220,2221],{},"alignment"," is either ",[377,2224,496],{},[377,2226,506],{},[377,2228,516],{},", or to have text wrapping specify a width ",[377,2231,2232],{},"p{5.0cm}"," . And ",[377,2235,2236],{},"contents"," is simply the actual data you want to be contained within that cell. You can also use ",[377,2239,2240],{},"\\multicolumn{1}{alignment}{contents}"," for a single column. In this simple example, the name David Batty is an exception, shifted to the right:",[443,2243,2245],{"className":445,"code":2244,"language":447,"meta":448,"style":448},"\\begin{tabular}{ |l|l| }\n  \\hline\n  \\multicolumn{2}{|c|}{Team sheet} \\\\\n  \\hline\n  GK & Paul Robinson \\\\\n  LB & Lucas Radebe \\\\\n  DC & Michael Duberry \\\\\n  DC & Dominic Matteo \\\\\n  RB & Dider Domi \\\\\n  MC & \\multicolumn{1}{r|}{David Batty} \\\\\n  MC & Eirik Bakke \\\\\n  MC & Jody Morris \\\\\n  FW & Jamie McMaster \\\\\n  ST & Alan Smith \\\\\n  ST & Mark Viduka \\\\\n  \\hline\n\\end{tabular}\n",[377,2246,2247,2251,2255,2260,2264,2269,2274,2279,2284,2289,2294,2299,2304,2309,2314,2319,2323],{"__ignoreMap":448},[452,2248,2249],{"class":454,"line":455},[452,2250,1875],{},[452,2252,2253],{"class":454,"line":732},[452,2254,799],{},[452,2256,2257],{"class":454,"line":738},[452,2258,2259],{},"  \\multicolumn{2}{|c|}{Team sheet} \\\\\n",[452,2261,2262],{"class":454,"line":744},[452,2263,799],{},[452,2265,2266],{"class":454,"line":750},[452,2267,2268],{},"  GK & Paul Robinson \\\\\n",[452,2270,2271],{"class":454,"line":814},[452,2272,2273],{},"  LB & Lucas Radebe \\\\\n",[452,2275,2276],{"class":454,"line":819},[452,2277,2278],{},"  DC & Michael Duberry \\\\\n",[452,2280,2281],{"class":454,"line":866},[452,2282,2283],{},"  DC & Dominic Matteo \\\\\n",[452,2285,2286],{"class":454,"line":872},[452,2287,2288],{},"  RB & Dider Domi \\\\\n",[452,2290,2291],{"class":454,"line":1050},[452,2292,2293],{},"  MC & \\multicolumn{1}{r|}{David Batty} \\\\\n",[452,2295,2296],{"class":454,"line":1056},[452,2297,2298],{},"  MC & Eirik Bakke \\\\\n",[452,2300,2301],{"class":454,"line":1062},[452,2302,2303],{},"  MC & Jody Morris \\\\\n",[452,2305,2306],{"class":454,"line":1068},[452,2307,2308],{},"  FW & Jamie McMaster \\\\\n",[452,2310,2311],{"class":454,"line":1074},[452,2312,2313],{},"  ST & Alan Smith \\\\\n",[452,2315,2316],{"class":454,"line":1080},[452,2317,2318],{},"  ST & Mark Viduka \\\\\n",[452,2320,2321],{"class":454,"line":1086},[452,2322,799],{},[452,2324,2325],{"class":454,"line":1092},[452,2326,753],{},[713,2328,2330],{"id":2329},"columns-spanning-multiple-rows","Columns spanning multiple rows",[357,2332,2333,2334,2337,2338,2341,2342,2345,2346,2349],{},"The first thing you need to do is add ",[377,2335,2336],{},"\\usepackage{multirow","} to the preamble. This then provides the command needed for spanning rows: ",[377,2339,2340],{},"\\multirow{*num_rows*}{*width*}{*contents*}",". The arguments are pretty simple to deduce (",[377,2343,2344],{},"*"," for the ",[419,2347,2348],{},"width"," means the content's natural width).",[443,2351,2353],{"className":445,"code":2352,"language":447,"meta":448,"style":448},"...\n\\usepackage{multirow}\n...\n\n\\begin{tabular}{ |l|l|l| }\n\\hline\n\\multicolumn{3}{|c|}{Team sheet} \\\\\n\\hline\nGoalkeeper & GK & Paul Robinson \\\\ \\hline\n\\multirow{4}{*}{Defenders} & LB & Lucas Radebe \\\\\n & DC & Michael Duburry \\\\\n & DC & Dominic Matteo \\\\\n & RB & Didier Domi \\\\ \\hline\n\\multirow{3}{*}{Midfielders} & MC & David Batty \\\\\n & MC & Eirik Bakke \\\\\n & MC & Jody Morris \\\\ \\hline\nForward & FW & Jamie McMaster \\\\ \\hline\n\\multirow{2}{*}{Strikers} & ST & Alan Smith \\\\\n & ST & Mark Viduka \\\\\n\\hline\n\\end{tabular}\n",[377,2354,2355,2360,2365,2369,2373,2378,2382,2387,2391,2396,2401,2406,2411,2416,2421,2426,2431,2436,2441,2446,2450],{"__ignoreMap":448},[452,2356,2357],{"class":454,"line":455},[452,2358,2359],{},"...\n",[452,2361,2362],{"class":454,"line":732},[452,2363,2364],{},"\\usepackage{multirow}\n",[452,2366,2367],{"class":454,"line":738},[452,2368,2359],{},[452,2370,2371],{"class":454,"line":744},[452,2372,1020],{"emptyLinePlaceholder":1019},[452,2374,2375],{"class":454,"line":750},[452,2376,2377],{},"\\begin{tabular}{ |l|l|l| }\n",[452,2379,2380],{"class":454,"line":814},[452,2381,1407],{},[452,2383,2384],{"class":454,"line":819},[452,2385,2386],{},"\\multicolumn{3}{|c|}{Team sheet} \\\\\n",[452,2388,2389],{"class":454,"line":866},[452,2390,1407],{},[452,2392,2393],{"class":454,"line":872},[452,2394,2395],{},"Goalkeeper & GK & Paul Robinson \\\\ \\hline\n",[452,2397,2398],{"class":454,"line":1050},[452,2399,2400],{},"\\multirow{4}{*}{Defenders} & LB & Lucas Radebe \\\\\n",[452,2402,2403],{"class":454,"line":1056},[452,2404,2405],{}," & DC & Michael Duburry \\\\\n",[452,2407,2408],{"class":454,"line":1062},[452,2409,2410],{}," & DC & Dominic Matteo \\\\\n",[452,2412,2413],{"class":454,"line":1068},[452,2414,2415],{}," & RB & Didier Domi \\\\ \\hline\n",[452,2417,2418],{"class":454,"line":1074},[452,2419,2420],{},"\\multirow{3}{*}{Midfielders} & MC & David Batty \\\\\n",[452,2422,2423],{"class":454,"line":1080},[452,2424,2425],{}," & MC & Eirik Bakke \\\\\n",[452,2427,2428],{"class":454,"line":1086},[452,2429,2430],{}," & MC & Jody Morris \\\\ \\hline\n",[452,2432,2433],{"class":454,"line":1092},[452,2434,2435],{},"Forward & FW & Jamie McMaster \\\\ \\hline\n",[452,2437,2438],{"class":454,"line":1098},[452,2439,2440],{},"\\multirow{2}{*}{Strikers} & ST & Alan Smith \\\\\n",[452,2442,2443],{"class":454,"line":1104},[452,2444,2445],{}," & ST & Mark Viduka \\\\\n",[452,2447,2448],{"class":454,"line":1109},[452,2449,1407],{},[452,2451,2452],{"class":454,"line":1115},[452,2453,753],{},[357,2455,2456,2457,2460],{},"The main thing to note when using ",[377,2458,2459],{},"\\multirow"," is that a blank entry must be inserted for each appropriate cell in each subsequent row to be spanned.",[357,2462,2463,2464,2467,2468,2471,2472,2474],{},"If there is no data for a cell, just don't type anything, but you still need the \"&\" separating it from the next column's data. The astute reader will already have deduced that for a table of ",[419,2465,2466],{},"n"," columns, there must always be ",[419,2469,2470],{},"n-1"," ampersands in each row (unless ",[377,2473,2019],{}," is also used).",[713,2476,2478],{"id":2477},"spanning-in-both-directions-simultaneously","Spanning in both directions simultaneously",[357,2480,2481],{},"Here is a nontrivial example of how to use spanning in both directions simultaneously and have the borders of the cells drawn correctly:",[443,2483,2485],{"className":445,"code":2484,"language":447,"meta":448,"style":448},"\\usepackage{multirow}\n\n\\begin{tabular}{cc|c|c|c|c|l}\n\\cline{3-6}\n& & \\multicolumn{4}{|c|}{Primes} \\\\ \\cline{3-6}\n& & 2 & 3 & 5 & 7 \\\\ \\cline{1-6}\n\\multicolumn{1}{|c|}{\\multirow{2}{*}{Powers}} &\n\\multicolumn{1}{|c|}{504} & 3 & 2 & 0 & 1 &     \\\\ \\cline{2-6}\n\\multicolumn{1}{|c|}{} &\n\\multicolumn{1}{|c|}{540} & 2 & 3 & 1 & 0 &     \\\\ \\cline{1-6}\n\\multicolumn{1}{|c|}{\\multirow{2}{*}{Powers}} &\n\\multicolumn{1}{|c|}{gcd} & 2 & 2 & 0 & 0 & min \\\\ \\cline{2-6}\n\\multicolumn{1}{|c|}{} &\n\\multicolumn{1}{|c|}{lcm} & 3 & 3 & 1 & 1 & max \\\\ \\cline{1-6}\n\\end{tabular}\n",[377,2486,2487,2491,2495,2500,2505,2510,2515,2520,2525,2530,2535,2539,2544,2548,2553],{"__ignoreMap":448},[452,2488,2489],{"class":454,"line":455},[452,2490,2364],{},[452,2492,2493],{"class":454,"line":732},[452,2494,1020],{"emptyLinePlaceholder":1019},[452,2496,2497],{"class":454,"line":738},[452,2498,2499],{},"\\begin{tabular}{cc|c|c|c|c|l}\n",[452,2501,2502],{"class":454,"line":744},[452,2503,2504],{},"\\cline{3-6}\n",[452,2506,2507],{"class":454,"line":750},[452,2508,2509],{},"& & \\multicolumn{4}{|c|}{Primes} \\\\ \\cline{3-6}\n",[452,2511,2512],{"class":454,"line":814},[452,2513,2514],{},"& & 2 & 3 & 5 & 7 \\\\ \\cline{1-6}\n",[452,2516,2517],{"class":454,"line":819},[452,2518,2519],{},"\\multicolumn{1}{|c|}{\\multirow{2}{*}{Powers}} &\n",[452,2521,2522],{"class":454,"line":866},[452,2523,2524],{},"\\multicolumn{1}{|c|}{504} & 3 & 2 & 0 & 1 &     \\\\ \\cline{2-6}\n",[452,2526,2527],{"class":454,"line":872},[452,2528,2529],{},"\\multicolumn{1}{|c|}{} &\n",[452,2531,2532],{"class":454,"line":1050},[452,2533,2534],{},"\\multicolumn{1}{|c|}{540} & 2 & 3 & 1 & 0 &     \\\\ \\cline{1-6}\n",[452,2536,2537],{"class":454,"line":1056},[452,2538,2519],{},[452,2540,2541],{"class":454,"line":1062},[452,2542,2543],{},"\\multicolumn{1}{|c|}{gcd} & 2 & 2 & 0 & 0 & min \\\\ \\cline{2-6}\n",[452,2545,2546],{"class":454,"line":1068},[452,2547,2529],{},[452,2549,2550],{"class":454,"line":1074},[452,2551,2552],{},"\\multicolumn{1}{|c|}{lcm} & 3 & 3 & 1 & 1 & max \\\\ \\cline{1-6}\n",[452,2554,2555],{"class":454,"line":1080},[452,2556,753],{},[357,2558,2559,2560,2563,2564,2567,2568,2570,2571,2573,2574,2577],{},"The command ",[377,2561,2562],{},"\\multicolumn{1}{|c|}{...}"," is just used to draw vertical borders both on the left and on the right of the cell. Even when combined with ",[377,2565,2566],{},"\\multirow{2}{*}{...}",", it still draws vertical borders that only span the first row. To compensate for that, we add ",[377,2569,2562],{}," in the following rows spanned by the multirow. Note that we cannot just use ",[377,2572,678],{}," to draw horizontal lines, since we do not want the line to be drawn over the text that spans several rows. Instead we use the command ",[377,2575,2576],{},"\\cline{2-6}"," and opt out the first column that contains the text \"Powers\".",[357,2579,2580],{},"Here is another example exploiting the same ideas to make\nthe familiar and popular \"2x2\" or double dichotomy:",[443,2582,2584],{"className":445,"code":2583,"language":447,"meta":448,"style":448},"\\begin{tabular}{ r|c|c }\n\\multicolumn{1}{r}{}\n &  \\multicolumn{1}{c}{noninteractive}\n & \\multicolumn{1}{c}{interactive} \\\\\n\\cline{2-3}\nmassively multiple & Library & University \\\\\n\\cline{2-3}\none-to-one & Book & Tutor \\\\\n\\cline{2-3}\n\\end{tabular}\n",[377,2585,2586,2591,2596,2601,2606,2611,2616,2620,2625,2629],{"__ignoreMap":448},[452,2587,2588],{"class":454,"line":455},[452,2589,2590],{},"\\begin{tabular}{ r|c|c }\n",[452,2592,2593],{"class":454,"line":732},[452,2594,2595],{},"\\multicolumn{1}{r}{}\n",[452,2597,2598],{"class":454,"line":738},[452,2599,2600],{}," &  \\multicolumn{1}{c}{noninteractive}\n",[452,2602,2603],{"class":454,"line":744},[452,2604,2605],{}," & \\multicolumn{1}{c}{interactive} \\\\\n",[452,2607,2608],{"class":454,"line":750},[452,2609,2610],{},"\\cline{2-3}\n",[452,2612,2613],{"class":454,"line":814},[452,2614,2615],{},"massively multiple & Library & University \\\\\n",[452,2617,2618],{"class":454,"line":819},[452,2619,2610],{},[452,2621,2622],{"class":454,"line":866},[452,2623,2624],{},"one-to-one & Book & Tutor \\\\\n",[452,2626,2627],{"class":454,"line":872},[452,2628,2610],{},[452,2630,2631],{"class":454,"line":1050},[452,2632,753],{},[370,2634,2636],{"id":2635},"controlling-table-size","Controlling table size",[713,2638,2640],{"id":2639},"resize-tables","Resize tables",[357,2642,400,2643,2646,2647,2650,2651,2653],{},[377,2644,2645],{},"graphicx"," packages features the command ",[377,2648,2649],{},"\\resizebox{width}{height}{object}"," which can be used with ",[377,2652,379],{}," to specify the height and width of a table. The following example shows how to resize a table to 8cm width while maintaining the original width\u002Fheight ratio.",[443,2655,2657],{"className":445,"code":2656,"language":447,"meta":448,"style":448},"\\usepackage{graphicx}\n% ...\n\n\\resizebox{8cm}{!}{%\n  \\begin{tabular}...\n  \\end{tabular}\n}\n",[377,2658,2659,2664,2669,2673,2678,2683,2687],{"__ignoreMap":448},[452,2660,2661],{"class":454,"line":455},[452,2662,2663],{},"\\usepackage{graphicx}\n",[452,2665,2666],{"class":454,"line":732},[452,2667,2668],{},"% ...\n",[452,2670,2671],{"class":454,"line":738},[452,2672,1020],{"emptyLinePlaceholder":1019},[452,2674,2675],{"class":454,"line":744},[452,2676,2677],{},"\\resizebox{8cm}{!}{%\n",[452,2679,2680],{"class":454,"line":750},[452,2681,2682],{},"  \\begin{tabular}...\n",[452,2684,2685],{"class":454,"line":814},[452,2686,869],{},[452,2688,2689],{"class":454,"line":819},[452,2690,2691],{},"}\n",[357,2693,2694],{},"Resizing table including the caption",[443,2696,2698],{"className":445,"code":2697,"language":447,"meta":448,"style":448},"\\begin{table}[h]\n\\resizebox{1.4\\textwidth}{!}{\\begin{minipage}{\\textwidth}\n\\begin{tabular}{r|c|c|}\n& \\multicolumn{1}{c}{noninteractive}\n& \\multicolumn{1}{c}{interactive} \\\\\n\\cline{2-3}\nmassively multiple & Library & University \\\\\n\\cline{2-3}\none-to-one & Book & Tutor \\\\\n\\cline{2-3}\n\\end{tabular}\n\\caption[Table caption text]{Table taken from \\cite[p.10]{refid} }\n\\label{table:name}\n\\end{minipage} }\n\\end{table}\n",[377,2699,2700,2705,2710,2715,2720,2725,2729,2733,2737,2741,2745,2749,2754,2759,2764],{"__ignoreMap":448},[452,2701,2702],{"class":454,"line":455},[452,2703,2704],{},"\\begin{table}[h]\n",[452,2706,2707],{"class":454,"line":732},[452,2708,2709],{},"\\resizebox{1.4\\textwidth}{!}{\\begin{minipage}{\\textwidth}\n",[452,2711,2712],{"class":454,"line":738},[452,2713,2714],{},"\\begin{tabular}{r|c|c|}\n",[452,2716,2717],{"class":454,"line":744},[452,2718,2719],{},"& \\multicolumn{1}{c}{noninteractive}\n",[452,2721,2722],{"class":454,"line":750},[452,2723,2724],{},"& \\multicolumn{1}{c}{interactive} \\\\\n",[452,2726,2727],{"class":454,"line":814},[452,2728,2610],{},[452,2730,2731],{"class":454,"line":819},[452,2732,2615],{},[452,2734,2735],{"class":454,"line":866},[452,2736,2610],{},[452,2738,2739],{"class":454,"line":872},[452,2740,2624],{},[452,2742,2743],{"class":454,"line":1050},[452,2744,2610],{},[452,2746,2747],{"class":454,"line":1056},[452,2748,753],{},[452,2750,2751],{"class":454,"line":1062},[452,2752,2753],{},"\\caption[Table caption text]{Table taken from \\cite[p.10]{refid} }\n",[452,2755,2756],{"class":454,"line":1068},[452,2757,2758],{},"\\label{table:name}\n",[452,2760,2761],{"class":454,"line":1074},[452,2762,2763],{},"\\end{minipage} }\n",[452,2765,2766],{"class":454,"line":1080},[452,2767,2768],{},"\\end{table}\n",[357,2770,2771,2772,2775],{},"Alternatively you can use ",[377,2773,2774],{},"\\scalebox{ratio}{object}"," in the same way but with ratios rather than fixed sizes:",[443,2777,2779],{"className":445,"code":2778,"language":447,"meta":448,"style":448},"\\usepackage{graphicx}\n% ...\n\n\\scalebox{0.7}{%\n  \\begin{tabular}...\n  \\end{tabular}\n}\n",[377,2780,2781,2785,2789,2793,2798,2802,2806],{"__ignoreMap":448},[452,2782,2783],{"class":454,"line":455},[452,2784,2663],{},[452,2786,2787],{"class":454,"line":732},[452,2788,2668],{},[452,2790,2791],{"class":454,"line":738},[452,2792,1020],{"emptyLinePlaceholder":1019},[452,2794,2795],{"class":454,"line":744},[452,2796,2797],{},"\\scalebox{0.7}{%\n",[452,2799,2800],{"class":454,"line":750},[452,2801,2682],{},[452,2803,2804],{"class":454,"line":814},[452,2805,869],{},[452,2807,2808],{"class":454,"line":819},[452,2809,2691],{},[713,2811,2813],{"id":2812},"changing-font-size","Changing font size",[357,2815,2816,2817,2820,2821,2824],{},"A table can be globally switched to a different font size by simply adding the desired size command (here: ",[377,2818,2819],{},"\\footnotesize",") in the table scope, which may be after the ",[377,2822,2823],{},"\\begin{table}"," statement if you use floats, otherwise you need to add a group delimiter.",[443,2826,2828],{"className":445,"code":2827,"language":447,"meta":448,"style":448},"{\\footnotesize\n  \\begin{tabular}{ | r | r || c | c | c |}\n      % ...\n  \\end{tabular}\n}\n",[377,2829,2830,2835,2840,2845,2849],{"__ignoreMap":448},[452,2831,2832],{"class":454,"line":455},[452,2833,2834],{},"{\\footnotesize\n",[452,2836,2837],{"class":454,"line":732},[452,2838,2839],{},"  \\begin{tabular}{ | r | r || c | c | c |}\n",[452,2841,2842],{"class":454,"line":738},[452,2843,2844],{},"      % ...\n",[452,2846,2847],{"class":454,"line":744},[452,2848,869],{},[452,2850,2851],{"class":454,"line":750},[452,2852,2691],{},[443,2854,2856],{"className":445,"code":2855,"language":447,"meta":448,"style":448},"\\begin{table}[h]\\footnotesize\n  \\caption{Performance at peak F-measure}\n  \\begin{tabular}{ | r | r || c | c | c |}\n      % ...\n  \\end{tabular}\n\\end{table}\n",[377,2857,2858,2863,2868,2872,2876,2880],{"__ignoreMap":448},[452,2859,2860],{"class":454,"line":455},[452,2861,2862],{},"\\begin{table}[h]\\footnotesize\n",[452,2864,2865],{"class":454,"line":732},[452,2866,2867],{},"  \\caption{Performance at peak F-measure}\n",[452,2869,2870],{"class":454,"line":738},[452,2871,2839],{},[452,2873,2874],{"class":454,"line":744},[452,2875,2844],{},[452,2877,2878],{"class":454,"line":750},[452,2879,869],{},[452,2881,2882],{"class":454,"line":814},[452,2883,2768],{},[357,2885,2886],{},"Alternatively, you can change the default font for all the tables in your document by placing the following code in the preamble:",[443,2888,2890],{"className":445,"code":2889,"language":447,"meta":448,"style":448},"\\let\\oldtabular\\tabular \n\\renewcommand{\\tabular}{\\footnotesize\\oldtabular}\n",[377,2891,2892,2897],{"__ignoreMap":448},[452,2893,2894],{"class":454,"line":455},[452,2895,2896],{},"\\let\\oldtabular\\tabular \n",[452,2898,2899],{"class":454,"line":732},[452,2900,2901],{},"\\renewcommand{\\tabular}{\\footnotesize\\oldtabular}\n",[357,2903,2904,2905,2908,2909,579],{},"See ",[364,2906,64],{"href":2907},"\u002Fdocument-fundamentals\u002Ffonts#sizing-text"," for named font sizes.  The table caption font size is not affected. To control the caption font size, see ",[364,2910,2911],{"href":121},"Caption Styles",[357,2913,2914,2915,2918,2919,579],{},"It is also possible to change the vertical space between rows using ",[377,2916,2917],{},"\\renewcommand{\\arraystretch}{0.8}"," before ",[377,2920,2921],{},"\\begin{tabular}",[370,2923,68],{"id":2924},"colors",[713,2926,2928],{"id":2927},"alternate-row-colors-in-tables","Alternate row colors in tables",[357,2930,400,2931,2934,2935,2937,2938,2941,2942,2944],{},[377,2932,2933],{},"xcolor"," package provides the necessary commands to produce tables with alternate row colors, when loaded with the ",[377,2936,383],{}," option.\nThe command ",[377,2939,2940],{},"\\rowcolors{\u003C*starting row*>}{\u003C*odd color*>}{\u003C*even color*>}"," has to be specified right before the ",[377,2943,379],{}," environment starts.",[443,2946,2948],{"className":445,"code":2947,"language":447,"meta":448,"style":448},"\\documentclass{article}\n\n\\usepackage[table]{xcolor}\n\n\\begin{document}\n\n\\begin{center}\n\\rowcolors{1}{green}{pink}\n\n\\begin{tabular}{lll}\nodd     & odd   & odd \\\\\neven    & even  & even\\\\\nodd     & odd   & odd \\\\\neven    & even  & even\\\\\n\\end{tabular}\n\\end{center}\n\n\\end{document}\n",[377,2949,2950,2955,2959,2964,2968,2972,2976,2980,2985,2989,2994,2999,3004,3008,3012,3016,3020,3024],{"__ignoreMap":448},[452,2951,2952],{"class":454,"line":455},[452,2953,2954],{},"\\documentclass{article}\n",[452,2956,2957],{"class":454,"line":732},[452,2958,1020],{"emptyLinePlaceholder":1019},[452,2960,2961],{"class":454,"line":738},[452,2962,2963],{},"\\usepackage[table]{xcolor}\n",[452,2965,2966],{"class":454,"line":744},[452,2967,1020],{"emptyLinePlaceholder":1019},[452,2969,2970],{"class":454,"line":750},[452,2971,1025],{},[452,2973,2974],{"class":454,"line":814},[452,2975,1020],{"emptyLinePlaceholder":1019},[452,2977,2978],{"class":454,"line":819},[452,2979,834],{},[452,2981,2982],{"class":454,"line":866},[452,2983,2984],{},"\\rowcolors{1}{green}{pink}\n",[452,2986,2987],{"class":454,"line":872},[452,2988,1020],{"emptyLinePlaceholder":1019},[452,2990,2991],{"class":454,"line":1050},[452,2992,2993],{},"\\begin{tabular}{lll}\n",[452,2995,2996],{"class":454,"line":1056},[452,2997,2998],{},"odd     & odd   & odd \\\\\n",[452,3000,3001],{"class":454,"line":1062},[452,3002,3003],{},"even    & even  & even\\\\\n",[452,3005,3006],{"class":454,"line":1068},[452,3007,2998],{},[452,3009,3010],{"class":454,"line":1074},[452,3011,3003],{},[452,3013,3014],{"class":454,"line":1080},[452,3015,753],{},[452,3017,3018],{"class":454,"line":1086},[452,3019,875],{},[452,3021,3022],{"class":454,"line":1092},[452,3023,1020],{"emptyLinePlaceholder":1019},[452,3025,3026],{"class":454,"line":1098},[452,3027,1216],{},[357,3029,2559,3030,3033,3034,3037,3038,3041],{},[377,3031,3032],{},"\\hiderowcolors"," is available to deactivate highlighting from a specified row until the end of the table.\nHighlighting can be reactivated within the table via the ",[377,3035,3036],{},"\\showrowcolors"," command. If while using these commands you experience ",[1801,3039,3040],{},"misplaced \\noalign errors"," then use the commands at the very beginning or end of a row in your tabular.",[443,3043,3045],{"className":445,"code":3044,"language":447,"meta":448,"style":448},"\\hiderowcolors odd & odd & odd \\\\\n",[377,3046,3047],{"__ignoreMap":448},[452,3048,3049],{"class":454,"line":455},[452,3050,3044],{},[357,3052,3053],{},"or",[443,3055,3057],{"className":445,"code":3056,"language":447,"meta":448,"style":448},"odd & odd & odd \\\\ \\showrowcolors\n",[377,3058,3059],{"__ignoreMap":448},[452,3060,3061],{"class":454,"line":455},[452,3062,3056],{},[713,3064,3066],{"id":3065},"colors-of-individual-cells","Colors of individual cells",[357,3068,3069,3070,3072],{},"As above this uses the ",[377,3071,2933],{}," package.",[443,3074,3076],{"className":445,"code":3075,"language":447,"meta":448,"style":448},"% Include this somewhere in your document\n\\usepackage[table]{xcolor}\n\n% Enter this in the cell you wish to color a light grey.\n% NB: the word 'gray' here denotes the grayscale color scheme, not the color grey. '0.9' denotes how dark the grey is.\n\\cellcolor[gray]{0.9}\n% The following will color the cell red.\n\\cellcolor{red}\n",[377,3077,3078,3083,3087,3091,3096,3101,3106,3111],{"__ignoreMap":448},[452,3079,3080],{"class":454,"line":455},[452,3081,3082],{},"% Include this somewhere in your document\n",[452,3084,3085],{"class":454,"line":732},[452,3086,2963],{},[452,3088,3089],{"class":454,"line":738},[452,3090,1020],{"emptyLinePlaceholder":1019},[452,3092,3093],{"class":454,"line":744},[452,3094,3095],{},"% Enter this in the cell you wish to color a light grey.\n",[452,3097,3098],{"class":454,"line":750},[452,3099,3100],{},"% NB: the word 'gray' here denotes the grayscale color scheme, not the color grey. '0.9' denotes how dark the grey is.\n",[452,3102,3103],{"class":454,"line":814},[452,3104,3105],{},"\\cellcolor[gray]{0.9}\n",[452,3107,3108],{"class":454,"line":819},[452,3109,3110],{},"% The following will color the cell red.\n",[452,3112,3113],{"class":454,"line":866},[452,3114,3115],{},"\\cellcolor{red}\n",[370,3117,3119],{"id":3118},"width-and-stretching","Width and stretching",[357,3121,3122,3123,380,3126,579],{},"We keep providing documentation for ",[377,3124,3125],{},"tabular*",[377,3127,3128],{},"tabularx",[713,3130,400,3132,433],{"id":3131},"the-tabular-environment-1",[377,3133,3125],{},[357,3135,3136],{},"This is basically a slight extension on the original tabular version, although it requires an extra argument (before the column descriptions) to specify the preferred width of the table.",[443,3138,3140],{"className":445,"code":3139,"language":447,"meta":448,"style":448},"\\begin{tabular*}{0.75\\textwidth}{ c c c r }\n  \\hline\n  label 1 & label 2 & label 3 & label 4 \\\\\n  \\hline\n  item 1  & item 2  & item 3  & item 4  \\\\\n  \\hline\n\\end{tabular*}\n",[377,3141,3142,3147,3151,3156,3160,3165,3169],{"__ignoreMap":448},[452,3143,3144],{"class":454,"line":455},[452,3145,3146],{},"\\begin{tabular*}{0.75\\textwidth}{ c c c r }\n",[452,3148,3149],{"class":454,"line":732},[452,3150,799],{},[452,3152,3153],{"class":454,"line":738},[452,3154,3155],{},"  label 1 & label 2 & label 3 & label 4 \\\\\n",[452,3157,3158],{"class":454,"line":744},[452,3159,799],{},[452,3161,3162],{"class":454,"line":750},[452,3163,3164],{},"  item 1  & item 2  & item 3  & item 4  \\\\\n",[452,3166,3167],{"class":454,"line":814},[452,3168,799],{},[452,3170,3171],{"class":454,"line":819},[452,3172,3173],{},"\\end{tabular*}\n",[357,3175,3176,3177,3180],{},"However, that may not look quite as intended. The columns are still at their natural width (just wide enough to fit their contents) while the rows are as wide as the table width specified. If you do not like this default, you must also explicitly insert extra column space. LaTeX has ",[419,3178,3179],{},"rubber lengths",", which, unlike others, are not fixed. LaTeX can dynamically decide how long the lengths should be. So, an example of this is the following.",[443,3182,3184],{"className":445,"code":3183,"language":447,"meta":448,"style":448},"\\begin{tabular*}{0.75\\textwidth}{@{\\extracolsep{\\fill}} c c c r }\n  \\hline\n  label 1 & label 2 & label 3 & label 4 \\\\\n  \\hline\n  item 1  & item 2  & item 3  & item 4  \\\\\n  \\hline\n\\end{tabular*}\n",[377,3185,3186,3191,3195,3199,3203,3207,3211],{"__ignoreMap":448},[452,3187,3188],{"class":454,"line":455},[452,3189,3190],{},"\\begin{tabular*}{0.75\\textwidth}{@{\\extracolsep{\\fill}} c c c r }\n",[452,3192,3193],{"class":454,"line":732},[452,3194,799],{},[452,3196,3197],{"class":454,"line":738},[452,3198,3155],{},[452,3200,3201],{"class":454,"line":744},[452,3202,799],{},[452,3204,3205],{"class":454,"line":750},[452,3206,3164],{},[452,3208,3209],{"class":454,"line":814},[452,3210,799],{},[452,3212,3213],{"class":454,"line":819},[452,3214,3173],{},[357,3216,3217,3218,3220,3221,3224,3225,3228],{},"You will notice the ",[377,3219,1814],{}," construct added at the beginning of the column description. Within it is the ",[377,3222,3223],{},"\\extracolsep"," command, which requires a width. A fixed width could have been used. However, by using a rubber length, such as ",[377,3226,3227],{},"\\fill",", the columns are automatically spaced evenly.",[713,3230,400,3232,3234],{"id":3231},"the-tabularx-package",[377,3233,3128],{}," package",[357,3236,3237,3238,3240,3241,3243,3244,3247],{},"This package provides a table environment called ",[377,3239,3128],{},", which is similar to the ",[377,3242,3125],{}," environment except that it has a new column specifier ",[377,3245,3246],{},"X"," (in uppercase). The column(s) specified with this specifier will be stretched to make the table as wide as specified, greatly simplifying the creation of tables.",[443,3249,3251],{"className":445,"code":3250,"language":447,"meta":448,"style":448},"\\usepackage{tabularx}\n% ...\n\n\\begin{tabularx}{\\textwidth}{ X X X X }\n  \\hline\n  label 1 & label 2 & label 3 & label 4 \\\\\n  \\hline\n  item 1  & item 2  & item 3  & item 4  \\\\\n  \\hline\n\\end{tabularx}\n",[377,3252,3253,3258,3262,3266,3271,3275,3279,3283,3287,3291],{"__ignoreMap":448},[452,3254,3255],{"class":454,"line":455},[452,3256,3257],{},"\\usepackage{tabularx}\n",[452,3259,3260],{"class":454,"line":732},[452,3261,2668],{},[452,3263,3264],{"class":454,"line":738},[452,3265,1020],{"emptyLinePlaceholder":1019},[452,3267,3268],{"class":454,"line":744},[452,3269,3270],{},"\\begin{tabularx}{\\textwidth}{ X X X X }\n",[452,3272,3273],{"class":454,"line":750},[452,3274,799],{},[452,3276,3277],{"class":454,"line":814},[452,3278,3155],{},[452,3280,3281],{"class":454,"line":819},[452,3282,799],{},[452,3284,3285],{"class":454,"line":866},[452,3286,3164],{},[452,3288,3289],{"class":454,"line":872},[452,3290,799],{},[452,3292,3293],{"class":454,"line":1050},[452,3294,3295],{},"\\end{tabularx}\n",[357,3297,3298,3299,3301,3302,3304,3305,1441,3308,3311,3312,979,3315,3318],{},"The content provided for the boxes is treated as for a ",[377,3300,357],{}," column, except that the width is calculated automatically. If you use the package ",[377,3303,469],{},", you may also apply any ",[377,3306,3307],{},">{\\cmd}|",[377,3309,3310],{},"\u003C{\\cmd}|"," command to achieve specific behavior (like ",[377,3313,3314],{},"\\centering",[377,3316,3317],{},"\\raggedright\\arraybackslash",") as described previously.",[357,3320,3321,3322,3325,3326,3329,3330,3333],{},"Another option is to use ",[377,3323,3324],{},"\\newcolumntype"," to format selected columns in a different way. It defines a new column specifier, e.g. ",[377,3327,3328],{},"R"," (in uppercase). In this example, the second and fourth column is adjusted in a different way (",[377,3331,3332],{},"\\raggedleft","):",[443,3335,3337],{"className":445,"code":3336,"language":447,"meta":448,"style":448},"\\usepackage{tabularx}\n% ...\n\n\\newcolumntype{R}{>{\\raggedleft\\arraybackslash}X}%\n\\begin{tabularx}{\\textwidth}{ l R l R }\n  \\hline\n  label 1 & label 2 & label 3 & label 4 \\\\\n  \\hline\n  item 1  & item 2  & item 3  & item 4  \\\\\n  \\hline\n\\end{tabularx}\n",[377,3338,3339,3343,3347,3351,3356,3361,3365,3369,3373,3377,3381],{"__ignoreMap":448},[452,3340,3341],{"class":454,"line":455},[452,3342,3257],{},[452,3344,3345],{"class":454,"line":732},[452,3346,2668],{},[452,3348,3349],{"class":454,"line":738},[452,3350,1020],{"emptyLinePlaceholder":1019},[452,3352,3353],{"class":454,"line":744},[452,3354,3355],{},"\\newcolumntype{R}{>{\\raggedleft\\arraybackslash}X}%\n",[452,3357,3358],{"class":454,"line":750},[452,3359,3360],{},"\\begin{tabularx}{\\textwidth}{ l R l R }\n",[452,3362,3363],{"class":454,"line":814},[452,3364,799],{},[452,3366,3367],{"class":454,"line":819},[452,3368,3155],{},[452,3370,3371],{"class":454,"line":866},[452,3372,799],{},[452,3374,3375],{"class":454,"line":872},[452,3376,3164],{},[452,3378,3379],{"class":454,"line":1050},[452,3380,799],{},[452,3382,3383],{"class":454,"line":1056},[452,3384,3295],{},[357,3386,3387,3388,3390,3391,3394,3395,3397],{},"Tabularx with rows spanning multiple columns using ",[377,3389,2019],{},". The two central columns are posing as one by using the ",[377,3392,3393],{},"X@{","} option. Note that the ",[377,3396,2019],{}," width (which in this example is 2) should equal the (in this example 1+1) width of the spanned columns:",[443,3399,3401],{"className":445,"code":3400,"language":447,"meta":448,"style":448},"\\usepackage{tabularx}\n% ...\n\n\\begin{tabularx}{1\\textwidth}{ >{\\setlength\\hsize{1\\hsize}\\centering}X >{\\setlength\\hsize{1\\hsize}\\raggedleft}X@{} >{\\setlength\\hsize{1\\hsize}\\raggedright}X >{\\setlength\\hsize{1\\hsize}\\centering}X }\n  \\hline\nLabel 1 & \\multicolumn{2}{>{\\centering\\setlength\\hsize{2\\hsize}}X}{Label 2} & Label 3\\tabularnewline\n\\hline\n  123  & 123  & 456  & 123  \\tabularnewline\n  \\hline\n  123  & 123  & 456  & 123  \\tabularnewline\n  \\hline\n\\end{tabularx}\n",[377,3402,3403,3407,3411,3415,3420,3424,3429,3433,3438,3442,3446,3450],{"__ignoreMap":448},[452,3404,3405],{"class":454,"line":455},[452,3406,3257],{},[452,3408,3409],{"class":454,"line":732},[452,3410,2668],{},[452,3412,3413],{"class":454,"line":738},[452,3414,1020],{"emptyLinePlaceholder":1019},[452,3416,3417],{"class":454,"line":744},[452,3418,3419],{},"\\begin{tabularx}{1\\textwidth}{ >{\\setlength\\hsize{1\\hsize}\\centering}X >{\\setlength\\hsize{1\\hsize}\\raggedleft}X@{} >{\\setlength\\hsize{1\\hsize}\\raggedright}X >{\\setlength\\hsize{1\\hsize}\\centering}X }\n",[452,3421,3422],{"class":454,"line":750},[452,3423,799],{},[452,3425,3426],{"class":454,"line":814},[452,3427,3428],{},"Label 1 & \\multicolumn{2}{>{\\centering\\setlength\\hsize{2\\hsize}}X}{Label 2} & Label 3\\tabularnewline\n",[452,3430,3431],{"class":454,"line":819},[452,3432,1407],{},[452,3434,3435],{"class":454,"line":866},[452,3436,3437],{},"  123  & 123  & 456  & 123  \\tabularnewline\n",[452,3439,3440],{"class":454,"line":872},[452,3441,799],{},[452,3443,3444],{"class":454,"line":1050},[452,3445,3437],{},[452,3447,3448],{"class":454,"line":1056},[452,3449,799],{},[452,3451,3452],{"class":454,"line":1062},[452,3453,3295],{},[357,3455,3456,3457,3460,3461,3463],{},"In a way analogous to how new commands with arguments can be created with ",[377,3458,3459],{},"\\newcommand",", new column types with arguments can be created with ",[377,3462,3324],{}," as follows:",[443,3465,3467],{"className":445,"code":3466,"language":447,"meta":448,"style":448},"\\usepackage{tabularx}\n\\usepackage[table]{xcolor} %Used to color the last column\n% ...\n\n\\newcolumntype{L}[1]{>{\\hsize=#1\\hsize\\raggedright\\arraybackslash}X}%\n\\newcolumntype{R}[1]{>{\\hsize=#1\\hsize\\raggedleft\\arraybackslash}X}%\n\\newcolumntype{C}[2]{>{\\hsize=#1\\hsize\\columncolor{#2}\\centering\\arraybackslash}X}%\n\n\\begin{tabularx}{\\textwidth}{ | L{1} | R{0.5} | R{0.5} | C{2}{gray} | }\n  \\hline\n  label 1 & label 2 & label 3 & label 4 \\\\\n  \\hline\n  item 1  & item 2  & item 3  & item 4  \\\\\n  \\hline\n\\end{tabularx}\n",[377,3468,3469,3473,3478,3482,3486,3491,3496,3501,3505,3510,3514,3518,3522,3526,3530],{"__ignoreMap":448},[452,3470,3471],{"class":454,"line":455},[452,3472,3257],{},[452,3474,3475],{"class":454,"line":732},[452,3476,3477],{},"\\usepackage[table]{xcolor} %Used to color the last column\n",[452,3479,3480],{"class":454,"line":738},[452,3481,2668],{},[452,3483,3484],{"class":454,"line":744},[452,3485,1020],{"emptyLinePlaceholder":1019},[452,3487,3488],{"class":454,"line":750},[452,3489,3490],{},"\\newcolumntype{L}[1]{>{\\hsize=#1\\hsize\\raggedright\\arraybackslash}X}%\n",[452,3492,3493],{"class":454,"line":814},[452,3494,3495],{},"\\newcolumntype{R}[1]{>{\\hsize=#1\\hsize\\raggedleft\\arraybackslash}X}%\n",[452,3497,3498],{"class":454,"line":819},[452,3499,3500],{},"\\newcolumntype{C}[2]{>{\\hsize=#1\\hsize\\columncolor{#2}\\centering\\arraybackslash}X}%\n",[452,3502,3503],{"class":454,"line":866},[452,3504,1020],{"emptyLinePlaceholder":1019},[452,3506,3507],{"class":454,"line":872},[452,3508,3509],{},"\\begin{tabularx}{\\textwidth}{ | L{1} | R{0.5} | R{0.5} | C{2}{gray} | }\n",[452,3511,3512],{"class":454,"line":1050},[452,3513,799],{},[452,3515,3516],{"class":454,"line":1056},[452,3517,3155],{},[452,3519,3520],{"class":454,"line":1062},[452,3521,799],{},[452,3523,3524],{"class":454,"line":1068},[452,3525,3164],{},[452,3527,3528],{"class":454,"line":1074},[452,3529,799],{},[452,3531,3532],{"class":454,"line":1080},[452,3533,3295],{},[357,3535,3536,3537,3540,3541,3543],{},"where since there are 4 columns, the sum of the ",[377,3538,3539],{},"\\hsize"," values (1 + 0.5 + 0.5 + 2) must be equal to 4. The default value used by tabularx for ",[377,3542,3539],{}," is 1.",[713,3545,400,3547,3234],{"id":3546},"the-tabulary-package",[377,3548,3549],{},"tabulary",[357,3551,3552,3558,3559,3561,3562,3564],{},[364,3553,3556],{"href":3554,"rel":3555},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Ftabulary",[1954],[377,3557,3549],{}," is a modified ",[377,3560,3125],{}," allowing width of columns set for equal heights.\n",[377,3563,3549],{}," allows easy and convenient writing of well balanced tables.",[357,3566,3567,3568,3570],{},"The problem with ",[377,3569,3128],{}," is that it leaves much blank if your cells are almost empty. Besides, it is not easy to have different column sizes.",[357,3572,3573,3575],{},[377,3574,3549],{}," tries to balance the column widths so that each column has at least its natural width, without exceeding the maximum length.",[443,3577,3579],{"className":445,"code":3578,"language":447,"meta":448,"style":448},"\\usepackage{tabulary}\n...\n\n\\begin{center}\n  \\begin{tabulary}{0.7\\textwidth}{LCL}\n    Short sentences      & \\#  & Long sentences                                                 \\\\\n    \\hline\n    This is short.       & 173 & This is much loooooooonger, because there are many more words.  \\\\\n    This is not shorter. & 317 & This is still loooooooonger, because there are many more words. \\\\\n  \\end{tabulary}  \n\\end{center}\n",[377,3580,3581,3586,3590,3594,3598,3603,3608,3612,3617,3622,3627],{"__ignoreMap":448},[452,3582,3583],{"class":454,"line":455},[452,3584,3585],{},"\\usepackage{tabulary}\n",[452,3587,3588],{"class":454,"line":732},[452,3589,2359],{},[452,3591,3592],{"class":454,"line":738},[452,3593,1020],{"emptyLinePlaceholder":1019},[452,3595,3596],{"class":454,"line":744},[452,3597,834],{},[452,3599,3600],{"class":454,"line":750},[452,3601,3602],{},"  \\begin{tabulary}{0.7\\textwidth}{LCL}\n",[452,3604,3605],{"class":454,"line":814},[452,3606,3607],{},"    Short sentences      & \\#  & Long sentences                                                 \\\\\n",[452,3609,3610],{"class":454,"line":819},[452,3611,844],{},[452,3613,3614],{"class":454,"line":866},[452,3615,3616],{},"    This is short.       & 173 & This is much loooooooonger, because there are many more words.  \\\\\n",[452,3618,3619],{"class":454,"line":872},[452,3620,3621],{},"    This is not shorter. & 317 & This is still loooooooonger, because there are many more words. \\\\\n",[452,3623,3624],{"class":454,"line":1050},[452,3625,3626],{},"  \\end{tabulary}  \n",[452,3628,3629],{"class":454,"line":1056},[452,3630,875],{},[357,3632,3633,3634,3636,3637,579],{},"The first parameter is the maximum width. ",[377,3635,3549],{}," will try not to exceed it, but it will not stretch to it if there is not enough content, contrary to ",[377,3638,3128],{},[357,3640,3641,3642,3644],{},"The second parameter is the column disposition. Possible values are those from the ",[377,3643,379],{}," environment, plus",[383,3646,3647,3655],{},[474,3648,3649],{},[477,3650,3651,3653],{},[480,3652,482],{},[480,3654,485],{},[487,3656,3657,3667,3677,3686],{},[477,3658,3659,3664],{},[492,3660,3661],{},[377,3662,3663],{},"L",[492,3665,3666],{},"left-justified balanced column",[477,3668,3669,3674],{},[492,3670,3671],{},[377,3672,3673],{},"C",[492,3675,3676],{},"centered balanced column",[477,3678,3679,3683],{},[492,3680,3681],{},[377,3682,3328],{},[492,3684,3685],{},"right-justified balanced column",[477,3687,3688,3693],{},[492,3689,3690],{},[377,3691,3692],{},"J",[492,3694,3695],{},"left-right-justified balanced column",[357,3697,3698],{},"These are all capitals.",[713,3700,400,3702,433],{"id":3701},"the-tabu-environment",[377,3703,2162],{},[357,3705,3706,3707,579],{},"It works pretty much like ",[377,3708,3128],{},[357,3710,3711,3712,3714,3715],{},"Note:  ",[419,3713,2162],{}," is currently ",[364,3716,3719],{"href":3717,"rel":3718},"https:\u002F\u002Fgithub.com\u002Ftabu-issues-for-future-maintainer\u002Ftabu\u002Fblob\u002Fmaster\u002FREADME.md",[1954],"broken and unmaintained",[443,3721,3723],{"className":445,"code":3722,"language":447,"meta":448,"style":448},"\\begin{tabu} to \\linewidth {llX[2]lllXl}\n% ...\n\\end{tabu}\n",[377,3724,3725,3730,3734],{"__ignoreMap":448},[452,3726,3727],{"class":454,"line":455},[452,3728,3729],{},"\\begin{tabu} to \\linewidth {llX[2]lllXl}\n",[452,3731,3732],{"class":454,"line":732},[452,3733,2668],{},[452,3735,3736],{"class":454,"line":738},[452,3737,2196],{},[357,3739,3740,3743,3744,3746],{},[377,3741,3742],{},"to \\linewidth"," specifies the target width.\nThe ",[377,3745,3246],{}," parameter can have an optional span factor.",[370,3748,3750],{"id":3749},"table-across-several-pages","Table across several pages",[357,3752,3753,3754,3757,3758,380,3760,3762],{},"Long tables are natively supported by LaTeX thanks to the ",[377,3755,3756],{},"longtable"," environment, which replaces both the ",[377,3759,379],{},[377,3761,383],{}," environments or rather combines them into a single environment. Unfortunately, this environment does not support stretching (X columns).",[357,3764,400,3765,3767,3768,3773,3774,3777,3778,3780],{},[377,3766,2162],{}," package (which is ",[364,3769,3772],{"href":3770,"rel":3771},"https:\u002F\u002Fgithub.com\u002Ftabu-issues-for-future-maintainer\u002Ftabu\u002Fblob\u002Fmain\u002FREADME.md",[1954],"no longer maintained",") provides the ",[377,3775,3776],{},"longtabu"," environment. It has most of the features of ",[377,3779,2162],{},", with the additional capability to span multiple pages.",[357,3782,3783],{},"LaTeX can do well with long tables: you can specify a header that will repeat on every page, a header for the first page only, and the same for the footer.",[443,3785,3787],{"className":445,"code":3786,"language":447,"meta":448,"style":448},"\\begin{longtabu} to \\linewidth {lX[2]lXl}\n\n\\rowfont\\bfseries H1 & H2 & H3 & H4 & H5 \\\\ \\hline \n\\endhead\n\n\\\\ \\hline\n\\multicolumn{5}{r}{There is more to come} \\\\\n\\endfoot\n\n\\\\ \\hline\n\\endlastfoot\n\n% Content ...\n",[377,3788,3789,3794,3798,3803,3808,3812,3817,3822,3827,3831,3835,3840,3844],{"__ignoreMap":448},[452,3790,3791],{"class":454,"line":455},[452,3792,3793],{},"\\begin{longtabu} to \\linewidth {lX[2]lXl}\n",[452,3795,3796],{"class":454,"line":732},[452,3797,1020],{"emptyLinePlaceholder":1019},[452,3799,3800],{"class":454,"line":738},[452,3801,3802],{},"\\rowfont\\bfseries H1 & H2 & H3 & H4 & H5 \\\\ \\hline \n",[452,3804,3805],{"class":454,"line":744},[452,3806,3807],{},"\\endhead\n",[452,3809,3810],{"class":454,"line":750},[452,3811,1020],{"emptyLinePlaceholder":1019},[452,3813,3814],{"class":454,"line":814},[452,3815,3816],{},"\\\\ \\hline\n",[452,3818,3819],{"class":454,"line":819},[452,3820,3821],{},"\\multicolumn{5}{r}{There is more to come} \\\\\n",[452,3823,3824],{"class":454,"line":866},[452,3825,3826],{},"\\endfoot\n",[452,3828,3829],{"class":454,"line":872},[452,3830,1020],{"emptyLinePlaceholder":1019},[452,3832,3833],{"class":454,"line":1050},[452,3834,3816],{},[452,3836,3837],{"class":454,"line":1056},[452,3838,3839],{},"\\endlastfoot\n",[452,3841,3842],{"class":454,"line":1062},[452,3843,1020],{"emptyLinePlaceholder":1019},[452,3845,3846],{"class":454,"line":1068},[452,3847,3848],{},"% Content ...\n",[357,3850,3851,3852,3854],{},"It uses syntax similar to ",[377,3853,3756],{},", so you should have a look at its documentation if you want to know more.",[357,3856,3857,3858,1441,3865,3872,3873,579],{},"Alternatively you can try one of the following packages ",[364,3859,3862],{"href":3860,"rel":3861},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fsupertabular",[1954],[377,3863,3864],{},"supertabular",[364,3866,3869],{"href":3867,"rel":3868},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fxtab",[1954],[377,3870,3871],{},"xtab",", an extended and somewhat improved version of ",[377,3874,3864],{},[370,3876,3878],{"id":3877},"partial-vertical-lines","Partial vertical lines",[357,3880,3881],{},"Adding a partial vertical line to an individual cell:",[443,3883,3885],{"className":445,"code":3884,"language":447,"meta":448,"style":448},"\\begin{tabular}{ l c r }\n  \\hline\n  1 & 2 & 3 \\\\ \\hline\n  4 & 5 & \\multicolumn{1}{r|}{6}  \\\\ \\hline\n  7 & 8 & 9 \\\\ \\hline\n\\end{tabular}\n",[377,3886,3887,3891,3895,3900,3905,3910],{"__ignoreMap":448},[452,3888,3889],{"class":454,"line":455},[452,3890,729],{},[452,3892,3893],{"class":454,"line":732},[452,3894,799],{},[452,3896,3897],{"class":454,"line":738},[452,3898,3899],{},"  1 & 2 & 3 \\\\ \\hline\n",[452,3901,3902],{"class":454,"line":744},[452,3903,3904],{},"  4 & 5 & \\multicolumn{1}{r|}{6}  \\\\ \\hline\n",[452,3906,3907],{"class":454,"line":750},[452,3908,3909],{},"  7 & 8 & 9 \\\\ \\hline\n",[452,3911,3912],{"class":454,"line":814},[452,3913,753],{},[357,3915,3916],{},"Removing part of a vertical line in a particular cell:",[443,3918,3920],{"className":445,"code":3919,"language":447,"meta":448,"style":448},"\\begin{tabular}{ |l|c|r| }\n  \\hline\n  1 & 2 & 3 \\\\ \\hline\n  4 & 5 & \\multicolumn{1}{r}{6} \\\\ \\hline\n  7 & 8 & 9 \\\\ \\hline\n\\end{tabular}\n",[377,3921,3922,3927,3931,3935,3940,3944],{"__ignoreMap":448},[452,3923,3924],{"class":454,"line":455},[452,3925,3926],{},"\\begin{tabular}{ |l|c|r| }\n",[452,3928,3929],{"class":454,"line":732},[452,3930,799],{},[452,3932,3933],{"class":454,"line":738},[452,3934,3899],{},[452,3936,3937],{"class":454,"line":744},[452,3938,3939],{},"  4 & 5 & \\multicolumn{1}{r}{6} \\\\ \\hline\n",[452,3941,3942],{"class":454,"line":750},[452,3943,3909],{},[452,3945,3946],{"class":454,"line":814},[452,3947,753],{},[370,3949,3951],{"id":3950},"vertically-centered-images","Vertically centered images",[357,3953,3954,3955,3957],{},"Inserting images into a table row will align it at the top of the cell.\nBy using the ",[377,3956,469],{}," package this problem can be solved.\nDefining a new columntype will keep the image vertically centered.",[443,3959,3961],{"className":445,"code":3960,"language":447,"meta":448,"style":448},"\\newcolumntype{V}{>{\\centering\\arraybackslash} m{.4\\linewidth} }\n",[377,3962,3963],{"__ignoreMap":448},[452,3964,3965],{"class":454,"line":455},[452,3966,3960],{},[357,3968,3969],{},"Or use a parbox to center the image.",[443,3971,3973],{"className":445,"code":3972,"language":447,"meta":448,"style":448},"\\parbox[c]{1em}{\\includegraphics{image.png} }\n",[377,3974,3975],{"__ignoreMap":448},[452,3976,3977],{"class":454,"line":455},[452,3978,3972],{},[357,3980,3981],{},"A raisebox works as well, also allowing to manually fine-tune the alignment with its first parameter.",[443,3983,3985],{"className":445,"code":3984,"language":447,"meta":448,"style":448},"\\raisebox{-.5\\height}{\\includegraphics{image.png} }\n",[377,3986,3987],{"__ignoreMap":448},[452,3988,3989],{"class":454,"line":455},[452,3990,3984],{},[370,3992,3994],{"id":3993},"footnotes-in-tables","Footnotes in tables",[357,3996,400,3997,3999,4000,4002],{},[377,3998,379],{}," environment does not handle footnotes properly. The ",[377,4001,3756],{}," fixes that.",[370,4004,4006],{"id":4005},"professional-tables","Professional tables",[357,4008,4009,4010,4013,4014,4017,4018,4023,4024,4029],{},"Many professionally typeset books and journals feature simple tables, which have appropriate spacing above and below lines, and almost ",[419,4011,4012],{},"never"," use vertical rules. Many examples of LaTeX tables (including this Wikibook) showcase the use of vertical rules (using \"|\"), and double-rules (using ",[377,4015,4016],{},"\\hline\\hline"," or \"||\"), which are regarded as unnecessary and distracting in a professionally published form.  The ",[364,4019,4022],{"href":4020,"rel":4021},"http:\u002F\u002Fwww.ctan.org\u002Ftex-archive\u002Fmacros\u002Flatex\u002Fcontrib\u002Fbooktabs\u002F",[1954],"booktabs"," package is useful for easily providing this professionalism in LaTeX tables, and the ",[364,4025,4028],{"href":4026,"rel":4027},"http:\u002F\u002Fmirrors.ctan.org\u002Fmacros\u002Flatex\u002Fcontrib\u002Fbooktabs\u002Fbooktabs.pdf",[1954],"documentation"," also provides guidelines on what constitutes a \"good\" table.",[357,4031,4032,4033,4036,4037,4040,4041,4044,4045,4048,4049,1441,4052,4055,4056,4059],{},"In brief, the package uses ",[377,4034,4035],{},"\\toprule"," for the uppermost rule (or line), ",[377,4038,4039],{},"\\midrule"," for the rules appearing in the middle of the table (such as under the header), and ",[377,4042,4043],{},"\\bottomrule"," for the lowermost rule. This ensures that the rule weight and spacing are acceptable. In addition, ",[377,4046,4047],{},"\\cmidrule"," can be used for mid-rules that span specified columns. The following example contrasts the use of booktabs and  two equivalent normal LaTeX implementations (the second example requires ",[377,4050,4051],{},"\\usepackage{array}",[377,4053,4054],{},"\\usepackage{dcolumn}",", and the third example requires ",[377,4057,4058],{},"\\usepackage{booktabs}"," in the preamble).",[713,4061,4063],{"id":4062},"normal-latex","Normal LaTeX",[443,4065,4067],{"className":445,"code":4066,"language":447,"meta":448,"style":448},"\\begin{tabular}{llr}\n\\hline\n\\multicolumn{2}{c}{Item} \\\\\n\\cline{1-2}\nAnimal    & Description & Price (\\$) \\\\\n\\hline\nGnat      & per gram    & 13.65      \\\\\n          & each        & 0.01       \\\\\nGnu       & stuffed     & 92.50      \\\\\nEmu       & stuffed     & 33.33      \\\\\nArmadillo & frozen      & 8.99       \\\\\n\\hline\n\\end{tabular}\n",[377,4068,4069,4074,4078,4083,4088,4093,4097,4102,4107,4112,4117,4122,4126],{"__ignoreMap":448},[452,4070,4071],{"class":454,"line":455},[452,4072,4073],{},"\\begin{tabular}{llr}\n",[452,4075,4076],{"class":454,"line":732},[452,4077,1407],{},[452,4079,4080],{"class":454,"line":738},[452,4081,4082],{},"\\multicolumn{2}{c}{Item} \\\\\n",[452,4084,4085],{"class":454,"line":744},[452,4086,4087],{},"\\cline{1-2}\n",[452,4089,4090],{"class":454,"line":750},[452,4091,4092],{},"Animal    & Description & Price (\\$) \\\\\n",[452,4094,4095],{"class":454,"line":814},[452,4096,1407],{},[452,4098,4099],{"class":454,"line":819},[452,4100,4101],{},"Gnat      & per gram    & 13.65      \\\\\n",[452,4103,4104],{"class":454,"line":866},[452,4105,4106],{},"          & each        & 0.01       \\\\\n",[452,4108,4109],{"class":454,"line":872},[452,4110,4111],{},"Gnu       & stuffed     & 92.50      \\\\\n",[452,4113,4114],{"class":454,"line":1050},[452,4115,4116],{},"Emu       & stuffed     & 33.33      \\\\\n",[452,4118,4119],{"class":454,"line":1056},[452,4120,4121],{},"Armadillo & frozen      & 8.99       \\\\\n",[452,4123,4124],{"class":454,"line":1062},[452,4125,1407],{},[452,4127,4128],{"class":454,"line":1068},[452,4129,753],{},[713,4131,4133,4134],{"id":4132},"using-array","Using ",[377,4135,469],{},[443,4137,4139],{"className":445,"code":4138,"language":447,"meta":448,"style":448},"\\usepackage{array} \n%or \\usepackage{dcolumn}\n...\n\\begin{tabular}{llr}\n\\firsthline\n\\multicolumn{2}{c}{Item} \\\\\n\\cline{1-2}\nAnimal    & Description & Price (\\$) \\\\\n\\hline\nGnat      & per gram    & 13.65      \\\\\n          & each        & 0.01       \\\\\nGnu       & stuffed     & 92.50      \\\\\nEmu       & stuffed     & 33.33      \\\\\nArmadillo & frozen      & 8.99       \\\\\n\\lasthline\n\\end{tabular}\n",[377,4140,4141,4146,4151,4155,4159,4164,4168,4172,4176,4180,4184,4188,4192,4196,4200,4205],{"__ignoreMap":448},[452,4142,4143],{"class":454,"line":455},[452,4144,4145],{},"\\usepackage{array} \n",[452,4147,4148],{"class":454,"line":732},[452,4149,4150],{},"%or \\usepackage{dcolumn}\n",[452,4152,4153],{"class":454,"line":738},[452,4154,2359],{},[452,4156,4157],{"class":454,"line":744},[452,4158,4073],{},[452,4160,4161],{"class":454,"line":750},[452,4162,4163],{},"\\firsthline\n",[452,4165,4166],{"class":454,"line":814},[452,4167,4082],{},[452,4169,4170],{"class":454,"line":819},[452,4171,4087],{},[452,4173,4174],{"class":454,"line":866},[452,4175,4092],{},[452,4177,4178],{"class":454,"line":872},[452,4179,1407],{},[452,4181,4182],{"class":454,"line":1050},[452,4183,4101],{},[452,4185,4186],{"class":454,"line":1056},[452,4187,4106],{},[452,4189,4190],{"class":454,"line":1062},[452,4191,4111],{},[452,4193,4194],{"class":454,"line":1068},[452,4195,4116],{},[452,4197,4198],{"class":454,"line":1074},[452,4199,4121],{},[452,4201,4202],{"class":454,"line":1080},[452,4203,4204],{},"\\lasthline\n",[452,4206,4207],{"class":454,"line":1086},[452,4208,753],{},[713,4210,4133,4212],{"id":4211},"using-booktabs",[377,4213,4022],{},[443,4215,4217],{"className":445,"code":4216,"language":447,"meta":448,"style":448},"\\usepackage{booktabs}\n\\begin{tabular}{llr}\n\\toprule\n\\multicolumn{2}{c}{Item} \\\\\n\\cmidrule(r){1-2}\nAnimal    & Description & Price (\\$) \\\\\n\\midrule\nGnat      & per gram    & 13.65      \\\\\n          & each        & 0.01       \\\\\nGnu       & stuffed     & 92.50      \\\\\nEmu       & stuffed     & 33.33      \\\\\nArmadillo & frozen      & 8.99       \\\\\n\\bottomrule\n\\end{tabular}\n",[377,4218,4219,4224,4228,4233,4237,4242,4246,4251,4255,4259,4263,4267,4271,4276],{"__ignoreMap":448},[452,4220,4221],{"class":454,"line":455},[452,4222,4223],{},"\\usepackage{booktabs}\n",[452,4225,4226],{"class":454,"line":732},[452,4227,4073],{},[452,4229,4230],{"class":454,"line":738},[452,4231,4232],{},"\\toprule\n",[452,4234,4235],{"class":454,"line":744},[452,4236,4082],{},[452,4238,4239],{"class":454,"line":750},[452,4240,4241],{},"\\cmidrule(r){1-2}\n",[452,4243,4244],{"class":454,"line":814},[452,4245,4092],{},[452,4247,4248],{"class":454,"line":819},[452,4249,4250],{},"\\midrule\n",[452,4252,4253],{"class":454,"line":866},[452,4254,4101],{},[452,4256,4257],{"class":454,"line":872},[452,4258,4106],{},[452,4260,4261],{"class":454,"line":1050},[452,4262,4111],{},[452,4264,4265],{"class":454,"line":1056},[452,4266,4116],{},[452,4268,4269],{"class":454,"line":1062},[452,4270,4121],{},[452,4272,4273],{"class":454,"line":1068},[452,4274,4275],{},"\\bottomrule\n",[452,4277,4278],{"class":454,"line":1074},[452,4279,753],{},[357,4281,4282,4283,4288,4289,4291,4292,3072],{},"Usually the need arises for footnotes under a table (and not at the bottom of the page), with a caption properly spaced above the table. These are addressed by the ",[364,4284,4287],{"href":4285,"rel":4286},"http:\u002F\u002Fwww.ctan.org\u002Ftex-archive\u002Fmacros\u002Flatex\u002Fcontrib\u002Fctable\u002F",[1954],"ctable"," package. It provides the option of a short caption given to be inserted in the list of tables, instead of the actual caption (which may be quite long and inappropriate for the list of tables). The ",[377,4290,4287],{}," uses the ",[377,4293,4022],{},[370,4295,4297],{"id":4296},"sideways-tables","Sideways tables",[357,4299,4300,4301,4304,4305,4308,4309,4311],{},"Tables can also be put on their side within a document using the ",[377,4302,4303],{},"rotating"," or the ",[377,4306,4307],{},"rotfloat"," package. See the ",[364,4310,106],{"href":107}," chapter.",[370,4313,4315],{"id":4314},"table-with-legend","Table with legend",[357,4317,4318,4319,4324,4325,4328,4329,4332],{},"To add a legend to a table the ",[364,4320,4323],{"href":4321,"rel":4322},"http:\u002F\u002Fwww.ctan.org\u002Ftex-archive\u002Fmacros\u002Flatex\u002Fcontrib\u002Fcaption\u002F",[1954],"caption"," package can be used. With the caption package a ",[377,4326,4327],{},"\\caption*{...}"," statement can be added besides the\nnormal ",[377,4330,4331],{},"\\caption{...}",". Example:",[443,4334,4336],{"className":445,"code":4335,"language":447,"meta":448,"style":448},"\\begin{table}\n  \\begin{tabular}{ | r | r || c | c | c |}\n\n      ...\n\n  \\end{tabular}\n  \\caption{A normal caption}\n  \\caption*{\n    A legend, even a table can be used\n    \\begin{tabular}{l l}\n      item 1 & explanation 1 \\\\\n    \\end{tabular}\n  }\n\\end{table}\n",[377,4337,4338,4343,4347,4351,4356,4360,4364,4369,4374,4379,4384,4389,4393,4398],{"__ignoreMap":448},[452,4339,4340],{"class":454,"line":455},[452,4341,4342],{},"\\begin{table}\n",[452,4344,4345],{"class":454,"line":732},[452,4346,2839],{},[452,4348,4349],{"class":454,"line":738},[452,4350,1020],{"emptyLinePlaceholder":1019},[452,4352,4353],{"class":454,"line":744},[452,4354,4355],{},"      ...\n",[452,4357,4358],{"class":454,"line":750},[452,4359,1020],{"emptyLinePlaceholder":1019},[452,4361,4362],{"class":454,"line":814},[452,4363,869],{},[452,4365,4366],{"class":454,"line":819},[452,4367,4368],{},"  \\caption{A normal caption}\n",[452,4370,4371],{"class":454,"line":866},[452,4372,4373],{},"  \\caption*{\n",[452,4375,4376],{"class":454,"line":872},[452,4377,4378],{},"    A legend, even a table can be used\n",[452,4380,4381],{"class":454,"line":1050},[452,4382,4383],{},"    \\begin{tabular}{l l}\n",[452,4385,4386],{"class":454,"line":1056},[452,4387,4388],{},"      item 1 & explanation 1 \\\\\n",[452,4390,4391],{"class":454,"line":1062},[452,4392,1112],{},[452,4394,4395],{"class":454,"line":1068},[452,4396,4397],{},"  }\n",[452,4399,4400],{"class":454,"line":1074},[452,4401,2768],{},[357,4403,4404],{},"The normal caption is needed for labels and references.",[370,4406,400,4408,3234],{"id":4407},"the-eqparbox-package",[377,4409,4410],{},"eqparbox",[357,4412,4413,4414,4416,4417,4420,4421,4424,4425,4427,4428,4430,4431,4433,4434,4436],{},"On rare occasions, it might be necessary to stretch every row in a table to the natural width of its longest line, for instance when one has the same text in two languages and wishes to present these next to each other with lines synching up. A tabular environment helps control where lines should break, but cannot justify the text, which leads to ragged right edges. The ",[377,4415,4410],{}," package provides the command ",[377,4418,4419],{},"\\eqmakebox"," which is like ",[377,4422,4423],{},"\\makebox"," but instead of a ",[377,4426,2348],{}," argument, it takes a tag. During compilation it bookkeeps which ",[377,4429,4419],{}," with a certain tag contains the widest text and can stretch all ",[377,4432,4419],{},"es with the same tag to that width. Combined with the ",[377,4435,469],{}," package, one can define a column specifier that justifies the text in all lines:comand",[443,4438,4440],{"className":445,"code":4439,"language":447,"meta":448,"style":448},"\\newsavebox{\\tstretchbox}\n\\newcolumntype{S}[1]{%\n  >{\\begin{lrbox}{\\tstretchbox} }%\n  l%\n  \u003C{\\end{lrbox}%\n  \\eqmakebox[#1][s]{\\unhcopy\\tstretchbox} }%\n",[377,4441,4442,4447,4452,4457,4462,4467],{"__ignoreMap":448},[452,4443,4444],{"class":454,"line":455},[452,4445,4446],{},"\\newsavebox{\\tstretchbox}\n",[452,4448,4449],{"class":454,"line":732},[452,4450,4451],{},"\\newcolumntype{S}[1]{%\n",[452,4453,4454],{"class":454,"line":738},[452,4455,4456],{},"  >{\\begin{lrbox}{\\tstretchbox} }%\n",[452,4458,4459],{"class":454,"line":744},[452,4460,4461],{},"  l%\n",[452,4463,4464],{"class":454,"line":750},[452,4465,4466],{},"  \u003C{\\end{lrbox}%\n",[452,4468,4469],{"class":454,"line":814},[452,4470,4471],{},"  \\eqmakebox[#1][s]{\\unhcopy\\tstretchbox} }%\n",[357,4473,4474,4475,4477],{},"See the documentation of the ",[377,4476,4410],{}," package for more details.",[370,4479,400,4481,3234],{"id":4480},"the-paracol-package",[377,4482,4483],{},"paracol",[357,4485,4486,4487,4491],{},"The various tabular environments available for LaTeX are feature rich; however, they lack the ability to ",[4488,4489,4490],"strong",{},"automatically page break large rows",". The paracol package provides automatic page breaks in between rows and in certain cases can replace the tabular environment. Such situations could be common in documents that require translations and definitions, which may also includes lists.",[357,4493,4494,4495,3072],{},"For further detail see the documentation of the ",[377,4496,4483],{},[370,4498,417,4500],{"id":4499},"floating-with-table",[377,4501,383],{},[357,4503,4504,4505,4508],{},"In WYSIWYG document processors, it is common to put tables in the middle of the text. This is what we have been doing until now.\nProfessional documents, however, often make it a point to print tables on a dedicated page so that they do not disrupt the flow. From the point of view of the source code, one has no idea on which page the current text is going to lie, so it is hardly possible to guess which page may be appropriate for our table. LaTeX can automate this task by abstracting objects such as tables, pictures, etc., and deciding for us where they might fit best. This abstraction is called a ",[419,4506,4507],{},"float",". Generally, an object that is floated will appear in the vicinity of its introduction in the source file, but one can choose to control its position also.",[357,4510,4511,4512,4514,4515,4517],{},"To tell LaTeX we want to use our table as a float, we need to put a ",[377,4513,383],{}," environment around the ",[377,4516,379],{}," environment, which is able to float and add a label and caption.",[357,4519,4520,4521,4524,4525,4528,4529,4531],{},"{ ",[4488,4522,4523],{},"Note:"," Please understand: you do not ",[419,4526,4527],{},"have to"," use floating tables. If you want to place your tables where they lie in your source code and you do not need any label, do not use ",[377,4530,383],{}," at all! This is a very common misunderstanding among newcomers.",[357,4533,400,4534,4536,4537,4539,4540,579],{},[377,4535,383],{}," environment initiates a type of float just as the environment ",[377,4538,393],{},". In fact, the two bear a lot of similarities (positioning, captions, etc.). More information about floating environments, captions etc. can be found in ",[364,4541,120],{"href":121},[357,4543,4544],{},"The environment names may now seem quite confusing. Let's sum it up:",[4546,4547,4548,4554],"ul",{},[4549,4550,4551,4553],"li",{},[377,4552,379],{}," is for the content itself (columns, lines, etc.).",[4549,4555,4556,4558],{},[377,4557,383],{}," is for the location of the table on the document, plus caption and label support.",[443,4560,4562],{"className":445,"code":4561,"language":447,"meta":448,"style":448},"\\begin{table}[position specifier]\n  \\centering\n  \\begin{tabular}{ |l|}\n    ... your table ...\n  \\end{tabular}\n  \\caption{This table shows some data}\n  \\label{tab:myfirsttable}\n\\end{table}\n",[377,4563,4564,4569,4574,4579,4584,4588,4593,4598],{"__ignoreMap":448},[452,4565,4566],{"class":454,"line":455},[452,4567,4568],{},"\\begin{table}[position specifier]\n",[452,4570,4571],{"class":454,"line":732},[452,4572,4573],{},"  \\centering\n",[452,4575,4576],{"class":454,"line":738},[452,4577,4578],{},"  \\begin{tabular}{ |l|}\n",[452,4580,4581],{"class":454,"line":744},[452,4582,4583],{},"    ... your table ...\n",[452,4585,4586],{"class":454,"line":750},[452,4587,869],{},[452,4589,4590],{"class":454,"line":814},[452,4591,4592],{},"  \\caption{This table shows some data}\n",[452,4594,4595],{"class":454,"line":819},[452,4596,4597],{},"  \\label{tab:myfirsttable}\n",[452,4599,4600],{"class":454,"line":866},[452,4601,2768],{},[357,4603,4604],{},"In the table, we used a label, so now we can refer to it just like any other reference:",[443,4606,4608],{"className":445,"code":4607,"language":447,"meta":448,"style":448},"\\ref{tab:myfirsttable}\n",[377,4609,4610],{"__ignoreMap":448},[452,4611,4612],{"class":454,"line":455},[452,4613,4607],{},[357,4615,400,4616,4618],{},[377,4617,383],{}," environment is also useful when you want to have a\nlist of tables at the beginning or end of your document with the command",[443,4620,4622],{"className":445,"code":4621,"language":447,"meta":448,"style":448},"\\listoftables\n",[377,4623,4624],{"__ignoreMap":448},[452,4625,4626],{"class":454,"line":455},[452,4627,4621],{},[357,4629,4630],{},"The captions now show up in the list of tables, if displayed.",[357,4632,4633,4634,4637],{},"You can set the optional parameter ",[377,4635,4636],{},"position specifier"," to define the position of the table, where it should be placed. The following characters are all possible placements. Using sequences of it define your \"wishlist\" to LaTeX.",[383,4639,4640,4648],{},[474,4641,4642],{},[477,4643,4644,4646],{},[480,4645,482],{},[480,4647,485],{},[487,4649,4650,4663,4675,4686,4698],{},[477,4651,4652,4657],{},[492,4653,4654],{},[377,4655,4656],{},"h",[492,4658,4659,4660,4662],{},"where the table is declared (",[4488,4661,4656],{},"ere)",[477,4664,4665,4669],{},[492,4666,4667],{},[377,4668,624],{},[492,4670,4671,4672,4674],{},"at the ",[4488,4673,624],{},"op of the page",[477,4676,4677,4681],{},[492,4678,4679],{},[377,4680,605],{},[492,4682,4671,4683,4685],{},[4488,4684,605],{},"ottom of the page",[477,4687,4688,4692],{},[492,4689,4690],{},[377,4691,357],{},[492,4693,4694,4695,4697],{},"on a dedicated ",[4488,4696,357],{},"age of floats",[477,4699,4700,4705],{},[492,4701,4702],{},[377,4703,4704],{},"!",[492,4706,4707,4708,4710,4711,4713],{},"override the default float restrictions. E.g., the maximum size allowed of a ",[377,4709,605],{}," float is normally quite small; if you want a large one, you need this ",[377,4712,4704],{}," parameter as well.",[357,4715,4716,4717,4720],{},"Default is ",[377,4718,4719],{},"tbp",", which means that it is by default placed on the top of the page. If that's not possible, it's placed at the bottom if possible, or finally with other floating environments on an extra page.",[357,4722,4723,4724,4727,4728,4731,4732,427],{},"You can force LaTeX to use one given position. E.g. ",[377,4725,4726],{},"[!h]"," forces LaTeX to place it exactly where you place it (Except when it's really impossible, e.g you place a table ",[419,4729,4730],{},"here"," and this place would be the last line on a page). Again, understand it correctly: it urges LaTeX to put the table at a specific place, but it will not be placed there if LaTeX thinks it will not look great. If you really want to place your table manually, do not use the ",[377,4733,383],{},[357,4735,4736,4737,4739,4740,4742,4743,427],{},"Centering the table horizontally works like everything else, using the ",[377,4738,3314],{}," command just after opening the ",[377,4741,383],{}," environment, or by enclosing it with a ",[377,4744,4745],{},"center",[370,4747,4749],{"id":4748},"using-spreadsheets-and-data-analysis-tools","Using spreadsheets and data analysis tools",[357,4751,4752],{},"For complex or dynamic tables, you may want to use a spreadsheet. You might save lots of time by building tables using specialized software and exporting them in LaTeX format. The following plugins and libraries are available for some popular software:",[4546,4754,4755,4763,4771,4779,4787,4795,4803,4816,4824,4832],{},[4549,4756,4757,4762],{},[364,4758,4761],{"href":4759,"rel":4760},"http:\u002F\u002Fcalc2latex.sourceforge.net\u002F",[1954],"calc2latex",": for LibreOffice and OpenOffice.org Calc spreadsheets,",[4549,4764,4765,4770],{},[364,4766,4769],{"href":4767,"rel":4768},"http:\u002F\u002Fwww.ctan.org\u002Ftex-archive\u002Fsupport\u002Fexcel2latex\u002F",[1954],"excel2latex",": for Microsoft Office Excel,",[4549,4772,4773,4778],{},[364,4774,4777],{"href":4775,"rel":4776},"https:\u002F\u002Fgithub.com\u002FTheChymera\u002Fmatrix2latex",[1954],"matrix2latex",": for Python and MATLAB,",[4549,4780,4781,4786],{},[364,4782,4785],{"href":4783,"rel":4784},"http:\u002F\u002Fpandas.pydata.org\u002Fpandas-docs\u002Fstable\u002Fgenerated\u002Fpandas.DataFrame.to_latex.html",[1954],"pandas",": pandas DataFrame's have a method to convert data they contain to latex,",[4549,4788,4789,4794],{},[364,4790,4793],{"href":4791,"rel":4792},"http:\u002F\u002Frubygems.org\u002Fgems\u002Flatex-tools",[1954],"latex-tools",": a Ruby library,",[4549,4796,4797,4802],{},[364,4798,4801],{"href":4799,"rel":4800},"http:\u002F\u002Fcran.r-project.org\u002Fweb\u002Fpackages\u002Fxtable\u002Findex.html",[1954],"xtable",": a library for R,",[4549,4804,4805,4810,4811,579],{},[364,4806,4809],{"href":4807,"rel":4808},"http:\u002F\u002Forgmode.org\u002F",[1954],"org-mode",": for Emacs users, org-mode tables can be used inline in LaTeX documents, see ",[364,4812,4815],{"href":4813,"rel":4814},"https:\u002F\u002Fwww.gnu.org\u002Fsoftware\u002Femacs\u002Fmanual\u002Fhtml_node\u002Forg\u002FA-LaTeX-example.html",[1954],"this tutorial",[4549,4817,4818,4823],{},[364,4819,4822],{"href":4820,"rel":4821},"http:\u002F\u002Femacswiki.org\u002Femacs\u002FAlignCommands",[1954],"Emacs align commands",": the align commands can clean up a messy LaTeX table.",[4549,4825,4826,4831],{},[364,4827,4830],{"href":4828,"rel":4829},"http:\u002F\u002Ftruben.no\u002Flatex\u002Ftable\u002F",[1954],"Online Table generator for LATeX",": An online tool for creating simple tables within the browser. LaTeX format is directly generated as you type.",[4549,4833,4834,4839],{},[364,4835,4838],{"href":4836,"rel":4837},"http:\u002F\u002Fwww.tablesgenerator.com\u002F",[1954],"Create LaTeX tables online ",": Online tool.",[357,4841,4842,4843,4846],{},"However, copying the generated source code to your document is not convenient at all. For maximum flexibility, generate the source code to a separate file which you can input from your main document file with the ",[377,4844,4845],{},"\\input"," command.\nIf your spreadsheet supports command-line, you can generate your complete document (table included) in one command, using a Makefile for example.",[357,4848,2904,4849,4851],{},[364,4850,280],{"href":281}," for more details.",[370,4853,4855],{"id":4854},"need-more-features","Need more features?",[357,4857,4858],{},"Have a look at one of the following packages:",[4546,4860,4861,4871,4880,4890,4900,4910,4919,4929,4942,4951,4961,4971,4981,4991],{},[4549,4862,4863,4870],{},[364,4864,4867],{"href":4865,"rel":4866},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fhhline",[1954],[377,4868,4869],{},"hhline",":   do whatever you want with horizontal lines",[4549,4872,4873,4879],{},[364,4874,4877],{"href":4875,"rel":4876},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Farray",[1954],[377,4878,469],{},":    gives you more freedom on how to define columns",[4549,4881,4882,4889],{},[364,4883,4886],{"href":4884,"rel":4885},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fcolortbl",[1954],[377,4887,4888],{},"colortbl",": make your table more colorful",[4549,4891,4892,4899],{},[364,4893,4896],{"href":4894,"rel":4895},"https:\u002F\u002Fctan.org\u002Fpkg\u002Fthreeparttable",[1954],[377,4897,4898],{},"threeparttable"," makes it possible to put footnotes both within the table and its caption",[4549,4901,4902,4909],{},[364,4903,4906],{"href":4904,"rel":4905},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Farydshln",[1954],[377,4907,4908],{},"arydshln",": creates dashed horizontal and vertical lines",[4549,4911,4912,4918],{},[364,4913,4916],{"href":4914,"rel":4915},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fctable",[1954],[377,4917,4287],{},": allows for footnotes under table and properly spaced caption above (incorporates booktabs package)",[4549,4920,4921,4928],{},[364,4922,4925],{"href":4923,"rel":4924},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fslashbox",[1954],[377,4926,4927],{},"slashbox",": create 2D tables with the first cell containing a description for both axes. Not available in Tex Live 2011 or later.",[4549,4930,4931,4938,4939,4941],{},[364,4932,4935],{"href":4933,"rel":4934},"https:\u002F\u002Fctan.org\u002Fpkg\u002Fdiagbox",[1954],[377,4936,4937],{},"diagbox",": compatible to ",[377,4940,4927],{},", come with Tex Live 2011 or later",[4549,4943,4944,4950],{},[364,4945,4948],{"href":4946,"rel":4947},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fdcolumn",[1954],[377,4949,1948],{},": decimal point alignment of numeric cells",[4549,4952,4953,4960],{},[364,4954,4957],{"href":4955,"rel":4956},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Frccol",[1954],[377,4958,4959],{},"rccol",": advanced decimal point alignment of numeric cells with rounding",[4549,4962,4963,4970],{},[364,4964,4967],{"href":4965,"rel":4966},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fnumprint",[1954],[377,4968,4969],{},"numprint",": print numbers, in the current mode (text or math) in order to use the correct font, with separators, exponent and\u002For rounded to a given number of digits. tabular(*), array, tabularx, and longtable environments are supported using all features of numprint",[4549,4972,4973,4980],{},[364,4974,4977],{"href":4975,"rel":4976},"http:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fspreadtab",[1954],[377,4978,4979],{},"spreadtab",": spread sheets allowing the use of formulae",[4549,4982,4983,4990],{},[364,4984,4987],{"href":4985,"rel":4986},"http:\u002F\u002Fctan.org\u002Ftex-archive\u002Fmacros\u002Flatex\u002Fcontrib\u002Fsiunitx",[1954],[377,4988,4989],{},"siunitx",": alignment of tabular entries",[4549,4992,4993,5000],{},[364,4994,4997],{"href":4995,"rel":4996},"https:\u002F\u002Fwww.ctan.org\u002Fpkg\u002Fpgfplotstable",[1954],[377,4998,4999],{},"pgfplotstable",": loads, rounds, formats and postprocesses numerical tables, e.g. by importing the data directly from .csv (comma-separated value) files instead of manually writing the whole tables in LaTeX code. Programs such as Excel, LibreOffice Calc etc. can export data sheets as .csv files.",[370,5002,5004],{"id":5003},"references","References",[5006,5007,5008],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":448,"searchDepth":732,"depth":732,"links":5010},[5011,5012,5026,5027,5032,5036,5040,5048,5049,5050,5051,5052,5059,5060,5061,5063,5065,5067,5068,5069],{"id":372,"depth":732,"text":11},{"id":430,"depth":732,"text":5013,"children":5014},"The tabular environment",[5015,5016,5017,5018,5019,5020,5021,5022,5024,5025],{"id":715,"depth":738,"text":716},{"id":967,"depth":738,"text":968},{"id":1222,"depth":738,"text":1223},{"id":1267,"depth":738,"text":1268},{"id":1288,"depth":738,"text":1289},{"id":1433,"depth":738,"text":1434},{"id":1529,"depth":738,"text":1530},{"id":1586,"depth":738,"text":5023},"Column specification using >{\\cmd} and \u003C{\\cmd}",{"id":1807,"depth":738,"text":1808},{"id":1941,"depth":738,"text":1942},{"id":2152,"depth":732,"text":2153},{"id":2199,"depth":732,"text":2200,"children":5028},[5029,5030,5031],{"id":2206,"depth":738,"text":2207},{"id":2329,"depth":738,"text":2330},{"id":2477,"depth":738,"text":2478},{"id":2635,"depth":732,"text":2636,"children":5033},[5034,5035],{"id":2639,"depth":738,"text":2640},{"id":2812,"depth":738,"text":2813},{"id":2924,"depth":732,"text":68,"children":5037},[5038,5039],{"id":2927,"depth":738,"text":2928},{"id":3065,"depth":738,"text":3066},{"id":3118,"depth":732,"text":3119,"children":5041},[5042,5044,5045,5046],{"id":3131,"depth":738,"text":5043},"The tabular* environment",{"id":3231,"depth":738,"text":978},{"id":3546,"depth":738,"text":983},{"id":3701,"depth":738,"text":5047},"The tabu environment",{"id":3749,"depth":732,"text":3750},{"id":3877,"depth":732,"text":3878},{"id":3950,"depth":732,"text":3951},{"id":3993,"depth":732,"text":3994},{"id":4005,"depth":732,"text":4006,"children":5053},[5054,5055,5057],{"id":4062,"depth":738,"text":4063},{"id":4132,"depth":738,"text":5056},"Using array",{"id":4211,"depth":738,"text":5058},"Using booktabs",{"id":4296,"depth":732,"text":4297},{"id":4314,"depth":732,"text":4315},{"id":4407,"depth":732,"text":5062},"The eqparbox package",{"id":4480,"depth":732,"text":5064},"The paracol package",{"id":4499,"depth":732,"text":5066},"Floating with table",{"id":4748,"depth":732,"text":4749},{"id":4854,"depth":732,"text":4855},{"id":5003,"depth":732,"text":5004},"Learn how to create and customize tables in LaTeX, including multirow, multicolumn, and advanced styling.","md",null,{},{"title":116,"description":5070},"fX45eX31T2jA_R9uWnABL7n3-7s-nMJPzuSGCmcuZM0",[5077,5079],{"title":106,"path":107,"stem":108,"description":5078,"children":-1},"Learn how to rotate text, figures, and tables in LaTeX using the rotating and rotfloat packages.",{"title":120,"path":121,"stem":122,"description":5080,"children":-1},"Understanding floating environments, placing figures and tables, and configuring captions in LaTeX.",1785155501448]