Escaping the slash character

Justin's Avatar


23 Jan, 2017 04:43 AM

If I'm writing linux paths in a document, I'm having issues while outputting my documents to pdf.

For example /var/log/messages

I've attempted to use \/var\/log\/messages and also //var//log//messages to no avail. In normal markdown *this would be italic* however within bear the slash is used.

What is the appropriate way to work around this?

  1. Support Staff 1 Posted by Danilo Bonardi on 23 Jan, 2017 10:16 AM

    Danilo Bonardi's Avatar

    Hi Justin,

    I suggest using the inline code block to represent your paths, there result is like this: /var/log/messages

  2. 2 Posted by Ted on 24 Jan, 2017 02:55 AM

    Ted's Avatar

    Just ran into this one today. Totally agree.

  3. 3 Posted by Justin on 24 Jan, 2017 02:58 AM

    Justin's Avatar

    I've used code blocks in other sections but I'd hope this would be something that will be resolved in a future release. Restricting the use of slash rules out using Bear for any sort of technical documentation

  4. Support Staff 4 Posted by Danilo Bonardi on 24 Jan, 2017 10:09 AM

    Danilo Bonardi's Avatar

    Oh, yes sorry I forgot to mention. We also working on an escape character ( which most likely will be backslash ).

  5. 5 Posted by drew on 24 Mar, 2017 09:06 AM

    drew's Avatar

    glad to hear an escape character is being worked on. i mostly use bear for journaling and categorizing my thoughts on the fly using hashtags, but i use slashes all the time when i can't make my mind up about which word to use, e.g. "...but reading barthes wouldn't appeal to pragmatists/businesspeople/etc."

    slashes are an important part of my written inner voice, and it's very hard to strike a tone that feels like me without them. just an option to turn off formatting for certain markdown characters on a per-note basis would be enough for my purposes, now that i think about it. personally i like this solution more, because escaping a character every single time can get tedious.

  6. 6 Posted by Andy on 25 Mar, 2017 09:13 PM

    Andy's Avatar

    I ran into the same issue today. I wrote normal text mentioning two related groups like "A/B and C/D". It displayed "B and C" in italics. I'd expect italics is only used when the closing slash is not directly followed by a letter. Just a suggestion.

  7. 7 Posted by Andy on 25 Mar, 2017 09:16 PM

    Andy's Avatar

    Okay, I see this is tricky. Sometimes you want a pre- or postfix syllable to be italics and not the rest of the word. Then my suggestion will prevent that. Sorry. But the issue is addressed – I'm confident you'll find a workable solution.

  8. 8 Posted by john on 04 Apr, 2017 03:44 PM

    john's Avatar

    Same here:
    If arterial blood contains 200 ml O2/L and the cardiac output is 5L/min, what is the A-V difference...

    Any text using units per units will have a problem.
    (I could, of course write 200 ml O2·L^-1, but how confusing would that be?)


  9. 9 Posted by Brad on 05 Apr, 2017 10:58 PM

    Brad's Avatar

    Adding my vote for some way to escape or disable forward slash italics. I use slashes all the time in my writing.

  10. 10 Posted by bykov.anton.a on 10 Apr, 2017 12:22 PM

    bykov.anton.a's Avatar

    Not a perfect solution, but a space bar works as an escape character. It takes getting used to, but it's putting an extra space after any / that is not used for formatting helps.

  11. 11 Posted by Tamas on 14 Sep, 2017 05:01 PM

    Tamas's Avatar

    +1 for allowing some way to enter slashes. Apparent I use it in my thoughts/ideas/notes a lot.

  12. 12 Posted by jim g on 16 Sep, 2017 11:59 AM

    jim g's Avatar

    I believe by using markdown compatibility mode you can avoid this problem.

  13. 13 Posted by john on 16 Sep, 2017 01:41 PM

    john's Avatar


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac