Skip to content

Highlighting figure calls (\@ref(fig:MyFigName) and chunks within an Rmd #42

Description

@alapo

First off. Love your theme, it accomplishes so many things for me. This post is a possible enhancement

I posted an issue on bookdown about \@ref(fig:MyFigureName) not being highlighted. I was curious if you knew of a way to do this within your theme. Below is a duplicate of my post.

I use bookdown for some of my manuscripts but I am running into a small annoyance when I write the document. Specifically, it seems that themes won't highlight the special terms used to call figures and tables. This issue was posted on StackOverflow but gained little tractions

The issue I am running into is that when I write something in bookdown the function calling the Figure is not being highlighted properly (see image below).

I have imported my own rsTheme (and rscodeio) in an attempt to solve this problem myself I don't see an option to add keywords to highlight.

img

But I would like for the entire function to be colored differently from the inline text (Photoshop version of desired output shown below) which would allow me to differentiate it better from other text in my document
img

Below I also showcase a chunk which does not get highlighted with rscodeio.

img

I would be happy to contribute to the solution for this if a direction was given. I have gone through some variables and been unable to find a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions