-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofCitation.sty
executable file
·74 lines (72 loc) · 2.64 KB
/
profCitation.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{profCitation}[2014/05/19]
\newcommand{\Cdeux}{%
\formatcitation{Les mathématiques ne sont écrites que pour les mathématiciens}{N. Copernic}%
}
\newcommand{\Cquatre}{%
\formatcitation{Un mathématicien est un aveugle qui, dans une pièce sombre, cherche un chat noir qui n'y est pas.}{C. Darwin}%
}
\newcommand{\Csix}{%
\formatcitation{Si vous touchez aux maths, vous ne devez être ni pressés, ni cupides, fussiez-vous roi ou reine.}{Euclide}%
}
\newcommand{\Csept}{%
\formatcitation{Ne tenez pour certain que ce qui est démontré.}{I. Newton}%
}
\newcommand{\Cun}{%
\formatcitation{La vie n'est bonne qu'à étudier et à enseigner les mathématiques.}{B. Pascal}%
}
\newcommand{\Cneuf}{%
\formatcitation{C'est avec la logique que nous prouvons et avec l'intuition que nous trouvons.}{H. Poincaré}%
}
\newcommand{\Ccinq}{%
\formatcitation{Qui parle sème~; qui écoute récolte.}{Pythagore}%
}
\newcommand{\Chuit}{
\formatcitation{Toute chose est nombre.}{Pythagore}%
}
\newcommand{\Ctrois}{%
\formatcitation{La vérité est parfaite pour les mathématiques, la chimie, la philosophie, mais pas pour la vie.}{E. Sabato}%
}
\newcommand{\Cdix}{%
\formatcitation{Aussi difficile que cela puisse paraître, si vous n'essayez pas, alors vous le ne ferez jamais.}{A. Wiles}%
}
\newcount\randCit
\newsavebox{\textecitation}
\newlength{\longCitation}
\newlength{\hautCitation}
\newlength{\profCitation}
\newcommand{\numcitation}[1]{%
\ifcase#1 \or \Cun \or \Cdeux \or \Ctrois \or \Cquatre \or \Ccinq \or \Csix
\or \Csept \or \Chuit \or \Cneuf \or \Cdix \fi%
}
\newcommand{\formatcitation}[2]{%
#1 $\longrightarrow$ {\scshape \normalfont #2}%%
}
\newcommand{\citationchoisie}{%
\setrannum{\randCit}{1}{10}%
\def\TEXTE{\numcitation{\randCit}}
\def\TEXTEf{\footnotesize\bfseries\slshape\TEXTE}
\settowidth{\longCitation}{\TEXTEf}
\settoheight{\hautCitation}{\TEXTEf}
\settodepth{\profCitation}{\TEXTEf}
\savebox{\textecitation}{%
\begin{pspicture}(0,-\profCitation)(\longCitation,\hautCitation)%\psset{unit=0.75cm}
\def\texteH{%
\begin{psclip}{\psframe[linestyle=none,linewidth=0pt](0,0)(\longCitation,\hautCitation)}
\rput[Bl](0,0){\psframebox[linestyle=none,framesep=0pt]{\macouleur\TEXTEf}}
\end{psclip}
}%%
\def\texteB{\begin{psclip}{\psframe[linestyle=none,linewidth=0pt](0,0)(\longCitation,-\profCitation)}
\rput[Bl](0,0){\psframebox[linestyle=none,framesep=0pt]{\white\TEXTEf}}
\end{psclip}
}%%
\rput(0,0){\texteB}
\rput(0,0){\texteH}
\end{pspicture}
}%
}
\citationchoisie
\if@nocit
\savebox{\textecitation}{}
\fi
\endinput