Selaa lähdekoodia

petites modifs

Thierry Dumont 1 kuukausi sitten
vanhempi
sitoutus
b5238c84f0
4 muutettua tiedostoa jossa 17 lisäystä ja 9 poistoa
  1. 1 1
      extr.py
  2. 2 2
      genauteur.py
  3. 6 4
      tout.py
  4. 8 2
      tpl.tex

+ 1 - 1
extr.py

@@ -109,7 +109,7 @@ le_titre= f"\\titre{{{titre_elements}}}\n"
 
 
 #--------------------------------------------------------------------
-template="../../../tpl.tex" # le template
+template="../tpl.tex" # le template
 #---------------------------------------------------------------------
 exten=fich.split(".")[-1]
 #

+ 2 - 2
genauteur.py

@@ -15,13 +15,13 @@ for x in L:
     d0=x.split('/')[0]
     
     if not d0 in excludedirs and d0[0]!="#":
-        d= f"../Sources/Courante/{d0}/data.yml"
+        d= f"../{d0}/data.yml"
         with open(d) as f:
             lt=yaml.safe_load(f)
             auteur= lt["auteur"]
             titre= lt["titre"]
             D.setdefault(auteur,[]).append(titre)
-            print(auteur,titre)
+
 # On a un dictionnaire D: auteur -> liste des textes.
 # fabriquer le LaTeX.
 with open("refauteur.tex","w") as f:

+ 6 - 4
tout.py

@@ -25,7 +25,7 @@ with open("all_texts") as f:
 forbiblatex={}
 for f in lf:
     forbiblatex[f]=",".join([x for x
-                             in glob.glob(f"../Sources/Courante/{f[0].split("/")[0]}/*.bib")])
+                             in glob.glob(f"../{f[0].split("/")[0]}/*.bib")])
 allbibfiles=[forbiblatex[k] for k in forbiblatex.keys()  if forbiblatex[k]!=""]
 
 print("\nFichiers bib",allbibfiles,"\n")
@@ -52,19 +52,21 @@ for l in Ltmpl:
             # 
             for x in allbibfiles:
                 Lall.append(f"\\addbibresource{{{x}}}\n")
-            T=[f'{{../Sources/Courante/{x[0].split("/")[0]}}}' for x in lf]
+            T=[f'{{../{x[0].split("/")[0]}}}' for x in lf]
             T=f"\\graphicspath{{ {''.join(T)} }}\n"
             Lall.append(T)
         Lall.append(l)
 
+
 #
 # parcourir les fichiers à assembler:
 #
 for l in lf:
     do_eject= len(l) == 1 or (len(l)>1 and not "noeject" in l[1])
     do_vfill= len(l) == 1 or (len(l)>1 and not "novfill" in l[1])
-    lok="../Sources/Courante/"+l[0].replace("\n","")
+    lok="../"+l[0].replace("\n","")
     print("On traite :",lok)
+    
     with open(lok) as g:
         LL=g.readlines()
     # insérer ce qui entre %@@debut et "%@@fin":
@@ -82,7 +84,7 @@ for l in lf:
             
     print("--> nl:",len(Z))
     # graphiques: modifier les chemins:
-    ajout="{../Sources/Courante/"+l[0].split("/")[0]+"/"
+    ajout="{../"+l[0].split("/")[0]+"/"
     #ajout=""
     
     Lall+=[addpath(x,ajout) for x in Z if not "newcounter" in x]

+ 8 - 2
tpl.tex

@@ -1,4 +1,4 @@
-\documentclass[10pt]{book}
+\documentclass[11pt]{book}
 \usepackage{geometry}
 \geometry{
 total={130mm,212mm},
@@ -76,7 +76,7 @@ total={130mm,212mm},
   {\raggedright{\bfseries\large \capitalisewords{{#2}} de #3 } \textsl{#4}}%
   \addcontentsline{toc}{section}{{\bfseries #1.}
     \capitalisewords{#2}~%
-     ~de #3, #4.\\%
+     ~de #3 #4.\\%
    \textsl{#5}}%
   \vspace*{24pt}%
   \begin{center}{\Large\bfseries #5}\end{center}%
@@ -116,6 +116,12 @@ total={130mm,212mm},
 {\end{list}}
 \SetBlockEnvironment{specialquote}
 %
+
+\setlength{\headheight}{14pt}
+\addtolength{\topmargin}{-0.06094pt}
+
+
+
 \begin{document}%\layout
 %
 \setcounter{footnote}{0}