Git Product home page Git Product logo

Comments (5)

tompollard avatar tompollard commented on May 23, 2024 1

It looks like you may be able reference the code block by adding an attribute using the method described at: http://pandoc.org/README.html#verbatim-code-blocks

    ```{#coderef .python}
    CODE HERE
    ```

from phd_thesis_markdown.

tompollard avatar tompollard commented on May 23, 2024

It is possible to add syntax highlighting to a code block using the backtick method below:

    ```python
    CODE HERE
    ```

...which will output something like:

mood = 'happy'
if mood == 'happy':
    print("I am a happy robot")

I have added an example to the following section:
https://github.com/tompollard/phd_thesis_markdown/blob/master/source/10_chapter_1.md

from phd_thesis_markdown.

tompollard avatar tompollard commented on May 23, 2024

Also can you set a figure on the code block?

I'm not sure if I understand this bit of the question. You would like a figure to appear inside the code block?

from phd_thesis_markdown.

httpete-ire avatar httpete-ire commented on May 23, 2024

@tompollard I didnt know it accepted code braces, just thought it was code blocks (tab indentation). Is it possible to set the theme of the syntax highlighting to a dark theme.

What I meant is that the actual code block itself is figured so I can reference it else where

from phd_thesis_markdown.

tompollard avatar tompollard commented on May 23, 2024

Is it possible to set the theme of the syntax highlighting to a dark theme.

Syntax highlighting style can be defined in Pandoc with the --highlight-style=STYLE argument. For more detail, see: http://pandoc.org/README.html#syntax-highlighting

I have added the highlight-style argument to the Makefile with the default style: https://github.com/tompollard/phd_thesis_markdown/blob/master/Makefile. Replacing pygments with espresso should give you a dark block.

from phd_thesis_markdown.

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.