tfrere HF Staff commited on
Commit
d288030
·
1 Parent(s): 3451951

update authorship and pdf download

Browse files
app/scripts/latex-importer/metadata-extractor.mjs CHANGED
@@ -32,8 +32,11 @@ export function extractLatexMetadata(latexContent) {
32
  if (fullAuthorInfo.includes('\\ensps')) {
33
  affiliations.push(1); // École Normale Supérieure
34
  }
 
 
 
35
  if (fullAuthorInfo.includes('\\hf')) {
36
- affiliations.push(2); // Hugging Face
37
  }
38
 
39
  // Clean author name by removing macros
@@ -58,15 +61,53 @@ export function extractLatexMetadata(latexContent) {
58
  metadata.authors = authors;
59
  }
60
 
61
- // Extract affiliations - create the two distinct affiliations
62
- metadata.affiliations = [
63
- {
64
- name: "École Normale Supérieure Paris-Saclay"
65
- },
66
- {
67
- name: "Hugging Face"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
- ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  // Extract date if available (common LaTeX patterns)
72
  const datePatterns = [
 
32
  if (fullAuthorInfo.includes('\\ensps')) {
33
  affiliations.push(1); // École Normale Supérieure
34
  }
35
+ if (fullAuthorInfo.includes('\\oxford')) {
36
+ affiliations.push(1); // University of Oxford (index 1 dans le frontmatter)
37
+ }
38
  if (fullAuthorInfo.includes('\\hf')) {
39
+ affiliations.push(2); // Hugging Face (index 2 dans le frontmatter)
40
  }
41
 
42
  // Clean author name by removing macros
 
61
  metadata.authors = authors;
62
  }
63
 
64
+ // Extract affiliations dynamically from \contribution command
65
+ const contributionMatch = latexContent.match(/\\contribution\[\]\{([^}]+)\}/);
66
+ if (contributionMatch) {
67
+ const contributionText = contributionMatch[1];
68
+
69
+ // Parse affiliations from contribution text
70
+ const affiliations = [];
71
+
72
+ // Split by common separators and clean up
73
+ const parts = contributionText
74
+ .split(/[,;]/)
75
+ .map(part => part.trim())
76
+ .filter(part => part.length > 0);
77
+
78
+ for (const part of parts) {
79
+ // Remove LaTeX commands and clean up
80
+ const cleanName = part
81
+ .replace(/\\[a-zA-Z]+/g, '') // Remove LaTeX commands like \oxford, \hf
82
+ .replace(/\s+/g, ' ') // Normalize whitespace
83
+ .trim();
84
+
85
+ if (cleanName && cleanName.length > 0) {
86
+ affiliations.push({
87
+ name: cleanName
88
+ });
89
+ }
90
  }
91
+
92
+ if (affiliations.length > 0) {
93
+ metadata.affiliations = affiliations;
94
+ }
95
+ }
96
+
97
+ // Fallback to hardcoded affiliations if no \contribution found
98
+ if (!metadata.affiliations || metadata.affiliations.length === 0) {
99
+ metadata.affiliations = [
100
+ {
101
+ name: "École Normale Supérieure Paris-Saclay"
102
+ },
103
+ {
104
+ name: "University of Oxford"
105
+ },
106
+ {
107
+ name: "Hugging Face"
108
+ }
109
+ ];
110
+ }
111
 
112
  // Extract date if available (common LaTeX patterns)
113
  const datePatterns = [
app/scripts/latex-importer/output/main.mdx CHANGED
@@ -2,7 +2,7 @@
2
  title: "Robot Learning: A Tutorial"
3
  authors:
4
  - name: "Francesco Capuano"
5
- affiliations: [2]
6
  - name: "Caroline Pascal"
7
  affiliations: [2]
8
  - name: "Adil Zouitine"
@@ -12,9 +12,9 @@ authors:
12
  - name: "Michel Aractingi"
13
  affiliations: [2]
14
  affiliations:
15
- - name: "École Normale Supérieure Paris-Saclay"
16
  - name: "Hugging Face"
17
- published: "Oct 14, 2025"
18
  tableOfContentsAutoCollapse: true
19
  ---
20
 
 
2
  title: "Robot Learning: A Tutorial"
3
  authors:
4
  - name: "Francesco Capuano"
5
+ affiliations: [1, 2]
6
  - name: "Caroline Pascal"
7
  affiliations: [2]
8
  - name: "Adil Zouitine"
 
12
  - name: "Michel Aractingi"
13
  affiliations: [2]
14
  affiliations:
15
+ - name: "University of Oxford"
16
  - name: "Hugging Face"
17
+ published: "Oct 15, 2025"
18
  tableOfContentsAutoCollapse: true
19
  ---
20
 
app/src/components/Hero.astro CHANGED
@@ -1,6 +1,7 @@
1
  ---
2
  import HtmlEmbed from "./HtmlEmbed.astro";
3
  import Image from "./Image.astro";
 
4
 
5
  interface Props {
6
  title: string; // may contain HTML (e.g., <br/>)
@@ -100,10 +101,14 @@ const pdfFilename = `${slugify(pdfBase)}.pdf`;
100
 
101
  <section class="hero">
102
  <h1 class="hero-title" set:html={title} />
103
- <div class="hero-banner">
104
  <HtmlEmbed src="banner.html" frameless />
 
 
 
 
105
  {description && <p class="hero-desc">{description}</p>}
106
- </div>
107
  </section>
108
 
109
  <header class="meta" aria-label="Article meta information">
@@ -209,9 +214,9 @@ const pdfFilename = `${slugify(pdfBase)}.pdf`;
209
  <p class="pdf-pro-only" style="display: none;">
210
  <a
211
  class="button"
212
- href={`/${pdfFilename}`}
213
- download={pdfFilename}
214
- aria-label={`Download PDF ${pdfFilename}`}
215
  >
216
  Download PDF
217
  </a>
@@ -366,6 +371,14 @@ const pdfFilename = `${slugify(pdfBase)}.pdf`;
366
  .hero-banner {
367
  max-width: 980px;
368
  margin: 0 auto;
 
 
 
 
 
 
 
 
369
  }
370
  .hero-desc {
371
  color: var(--muted-color);
 
1
  ---
2
  import HtmlEmbed from "./HtmlEmbed.astro";
3
  import Image from "./Image.astro";
4
+ import lerobotLogo from "../content/assets/image/figures/ch1/ch1-lerobot-figure1.png";
5
 
6
  interface Props {
7
  title: string; // may contain HTML (e.g., <br/>)
 
101
 
102
  <section class="hero">
103
  <h1 class="hero-title" set:html={title} />
104
+ <!-- <div class="hero-banner">
105
  <HtmlEmbed src="banner.html" frameless />
106
+ <Image
107
+ src={lerobotLogo}
108
+ alt="LeRobot Logo"
109
+ />
110
  {description && <p class="hero-desc">{description}</p>}
111
+ </div> -->
112
  </section>
113
 
114
  <header class="meta" aria-label="Article meta information">
 
214
  <p class="pdf-pro-only" style="display: none;">
215
  <a
216
  class="button"
217
+ href={`http://arxiv.org/pdf/2510.12403`}
218
+ target="_blank"
219
+ rel="noopener noreferrer"
220
  >
221
  Download PDF
222
  </a>
 
371
  .hero-banner {
372
  max-width: 980px;
373
  margin: 0 auto;
374
+ border: 1px solid var(--border-color);
375
+ border-radius: 8px;
376
+ margin-top: 8px;
377
+ margin-bottom: 8px;
378
+ overflow: hidden;
379
+ }
380
+ .hero-banner .ri-root {
381
+ border-radius: 8px;
382
  }
383
  .hero-desc {
384
  color: var(--muted-color);
app/src/content/article.mdx CHANGED
@@ -2,7 +2,7 @@
2
  title: "Robot Learning: A Tutorial"
3
  authors:
4
  - name: "Francesco Capuano"
5
- affiliations: [2]
6
  - name: "Caroline Pascal"
7
  affiliations: [2]
8
  - name: "Adil Zouitine"
@@ -12,9 +12,9 @@ authors:
12
  - name: "Michel Aractingi"
13
  affiliations: [2]
14
  affiliations:
15
- - name: "École Normale Supérieure Paris-Saclay"
16
  - name: "Hugging Face"
17
- published: "Oct 14, 2025"
18
  tableOfContentsAutoCollapse: true
19
  ---
20
 
 
2
  title: "Robot Learning: A Tutorial"
3
  authors:
4
  - name: "Francesco Capuano"
5
+ affiliations: [1, 2]
6
  - name: "Caroline Pascal"
7
  affiliations: [2]
8
  - name: "Adil Zouitine"
 
12
  - name: "Michel Aractingi"
13
  affiliations: [2]
14
  affiliations:
15
+ - name: "University of Oxford"
16
  - name: "Hugging Face"
17
+ published: "Oct 15, 2025"
18
  tableOfContentsAutoCollapse: true
19
  ---
20