Giter VIP home page Giter VIP logo

Comments (5)

yihui avatar yihui commented on August 30, 2024

这个得保留 .tex 文件、从那里面看看究竟怎么 tab:plot-summary 出现多次了。

from msg.

XiangyunHuang avatar XiangyunHuang commented on August 30, 2024

很奇怪这一点我之前也排查过,忘记说了,这是生成的 tex 表格

下面我们对每种数据类型在不同维度下的图形类型做一个简单概括如表 \ref{tab:plot-summary},注意该表格并非一个完整的作图指引,面对实际数据时,我们仍然需要具体问题具体分析。

\begin{longtable}[]{@{}lcccc@{}}
\caption{\label{tab:plot-summary} 各种类型的数据对应的统计图形概览}\tabularnewline
\toprule
\endhead
& 一维 & 二维 & 高维 & 矩阵\tabularnewline
分类数据 & 条形图 & 马赛克图 & 马赛克图 &\tabularnewline
& & 关联图、四瓣图 & &\tabularnewline
连续数据 & 直方图 & 散点图 & 平行坐标图 & 颜色图\tabularnewline
& 箱线图 & & 散点图矩阵、三维散点图 & 热图\tabularnewline
& Cleveland 点图 & & 三维透视图、平滑散点图 & 等高图\tabularnewline
& 一维散点图 & & 星状图、符号图、脸谱图 &\tabularnewline
混合数据 & & 条件密度图 & 条件分割图 &\tabularnewline
& & 棘状图 & &\tabularnewline
\bottomrule
\end{longtable}

附件是生成的 tex 文件,因为不能上传 TeX 格式文件,我把它打包成 zip 格式了

_main.zip
_main.pdf

from msg.

XiangyunHuang avatar XiangyunHuang commented on August 30, 2024

我搞清楚问题所在了,表格跨页就会导致这个问题,我将上述表格插入的文档中间,这会导致这个表格最终在编译的 PDF 里拆分为两段,所以就报警告了 。

01-introduction.Rmd 文件内容如下

\mainmatter

# 牛刀小试 {#intro}

现在我们可以试试 **bookdown** 的一些初级功能了,例如图表。图 \@ref(fig:hello) 是一幅无趣的散点图,表 \@ref(tab:iris) 是一份枯燥的数据。

```{r hello, fig.cap='雷猴啊,散点图!', out.width='90%'}
par(mar = c(4, 4, 1, .1))
plot(cars, pch = 19)
```

Table: (\#tab:plot-summary) 各种类型的数据对应的统计图形概览

---------- --------------- ---------------- ------------------------ --------
                一维             二维                 高维             矩阵
 分类数据      条形图          马赛克图             马赛克图                  
                            关联图、四瓣图                           
 连续数据      直方图           散点图             平行坐标图         颜色图
               箱线图                        散点图矩阵、三维散点图    热图
            Cleveland 点图                    三维透视图、平滑散点图   等高图
             一维散点图                      星状图、符号图、脸谱图  
 混合数据                     条件密度图           条件分割图        
                                棘状图                               
---------- --------------- ---------------- ------------------------ --------

```{r iris}
knitr::kable(
  head(iris), caption = '雷猴啊,iris 数据!',
  booktabs = TRUE
)
```

就这样,你可以一直编下去,直到编不下去。

生成的 PDF 见 bookdown.pdf

表格分页就分页,应该不妨碍的呀

table

from msg.

yihui avatar yihui commented on August 30, 2024

\label{} 定义在 \caption{} 之内,所以重复标题的时候把这个标签也重复了。

我觉得不是什么重要的问题,就忽略这个警告信息吧。

from msg.

XiangyunHuang avatar XiangyunHuang commented on August 30, 2024

嗯嗯,好的

from msg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.