You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Bookdown无序列表中左对齐array的实现方案问询

解决Bookdown无序列表中左对齐array的问题

修正后的代码

---
title: "Alignment of array in unordered list"
output: bookdown::gitbook
---

# First header

- First point of unordered list
- $$
  \begin{array}{l l l l}
      text_1 &        &           &        \\
             & text_2 &           &        \\
             &        & text_{31} &        \\
             &        & text_{32} &        \\
             &        &           & text_4 \\
  \end{array}
  $$
- Some following points...

关键调整说明

  1. 用公式块包裹LaTeX代码:将array环境放在$$ ... $$中,让Bookdown正确识别并渲染LaTeX公式,否则原始LaTeX代码会被当作普通文本输出。
  2. 保持缩进一致:公式块内的array代码缩进和列表项对齐,确保Markdown解析时将公式归属于当前列表项,避免出现结构混乱。

array的l参数已经指定每列左对齐,符合需求。用bookdown::render_book重新渲染即可得到正确效果。

内容的提问来源于stack exchange,提问作者tueftla

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 09:25:58