康特克斯 MkIV

康特克斯 MkIV

我需要表格的乳胶代码,使用多行和多列 ,。 ! @#$​​%^&*()_+;

答案1

康特克斯 MkIV

这是一份工作天然桌

\definecolor[fg:rule][h=aaaaaa]
\definecolor[bg:fill][h=f9f9f9]

\startsetups [table:wiki]
  \setupTABLE
    [
      align={middle,lohi},
      background=color,
      backgroundcolor=bg:fill,
      framecolor=fg:rule,
    ]
\stopsetups

\setuppapersize[A4,landscape]
\setupbodyfont[heros,10pt]

\starttext

\startTABLE[setups={table:wiki}]
  \NC Period
  \NC Matches involving ICC full member nations
  \NC Matches between teams that play first class cricket
  \NC Under-19 internationals
  \NC Under-15 internationals
  \NC Matches between ICC associate member nations
  \NC Women’s ODIs \NC\NR
  % ---
  \NC 1999||31 Aug 2002 \NC 225 \NC[nx=5,ny=2]  ? \NC\NR
  \NC 1 Sep 2002||2006 \NC 235 \NC\NR
  \NC 2006/07 \NC[nx=3,ny=3] 235 \NC[ny=3] 200 \NC[ny=3] 190 \NC[ny=3] 175 \NC\NR
  \NC 2007/08 \NC\NR
  \NC 2008/09 \NC\NR
  \NC 2009/10 \NC[nx=2,ny=5] 245 \NC[nx=4,ny=5] 200 \NC\NR
  \NC 2010/11 \NC\NR
  \NC 2011/12 \NC\NR
  \NC 2012/13 \NC\NR
  \NC 2013/14 \NC\NR
\stopTABLE

\stoptext

在此处输入图片描述

乳胶

识别 LaTeX 源中的实际内容非常困难。

\documentclass{article}
\usepackage{tgheros}
\renewcommand*\familydefault{\sfdefault}
\usepackage[landscape]{geometry}
\usepackage{array,colortbl,hhline,multirow,tabularx,xcolor}
\definecolor{fg:rule}{HTML}{AAAAAA}
\definecolor{bg:fill}{HTML}{F9F9F9}
\renewcommand\tabularxcolumn[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\noindent
\arrayrulecolor{fg:rule}%
\begin{tabularx}{\textwidth}{|c|X|X|X|X|X|X|}
  \hhline{|-|-|-|-|-|-|-|}\rowcolor{bg:fill}
  Period
  & Matches involving ICC full member nations
  & Matches between teams that play first class cricket
  & Under-19 internationals
  & Under-15 internationals
  & Matches between ICC associate member nations
  & Women's ODIs \\
  \hhline{|-|-|-|-|-|-|-|}\rowcolor{bg:fill}
  % ---
  1999--31 Aug 2002 & 225 & \multicolumn{5}{c|}{} \\
  \hhline{|-|-| | | | | |}\rowcolor{bg:fill}
  1 Sep 2002--2006 & 235 & \multicolumn{5}{c|}{\multirow{-2}{*}{?}} \\
  \hhline{|-|-|-|-|-|-|-|}\rowcolor{bg:fill}
  2006/07 & \multicolumn{3}{c|}{} & & & \\
  \hhline{|-| | | | | | |}\rowcolor{bg:fill}
  2007/08 & \multicolumn{3}{c|}{} & & & \\
  \hhline{|-| | | | | | |}\rowcolor{bg:fill}
  2008/09 & \multicolumn{3}{c|}{\multirow{-3}{*}{235}} & \multirow{-3}{*}{200} & \multirow{-3}{*}{190} & \multirow{-3}{*}{175} \\
  \hhline{|-|-|-|-|-|-|-|}\rowcolor{bg:fill}
  2009/10 & \multicolumn{2}{c|}{} & \multicolumn{4}{c|}{} \\
  \hhline{|-| | | | | | |}\rowcolor{bg:fill}
  2010/11 & \multicolumn{2}{c|}{} & \multicolumn{4}{c|}{} \\
  \hhline{|-| | | | | | |}\rowcolor{bg:fill}
  2011/12 & \multicolumn{2}{c|}{} & \multicolumn{4}{c|}{} \\
  \hhline{|-| | | | | | |}\rowcolor{bg:fill}
  2012/13 & \multicolumn{2}{c|}{} & \multicolumn{4}{c|}{} \\
  \hhline{|-| | | | | | |}\rowcolor{bg:fill}
  2013/14 & \multicolumn{2}{c|}{\multirow{-5}{*}{245}} & \multicolumn{4}{c|}{\multirow{-5}{*}{200}} \\
  \hhline{|-|-|-|-|-|-|-|}
\end{tabularx}
\end{document}

在此处输入图片描述

答案2

这应该可以让你入门,尽管垂直线确实很难看。我会研究booktabs-package,以获得进一步的建议,或者可能看看我之前回答的一个类似问题:Latex 多行表格式

代码

\documentclass[landscape]{article}
\usepackage{multirow}
\usepackage{caption}
\usepackage[margin=1cm]{geometry}

\newcommand{\theader}[1]{#1} % any formatting to headers could be added here.
\begin{document}

\begin{table}[hbt]
  \centering
  \caption{Some kind of table}
  \label{tab:SomeKind} %For referencing \cref{tab:SomeKind}
  \begin{tabular}{*{7}{|c}|}
    \hline
      &\theader{Matches involving \textsc{icc}}&&&&&\\
      \theader{Period} & \theader{full member nations } & \theader{more header}& \theader{more header}& \theader{more header}& \theader{more header}& \theader{more header}\\
    \hline
      1995 -- 31 aug 2002 & 225 & \multicolumn{5}{c|}{\multirow{2}{*}{?}}\\
      1 Sep 2002 -- 2006 & 235 & \multicolumn{5}{c|}{\multirow{2}{*}{}}\\
    \hline
  \end{tabular}
\end{table}

\end{document}

相关内容