Giter Club home page Giter Club logo

Comments (11)

shanepiesik avatar shanepiesik commented on July 18, 2024

R syntax highlighting works for R in .md files but does not work in .Rmd

from loveit.

shanepiesik avatar shanepiesik commented on July 18, 2024

Following these steps will get you R syntax highlighting in .Rmd files there https://bookdown.org/yihui/blogdown/templates.html#how-to

from loveit.

dillonzq avatar dillonzq commented on July 18, 2024

@idrusfachr
The default R syntax highlighting looks like:
image

You could edit config/css/_custom.css in your project folder to override the variables in assets/css/_variables.scss in the LoveIt folder to customize the highlighting style.

from loveit.

dillonzq avatar dillonzq commented on July 18, 2024

😁 I'm considering improving the color scheme of the syntax highlighting.

from loveit.

idrusfachr avatar idrusfachr commented on July 18, 2024

R syntax highlighting works for R in .md files but does not work in .Rmd

I tried both .Rmd and .md but still doesn't work.

@idrusfachr
The default R syntax highlighting looks like:
image

You could edit config/css/_custom.css in your project folder to override the variables in assets/css/_variables.scss in the LoveIt folder to customize the highlighting style.

That looks good to me. How can I activate this? Do i need to set parameter on my config file? Since using the default parameter still doesn't work in .md and .Rmd file. Like this:
Capture

from loveit.

dillonzq avatar dillonzq commented on July 18, 2024

@idrusfachr Is your original Markdown document like this?
image

from loveit.

idrusfachr avatar idrusfachr commented on July 18, 2024

Hi @dillonzq,

I get this on .md file
image

and this on .Rmd file
image

But both return this when rendered to html
image

from loveit.

dillonzq avatar dillonzq commented on July 18, 2024

@idrusfachr
Is the highlight configuration in your config file like this?
image

from loveit.

idrusfachr avatar idrusfachr commented on July 18, 2024

@dillonzq Finally fixed by set pygmentsUseClasses = false in my config file

Thank you very much for your help.

from loveit.

pablocal avatar pablocal commented on July 18, 2024

I'm in the same situation as @idrusfachr above. I really like this Hugo theme but I normally use data and output in my posts so I use .Rmd instead of markdown.

The syntax highlight does not work. I have tried to customise the css with no success. Could you give a brief indication of how to do so.

@idrusfachr where about of the config file did you set pygmentsUseClasses = false ?

from loveit.

idrusfachr avatar idrusfachr commented on July 18, 2024

@idrusfachr where about of the config file did you set pygmentsUseClasses = false ?

Hi @pablocal , I putted it here. Look at line 18 - 22.

from loveit.

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.