简体   繁体   English

如何在 github 自述文件中的列表中显示数学块?

[英]How do I show math block inside list in github readme?

I tried this:我试过这个:

1. Setup
        1. item 1:
```math
                \left( \{g^{s^k}\}_{k\in[d]}, \{g_l^{l_i(s)}, g_r^{r_i(s)}, g_o^{o_i(s)}\}_{i\in\{0,...,n\}}, \\
                \{g_l^{α_{l}l_i(s)}, g_r^{α_{r}r_i(s)}, g_o^{α_{o}o_i(s)}, g_l^{βl_i(s)}g_r^{βr_i(s)}g_o^{βo_i(s)}\}_{i\in\{m+1,...,n\}}, \\
                g_l^{t(s)}, g_r^{t(s)}, g_o^{t(s)}, g_l^{α_{l}t(s)}, g_r^{α_{r}t(s)}, g_o^{α_{o}t(s)}, g_l^{βt(s)}, g_r^{βt(s)}, g_o^{βt(s)}  \right)
```extraly_added_not_exist_in_OP
        2. item 2

But it breaks the display of "item 2", which is supposed to be aligned with "item 1", now becomes aligned with the parent item, demo here但它打破了“项目 2”的显示,它应该与“项目 1”对齐,现在与父项目对齐,demo here

What's the correct way to make both math and list look normal?让数学和列表看起来正常的正确方法是什么?

Make sure to indent the whole math block with 3 spaces inside the list item, like this:确保在列表项内使用 3 个空格缩进整个数学块,如下所示:


1. Setup
   1. item 1:

      ```math
       \left( \{g^{s^k}\}_{k\in[d]}, \{g_l^{l_i(s)}, g_r^{r_i(s)}, g_o^{o_i(s)}\}_{i\in\{0,...,n\}}, \\
       \{g_l^{α_{l}l_i(s)}, g_r^{α_{r}r_i(s)}, g_o^{α_{o}o_i(s)}, g_l^{βl_i(s)}g_r^{βr_i(s)}g_o^{βo_i(s)}\}_{i\in\{m+1,...,n\}}, \\
       g_l^{t(s)}, g_r^{t(s)}, g_o^{t(s)}, g_l^{α_{l}t(s)}, g_r^{α_{r}t(s)}, g_o^{α_{o}t(s)}, g_l^{βt(s)}, g_r^{βt(s)}, g_o^{βt(s)}  \right)
      ```
       
   1. item 2

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM