-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofJS.sty
128 lines (118 loc) · 2.74 KB
/
profJS.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{profJS}[2019/01/29]
\newcommand{\javascript}{\texttt{JavaScript}\xspace}
%
\newlength{\javascriptLogoSize}
\setlength{\javascriptLogoSize}{\f@size pt}
%% \multiply\pythonLogoSize by 1.05
\newmintedfile[comjavascript]{js}{%
fontfamily=tt,
linenos,
mathescape,
breaklines,
autogobble,
framerule=1pt,
rulecolor=yellow,
numbersep=3pt%
}%%
\newminted[envjavascript]{js}{%
fontfamily=tt,
linenos,
mathescape,
breaklines,
autogobble,
framerule=1pt,
rulecolor=yellow,
numbersep=3pt%
}%%
%% style tcolorbox
%% pour encadrer le code
\newtcolorbox{boitejavascript}{%%
enhanced,
breakable,
colback=yellow!15,
colframe=yellow!20,
colbacktitle=yellow!30,
title={\sffamily\texttt{\color{green!30!black} Code Javascript}%%
\hfill%
\includegraphics[height=\pythonLogoSize]{js.png}%%
},
%% title style={left color=yellow!30, right color=blue!20},
boxrule=5pt,
titlerule=.5pt,
bottomtitle=-2pt,
toptitle=-2pt,
arc=10pt,
watermark graphics=js.png,
watermark zoom=1.00,
watermark opacity=.1,
%% drop fuzzy shadow=blue!50!black
}
%% À UTILISER AVEC UN FICHIER
\newcommand{\fichierjavascript}[1]{%
\begin{english}%%
\begin{boitejavascript}
\compy{#1}
\end{boitejavascript}
\end{english}%%
}
%% À UTILISER DIRECTEMENT
\newenvironment{codejavascript}{
\VerbatimEnvironment
\begin{english}%%
\begin{boitejavascript}
\begin{envjavascript}%
}{\end{envjavascript}
\end{boitejavascript}
\end{english}
}
\newcommand{\vjscript}[1]{%
\begin{english}%%
\begin{mdframed}[%%
linecolor=yellow!20,
linewidth=5pt,
frametitlebackgroundcolor=yellow!30,
frametitlerule=true,
backgroundcolor=yellow!15,
roundcorner=10pt,
frametitle={\sffamily\texttt{\color{green!80} Code Javascript}%%
\hfill%
\includegraphics[height=\javascriptLogoSize]{images/js.png}%%
}]%
\vjs{#1}%%
\end{mdframed}%%
\end{english}%%
}
\newenvironment{jscriptdirect}{
\VerbatimEnvironment
\begin{english}%%
\begin{mdframed}[%%
linecolor=yellow!20,
linewidth=5pt,
frametitlebackgroundcolor=yellow!30,
frametitlerule=true,
backgroundcolor=yellow!15,
roundcorner=10pt,
frametitle={\sffamily\texttt{\color{green!30!black} Code Javascript}%%
\hfill%
\includegraphics[height=\javascriptLogoSize]{images/js.png}%%
}]%
\begin{minted}[%
fontfamily=tt,
linenos,
mathescape,
breaklines,
autogobble,
framerule=1pt,
rulecolor=yellow,
numbersep=3pt%
]{js}}{%
\end{minted}
\end{mdframed}
\end{english}
}
\endinput
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: