literate-dotfiles/docs/emacs-snippets.html

970 lines
51 KiB
HTML
Raw Permalink Normal View History

2020-05-26 08:40:15 +02:00
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
2022-05-09 10:05:23 +02:00
<!-- 2022-05-09 lun. 10:04 -->
2020-05-26 08:40:15 +02:00
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Doom Emacs Configuration</title>
<meta name="author" content="Dehaeze Thomas" />
2021-10-25 14:37:10 +02:00
<meta name="generator" content="Org Mode" />
2021-01-01 20:12:34 +01:00
<link rel="stylesheet" type="text/css" href="./dist/style.css"/>
<script type="text/javascript" src="./dist/script.js"></script>
2020-05-26 08:40:15 +02:00
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="./index.html"> UP </a>
|
<a accesskey="H" href="./index.html"> HOME </a>
2021-10-25 14:37:10 +02:00
</div><div id="content" class="content">
2020-05-26 08:40:15 +02:00
<h1 class="title">Doom Emacs Configuration</h1>
2021-10-25 14:37:10 +02:00
<div id="table-of-contents" role="doc-toc">
2020-05-26 08:40:15 +02:00
<h2>Table of Contents</h2>
2021-10-25 14:37:10 +02:00
<div id="text-table-of-contents" role="doc-toc">
2020-05-26 08:40:15 +02:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#orgffeab79">LaTeX</a>
2020-05-26 08:40:15 +02:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#org2042489">Coordinate</a></li>
<li><a href="#orgb3a66f3">Draw</a></li>
<li><a href="#org411e901">Node</a></li>
<li><a href="#org22d90dd">Path</a></li>
2020-05-26 08:40:15 +02:00
</ul>
</li>
2022-05-09 10:05:23 +02:00
<li><a href="#orgc2b2292">Matlab</a>
2020-05-26 08:40:15 +02:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#orgd3eeea7">Clear</a></li>
<li><a href="#org0dcc39a">Function</a></li>
2020-05-26 08:40:15 +02:00
</ul>
</li>
2022-05-09 10:05:23 +02:00
<li><a href="#org918a738">Org Mode</a>
2020-05-26 08:40:15 +02:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#org9133b41">Begin</a></li>
<li><a href="#orga88a23c">Caption</a></li>
<li><a href="#org6b93a9b">Block</a></li>
<li><a href="#org2a73292">Custom Box</a></li>
<li><a href="#orgff8d2f2">Latex Class</a></li>
<li><a href="#org1c2c726">Bibliography with completion</a></li>
<li><a href="#org7f5c530">Cite</a></li>
<li><a href="#org37c96e4">Ref</a></li>
<li><a href="#org024ab1b">Beamer - CBOX</a></li>
<li><a href="#org678a86c">HTML Details</a></li>
<li><a href="#orgcebff18">Code</a></li>
<li><a href="#org24aec6b">Equation</a></li>
<li><a href="#orga61bef4">Figure</a></li>
<li><a href="#org38db305">Frac</a></li>
<li><a href="#orge40e702">Left</a></li>
<li><a href="#org7e0fa73">Minipage</a></li>
<li><a href="#org1329a6b">Minipage Figures</a></li>
<li><a href="#orgc4b2d7b">Wrap Figure</a></li>
<li><a href="#orgd73f8fd">Multicolumn</a></li>
<li><a href="#orgc01c0a5">Subfigure</a></li>
<li><a href="#org972c5ee">Table</a></li>
<li><a href="#org9d47055">Tikz</a></li>
<li><a href="#org6740e67">Tikzfig</a></li>
<li><a href="#orgd78a868">Tikzheader</a></li>
<li><a href="#org7350df7">User-config</a></li>
<li><a href="#org56534d3">User-init</a></li>
<li><a href="#org349e863">Wrap</a></li>
<li><a href="#org74e5a20">Python Specific</a>
2020-05-26 08:40:15 +02:00
<ul>
2022-05-09 10:05:23 +02:00
<li><a href="#org1e4e64d">Pfigure</a></li>
2020-05-26 08:40:15 +02:00
</ul>
</li>
2022-05-09 10:05:23 +02:00
<li><a href="#org2f3dfac">Matlab Specific</a>
<ul>
<li><a href="#orgac493d5">Mconfig</a></li>
<li><a href="#orgb08853d">Mfigure</a></li>
<li><a href="#org7074d53">Mfunction</a></li>
<li><a href="#orgf3f4c44">Mheader</a></li>
<li><a href="#org700ea5e">Minit</a></li>
<li><a href="#org4b76dde">Mtable</a></li>
<li><a href="#org37717eb">Mvalue</a></li>
</ul>
</li>
<li><a href="#orgc5363bb">Binary</a></li>
</ul>
</li>
<li><a href="#org913ab23">Python</a>
<ul>
<li><a href="#orgb7441cf">Function</a></li>
2020-05-26 08:40:15 +02:00
</ul>
</li>
</ul>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgffeab79" class="outline-2">
<h2 id="orgffeab79">LaTeX</h2>
<div class="outline-text-2" id="text-orgffeab79">
2020-05-26 08:40:15 +02:00
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org2042489" class="outline-3">
<h3 id="org2042489">Coordinate</h3>
<div class="outline-text-3" id="text-org2042489">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :coordinate</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
\coordinate[${<span class="org-highlight-numbers-number">1</span>:-&gt;}] (${<span class="org-highlight-numbers-number">2</span>:name}) at (${<span class="org-highlight-numbers-number">3</span>:pointcoordinate});
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgb3a66f3" class="outline-3">
<h3 id="orgb3a66f3">Draw</h3>
<div class="outline-text-3" id="text-orgb3a66f3">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :draw</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
\draw[${<span class="org-highlight-numbers-number">1</span>:-&gt;}] (${<span class="org-highlight-numbers-number">2</span>:point1}) -- (${<span class="org-highlight-numbers-number">3</span>:point2});
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org411e901" class="outline-3">
<h3 id="org411e901">Node</h3>
<div class="outline-text-3" id="text-org411e901">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :node</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
node[${<span class="org-highlight-numbers-number">1</span>:below right}] (${<span class="org-highlight-numbers-number">2</span>:name}) {${<span class="org-highlight-numbers-number">3</span>:label}};
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org22d90dd" class="outline-3">
<h3 id="org22d90dd">Path</h3>
<div class="outline-text-3" id="text-org22d90dd">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :path</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
\path[${<span class="org-highlight-numbers-number">1</span>}] (${<span class="org-highlight-numbers-number">2</span>:point1}) -- (${<span class="org-highlight-numbers-number">3</span>:point2});
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgc2b2292" class="outline-2">
<h2 id="orgc2b2292">Matlab</h2>
<div class="outline-text-2" id="text-orgc2b2292">
2020-05-26 08:40:15 +02:00
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgd3eeea7" class="outline-3">
<h3 id="orgd3eeea7">Clear</h3>
<div class="outline-text-3" id="text-orgd3eeea7">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :clear and close all</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
2020-05-26 08:40:15 +02:00
clear; close all; clc;
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org0dcc39a" class="outline-3">
<h3 id="org0dcc39a">Function</h3>
<div class="outline-text-3" id="text-org0dcc39a">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :function</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-variable-name">function </span>[${<span class="org-highlight-numbers-number">4</span>:outputs}] = ${<span class="org-highlight-numbers-number">1</span>:functionName}(${<span class="org-highlight-numbers-number">2</span>:inputs}, ${<span class="org-highlight-numbers-number">3</span>:opts_param})
2020-05-26 08:40:15 +02:00
% $1 - Description
%
% Syntax: $1($2, $3)
%
% Inputs:
% - $2 -
% - $3 - Optionals parameters: structure with the following fields:
% -
%
% Outputs:
% - $4 -
%% Default value for opts
2020-11-03 16:27:09 +01:00
<span class="org-variable-name">opts</span> = struct(...
<span class="org-string">'${5:outputs}'</span>, ${<span class="org-highlight-numbers-number">6</span>:default_value} ...
2020-05-26 08:40:15 +02:00
);
2020-11-03 16:27:09 +01:00
if exist(<span class="org-string">'opts_param'</span>,<span class="org-string">'var'</span>)
<span class="org-variable-name">for opt</span> = fieldnames($3)<span class="org-string">'</span>
<span class="org-string"> if sum(strcmp(fieldnames(opts), opt{1})) == 1</span>
<span class="org-string"> opts.(opt{1}) = $3.(opt{1});</span>
<span class="org-string"> else</span>
<span class="org-string"> warning(sprintf('</span>%s is not a valid option.<span class="org-string">', opt{1}));</span>
<span class="org-string"> end</span>
<span class="org-string"> end</span>
<span class="org-string">end</span>
2020-05-26 08:40:15 +02:00
2020-11-03 16:27:09 +01:00
<span class="org-string">$0</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org918a738" class="outline-2">
<h2 id="org918a738">Org Mode</h2>
<div class="outline-text-2" id="text-org918a738">
2020-05-26 08:40:15 +02:00
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org9133b41" class="outline-3">
<h3 id="org9133b41">Begin</h3>
<div class="outline-text-3" id="text-org9133b41">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :LaTeX Environment</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
\begin{${<span class="org-highlight-numbers-number">1</span>:equation}}
2021-02-10 18:02:02 +01:00
$0
2020-05-26 08:40:15 +02:00
\end{$1}
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orga88a23c" class="outline-3">
<h3 id="orga88a23c">Caption</h3>
<div class="outline-text-3" id="text-orga88a23c">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Caption</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: $0</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org6b93a9b" class="outline-3">
<h3 id="org6b93a9b">Block</h3>
<div class="outline-text-3" id="text-org6b93a9b">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Org-Mode Block</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">key: block</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_${1:$$(let ((type (yas-choose-value '("src" "example" "quote" "verse" "center" "latex" "html" "ascii"))))</span>
(if type (concat type (if (equal type <span class="org-string">"src"</span>)
(concat <span class="org-string">" "</span> (yas-choose-value <span class="org-string">'("emacs-lisp" "latex" "python" "sh" "matlab")))))))}</span>
<span class="org-string">$0</span>
<span class="org-string">#+end_${1:$(car (split-string yas-text))}</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org2a73292" class="outline-3">
<h3 id="org2a73292">Custom Box</h3>
<div class="outline-text-3" id="text-org2a73292">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Custom Box</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :options [$1]{${2:blue}}{${3:ams nodisplayskip}}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_cbox</span>
2020-05-26 08:40:15 +02:00
$0
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_cbox</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgff8d2f2" class="outline-3">
<h3 id="orgff8d2f2">Latex Class</h3>
<div class="outline-text-3" id="text-orgff8d2f2">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">name: latex-class</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">key: lc</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">expand-env: ((classes (mapcar 'car org-latex-classes)))</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+latex_class: ${1:$$(yas-choose-value classes)}</span>
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org1c2c726" class="outline-3">
<h3 id="org1c2c726">Bibliography with completion</h3>
<div class="outline-text-3" id="text-org1c2c726">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">name: bibliography with completion</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">key: bib</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
bibliography:${<span class="org-highlight-numbers-number">1</span>:$$(yas-choose-value (org-ref-find-bibliography))}
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org7f5c530" class="outline-3">
<h3 id="org7f5c530">Cite</h3>
<div class="outline-text-3" id="text-org7f5c530">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">name: org-ref cite link</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">key: cite</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
cite:${<span class="org-highlight-numbers-number">1</span>:$$(completing-read
<span class="org-string">"bibtex key: "</span>
2020-05-26 08:40:15 +02:00
(let ((bibtex-files (org-ref-find-bibliography)))(bibtex-global-key-alist)))}
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org37c96e4" class="outline-3">
<h3 id="org37c96e4">Ref</h3>
<div class="outline-text-3" id="text-org37c96e4">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">name: org-ref ref link with completion</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">key: ref</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
ref:${<span class="org-highlight-numbers-number">1</span>:$$(completing-read <span class="org-string">"label: "</span> (org-ref-get-labels))}
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org024ab1b" class="outline-3">
<h3 id="org024ab1b">Beamer - CBOX</h3>
<div class="outline-text-3" id="text-org024ab1b">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Beamer Custom Box</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
*** ${<span class="org-highlight-numbers-number">1</span>:@@latex:@@} :B_cbox:
2020-05-26 08:40:15 +02:00
,:PROPERTIES:
:BEAMER_env: cbox
2020-11-03 16:27:09 +01:00
:BEAMER_opt: {${<span class="org-highlight-numbers-number">2</span>:blue}}{${<span class="org-highlight-numbers-number">3</span>:ams nodisplayskip}}
2020-05-26 08:40:15 +02:00
:END:
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org678a86c" class="outline-3">
<h3 id="org678a86c">HTML Details</h3>
<div class="outline-text-3" id="text-org678a86c">
2021-01-01 20:12:34 +01:00
<div class="org-src-container">
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :details</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+HTML: &lt;details&gt;&lt;summary&gt;${1:Figure}&lt;/summary&gt;</span>
$0
<span class="org-comment-delimiter">#</span><span class="org-comment">+HTML: &lt;/details&gt;</span>
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgcebff18" class="outline-3">
<h3 id="orgcebff18">Code</h3>
<div class="outline-text-3" id="text-orgcebff18">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Code</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: ${1:Listing Caption}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+label: lst:${2:listing_name}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src ${3:listing_language}</span>
2020-05-26 08:40:15 +02:00
$0
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org24aec6b" class="outline-3">
<h3 id="org24aec6b">Equation</h3>
<div class="outline-text-3" id="text-org24aec6b">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Equation</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: eq:${1:equation_name}</span>
2020-05-26 08:40:15 +02:00
\begin{equation}
$0
\end{equation}
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orga61bef4" class="outline-3">
<h3 id="orga61bef4">Figure</h3>
<div class="outline-text-3" id="text-orga61bef4">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Figure</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: fig:${1:figure_name}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: ${2:Figure caption}</span>
[[file:${<span class="org-highlight-numbers-number">3</span>:figs/}$1.${<span class="org-highlight-numbers-number">4</span>:pdf}]]
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org38db305" class="outline-3">
<h3 id="org38db305">Frac</h3>
<div class="outline-text-3" id="text-org38db305">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :LaTeX Fraction</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
2020-05-26 08:40:15 +02:00
\frac{$1}{$2} $0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orge40e702" class="outline-3">
<h3 id="orge40e702">Left</h3>
<div class="outline-text-3" id="text-orge40e702">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Left Right mathematical delimitations</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
2020-05-26 08:40:15 +02:00
\left$1 $0 \right$2
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org7e0fa73" class="outline-3">
<h3 id="org7e0fa73">Minipage</h3>
<div class="outline-text-3" id="text-org7e0fa73">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :minipage</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+BEGIN_EXPORT latex</span>
2020-05-26 08:40:15 +02:00
\begin{figure}[htbp]
\centering
2020-11-03 16:27:09 +01:00
\begin{minipage}[t]{<span class="org-highlight-numbers-number">0.49</span>\linewidth}
<span class="org-comment-delimiter">#</span><span class="org-comment">+END_EXPORT</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :float nil :width 0.95\linewidth</span>
2020-05-26 08:40:15 +02:00
$0
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+BEGIN_EXPORT latex</span>
2020-05-26 08:40:15 +02:00
\end{minipage}%
\hfill%
2020-11-03 16:27:09 +01:00
\begin{minipage}[t]{<span class="org-highlight-numbers-number">0.49</span>\linewidth}
<span class="org-comment-delimiter">#</span><span class="org-comment">+END_EXPORT</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :float nil :width 0.95\linewidth</span>
2020-05-26 08:40:15 +02:00
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+BEGIN_EXPORT latex</span>
2020-05-26 08:40:15 +02:00
\end{minipage}
\end{figure}
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+END_EXPORT</span>
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org1329a6b" class="outline-3">
<h3 id="org1329a6b">Minipage Figures</h3>
<div class="outline-text-3" id="text-org1329a6b">
2020-11-03 16:27:09 +01:00
<div class="org-src-container">
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Minipage with Figures</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :options [t]{${3:0.5\linewidth}}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_minipage</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: fig:$1</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: ${2:Caption}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: ${4::width \linewidth} :float nil</span>
[[file:figs/${<span class="org-highlight-numbers-number">1</span>:figure_name}.pdf]]
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_minipage</span>
\hfill
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :options [t]{${7:0.5\linewidth}}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_minipage</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: fig:$5</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: ${6:Caption}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: ${8::width \linewidth} :float nil</span>
[[file:figs/${<span class="org-highlight-numbers-number">5</span>:figure_name}.pdf]]
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_minipage</span>
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgc4b2d7b" class="outline-3">
<h3 id="orgc4b2d7b">Wrap Figure</h3>
<div class="outline-text-3" id="text-orgc4b2d7b">
2020-11-03 16:27:09 +01:00
<div class="org-src-container">
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Wrap Figure</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :options {${1:rl}}{${2:0.45\textwidth}}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_wrapfigure</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :${3:width \linewidth}</span>
[[file:figs/${<span class="org-highlight-numbers-number">4</span>:figure_name.pdf}]]
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_wrapfigure</span>
$0
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgd73f8fd" class="outline-3">
<h3 id="orgd73f8fd">Multicolumn</h3>
<div class="outline-text-3" id="text-orgd73f8fd">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Multcolumn</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :float multicolumn</span>
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgc01c0a5" class="outline-3">
<h3 id="orgc01c0a5">Subfigure</h3>
<div class="outline-text-3" id="text-orgc01c0a5">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Subfigure</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: fig:${1:figure_name}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: ${2:figure caption}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :environment subfigure :width 0.49\linewidth :align c</span>
| file:${<span class="org-highlight-numbers-number">3</span>:sub_fig_name}.${<span class="org-highlight-numbers-number">4</span>:pdf} | file:${<span class="org-highlight-numbers-number">5</span>:sub_fig_name}.${<span class="org-highlight-numbers-number">6</span>:pdf} |
| &lt;&lt;fig:$3&gt;&gt; ${<span class="org-highlight-numbers-number">7</span>:sub figure caption} | &lt;&lt;fig:$5&gt;&gt; ${<span class="org-highlight-numbers-number">8</span>:sub figure caption} |
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org972c5ee" class="outline-3">
<h3 id="org972c5ee">Table</h3>
<div class="outline-text-3" id="text-org972c5ee">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Table</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: tab:${1:table_name}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: ${2:Table caption}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :environment tabularx :width ${3:\linewidth} :align ${4:lXX}</span>
2022-05-09 10:05:23 +02:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :center t :booktabs t</span>
2020-05-26 08:40:15 +02:00
| $0 | | |
|---+---+---|
| | | |
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org9d47055" class="outline-3">
<h3 id="org9d47055">Tikz</h3>
<div class="outline-text-3" id="text-org9d47055">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Tikz figure</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src latex :file ${1:figure_name}.pdf :post pdf2svg(file=*this*, ext="png") :exports both</span>
2021-02-10 18:02:02 +01:00
\begin{tikzpicture}
$0
\end{tikzpicture}
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org6740e67" class="outline-3">
<h3 id="org6740e67">Tikzfig</h3>
<div class="outline-text-3" id="text-org6740e67">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Tikz Figure</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+NAME: fig:${1:figure_name}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+HEADER: :headers '("\\\\usepackage{tikz}" "\\\\usepackage{import}" "\\\\import{$HOME/Cloud/thesis/LaTeX/}{config.tex}")</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+HEADER: :imagemagick t :fit yes :iminoptions -scale 100% -density 150 :imoutoptions -quality 100</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+HEADER: :results raw replace :buffer no :eval no-export :exports both :mkdirp yes</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+HEADER: :output-dir ${2:figs}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src latex :file $1.pdf :post pdf2svg(file=*this*, ext="png") :exports both</span>
2021-02-10 18:02:02 +01:00
\begin{tikzpicture}
$0
\end{tikzpicture}
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+NAME: fig:$1</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+CAPTION: ${3:Caption}</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+RESULTS: fig:$1</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgd78a868" class="outline-3">
<h3 id="orgd78a868">Tikzheader</h3>
<div class="outline-text-3" id="text-orgd78a868">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Tikz Header</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
* ${<span class="org-highlight-numbers-number">1</span>:Title/Description of the figure}
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src latex :file ${2:figure_name}.pdf :tangle figs/$2.tex :exports ${3:both}</span>
2021-02-10 18:02:02 +01:00
\begin{tikzpicture}
$0
\end{tikzpicture}
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: fig:$2</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: $1 ([[./figs/$2.png][png]], [[./figs/$2.pdf][pdf]], [[./figs/$2.tex][tex]]).</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+RESULTS:</span>
[<span class="org-type">[file:./figs/$2.png]</span>]
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org7350df7" class="outline-3">
<h3 id="org7350df7">User-config</h3>
<div class="outline-text-3" id="text-org7350df7">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">-*- mode: snippet -*-</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">name: user-config</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">key: uc</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src emacs-lisp :tangle user-config.el</span>
2020-05-26 08:40:15 +02:00
$1
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org56534d3" class="outline-3">
<h3 id="org56534d3">User-init</h3>
<div class="outline-text-3" id="text-org56534d3">
2020-05-26 08:40:15 +02:00
<p>
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/user-init
</p>
<p>
,#+begin_src emacs-lisp :tangle user-init.el
$1
,#+end_src
#+end_Sec
</p>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org349e863" class="outline-3">
<h3 id="org349e863">Wrap</h3>
<div class="outline-text-3" id="text-org349e863">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Wrap</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+attr_latex: :float wrap</span>
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org74e5a20" class="outline-3">
<h3 id="org74e5a20">Python Specific</h3>
<div class="outline-text-3" id="text-org74e5a20">
</div>
<div id="outline-container-org1e4e64d" class="outline-4">
<h4 id="org1e4e64d">Pfigure</h4>
<div class="outline-text-4" id="text-org1e4e64d">
<div class="org-src-container">
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Python-Figure</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src jupyter-python :file ${2:filename}.png :results none</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Figure - ${1:description}</span>
<span class="org-variable-name">plt.figure(figsize</span>=(${<span class="org-highlight-numbers-number">3</span>:<span class="org-highlight-numbers-number">1200</span>}/150, ${<span class="org-highlight-numbers-number">4</span>:<span class="org-highlight-numbers-number">800</span>}/150), dpi=<span class="org-highlight-numbers-number">150</span>)
plt.clf
$0
plt.savefig(<span class="org-string">'figs/$2.pdf'</span>, transparent=True, bbox_inches=<span class="org-string">'tight'</span>, pad_inches=<span class="org-highlight-numbers-number">0</span>)
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: fig:$2</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: $1</span>
[<span class="org-type">[file:figs/$2.png]</span>]
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org2f3dfac" class="outline-3">
<h3 id="org2f3dfac">Matlab Specific</h3>
<div class="outline-text-3" id="text-org2f3dfac">
2020-05-26 08:40:15 +02:00
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgac493d5" class="outline-4">
<h4 id="orgac493d5">Mconfig</h4>
<div class="outline-text-4" id="text-orgac493d5">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Matlab-Configuration-Header</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab :session *MATLAB*</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :tangle ${1:filename}.m</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :comments org</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :exports both</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :results none</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :eval no-export</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :noweb yes</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :mkdirp yes</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+PROPERTY: header-args:matlab+ :output-dir ${2:figs}</span>
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgb08853d" class="outline-4">
<h4 id="orgb08853d">Mfigure</h4>
<div class="outline-text-4" id="text-orgb08853d">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
2022-05-09 10:05:23 +02:00
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Matlab-Figure</span>
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
2022-05-09 10:05:23 +02:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src matlab :exports none :results none</span>
%% ${<span class="org-highlight-numbers-number">1</span>:description}
figure;
2020-05-26 08:40:15 +02:00
$0
2022-05-09 10:05:23 +02:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src matlab :tangle no :exports results :results file replace</span>
2022-05-09 10:05:23 +02:00
exportFig(<span class="org-string">'figs/${2:filename}.pdf'</span>, <span class="org-string">'width'</span>, <span class="org-string">'${3:full}'</span>, <span class="org-string">'height'</span>, <span class="org-string">'${4:full}'</span>);
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
2022-05-09 10:05:23 +02:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+name: fig:$2</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+caption: $1</span>
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+RESULTS:</span>
2022-05-09 10:05:23 +02:00
[<span class="org-type">[file:figs/$2.png]</span>]
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org7074d53" class="outline-4">
<h4 id="org7074d53">Mfunction</h4>
<div class="outline-text-4" id="text-org7074d53">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Matlab-Function</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
* ${<span class="org-highlight-numbers-number">1</span>:Function Name}
2020-05-26 08:40:15 +02:00
:PROPERTIES:
2020-11-03 16:27:09 +01:00
:header-args:matlab+: :tangle src/${<span class="org-highlight-numbers-number">2</span>:matlab_file_name}.m
2020-05-26 08:40:15 +02:00
:header-args:matlab+: :comments none :mkdirp yes :eval no
:END:
&lt;&lt;sec:$2&gt;&gt;
This Matlab function is accessible [[file:src/$2.m][here]].
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src matlab</span>
2021-02-10 18:02:02 +01:00
<span class="org-variable-name">function </span>[${<span class="org-highlight-numbers-number">4</span>:in_data}] = $2(${<span class="org-highlight-numbers-number">3</span>:in_data})
% $2 - $0
%
<span class="org-variable-name">% Syntax: </span>[<span class="org-constant">$4</span>] = $2($3)
%
% Inputs:
% - $3 -
%
% Outputs:
% - $4 -
end
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgf3f4c44" class="outline-4">
<h4 id="orgf3f4c44">Mheader</h4>
<div class="outline-text-4" id="text-orgf3f4c44">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Matlab-Header</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
* ${<span class="org-highlight-numbers-number">1</span>:Heading Name}
2020-05-26 08:40:15 +02:00
:PROPERTIES:
2020-11-03 16:27:09 +01:00
:header-args:matlab+: :tangle matlab/${<span class="org-highlight-numbers-number">2</span>:matlab_file_name}.m
2020-05-26 08:40:15 +02:00
:header-args:matlab+: :comments org :mkdirp yes
:END:
&lt;&lt;sec:$2&gt;&gt;
** ZIP file containing the data and matlab files :ignore:
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src bash :exports none :results none</span>
2021-02-10 18:02:02 +01:00
if [ matlab/$2.m -nt data/$2.zip ]; then
cp matlab/$2.m $2.m;
zip data/$2 \
mat/data.mat \
$2.m
rm $2.m;
fi
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_note</span>
2021-02-10 18:02:02 +01:00
All the files (data and Matlab scripts) are accessible [[file:data/$2.zip][here]].
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_note</span>
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org700ea5e" class="outline-4">
<h4 id="org700ea5e">Minit</h4>
<div class="outline-text-4" id="text-org700ea5e">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Matlab-Init</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
2020-05-26 08:40:15 +02:00
** Matlab Init :noexport:ignore:
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)</span>
2021-02-10 18:02:02 +01:00
&lt;&lt;matlab-dir&gt;&gt;
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src matlab :exports none :results silent :noweb yes</span>
2021-02-10 18:02:02 +01:00
&lt;&lt;matlab-init&gt;&gt;
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org4b76dde" class="outline-4">
<h4 id="org4b76dde">Mtable</h4>
<div class="outline-text-4" id="text-org4b76dde">
2020-05-26 08:40:15 +02:00
<div class="org-src-container">
2020-11-03 16:27:09 +01:00
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Matlab-Table</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)</span>
2021-02-10 18:02:02 +01:00
data2orgtable(${<span class="org-highlight-numbers-number">1</span>:data}, {${<span class="org-highlight-numbers-number">2</span>:<span class="org-string">'rowlabel'</span>}}, {${<span class="org-highlight-numbers-number">3</span>:<span class="org-string">'collabel'</span>}}, <span class="org-string">' %.1f '</span>);
2020-11-03 16:27:09 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
2020-05-26 08:40:15 +02:00
$0
</pre>
</div>
</div>
</div>
2021-01-01 20:12:34 +01:00
2022-05-09 10:05:23 +02:00
<div id="outline-container-org37717eb" class="outline-4">
<h4 id="org37717eb">Mvalue</h4>
<div class="outline-text-4" id="text-org37717eb">
2021-01-01 20:12:34 +01:00
<div class="org-src-container">
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Matlab-Value</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src matlab :results value replace :exports results :tangle no</span>
2021-02-10 18:02:02 +01:00
sprintf(<span class="org-string">'x = %.2g'</span>, x);
2021-01-01 20:12:34 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
$0
</pre>
</div>
</div>
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-orgc5363bb" class="outline-3">
<h3 id="orgc5363bb">Binary</h3>
<div class="outline-text-3" id="text-orgc5363bb">
2021-01-01 20:12:34 +01:00
<div class="org-src-container">
<pre class="src src-conf"><span class="org-comment-delimiter">#</span><span class="org-comment">contributor : Thomas Dehaeze <a href="mailto:dehaeze.thomas%40gmail.com">&lt;dehaeze.thomas@gmail.com&gt;</a></span>
<span class="org-comment-delimiter">#</span><span class="org-comment">name :Binary</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
<span class="org-variable-name">*</span> =${<span class="org-highlight-numbers-number">1</span>:binary-name}= - ${<span class="org-highlight-numbers-number">2</span>:Description}
:PROPERTIES:
:CUSTOM_ID: $1
:END:
<span class="org-comment-delimiter">#</span><span class="org-comment">+begin_src bash :tangle ~/.local/bin/$1</span>
2021-02-10 18:02:02 +01:00
$0
2021-01-01 20:12:34 +01:00
<span class="org-comment-delimiter">#</span><span class="org-comment">+end_src</span>
</pre>
</div>
</div>
2020-05-26 08:40:15 +02:00
</div>
</div>
2022-05-09 10:05:23 +02:00
<div id="outline-container-org913ab23" class="outline-2">
<h2 id="org913ab23">Python</h2>
<div class="outline-text-2" id="text-org913ab23">
</div>
<div id="outline-container-orgb7441cf" class="outline-3">
<h3 id="orgb7441cf">Function</h3>
<div class="outline-text-3" id="text-orgb7441cf">
<div class="org-src-container">
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">-*- coding: utf-8 -*-</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">name: de</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">contributor: Orestis Markou</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">contributor: Yasser Gonz&#225;lez Fern&#225;ndez <a href="mailto:yglez%40uh.cu">&lt;yglez@uh.cu&gt;</a></span>
<span class="org-comment-delimiter"># </span><span class="org-comment">contributor: Tibor Simko <a href="mailto:tibor.simko%40cern.ch">&lt;tibor.simko@cern.ch&gt;</a></span>
<span class="org-comment-delimiter"># </span><span class="org-comment">--</span>
def ${<span class="org-highlight-numbers-number">1</span>:name}($2):
<span class="org-string">"""</span>
<span class="org-string"> $3</span>
<span class="org-string"> </span><span class="org-string"><span class="org-type">$</span></span><span class="org-string">{2:$</span>
<span class="org-string"> (let* ((indent</span>
<span class="org-string"> (concat "</span>\n<span class="org-string">" (make-string (current-column) 32)))</span>
<span class="org-string"> (args</span>
<span class="org-string"> (mapconcat</span>
<span class="org-string"> '(lambda (x)</span>
<span class="org-string"> (if (not (string= (nth 0 x) ""))</span>
<span class="org-string"> (concat "</span>@param <span class="org-string">" (nth 0 x) "</span>: <span class="org-string">" indent</span>
<span class="org-string"> "</span>@type <span class="org-string">" (nth 0 x) "</span>: <span class="org-string">")))</span>
<span class="org-string"> (mapcar</span>
<span class="org-string"> '(lambda (x)</span>
<span class="org-string"> (mapcar</span>
<span class="org-string"> '(lambda (x)</span>
<span class="org-string"> (replace-regexp-in-string "</span>[[:blank:]]*$<span class="org-string">" ""</span>
<span class="org-string"> (replace-regexp-in-string "</span>^[[:blank:]]*<span class="org-string">" "" x)))</span>
<span class="org-string"> x))</span>
<span class="org-string"> (mapcar '(lambda (x) (split-string x "</span>=<span class="org-string">"))</span>
<span class="org-string"> (split-string text "</span>,<span class="org-string">")))</span>
<span class="org-string"> indent)))</span>
<span class="org-string"> (if (string= args "")</span>
<span class="org-string"> (concat indent "</span>@return: <span class="org-string">" indent "</span>@rtype: <span class="org-string">" indent (make-string 3 34))</span>
<span class="org-string"> (mapconcat</span>
<span class="org-string"> 'identity</span>
<span class="org-string"> (list "" args "</span>@return: <span class="org-string">" "</span>@rtype: <span class="org-string">" (make-string 3 34))</span>
<span class="org-string"> indent)))</span>
<span class="org-string"> }</span>
<span class="org-string"> $0</span>
</pre>
</div>
</div>
</div>
</div>
2020-05-26 08:40:15 +02:00
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
2022-05-09 10:05:23 +02:00
<p class="date">Created: 2022-05-09 lun. 10:04</p>
2020-05-26 08:40:15 +02:00
</div>
</body>
</html>