Skip to contentSkip to conversation

Use 'small' font in caption of code snippet

PATCH In review Akira Yokosawa 2 participants 2 messages Sep 28, 2017 – Sep 29, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use 'small' font in caption of code snippet

From e1a3f7e099581b811ea51ef20b27f019b25edee4 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Fri, 29 Sep 2017 07:16:07 +0900
Subject: [PATCH] Use 'small' font in caption of code snippet

As code snippets use "scriptsize" font, the "normal" font of their captions looks too big when placed just above the code in the "ruled" style. Using the "small" font can reduce the size gap.

Also use colon as a separator in the caption as the same as those of figures and tables.

---
 perfbook.tex | 1 +
 1 file changed, 1 insertion(+)
perfbook.tex +1 -0
index 10346c7..84e48eb 100644
@@ -27,6 +27,7 @@
 \usepackage{subfig}
 \newsubfloat{listing}
 \captionsetup{labelfont=bf}
+\captionsetup[listing]{font=small,labelsep=colon}
 % \usepackage{breakurl}
 \usepackage{graphicx}
 \usepackage{rotating}
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Akira Yokosawa
Quoted 1 line

From e1a3f7e099581b811ea51ef20b27f019b25edee4 Mon Sep 17 00:00:00 2001

From: Akira Yokosawa <[email protected]>
Date: Fri, 29 Sep 2017 07:16:07 +0900
Subject: [PATCH] Use 'small' font in caption of code snippet

Quoted 8 lines

As code snippets use "scriptsize" font, the "normal" font of their captions looks too big when placed just above the code in the "ruled" style. Using the "small" font can reduce the size gap.

Also use colon as a separator in the caption as the same as those of figures and tables.

It does look nicer, applied, thank you!!!

Thanx, Paul

Quoted 19 lines
---
 perfbook.tex | 1 +
 1 file changed, 1 insertion(+)
perfbook.tex +1 -0
index 10346c7..84e48eb 100644
@@ -27,6 +27,7 @@
 \usepackage{subfig}
 \newsubfloat{listing}
 \captionsetup{labelfont=bf}
+\captionsetup[listing]{font=small,labelsep=colon}
 % \usepackage{breakurl}
 \usepackage{graphicx}
 \usepackage{rotating}
Signature · 1 line
2.7.4