gpt4 book ai didi

markdown - Markdown 中的嵌套表?

转载 作者:行者123 更新时间:2023-12-04 12:57:21 30 4
gpt4 key购买 nike

我需要在 Markdown 中创建一个类似嵌套的表,如下所示:

enter image description here

我怎样才能做到这一点?

最佳答案

@Waylan 是对的,您可以将 HTML(例如使用 Markdown 生成的表格)粘贴到 Markdown 表格的单元格中。

这需要一些工作,因为您需要检查呈现的生成的 HTML(幸运的是,像 Firefox 这样的浏览器允许您检查呈现的 HTML 的来源)。

另一个缺点是结果可能不可读,例如:

|                |ASCII                          |HTML                         |
|----------------|-------------------------------|-----------------------------|
|Single backticks|`'Isn't this fun?'` |'Isn't this fun?' |
|Quotes |`"Isn't this fun?"` |<table> <thead> <tr> <th></th> <th>ASCII</th> <th>HTML</th> </tr> </thead> <tbody> <tr> <td>Single backticks</td> <td><code>'Isn't this fun?'</code></td> <td>‘Isn’t this fun?’</td> </tr> <tr> <td>Quotes</td> <td><code>"Isn't this fun?"</code></td> <td>“Isn’t this fun?”</td> </tr> <tr> <td>Dashes</td> <td><code>-- is en-dash, --- is em-dash</code></td> <td>– is en-dash, — is em-dash</td> </tr> </tbody> </table> |
|Dashes |`-- is en-dash, --- is em-dash`|-- is en-dash, --- is em-dash|

呈现为:

enter image description here

https://stackedit.io编辑。

最后,您的示例将类似于:
|   |  Returned Value |
|--| -----------------|
| Version V2 | <table> <thead> <tr> Z-value</th> <th>06</th> </tr> </thead> <tbody> <tr> <td>Protocol</td> <td>04 05</td> </tr> <tr> <td>Protocol Sub</td> <td>02</td> </tr> <tr> <td>Application</td> <td>11</td> </tr> <tr> <td>Application Sub</td> <td>00</td> </tr> </tbody> </table> |

并渲染成:

enter image description here

这可能不值得。 Markdown 不是为了这个(如果可以,请改用 LaTeX,或者 LaTeX 嵌入 Markdown)

关于markdown - Markdown 中的嵌套表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43591906/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com