Giter Site home page Giter Site logo

Block in monospace; not code? about ox-hugo HOT 5 CLOSED

amca01 avatar amca01 commented on June 6, 2024
Block in monospace; not code?

from ox-hugo.

Comments (5)

amca01 avatar amca01 commented on June 6, 2024 1

Here's what worked for me:

#+BEGIN_EXPORT HTML
<div style = "background-color:#AED6F1"><samp>
This is the stuff I want to have in monospace font.</samp></div>
#+END_EXPORT 

The <samp> is an HTML5 tag for representing sample output; a repacement for the now discontinued <tt> tag. And there are also <kbd>, <code> and of course <pre>.

from ox-hugo.

kaushalmodi avatar kaushalmodi commented on June 6, 2024

Does this help?

#+begin_example
This is the text that I want to in monospace font.
#+end_example

from ox-hugo.

kaushalmodi avatar kaushalmodi commented on June 6, 2024

Alternatively, you can do

#+BEGIN_EXPORT HTML
<style>
.mono text {
  font-family: monospace;
}
</style>
#+END_EXPORT
#+begin_mono
This is the text that I want to in monospace font.
#+end_mono

See https://ox-hugo.scripter.co/doc/org-special-blocks/#special-blocks--div-tags for reference.

from ox-hugo.

amca01 avatar amca01 commented on June 6, 2024

Thanks for both of those. However, the first just shows the text in the same dark palette of my source code: there's no visual difference between this and starting with #+begin_src and ending with #+end_src.

The second one has no effect for me.

from ox-hugo.

kaushalmodi avatar kaushalmodi commented on June 6, 2024

Hello, I am closing this issue as it is resolved.

from ox-hugo.

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.