Skip to content

Commit b356d40

Browse files
committed
Add InlineCode macro and restore italics
1 parent 2383c64 commit b356d40

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

typeset/drvmly.ltx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
\usepackage{microtype}
5252
\usepackage{hyperref}
5353
\usepackage{amsmath}
54+
\newcommand{\InlineCode}[1]{\texttt{#1}}
5455

5556
\makeatletter
5657

typeset/drvpst.ltx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
\usepackage{microtype}
5050
\usepackage{hyperref}
5151
\usepackage{amsmath}
52+
\newcommand{\InlineCode}[1]{\texttt{#1}}
5253

5354
\makeatletter
5455

typeset/md2tex.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,7 @@ static int enter_span_calback(MD_SPANTYPE type, void *detail, void *userdata) {
289289
render_open_img_span(r, (MD_SPAN_IMG_DETAIL *)detail);
290290
break;
291291
case MD_SPAN_CODE:
292-
if (r->heading_scope == 0) {
293-
RENDER_VERBATIM(r, "\\verb!");
294-
r->verbatim_type = 2;
295-
} else
296-
RENDER_VERBATIM(r, "\\texttt{");
292+
RENDER_VERBATIM(r, "\\InlineCode{");
297293
break;
298294
case MD_SPAN_DEL:
299295
RENDER_VERBATIM(r, "\\del{");
@@ -331,11 +327,7 @@ static int leave_span_calback(MD_SPANTYPE type, void *detail, void *userdata) {
331327
render_close_img_span(r, (MD_SPAN_IMG_DETAIL *)detail);
332328
break;
333329
case MD_SPAN_CODE:
334-
if (r->heading_scope == 0) {
335-
RENDER_VERBATIM(r, "!");
336-
r->verbatim_type = 0;
337-
} else
338-
RENDER_VERBATIM(r, "}");
330+
RENDER_VERBATIM(r, "}");
339331
break;
340332
case MD_SPAN_DEL:
341333
RENDER_VERBATIM(r, "}");

0 commit comments

Comments
 (0)