Anonymous
Quarto Revealjs: автор не центрирует титульный слайд, несмотря на правила CSS
Сообщение
Anonymous » 12 дек 2025, 13:48
Я создаю презентацию Quarto Revealjs и не могу расположить информацию об авторе по центру титульного слайда, несмотря на то, что в моем CSS есть text-align: center;. Заголовок и подзаголовок расположены по центру правильно, но автор остается по левому краю.
Минимальный воспроизводимый пример
Файл QMD ( ):[/b]
Код: Выделить всё
---
title: "Data Visualization"
subtitle: "for Genomics and Biological Sciences"
author: "[url=https://github.com/loukesio]Dr. Loukas Theodosiou[/url] // December 15th 2025"
title-slide-attributes:
data-background-color: "#E8F5F1"
format:
revealjs:
theme: slides.scss
footer: '**GraphAI** // Consultation in Genomics Data Visualization'
transition: fade
progress: true
multiplex: false
preview-links: true
scrollable: false
hide-inactive-cursor: true
highlight-style: printing
pause: true
embed-resources: false
editor: source
---
# Why do we need data visualisations?
Content here...
Файл SCSS ( ):[/b]
Код: Выделить всё
/*-- scss:defaults --*/
@import url('https://fonts.googleapis.com/css2?family=Asap:ital,wdth,wght@0,87.5,400;0,87.5,500;0,87.5,600;0,87.5,700;0,87.5,800;0,87.5,900;0,100,400;0,100,500;0,100,600;0,100,700;0,100,800;0,100,900;1,87.5,400;1,87.5,500;1,87.5,600;1,87.5,700;1,87.5,800;1,87.5,900;1,100,400;1,100,500;1,100,600;1,100,700;1,100,800;1,100,900&family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,500;0,7..72,600;0,7..72,700;0,7..72,800;0,7..72,900;1,7..72,400;1,7..72,500;1,7..72,600;1,7..72,700;1,7..72,800;1,7..72,900&family=Spline+Sans+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Spline+Sans:wght@400;500;600;700&display=swap');
$font-family-sans-serif: 'Asap', 'Asap Condensed', 'Spline Sans', 'Tahoma', 'Arial', sans-serif;
$font-family-serif: 'Literata', 'Bodoni MT', 'Bodoni 72', 'Georgia', 'Times', serif;
/*-- scss:rules --*/
/* Title - CENTERS CORRECTLY */
h1.title {
font-family: 'Literata', 'Bodoni MT', 'Bodoni 72', 'Georgia', 'Times', serif;
font-size: 1.7em;
font-style: italic;
font-weight: 800;
color: #28A87D;
line-height: 1.07;
text-align: center;
margin-bottom: .4em;
}
/* Subtitle - CENTERS CORRECTLY */
p.subtitle {
color: #606060;
font-weight: 600;
font-style: italic;
line-height: .97;
text-align: center;
}
/* Author - DOES NOT CENTER */
.quarto-title-author {
font-size: .8em;
font-weight: 600;
color: #606060;
font-style: italic;
margin-top: 1.5em;
text-align: center; /*
Подробнее здесь: [url]https://stackoverflow.com/questions/79844799/quarto-revealjs-author-not-centering-on-title-slide-despite-css-rules[/url]
1765536490
Anonymous
Я создаю презентацию Quarto Revealjs и не могу расположить информацию об авторе по центру титульного слайда, несмотря на то, что в моем CSS есть text-align: center;. Заголовок и подзаголовок расположены по центру правильно, но автор остается по левому краю. Минимальный воспроизводимый пример [b]Файл QMD ([code]presentation.qmd[/code]):[/b] [code]--- title: "Data Visualization" subtitle: "for Genomics and Biological Sciences" author: "[url=https://github.com/loukesio]Dr. Loukas Theodosiou[/url] // December 15th 2025" title-slide-attributes: data-background-color: "#E8F5F1" format: revealjs: theme: slides.scss footer: '**GraphAI** // Consultation in Genomics Data Visualization' transition: fade progress: true multiplex: false preview-links: true scrollable: false hide-inactive-cursor: true highlight-style: printing pause: true embed-resources: false editor: source --- # Why do we need data visualisations? Content here... [/code] [b]Файл SCSS ([code]slides.scss[/code]):[/b] [code]/*-- scss:defaults --*/ @import url('https://fonts.googleapis.com/css2?family=Asap:ital,wdth,wght@0,87.5,400;0,87.5,500;0,87.5,600;0,87.5,700;0,87.5,800;0,87.5,900;0,100,400;0,100,500;0,100,600;0,100,700;0,100,800;0,100,900;1,87.5,400;1,87.5,500;1,87.5,600;1,87.5,700;1,87.5,800;1,87.5,900;1,100,400;1,100,500;1,100,600;1,100,700;1,100,800;1,100,900&family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,500;0,7..72,600;0,7..72,700;0,7..72,800;0,7..72,900;1,7..72,400;1,7..72,500;1,7..72,600;1,7..72,700;1,7..72,800;1,7..72,900&family=Spline+Sans+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Spline+Sans:wght@400;500;600;700&display=swap'); $font-family-sans-serif: 'Asap', 'Asap Condensed', 'Spline Sans', 'Tahoma', 'Arial', sans-serif; $font-family-serif: 'Literata', 'Bodoni MT', 'Bodoni 72', 'Georgia', 'Times', serif; /*-- scss:rules --*/ /* Title - CENTERS CORRECTLY */ h1.title { font-family: 'Literata', 'Bodoni MT', 'Bodoni 72', 'Georgia', 'Times', serif; font-size: 1.7em; font-style: italic; font-weight: 800; color: #28A87D; line-height: 1.07; text-align: center; margin-bottom: .4em; } /* Subtitle - CENTERS CORRECTLY */ p.subtitle { color: #606060; font-weight: 600; font-style: italic; line-height: .97; text-align: center; } /* Author - DOES NOT CENTER */ .quarto-title-author { font-size: .8em; font-weight: 600; color: #606060; font-style: italic; margin-top: 1.5em; text-align: center; /* Подробнее здесь: [url]https://stackoverflow.com/questions/79844799/quarto-revealjs-author-not-centering-on-title-slide-despite-css-rules[/url]