daviddalpiaz / appliedstats

:bar_chart: Methods of Applied Statistics Course Textbook Repository
https://book.stat420.org/
155 stars 168 forks source link

Graphics needs to be systematized #83

Open KO3AK-I3-XOPCY opened 5 years ago

KO3AK-I3-XOPCY commented 5 years ago

It would be nice to come up with an indexing scheme for all graphics (figures, plots, tables, etc) so they can be easily and unambiguously referenced from either HTML or PDF text. For example: In 7.1.1, after the words"However, its variance remains constant for each xi", there is a following wording to reference a picture with a graph: "This is visually displayed in the image below". I see you guys have fixed it a bit, since I first noticed it, where the picture was actually above the wording, not below. However, still the picture is way down, not even on the same page, but on the next one. It would be better to have a numerical reference, not relative one.

5-19_view 6-16_view

coatless commented 5 years ago

@daviddalpiaz to achieve this you're going to need to switch from:

Please see the figure below.

![](path/to/figure.png)

Text

to


Please see Figure \@ref(fig:name-fig).

```{r name-fig}
knitr::include_graphics("path/to/figure.png")

More text

daviddalpiaz commented 5 years ago

This is certainly on my todo list. The "ordering" of figures is always correct in the HTML version since there are not pages, but I do plan to create a system that works well with the PDF version as well.