[BL training-materials-updates] Share LaTeX definitions between labs and slides

Michael Opdenacker michael.opdenacker at bootlin.com
Sat Nov 24 17:25:56 CET 2018


Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=0abd470a1818491d824c45aba6d5f7a31e361131

>---------------------------------------------------------------

commit 0abd470a1818491d824c45aba6d5f7a31e361131
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Sat Nov 24 17:25:56 2018 +0100

    Share LaTeX definitions between labs and slides
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

0abd470a1818491d824c45aba6d5f7a31e361131
 common/beamerthemeBootlin.sty | 11 +----------
 common/common.sty             | 12 ++++++++++++
 common/labs.sty               |  4 +---
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/common/beamerthemeBootlin.sty b/common/beamerthemeBootlin.sty
index bef74a2..23895c5 100644
--- a/common/beamerthemeBootlin.sty
+++ b/common/beamerthemeBootlin.sty
@@ -2,6 +2,7 @@
 % Copyright (C) 2010 Maxime Petazzoni <maxime.petazzoni at bulix.org>
 % Creative Commons CC-by-sa 3.0
 
+\usepackage{common}
 \usepackage[absolute,verbose,overlay]{textpos}
 \usepackage{fancyvrb}
 \setlength{\TPHorizModule}{\paperwidth}
@@ -32,16 +33,6 @@
 % Custom Bootlin commands
 \newcommand{\code}[1]{{\usebeamercolor[fg]{code} \path{#1}}}
 \newcommand{\codewithhash}[1]{{\usebeamercolor[fg]{code} \tt{#1}}}
-\newcommand\kfunc[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{#1()}}}
-\newcommand\ksym[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{#1}}}
-\newcommand\kstruct[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{struct #1}}}
-\newcommand\kfile[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1}{\code{#1}}}
-\newcommand\kfileversion[2]{\href{https://elixir.bootlin.com/linux/v#2/source/#1}{\code{#1}}}
-\newcommand\kdir[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1/}{\code{#1/}}}
-\newcommand\ksubarch[1]{\href{https://elixir.bootlin.com/linux/latest/source/arch/#1/}{\code{#1}}}
-\newcommand\kerneldoctext[1]{\href{https://kernel.org/doc/Documentation/#1}{\code{Documentation/#1}}}
-\newcommand\kerneldochtml[1]{\href{https://www.kernel.org/doc/html/latest/#1.html}{\code{#1}}}
-\newcommand\kerneldochtmlsection[3]{\href{https://www.kernel.org/doc/html/latest/#1/index.html\##2}{\code{#1} (section {\em #3})}}
 
 \usepackage{listings}
 \usepackage{environ}
diff --git a/common/common.sty b/common/common.sty
new file mode 100644
index 0000000..2ab4ff7
--- /dev/null
+++ b/common/common.sty
@@ -0,0 +1,12 @@
+% Common Bootlin commands
+
+\newcommand\kfunc[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{#1()}}}
+\newcommand\ksym[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{#1}}}
+\newcommand\kstruct[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{struct #1}}}
+\newcommand\kfile[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1}{\code{#1}}}
+\newcommand\kfileversion[2]{\href{https://elixir.bootlin.com/linux/v#2/source/#1}{\code{#1}}}
+\newcommand\kdir[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1/}{\code{#1/}}}
+\newcommand\ksubarch[1]{\href{https://elixir.bootlin.com/linux/latest/source/arch/#1/}{\code{#1}}}
+\newcommand\kerneldoctext[1]{\href{https://kernel.org/doc/Documentation/#1}{\code{Documentation/#1}}}
+\newcommand\kerneldochtml[1]{\href{https://www.kernel.org/doc/html/latest/#1.html}{\code{#1}}}
+\newcommand\kerneldochtmlsection[3]{\href{https://www.kernel.org/doc/html/latest/#1/index.html\##2}{\code{#1} (section {\em #3})}}
diff --git a/common/labs.sty b/common/labs.sty
index 3953854..4542892 100644
--- a/common/labs.sty
+++ b/common/labs.sty
@@ -1,3 +1,4 @@
+\usepackage{common}
 \NeedsTeXFormat{LaTeX2e}
 
 %% Remove indentation on the first line of each paragraph, and add
@@ -125,9 +126,6 @@
 %% characters such as _ $ or &.
 \newcommand{\code}[1]
 {\path{#1}}
-\newcommand\kfile[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1}{\code{#1}}}
-\newcommand\kdir[1]{\href{https://elixir.bootlin.com/linux/latest/source/#1/}{\code{#1/}}}
-\newcommand\kfileversion[2]{\href{https://elixir.bootlin.com/linux/v#2/source/#1}{\code{#1}}}
 \newcommand{\makeabout}
 {
   \section{About this document}




More information about the training-materials-updates mailing list