Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-references in caption for landscape table #235

Open
SOLV-Code opened this issue Sep 9, 2023 · 1 comment
Open

Cross-references in caption for landscape table #235

SOLV-Code opened this issue Sep 9, 2023 · 1 comment

Comments

@SOLV-Code
Copy link

SOLV-Code commented Sep 9, 2023

I was able to convert a regular table to a landscape table following the steps from your wiki page. However, that broke cross-references like Table \@ref(tab:TableAltApproaches) that I had in the caption, in two ways:

  • created a line break
  • did not recognize the cross-reference

Adding a second \ fixed the cross-reference, but the line break is still there. Adding a third \ crashes the knit.

This may be the same underlying problem encountered in #225 where I was trying to put cross-references inside a csas_table()

I can generate a minimum working example, if needed

@SOLV-Code
Copy link
Author

SOLV-Code commented Sep 9, 2023

Never mind. The trick is to put the caption specification before starting the landscapepage environment.
Leaving this up in case it warrants putting a note on the wiki page before closing the issue.

This works:



\clearpage

(ref:TableSummary) Caption with some cross-references 
like  Table \@ref(tab:TableAltApproaches))  and Appendix \@ref(AggregationAppendix).

\begin{landscapepage}

```{r TableSummary, echo = FALSE, results = "asis"}

TABLE CODE HERE


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant