Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    Latex表格自动换行

    Algorithm
    4
    6
    3169
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 李东岳
      李东岳 管理员 last edited by 李东岳

      下面的代码生成的图是这样的,特别长。当然可以化成两个表,并排显示然后变短更加美观。但是有没有自动处理的方式?比如指定一列最多显示10行,其他的自动转移到第二列?

      0_1517218974041_捕获.PNG

      \begin{table}[]
      \centering
      \label{my-label}
      \begin{tabular}{lll}
      \hline
      Moments & Index & Unit \\ \hline
         $M_{0,0,0}$     &   0    & $m^{-3}$     \\
         $M_{0,0,1}$     &   1    & $m^{-2}$    \\
         $M_{0,0,2}$     &   2    & $m^{-1}$     \\
         $M_{0,0,3}$     &   3    & $m^{0}$     \\
         $M_{0,0,4}$     &   4    & $m^{1}$     \\
         $M_{0,0,5}$     &   5    & $m^{2}$     \\
         $M_{1,0,0}$     &   6    & $m^{-2}s^{-1}$     \\
         $M_{1,0,1}$     &   7    & $m^{-1}s^{-1}$     \\
         $M_{1,0,2}$     &   8    & $m^{0}s^{-1}$     \\
         $M_{1,0,3}$     &   9    & $m^{1}s^{-1}$     \\
         $M_{1,0,4}$     &   10   & $m^{2}s^{-1}$     \\
         $M_{1,0,5}$     &   11   & $m^{3}s^{-1}$     \\
         $M_{1,1,0}$     &   12   & $m^{-1}s^{-2}$     \\
         $M_{1,1,1}$     &   13    & $m^0s^{-2}$     \\
         $M_{1,1,2}$     &   14    & $m^{1}s^{-2}$     \\
         $M_{2,0,0}$     &   15    & $m^{-1}s^{-2}$     \\
         $M_{2,0,1}$     &   16    & $m^{0}s^{-2}$     \\
         $M_{2,0,2}$     &   17    & $m^{1}s^{-2}$     \\
         $M_{0,1,0}$     &   18    & $m^{-2}s^{-1}$     \\
         $M_{0,1,1}$     &   19    & $m^{-1}s^{-1}$     \\
         $M_{0,1,2}$     &   20    & $m^{0}s^{-1}$     \\
         $M_{0,1,3}$     &   21    & $m^{1}s^{-1}$     \\
         $M_{0,1,4}$     &   22    & $m^{2}s^{-1}$     \\
         $M_{0,1,5}$     &   23    & $m^{3}s^{-1}$    \\
         $M_{1,1,0}$     &   24    & $m^{-1}s^{-2}$     \\
         $M_{1,1,1}$     &   25    & $m^{0}s^{-2}$     \\
         $M_{1,1,2}$     &   26    & $m^{1}s^{-2}$     \\
         $M_{0,2,0}$     &   27    & $m^{-1}s^{-2}$     \\
         $M_{0,2,1}$     &   28    & $m^{-0}s^{-2}$    \\
         $M_{0,2,2}$     &   29    & $m^{1}s^{-2}$     \\   
          \hline
      \end{tabular}
      \caption{Caption}
      \end{table}
      

      CFD课程 改成线上了 http://dyfluid.com/class.html
      CFD高性能服务器 http://dyfluid.com/servers.html

      1 Reply Last reply Reply Quote
      • bestucan
        bestucan 版主 副教授 last edited by

        https://tex.stackexchange.com/questions/27088/automatic-way-to-break-narrow-tables-into-two-columns
        第一个用画图包生生画出来的表格,不是表格环境。
        第二个是自定义了个环境。
        如果只是少量表格,哪个看起来都不如手动来的方便。
        编辑器能块操作就更方便了。
        替代文字

        滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

        异步沟通方式(《posting style》from wiki)(下载后打开):
        https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
        提问的智慧(github在gitee的镜像):
        https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

        1 Reply Last reply Reply Quote
        • bestucan
          bestucan 版主 副教授 last edited by

          emacs块操作 传不了动图,挂个链接。学名叫矩形区域文本操作,word也能,按住alt不放,鼠标拉个矩形区域剪走,再直接粘贴

          滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

          异步沟通方式(《posting style》from wiki)(下载后打开):
          https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
          提问的智慧(github在gitee的镜像):
          https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

          1 Reply Last reply Reply Quote
          • zousiyu
            zousiyu last edited by

            tabu宏包应该可以,https://ctan.org/pkg/tabu

            1 Reply Last reply Reply Quote
            • 浪
              浪迹天大 last edited by

              偶然看到的,不知道是不是解决这个问题的:cheeky:
              如何让长表格进行自动分栏

              OpenFOAM 学习交流:https://openfoam.top

              1 Reply Last reply Reply Quote
              • 李东岳
                李东岳 管理员 last edited by

                谢谢各位,解决了:mihu:

                CFD课程 改成线上了 http://dyfluid.com/class.html
                CFD高性能服务器 http://dyfluid.com/servers.html

                1 Reply Last reply Reply Quote
                • First post
                  Last post

                CFD中文网 | 东岳流体 | 京ICP备15017992号-2