16 INTEGER,
INTENT(IN) :: LNG
17 INTEGER,
INTENT(IN) :: NFIC
19 INTEGER :: I1,I2,I3,J,IRUB,IKEY,IERR
23 CHARACTER(LEN=PATH_LEN),
ALLOCATABLE :: TO_SORT1(:)
24 INTEGER :: ORDERED_KEY1(*)
25 INTEGER,
ALLOCATABLE :: ORDERED_RUB1(:)
26 INTEGER,
ALLOCATABLE :: ORDERED_RUB2(:)
27 INTEGER,
ALLOCATABLE :: ORDERED_RUB3(:)
28 ALLOCATE(ordered_rub1(
nrub(lng,1)),stat=ierr)
29 CALL check_allocate(ierr,
'ORDERED_RUB')
30 ALLOCATE(ordered_rub2(
nrub(lng,2)),stat=ierr)
31 CALL check_allocate(ierr,
'ORDERED_RUB')
32 ALLOCATE(ordered_rub3(
nrub(lng,3)),stat=ierr)
33 CALL check_allocate(ierr,
'ORDERED_RUB')
35 ALLOCATE(to_sort1(
nrub(lng,1)),stat=ierr)
36 CALL check_allocate(ierr,
'TO_SORT1')
38 to_sort1(irub) = repeat(
' ',path_len)
39 to_sort1(irub) =
rubrique(lng,irub,1)
45 irub1 = ordered_rub1(i1)
46 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
47 WRITE(nfic,
'(3A)')
"\section{",trim(
rubrique(lng,irub1,1)),
"}" 48 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
52 ikey = ordered_key1(j)
54 & (
mydico(ikey)%RUBRIQUE(lng,2)(1:1).EQ.
' '))
THEN 55 WRITE(nfic,
'(3a)')
"\telkey{",
56 & trim(
mydico(ikey)%KNOM(lng)),
"}\\" 60 ALLOCATE(to_sort1(
nrub(lng,2)),stat=ierr)
61 CALL check_allocate(ierr,
'TO_SORT1')
63 to_sort1(irub) = repeat(
' ',path_len)
64 to_sort1(irub) =
rubrique(lng,irub,2)
70 irub2 = ordered_rub2(i2)
72 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
73 WRITE(nfic,
'(3A)')
"\subsection{",
75 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
79 ikey = ordered_key1(j)
82 & (
mydico(ikey)%RUBRIQUE(lng,3)(1:1).EQ.
' '))
THEN 83 WRITE(nfic,
'(3a)')
"\telkey{",
84 & trim(
mydico(ikey)%KNOM(lng)),
"}\\" 88 ALLOCATE(to_sort1(
nrub(lng,3)),stat=ierr)
89 CALL check_allocate(ierr,
'TO_SORT1')
91 to_sort1(irub) = repeat(
' ',path_len)
92 to_sort1(irub) =
rubrique(lng,irub,3)
98 irub3 = ordered_rub3(i3)
100 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
101 WRITE(nfic,
'(3A)')
"\subsubsection{",
103 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
104 WRITE(nfic,
'(A)')
' ' 107 ikey = ordered_key1(j)
111 WRITE(nfic,
'(3a)')
"\telkey{",
112 & trim(
mydico(ikey)%KNOM(lng)),
"}\\" 130 CHARACTER(LEN=PATH_LEN),
INTENT(IN) :: FILENAME
131 INTEGER,
INTENT(IN) :: LNG
133 INTEGER :: I,NFIC,IERR,IKEY
134 CHARACTER(LEN=PATH_LEN),
ALLOCATABLE :: TO_SORT1(:),TO_SORT2(:)
135 INTEGER,
ALLOCATABLE :: ORDERED_KEY1(:),ORDERED_KEY2(:)
136 INTEGER,
ALLOCATABLE :: ORDERED_RUB(:)
139 WRITE(*,*)
'---- LATEX PROCESS ----' 140 WRITE(*,*)
'WRITING IN : ',trim(filename)
141 OPEN(nfic,file=trim(filename),iostat=ierr)
142 CALL check_call(ierr,
'WRITE2LATEX')
144 WRITE(*,*)
'TOTAL NUMBER OF KEY IN THE DICTIONARY: ',
nkey 149 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
150 IF(lng.EQ.lng_fr)
THEN 151 WRITE(nfic,
'(A)')
'\chapter{Liste detaillée des mots clefs}' 153 WRITE(nfic,
'(A)')
'\chapter{Detail list of keywords}' 155 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
156 WRITE(nfic,
'(A)')
' ' 160 ALLOCATE(to_sort1(
nkey),stat=ierr)
161 CALL check_allocate(ierr,
'TO_SORT1')
162 ALLOCATE(to_sort2(
nkey),stat=ierr)
163 CALL check_allocate(ierr,
'TO_SORT2')
164 ALLOCATE(ordered_key1(
nkey),stat=ierr)
165 CALL check_allocate(ierr,
'ORDERED_KEY1')
166 ALLOCATE(ordered_key2(
nkey),stat=ierr)
167 CALL check_allocate(ierr,
'ORDERED_KEY2')
168 ALLOCATE(ordered_rub(
nkey),stat=ierr)
169 CALL check_allocate(ierr,
'ORDERED_RUB')
172 to_sort1(ikey) = repeat(
' ',path_len)
173 to_sort2(ikey) = repeat(
' ',path_len)
174 to_sort1(ikey)(1:72) =
mydico(ikey)%KNOM(lng)
175 to_sort2(ikey)(1:72) =
mydico(ikey)%KNOM(3-lng)
184 ikey = ordered_key1(i)
186 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
187 WRITE(nfic,
'(3A)')
"\section{",trim(
mydico(ikey)%KNOM(lng)),
"}" 188 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
189 WRITE(nfic,
'(A)')
" " 191 WRITE(nfic,
'(A)')
"\begin{tabular}{ll}" 193 SELECT CASE(
mydico(ikey)%KTYPE)
195 IF(lng.EQ.lng_fr)
THEN 196 WRITE(nfic,
'(A)')
"Type : & Entier\\" 198 WRITE(nfic,
'(A)')
"Type : & Integer\\" 201 IF(lng.EQ.lng_fr)
THEN 202 WRITE(nfic,
'(A)')
"Type : & Réel\\" 204 WRITE(nfic,
'(A)')
"Type : & Real\\" 207 IF(lng.EQ.lng_fr)
THEN 208 WRITE(nfic,
'(A)')
"Type : & Logique\\" 210 WRITE(nfic,
'(A)')
"Type : & Logical\\" 213 IF(lng.EQ.lng_fr)
THEN 214 WRITE(nfic,
'(A)')
"Type : & Caractère\\" 216 WRITE(nfic,
'(A)')
"Type : & String\\" 220 IF(lng.EQ.lng_fr)
THEN 221 WRITE(nfic,
'(A,I2,A)')
"Taille : & ",
mydico(ikey)%TAILLE,
"\\" 223 WRITE(nfic,
'(A,I2,A)')
224 &
"Dimension : & ",
mydico(ikey)%TAILLE,
"\\" 227 WRITE(nfic,
'(A)')
"Mnemo & ",trim(
mydico(ikey)%MNEMO),
"\\" 231 IF(lng.EQ.lng_fr)
THEN 232 WRITE(nfic,
'(3A)')
"Mot clef anglais : & ",
233 & trim(
mydico(ikey)%KNOM(2)),
"\\" 235 WRITE(nfic,
'(3A)')
"French keyword : & \telkey{",
236 & trim(
mydico(ikey)%KNOM(1)),
"}\\" 238 WRITE(nfic,
'(a)')
"\end{tabular}" 239 WRITE(nfic,
'(A)')
"\\" 241 IF(
mydico(ikey)%AIDE(lng)(1:3).EQ.
' ')
THEN 242 WRITE(nfic,
'(A)')
'TODO: WRITE HELP FOR THAT KEYWORD' 244 WRITE(nfic,
'(A)') trim(
mydico(ikey)%AIDE(lng))
246 WRITE(nfic,
'(A)')
"%" 253 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
254 IF(lng.EQ.lng_fr)
THEN 255 WRITE(nfic,
'(A)')
'\chapter{Liste des mots clefs par rubrique}' 258 &
'\chapter{List of keywords classified according to type}' 260 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
261 WRITE(nfic,
'(A)')
' ' 265 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
266 IF(lng.EQ.lng_fr)
THEN 267 WRITE(nfic,
'(A)')
'\chapter{Glossaire}' 269 WRITE(nfic,
'(A)')
'\chapter{Glossary}' 271 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
272 WRITE(nfic,
'(A)')
' ' 276 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
277 IF(lng.EQ.lng_fr)
THEN 278 WRITE(nfic,
'(A)')
'\section{Glossaire francais/anglais}' 280 WRITE(nfic,
'(A)')
'\section{English/French glossary}' 282 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
283 WRITE(nfic,
'(A)')
' ' 285 WRITE(nfic,
'(A)')
'\begin{longtable}'//
286 &
'{|p{0.5\linewidth}|p{0.5\linewidth}|}' 287 WRITE(nfic,
'(A)')
'\hline' 289 ikey = ordered_key1(i)
290 WRITE(nfic,
'(5A)')
"\telkey{",trim(
mydico(ikey)%KNOM(lng)),
291 &
"} & \telkey{",trim(
mydico(ikey)%KNOM(3-lng)),
293 WRITE(nfic,
'(A)')
'\hline' 295 WRITE(nfic,
'(A)')
'\end{longtable}' 296 WRITE(nfic,
'(A)')
'%' 300 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
301 IF(lng.EQ.lng_fr)
THEN 302 WRITE(nfic,
'(A)')
'\section{Glossaire anglais/francais}' 304 WRITE(nfic,
'(A)')
'\section{French/English glossary}' 306 WRITE(nfic,
'(A,A)')
'%',repeat(
'-',80)
307 WRITE(nfic,
'(A)')
' ' 309 WRITE(nfic,
'(A)')
'\begin{longtable}'//
310 &
'{|p{0.5\linewidth}|p{0.5\linewidth}|}' 311 WRITE(nfic,
'(A)')
'\hline' 313 ikey = ordered_key2(i)
314 WRITE(nfic,
'(5A)')
"\telkey{",trim(
mydico(ikey)%KNOM(3-lng)),
315 &
"} & \telkey{",trim(
mydico(ikey)%KNOM(lng)),
317 WRITE(nfic,
'(A)')
'\hline' 319 WRITE(nfic,
'(A)')
'\end{longtable}'
subroutine write_rubrique2latex(NFIC, LNG, ORDERED_KEY1)
subroutine write2latex(FILENAME, LNG)
subroutine write_default(NFIC, IKEY, LNG)
logical, dimension(:,:,:), allocatable rub2_dep
integer, dimension(2, 3) nrub
logical function has_rubrique(IKEY, IRUB, LEVEL, LNG)
character(len=string_len), dimension(2, rmax, 3) rubrique
logical, dimension(:,:), allocatable rub1_dep
type(keyword), dimension(nmax *4) mydico
subroutine shell_string(N, A, B)