7

Is there any way I could make the following sentence be formatted italic?

*.h or *.hpp for your class definitions

I tryed so far:

"**.h or .hpp for your class definitions"

**.h or .hpp for your class definitions

"* *.h or .hpp for your class definitions"

  • *.h or .hpp for your class definitions

But as you can see every output isn't quite what is planed.

2

1 Answer 1

13

Within Markdown, you can use backslashes as escape characters:

*\*.h or \*.hpp for your class definitions*

becomes:

*.h or *.hpp for your class definitions

Alternatively, you can mix in some HTML; using <i> would also work:

<i>*.h or *.hpp for your class definitions</i>

outputs:

*.h or *.hpp for your class definitions

2
  • 4
    The advantage of backslashes is that they also work in comments.
    – Cody Gray Mod
    Commented Mar 8, 2016 at 13:21
  • @CodyGray thanks - I reordered my answer. <i>I didn't know that HTML wasn't supported in comments.</i>
    – Glorfindel
    Commented Mar 8, 2016 at 13:26

Not the answer you're looking for? Browse other questions tagged .