0

In the markdown-mode I am able to do following: [one, two, three, four]

But in org-mode when I do:

[~one~, ~two~, ~three~, ~four~] , it printed as it is instead of converting ~varaible~ into code format. How can I pretent this to keep code sample format?

Related: How to apply code sample inside a line using org mode

1 Answer 1

1

You need to separate the ~ from the square brackets.

[ ~one~, ~two~ ]

seems to apply the org-code face to ~one~ and ~two~.

You can also use a Zero-width space instead of the space (use C-x 8 RET 200b to enter it).

12
  • Would space in between [ ~ will be applied?
    – alper
    Commented Nov 25, 2021 at 13:57
  • What do you mean by "applied?"
    – choroba
    Commented Nov 25, 2021 at 14:00
  • Like would it be viewed as [<space>one
    – alper
    Commented Nov 25, 2021 at 14:01
  • Yes. See the update for a workaround.
    – choroba
    Commented Nov 25, 2021 at 14:02
  • 1
    Ah they told me that: I believe GitHub uses org-ruby to render .org files as HTML and open an issue on github.com/bdewey/org-ruby/issues
    – alper
    Commented Nov 27, 2021 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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