diff --git a/thesis_output/export_pdf.py b/thesis_output/export_pdf.py new file mode 100755 index 0000000..2914af2 --- /dev/null +++ b/thesis_output/export_pdf.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Export presentation.html as PDF using Chrome headless and Reveal.js print mode.""" + +import subprocess +import sys +from pathlib import Path + +CHROME_PATHS = [ + "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", + "/Applications/Chromium.app/Contents/MacOS/Chromium", +] + + +def find_chrome(): + for p in CHROME_PATHS: + if Path(p).exists(): + return p + return None + + +def main(): + script_dir = Path(__file__).resolve().parent + html_path = script_dir / "presentation.html" + output_path = script_dir / "presentation.pdf" + + if not html_path.exists(): + print(f"Error: {html_path} not found") + sys.exit(1) + + chrome = find_chrome() + if not chrome: + print("Error: Chrome not found. Searched:") + for p in CHROME_PATHS: + print(f" {p}") + sys.exit(1) + + # Use ?print-pdf to trigger Reveal.js print layout + file_url = f"file://{html_path}?print-pdf" + + print(f"Using: {chrome}") + print(f"Opening: {file_url}") + print("Generating PDF...") + + result = subprocess.run( + [ + chrome, + "--headless=new", + "--disable-gpu", + "--no-sandbox", + "--disable-extensions", + f"--print-to-pdf={output_path}", + "--print-to-pdf-no-header", + "--no-pdf-header-footer", + "--run-all-compositor-stages-before-draw", + "--virtual-time-budget=10000", + file_url, + ], + capture_output=True, + text=True, + timeout=30, + ) + + if output_path.exists(): + size_kb = output_path.stat().st_size / 1024 + print(f"PDF saved to: {output_path} ({size_kb:.0f} KB)") + else: + print("Error: PDF was not generated") + if result.stderr: + print(result.stderr) + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/thesis_output/presentation.html b/thesis_output/presentation.html index a3797cb..6d0ffef 100644 --- a/thesis_output/presentation.html +++ b/thesis_output/presentation.html @@ -11,13 +11,17 @@ :root { --unir-blue: #0098CD; --unir-blue-dark: #007AA3; + --unir-blue-deeper: #005F73; --unir-light: #E6F4F9; - --unir-text: #404040; + --unir-text: #2D3B45; + --unir-text-light: #555; --unir-gray: #E7E6E6; --unir-red: #E8654A; - --unir-orange: #F0A030; + --unir-orange: #E8832A; + --unir-green: #2EAD4B; } + /* ===== BASE ===== */ .reveal { font-family: 'Calibri', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; font-size: 28px; @@ -25,103 +29,258 @@ } .reveal h1, .reveal h2, .reveal h3 { - font-family: 'Calibri Light', 'Calibri', 'Segoe UI', Arial, sans-serif; + font-family: 'Calibri', 'Segoe UI', Arial, sans-serif; color: var(--unir-blue); text-transform: none; - letter-spacing: -0.02em; - font-weight: 600; + letter-spacing: -0.01em; + font-weight: 700; } .reveal h1 { font-size: 1.8em; } - .reveal h2 { font-size: 1.4em; margin-bottom: 0.6em; } - .reveal h3 { font-size: 1.1em; } + .reveal h2 { + font-size: 1.3em; + margin-bottom: 0.5em; + border-left: 5px solid var(--unir-blue); + padding-left: 15px; + line-height: 1.3; + } + .reveal h3 { font-size: 1em; color: var(--unir-text); } .reveal .slides section { text-align: left; - padding: 20px 40px; + padding: 0; + } + /* Content slides with footer use flex column */ + .reveal .slides section:not(.title-slide):not(.index-slide):not(.thanks-slide) { + display: flex !important; + flex-direction: column !important; + height: 100% !important; + } + .slide-body { + flex: 1 1 0; + min-height: 0; + overflow: hidden; + padding: 20px 50px 5px 50px; + } + /* Scale images/charts to fit available space */ + .slide-body img { + max-height: 100%; + object-fit: contain; } - /* Corner logo on all slides except title */ - .reveal .slides section:not(.title-slide)::after { - content: ''; - position: absolute; - top: 15px; - right: 20px; - width: 110px; - height: 30px; - background: url('../instructions/plantilla_individual_files/image001.png') no-repeat center; - background-size: contain; - opacity: 0.8; + /* ===== SLIDE FOOTER — white bar at bottom ===== */ + .slide-footer { + flex-shrink: 0; + height: 80px; + background: white; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 50px; + width: 100%; + box-sizing: border-box; + } + .slide-footer .footer-logo { + height: 42px; + } + .slide-footer .footer-page { + font-size: 18px; + color: #b0b0b0; + border-left: 4px solid var(--unir-blue); + padding-left: 12px; + line-height: 1.2; + text-align: right; + } + .slide-footer .footer-page .pag-label { + font-weight: 400; + } + .slide-footer .footer-page .pag-number { + font-weight: 700; + font-size: 1.4em; } - /* Bottom accent line */ - .reveal .slides section:not(.title-slide)::before { - content: ''; - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 4px; - background: linear-gradient(90deg, var(--unir-blue), var(--unir-light)); - } - - /* Title slide */ + /* ===== TITLE SLIDE ===== */ .title-slide { + background: var(--unir-blue) !important; text-align: center !important; + padding: 0 !important; + display: flex !important; + flex-direction: column !important; + height: 100% !important; + } + .title-slide .title-content { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 40px 80px 0; + position: relative; } .title-slide h1 { - font-size: 1.5em !important; - line-height: 1.3; - margin-top: 0.2em; - } - .title-slide .subtitle { - color: var(--unir-blue); - font-size: 0.75em; - font-weight: 600; - margin-bottom: 0.5em; - text-transform: uppercase; - letter-spacing: 0.1em; + color: white !important; + font-size: 2.2em !important; + font-weight: 700; + line-height: 1.2; + margin: 0 auto; + max-width: 80%; + border-left: none; + padding-left: 0; } .title-slide .meta { - font-size: 0.65em; - color: #666; - line-height: 1.8; + color: rgba(255,255,255,0.85); + font-size: 0.7em; + line-height: 1.6; + margin-top: 20px; } .title-slide .meta strong { - color: var(--unir-text); + color: white; } - .title-slide .logo-large { - width: 220px; - margin-bottom: 10px; + .title-slide .title-footer { + height: 80px; + background: white; + display: flex; + align-items: center; + padding: 0 50px; + width: 100%; + flex-shrink: 0; } - .title-slide .divider { - width: 120px; - height: 3px; - background: var(--unir-blue); - margin: 15px auto; + .title-slide .title-footer img { + height: 42px; } - /* Thank you slide */ + /* Corner brackets */ + .corner-tl, + .corner-br { + position: absolute; + width: 60px; + height: 60px; + } + .title-slide .corner-tl { + top: 15%; + left: 22%; + border-top: 4px solid rgba(255,255,255,0.5); + border-left: 4px solid rgba(255,255,255,0.5); + } + .title-slide .corner-br { + bottom: 22%; + right: 22%; + border-bottom: 4px solid rgba(255,255,255,0.5); + border-right: 4px solid rgba(255,255,255,0.5); + } + + /* ===== INDEX / AGENDA SLIDE ===== */ + .index-slide { + padding: 0 !important; + display: grid !important; + grid-template-columns: 42% 58%; + height: 100% !important; + } + .index-slide .index-left { + background: var(--unir-blue); + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 40px; + } + .index-slide .index-left h2 { + color: white !important; + font-size: 3em !important; + font-weight: 700; + border-left: none; + padding-left: 0; + text-align: center; + margin: 0; + letter-spacing: 0.02em; + } + .index-slide .index-right { + display: flex; + flex-direction: column; + justify-content: center; + padding: 40px 50px; + } + .index-item { + display: flex; + align-items: baseline; + gap: 12px; + margin: 16px 0; + font-size: 0.85em; + } + .index-item .index-num { + font-size: 1.1em; + font-weight: 700; + color: #bbb; + min-width: 30px; + } + .index-item .index-text { + font-weight: 700; + color: var(--unir-text); + font-size: 1.05em; + } + + /* ===== THANKS SLIDE ===== */ .thanks-slide { text-align: center !important; + padding: 0 !important; + background: white !important; + display: flex !important; + flex-direction: column !important; + height: 100% !important; + } + .thanks-slide .thanks-content { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + position: relative; } .thanks-slide h1 { - font-size: 2.5em !important; - margin-bottom: 0.3em; + color: var(--unir-blue) !important; + font-size: 3em !important; + font-weight: 700; + line-height: 1.1; + text-transform: lowercase; + border-left: none; + padding-left: 0; } - .thanks-slide .questions { - font-size: 1.2em; - color: #666; - margin-bottom: 1em; + .thanks-slide .corner-tl { + top: 30%; + left: 28%; + border-top: 3px solid var(--unir-blue); + border-left: 3px solid var(--unir-blue); + opacity: 0.4; + } + .thanks-slide .corner-br { + bottom: 30%; + right: 28%; + border-bottom: 3px solid var(--unir-blue); + border-right: 3px solid var(--unir-blue); + opacity: 0.4; + } + .thanks-slide .title-footer { + height: 80px; + background: white; + display: flex; + align-items: center; + padding: 0 50px; + width: 100%; + flex-shrink: 0; + } + .thanks-slide .title-footer img { + height: 42px; } - /* Two column layout */ + /* ===== TWO COLUMN LAYOUTS ===== */ .two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; + overflow: hidden; } + .two-columns > * { min-width: 0; } .two-columns-60-40 { display: grid; grid-template-columns: 3fr 2fr; @@ -141,23 +300,22 @@ align-items: start; } - /* Highlight box */ + /* ===== HIGHLIGHT BOX ===== */ .highlight-box { background: var(--unir-light); border-left: 5px solid var(--unir-blue); padding: 15px 20px; - border-radius: 0 8px 8px 0; + border-radius: 0; margin: 15px 0; font-size: 0.85em; } .highlight-box.center-box { border-left: none; border-top: 3px solid var(--unir-blue); - border-radius: 0 0 8px 8px; text-align: center; } - /* Metric cards */ + /* ===== METRIC CARDS ===== */ .metric-cards { display: flex; gap: 15px; @@ -166,16 +324,12 @@ } .metric-card { background: white; - border: 2px solid var(--unir-light); - border-radius: 12px; + border: 2px solid var(--unir-gray); + border-radius: 4px; padding: 15px 20px; text-align: center; min-width: 130px; - box-shadow: 0 2px 8px rgba(0,0,0,0.06); - transition: transform 0.2s; - } - .metric-card:hover { - transform: translateY(-2px); + box-shadow: 0 2px 6px rgba(0,0,0,0.04); } .metric-card .number { font-size: 1.6em; @@ -183,7 +337,7 @@ color: var(--unir-blue); line-height: 1.2; } - .metric-card .number.success { color: #2EAD4B; } + .metric-card .number.success { color: var(--unir-green); } .metric-card .number.warning { color: var(--unir-orange); } .metric-card .number.danger { color: var(--unir-red); } .metric-card .label { @@ -192,7 +346,7 @@ margin-top: 4px; } - /* Data table */ + /* ===== DATA TABLE ===== */ .data-table { width: 100%; border-collapse: collapse; @@ -206,43 +360,30 @@ text-align: left; font-weight: 600; } - .data-table thead th:first-child { - border-radius: 8px 0 0 0; - } - .data-table thead th:last-child { - border-radius: 0 8px 0 0; - } .data-table tbody td { padding: 8px 14px; border-bottom: 1px solid var(--unir-gray); } .data-table tbody tr:nth-child(even) { - background: #FAFCFE; + background: #F5F9FC; } .data-table tbody tr.highlight { background: var(--unir-light); font-weight: 600; } - .data-table tbody tr:last-child td:first-child { - border-radius: 0 0 0 8px; - } - .data-table tbody tr:last-child td:last-child { - border-radius: 0 0 8px 0; - } - /* Engine cards */ + /* ===== ENGINE CARDS ===== */ .engine-card { background: white; border: 2px solid var(--unir-gray); - border-radius: 12px; + border-radius: 4px; padding: 18px; text-align: center; - transition: all 0.3s; } .engine-card.selected { border-color: var(--unir-blue); background: var(--unir-light); - box-shadow: 0 4px 16px rgba(0,152,205,0.2); + box-shadow: 0 2px 12px rgba(0,152,205,0.15); } .engine-card h3 { margin: 0 0 5px 0; @@ -257,14 +398,12 @@ font-size: 0.6em; color: var(--unir-text); background: var(--unir-light); - border-radius: 6px; + border-radius: 4px; padding: 4px 8px; display: inline-block; margin-bottom: 8px; } - .engine-card.selected .arch { - background: white; - } + .engine-card.selected .arch { background: white; } .engine-card ul { text-align: left; font-size: 0.6em; @@ -272,7 +411,7 @@ padding-left: 16px; } - /* Agenda items */ + /* ===== AGENDA ITEMS (for methodology etc) ===== */ .agenda-item { display: flex; align-items: center; @@ -294,12 +433,12 @@ flex-shrink: 0; } - /* Tags */ + /* ===== TAGS ===== */ .tag { display: inline-block; background: var(--unir-light); color: var(--unir-blue-dark); - border-radius: 20px; + border-radius: 4px; padding: 3px 12px; font-size: 0.6em; font-weight: 600; @@ -309,33 +448,32 @@ .tag.cont { background: #E8F5E9; color: #2E7D32; } .tag.fixed { background: var(--unir-gray); color: #888; } - /* Chart containers */ + /* ===== CHART CONTAINERS ===== */ .chart-container { position: relative; width: 100%; - max-height: 420px; + height: 400px; + max-width: 100%; + overflow: hidden; } .chart-container canvas { - max-height: 420px; + width: 100% !important; + height: 100% !important; } - /* Bullet lists */ + /* ===== LISTS ===== */ .reveal ul, .reveal ol { font-size: 0.8em; line-height: 1.6; } - .reveal li { - margin-bottom: 6px; - } - - /* Compact list */ + .reveal li { margin-bottom: 6px; } .compact-list { font-size: 0.7em; } .compact-list li { margin-bottom: 3px; } - /* Objective check */ + /* ===== OBJECTIVE LIST ===== */ .obj-list { - list-style: none; - padding: 0; + list-style: none !important; + padding: 0 !important; font-size: 0.72em; } .obj-list li { @@ -357,7 +495,7 @@ box-shadow: inset 0 0 0 3px white; } - /* Conclusion items */ + /* ===== CONTRIBUTION / LIMITATION ITEMS ===== */ .contribution-item { display: flex; align-items: start; @@ -370,27 +508,29 @@ height: 28px; background: var(--unir-blue); color: white; - border-radius: 6px; + border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; + font-weight: 700; } .limitation-icon { width: 28px; height: 28px; background: var(--unir-orange); color: white; - border-radius: 6px; + border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; + font-weight: 700; } - /* Figure caption */ + /* ===== FIGURE CAPTION ===== */ .fig-caption { text-align: center; font-size: 0.55em; @@ -399,7 +539,7 @@ margin-top: 5px; } - /* Comparison table for fine-tuning vs HPO */ + /* ===== COMPARISON TABLE ===== */ .compare-row { display: grid; grid-template-columns: 140px 1fr 1fr; @@ -424,40 +564,32 @@ background: var(--unir-light); } - /* Slide number */ - .reveal .slide-number { - color: var(--unir-blue); - font-size: 14px; - font-family: 'Calibri', sans-serif; - } + /* ===== SLIDE NUMBER ===== */ + .reveal .slide-number { display: none; } + .reveal .progress span { background: var(--unir-blue); } - /* Progress bar */ - .reveal .progress span { - background: var(--unir-blue); - } - - /* Improvements arrow */ + /* ===== MISC ===== */ .improvement { - color: #2EAD4B; + color: var(--unir-green); font-weight: 700; font-size: 0.8em; } - /* Code/param names */ code, .param { font-family: 'Consolas', 'Courier New', monospace; background: var(--unir-light); padding: 2px 6px; - border-radius: 4px; + border-radius: 3px; font-size: 0.85em; } - /* Section divider */ .section-divider { text-align: center !important; } .section-divider h2 { font-size: 1.8em !important; + border-left: none; + padding-left: 0; } .section-divider .section-number { font-size: 3em; @@ -465,6 +597,69 @@ opacity: 0.2; font-weight: 700; } + + /* ===== PRINT PDF ===== */ + @page { + size: 1280px 720px; + margin: 0; + } + @media print { + * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } + .reveal .slides section { + position: relative !important; + page-break-after: always; + page-break-inside: avoid; + width: 1280px !important; + min-height: 720px !important; + height: 720px !important; + max-height: 720px !important; + overflow: hidden !important; + box-sizing: border-box !important; + } + .slide-body { + overflow: hidden !important; + max-height: 620px !important; + } + .slide-body .two-columns, + .slide-body .two-columns-60-40, + .slide-body .two-columns-40-60, + .slide-body .three-columns { + overflow: hidden !important; + } + .slide-footer { + position: absolute !important; + bottom: 0 !important; + left: 0 !important; + right: 0 !important; + height: 80px !important; + display: flex !important; + background: white !important; + } + .title-slide .title-footer, + .thanks-slide .title-footer { + position: absolute !important; + bottom: 0 !important; + left: 0 !important; + right: 0 !important; + height: 80px !important; + display: flex !important; + background: white !important; + } + .thanks-slide .thanks-content, + .title-slide .title-content { + position: absolute !important; + top: 0 !important; + left: 0 !important; + right: 0 !important; + bottom: 80px !important; + display: flex !important; + flex-direction: column !important; + justify-content: center !important; + align-items: center !important; + } + /* Show fragments in print */ + .fragment { opacity: 1 !important; visibility: visible !important; } + }
@@ -473,30 +668,39 @@