Update
This commit is contained in:
parent
87b968f4c3
commit
a586758cb7
85
algo/algo.sty
Normal file
85
algo/algo.sty
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
% File : algo.sty
|
||||||
|
% Author : Jeff LANCE <email@jefflance.me>
|
||||||
|
% Date : 24.05.2020
|
||||||
|
% Last Modified Date: 24.05.2020
|
||||||
|
% Last Modified By : Jeff LANCE <email@jefflance.me>
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
|
|
||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{algo}[2020/05/24 Algorithms package, v0.1]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\makeatletter
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% PACKAGES
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
|
\RequirePackage{xparse}
|
||||||
|
\RequirePackage{algpseudocode}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% TRANSLATIONS
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
|
\algrenewcommand\algorithmicfor{\textbf{Pour}}
|
||||||
|
\algnewcommand\algorithmicto{\textbf{à}}
|
||||||
|
\algrenewcommand\algorithmicdo{}
|
||||||
|
|
||||||
|
\algrenewtext{For}[3]%
|
||||||
|
{\algorithmicfor\ #1 \textbf{allant de} #2 \textbf{à} #3 \algorithmicdo}
|
||||||
|
|
||||||
|
\algrenewcommand\algorithmicwhile{\textbf{Tant que}}
|
||||||
|
|
||||||
|
\algrenewcommand\algorithmicend{\textbf{Fin}}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% COMMANDS
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
|
\NewDocumentCommand{\Sets}{ m m }{
|
||||||
|
\State #1 \gets #2
|
||||||
|
}
|
||||||
|
|
||||||
|
\NewDocumentCommand{\Print}{ m }{
|
||||||
|
\State \textbf{Afficher} #1
|
||||||
|
}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% ENVIRONMENTS
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
|
\NewDocumentEnvironment{pseudocode}{ }{
|
||||||
|
\begin{algorithmic}
|
||||||
|
\sffamily
|
||||||
|
}{
|
||||||
|
\end{algorithmic}
|
||||||
|
}
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
@ -34,6 +34,7 @@
|
|||||||
\RequirePackage{ifluatex}
|
\RequirePackage{ifluatex}
|
||||||
\RequirePackage{import}
|
\RequirePackage{import}
|
||||||
\RequirePackage{lipsum}
|
\RequirePackage{lipsum}
|
||||||
|
\RequirePackage{subfiles}
|
||||||
|
|
||||||
% language
|
% language
|
||||||
\ifluatex
|
\ifluatex
|
||||||
@ -115,7 +116,6 @@
|
|||||||
\RequirePackage{tasks}
|
\RequirePackage{tasks}
|
||||||
\RequirePackage{dashrule}
|
\RequirePackage{dashrule}
|
||||||
\RequirePackage{qrcode}
|
\RequirePackage{qrcode}
|
||||||
% \RequirePackage[french]{algorithme}
|
|
||||||
%--
|
%--
|
||||||
|
|
||||||
|
|
||||||
@ -280,8 +280,8 @@
|
|||||||
bgcolor=white,
|
bgcolor=white,
|
||||||
highlightcolor=white,
|
highlightcolor=white,
|
||||||
autogobble,
|
autogobble,
|
||||||
frame=single,
|
frame=none,
|
||||||
breaklines,
|
% breaklines,
|
||||||
escapeinside=||,
|
escapeinside=||,
|
||||||
xleftmargin=0em,
|
xleftmargin=0em,
|
||||||
xrightmargin=0em,
|
xrightmargin=0em,
|
||||||
|
Binary file not shown.
@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
%% Own packages. Those contains some global settings and definitions.
|
%% Own packages. Those contains some global settings and definitions.
|
||||||
%%
|
%%
|
||||||
|
\RequirePackage{algo}
|
||||||
\RequirePackage{commun}
|
\RequirePackage{commun}
|
||||||
\RequirePackage{couleurs}
|
\RequirePackage{couleurs}
|
||||||
\RequirePackage{shortcuts}
|
\RequirePackage{shortcuts}
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
|
|
||||||
%% tasks
|
%% tasks
|
||||||
%%
|
%%
|
||||||
\newcommand{\bq}{\begin{tasks}}
|
\newcommand{\bt}{\begin{tasks}}
|
||||||
\newcommand{\eq}{\end{tasks}}
|
\newcommand{\et}{\end{tasks}}
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
@ -270,15 +270,15 @@
|
|||||||
\NewDocumentCommand \N { s g } {
|
\NewDocumentCommand \N { s g } {
|
||||||
\IfBooleanTF {#1} {
|
\IfBooleanTF {#1} {
|
||||||
\IfNoValueTF {#2} {
|
\IfNoValueTF {#2} {
|
||||||
\!\!\!\!\ensuremath{\mathbb{N} \setminus \{0\}}\!\!\!
|
\ensuremath{\mathbb{N} \setminus \{0\}}
|
||||||
}{
|
}{
|
||||||
\!\!\!\!\ensuremath{\mathbb{N} \setminus \{0, #2\}}\!\!\!
|
\ensuremath{\mathbb{N} \setminus \{0, #2\}}
|
||||||
}
|
}
|
||||||
}{
|
}{
|
||||||
\IfNoValueTF {#2} {
|
\IfNoValueTF {#2} {
|
||||||
\!\!\!\!\ensuremath{\mathbb{N}}\!\!\!
|
\ensuremath{\mathbb{N}}
|
||||||
}{
|
}{
|
||||||
\!\!\!\!\ensuremath{\mathbb{N} \setminus \{#2\}}\!\!\!
|
\ensuremath{\mathbb{N} \setminus \{#2\}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user