[PATCH 8/8] Widen tabsize of code snippets for 1c layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 409e0528f63f20877a3fc6a8b4280acd879dd056 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@xxxxxxxxx>
Date: Sat, 23 Feb 2019 19:41:35 +0900
Subject: [PATCH 8/8] Widen tabsize of code snippets for 1c layout

Most readers are supposed to be used to tabsize=8.
Use it for 1c layout.

While we are here, use \fvset{} to set common default parameters.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 perfbook.tex | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/perfbook.tex b/perfbook.tex
index bbf8455..ac37477 100644
--- a/perfbook.tex
+++ b/perfbook.tex
@@ -129,13 +129,19 @@
 \usepackage{arydshln}
 \definecolor{lightgray}{gray}{0.9} % for coloring alternate rows in table
 
+\fvset{fontsize=\scriptsize,obeytabs=true}
+\IfTwoColumn{
+\fvset{tabsize=2}
+}{
+\fvset{tabsize=8}
+}
 \DefineVerbatimEnvironment{VerbatimL}{Verbatim}%
-{fontsize=\scriptsize,numbers=left,numbersep=5pt,xleftmargin=9pt,obeytabs=true,tabsize=2}
+{numbers=left,numbersep=5pt,xleftmargin=9pt}
 \AfterEndEnvironment{VerbatimL}{\vspace*{-9pt}}
 \DefineVerbatimEnvironment{VerbatimN}{Verbatim}%
-{fontsize=\scriptsize,numbers=left,numbersep=3pt,xleftmargin=5pt,xrightmargin=5pt,obeytabs=true,tabsize=2,frame=single}
+{numbers=left,numbersep=3pt,xleftmargin=5pt,xrightmargin=5pt,frame=single}
 \DefineVerbatimEnvironment{VerbatimU}{Verbatim}%
-{fontsize=\scriptsize,numbers=none,xleftmargin=5pt,xrightmargin=5pt,obeytabs=true,tabsize=2,samepage=true,frame=single}
+{numbers=none,xleftmargin=5pt,xrightmargin=5pt,samepage=true,frame=single}
 
 \IfLmttForCode{
 \AtBeginEnvironment{verbatim}{\renewcommand{\ttdefault}{lmtt}}
-- 
2.7.4





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux