开发者

How to draw diagonal table borders in latex, like in Excel?

Is it possible to draw diagonal (parallelogram) cells in LaTeX: the cell content is diagonal, and the cell's originally vertical borders are also diagonal.

Here is what I managed to do using the rotating package:

\begin{tabular}{|r|c|c|}
\hline
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\
 & \begin{rotate}{45}Trying to save some horizo开发者_JAVA百科ntal space\end{rotate} & \begin{rotate}{45}While keeping headers readable\end{rotate} \\
\hline
this & is & a \\
\hline
sample & latex & table \\
\hline
\end{tabular}

Here is a screenshot of the output vs what is possible using Excel:

How to draw diagonal table borders in latex, like in Excel?


Short answer: LaTeX regular tables don't have that capability.

Long answer: It can surely be done but with more effort, as shown by similar (but not quite the same) questions in Tex.Stackexchange:

  • Inclined line between two cells in a table
  • Diagonal lines in table cell
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜