1

I know I can make *hello* produce hello in bold typeface. But how would I, in addition, make **hello** produce hello in italics?

\documentclass{article}

\begingroup\lccode`\~=`* \lowercase{\endgroup\def~#1~}{{\bfseries #1}}
\catcode`*=13

\begin{document}
*this is bold typeface*                 % works
**this should be italic typeface**      % how to do this?
\end{document}

marked as duplicate by JPi, Community Aug 20 '16 at 19:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Is using LuaLaTeX an option for you? – Mico Aug 20 '16 at 19:18
  • Sure, though I'd also value a regular latex answer. – JPi Aug 20 '16 at 19:19
  • Are you porting Markdown to LaTeX ? – percusse Aug 20 '16 at 19:22
  • 1
    No, I am not... – JPi Aug 20 '16 at 19:22
  • I think there's already an answer by Bruno Le Floch: tex.stackexchange.com/a/15374/4427 – egreg Aug 20 '16 at 19:25

Browse other questions tagged or ask your own question.