Git Product home page Git Product logo

Comments (4)

weijianwen avatar weijianwen commented on May 26, 2024

你给个例子看看。

from sjtuthesis.

zhangkmsjtu avatar zhangkmsjtu commented on May 26, 2024
\documentclass{article}
\usepackage{diagbox}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{dcolumn}

\newcommand{\tabincell}[2]{
\begin{tabular}{@{}#1@{}}#2\end{tabular}
}

\begin{document}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|}
  \hline
  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
  \multicolumn{2}{|c}{\multirow{2}{*}{\diagbox{项目类别}{${\bar a}, {\bar b}$}{$ D_o / D $}}} &
  \multicolumn{5}{|c}{A型应变花} &
  \multicolumn{5}{|c|}{B型应变花} \\
  \cline{3-12}
     \multicolumn{2}{|c|}{}  & 0.30 & 0.35 & 0.40 & 0.45 & 0.50 & 0.30 & 0.35 & 0.40 & 0.45 & 0.50 \\
  \hline
  1 &   &   &   &   &   &   &   &   &   &   &  \\
  \hline
  2 &   & *  &   &   &   &   &   &   &   &   &  \\
  \hline
  3 &   &   &   &   &   &   &   &   &   &   &  \\
  \hline
  4 &   &   &   &   &   &   &   &   &   &   &  \\
  \hline
\end{tabular}

\end{document}

以上代码在texlive2014中可以正常生成表头(上图),但是放到模版中就处问题了,两根斜线错位(下图)
qq 20150606112712
qq 20150606112654

from sjtuthesis.

weijianwen avatar weijianwen commented on May 26, 2024

diagbox计算高度不准确,可以通过height参数调整。所做修改见 fadafe4 ,效果下图:
screen shot 2015-06-07 at 2 22 59
我觉得几个表头都挤在一个单元格中,效果很差,建议改用三线表格重绘。

from sjtuthesis.

zhangkmsjtu avatar zhangkmsjtu commented on May 26, 2024

嗯,采用三线表格了,简单点,带表头的是**特色,比较麻烦。

from sjtuthesis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.