3

I'm using Rmarkdown and Bookdown to write an article. The issue I'm running into is with cross references and the order of introducing them and referring to them. For example, in this paper example, the Methods come after the results.

## Introduction

This is an important paper. 

## Results

- Blah blah. I want say some things about the [Methods][#methods] section. 

## Methods {#methods}

This is what I did. 

Can one do this?

  • Welcome to TeX.SX! Does your question relate to LaTeX in any way? If not, it might be better to ask this at Stack Overflow – Jasper Habicht May 7 '18 at 20:59
  • Hi. It does because the issue seemed to be in the underlying LaTex, not the Rmarkdown. But if you think the question is not relevant, feel free to close. – Alex May 7 '18 at 21:56
  • It doesn't matter for LaTeX where the label is compared to the cross-reference, but as the answer points out, you're using the wrong Markdown syntax for the cross reference. – Torbjørn T. May 8 '18 at 9:19
4

Right from the documentation of bookdown

2.1.1 Inline formatting

[...] Links are created using [text](link), e.g., [RStudio](https://www.rstudio.com)

In your example this means [square brackets](parentheses)

--- 
title: "A Minimal Book Example"
documentclass: book
---

## Introduction

This is an important paper. 

## Results

- Blah blah. I want say some things about the [Methods](#methods) section. 

## Methods {#methods}

This is what I did. 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.