-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtranslation-fr.sty
83 lines (75 loc) · 2.65 KB
/
translation-fr.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
%% translation-fr.sty For memman-fr
\ProvidesPackage{translation-fr}[2017/09/28 for memman-fr]
\usepackage{paracol}
\usepackage{microtype}
\usepackage{paracol}
\newcommand*{\switchEng}{\switchcolumn[0]*\selectlanguage{english}}
\newcommand*{\switchFrench}{\switchcolumn[1]\selectlanguage{french}}
\usepackage{ifthen}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usetikzlibrary{positioning}
\usepackage[english,french]{babel}
%% Taken from "memsty.sty" to load hyperref as the last package
\usepackage[pdftex,
plainpages=false,
pdfpagelabels,
%%% hyperfootnotes=false,
bookmarksnumbered,
% colorlinks,
% ocgcolorlinks, % this only works for pdflatex
]{hyperref}
% this is a lillt special, using this one can change the link colors
% in the manual to blacnmk without changing any file, just use
%
% pdflatex "\def\MEMOIRblacklinks{}\input{memman.tex}"
%
\@ifundefined{MEMOIRblacklinks}{%
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\definecolor{citecolour}{rgb}{0,0.6,0.2}
% \definecolor{filecolor}{rgb}{0,0.2,0.6}
\definecolor{urlcolour} {rgb}{0.8,0,0.8}
}{%
typeout{Asked for black links, so that is what you are going to get}
\definecolor{linkcolour}{rgb}{0,0,0}
\definecolor{citecolour}{rgb}{0,0,0}
% \definecolor{filecolor}{rgb}{0,0,0}
\definecolor{urlcolour} {rgb}{0,0,0}
\hypersetup{colorlinks}
}
\hypersetup{
pdftitle={The memoir class},
pdfauthor={Peter Wilson},
linkcolor=linkcolour,citecolor=citecolour,
filecolor=urlcolour,urlcolor=urlcolour,
}
%% Translation stage:
%% - 0: nothing done (all white)
%% - 1: automatic translation (red light)
%% - 2: human translation (yellow light)
%% - 3: human correction (green light)
\newcommand*{\TS}[1]{%
\ifthenelse{\equal{#1}{1}}{\def\TScolorA{red}}{\def\TScolorA{white}}%
\ifthenelse{\equal{#1}{2}}{\def\TScolorB{yellow!80!red}}{\def\TScolorB{white}}%
\ifthenelse{\equal{#1}{3}}{\def\TScolorC{green}}{\def\TScolorC{white}}%
\marginpar{%
\raisebox{-3.0ex}{%
\begin{tikzpicture}[ampersand replacement=\&,anchor=north]
\matrix[matrix of nodes,
nodes in empty cells,
rounded corners,
inner sep=.275ex,
draw = black,
fill = black!50,
nodes = {circle, minimum size=1.5ex, anchor=center, draw=black, inner sep=0pt},
row 1 column 1/.style={nodes={fill=\TScolorA}},
row 1 column 2/.style={nodes={fill=\TScolorB}},
row 1 column 3/.style={nodes={fill=\TScolorC}},
column sep=.125ex
] {%
\& \& \\
} ;
\end{tikzpicture}%
}% end of \marginpar
}% end of \raisebox
}% end of \newcommand