首页 > 解决方案 > 降价表没有使列足够宽

问题描述

我在 jupyter 实验室有这个 Markdown 代码。

代码:代码图像

| Phenomanae               | Originial Equations                                   | Approximate  |
|--------------------------|-------------------------------------------------------|              |
|Radiation                 |$Q_{R} = A\epsilon\sigma (T^{4}_{plate} - T^{4}_{air})$|wwwwwwwwwww   |
|Conduction with Work Roll |$Q_{Cond} = -kA\frac{\partial T}{\partial z}$          |wwwwwwwwwww   |
|Convection with Air       |$Q_{Air} = hA(T_{plate}-T_{air})$                      |wwwwwwwwwww   |
|Convection with Descaler  |$Q_{Desc} = h_w A_w(T_{plate} - T_{water})$            |wwwwwwwwwww   |
|Deformation               |$Q_{Desc} = h_w A_w(T_{plate} - T_{water})$            |wwwwwwwwwww   |

输出表

中间一栏只有标题“原始方程”那么长。如何让列自动调整其宽度以适应方程式。

标签: pythonmarkdown

解决方案


您可以将表格放在自定义类中,并使用 css 对其进行样式设置。这样,您可以为第二列设置恒定宽度

<div class="foo">
| Phenomanae               | Originial Equations                                   | Approximate  |
|--------------------------|-------------------------------------------------------|              |
|Radiation                 |$Q_{R} = A\epsilon\sigma (T^{4}_{plate} - T^{4}_{air})$|wwwwwwwwwww   |
|Conduction with Work Roll |$Q_{Cond} = -kA\frac{\partial T}{\partial z}$          |wwwwwwwwwww   |
|Convection with Air       |$Q_{Air} = hA(T_{plate}-T_{air})$                      |wwwwwwwwwww   |
|Convection with Descaler  |$Q_{Desc} = h_w A_w(T_{plate} - T_{water})$            |wwwwwwwwwww   |
|Deformation               |$Q_{Desc} = h_w A_w(T_{plate} - T_{water})$            |wwwwwwwwwww   |
</div>

<style>
    .foo table {
        ...
    }
</style>

推荐阅读