├── .github ├── DISCUSSION_TEMPLATE │ ├── ideas.yml │ └── q-a.yml ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug.yml │ └── config.yml ├── dependabot.yml ├── template.png └── workflows │ └── release.yml ├── .gitignore ├── CITATION.cff ├── LICENSE ├── README.md ├── _extensions └── coeos │ ├── LICENSE │ ├── _about.qmd │ ├── _code.qmd │ ├── _extension.yml │ ├── coeos.html │ ├── coeos.scss │ ├── coeos.svg │ └── setup-ggplot2-coeos.R └── template.qmd /.github/DISCUSSION_TEMPLATE/ideas.yml: -------------------------------------------------------------------------------- 1 | title: "The (missing) feature you want to discuss" 2 | labels: 3 | - "Type: Enhancement :bulb:" 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | First, please check if your feature request has already been discussed. 9 | If it has, please consider adding a comment to the existing discussion instead of creating a new one. 10 | 11 | If you want to ask for help, please consider using the Q&A GitHub Discussions, as it is better suited for answering your question. 12 | 13 | Finally, try to describe the best you can what you want to achieve and why you think it is important. 14 | This will help us to understand your request and prioritise it. 15 | 16 | _Thank you for opening this feature request!_ 17 | - type: textarea 18 | attributes: 19 | label: Description 20 | description: Start your discussion! 21 | validations: 22 | required: true 23 | - type: markdown 24 | attributes: 25 | value: | 26 | _Thank you for opening this feature request!_ 27 | -------------------------------------------------------------------------------- /.github/DISCUSSION_TEMPLATE/q-a.yml: -------------------------------------------------------------------------------- 1 | title: "Your question in one sentence" 2 | body: 3 | - type: markdown 4 | attributes: 5 | value: | 6 | First, please check if your question has already been asked. 7 | If it has, please consider adding a comment to the existing discussion instead of creating a new one. 8 | 9 | Finally, try to describe the best you can what you want to achieve or what is your issue, especially by providing a complete self-contained reproducible example. 10 | This will help us to understand your question and answer it. 11 | 12 | `````md 13 | ````qmd 14 | --- 15 | title: "Reproducible Quarto Document" 16 | format: html 17 | engine: jupyter 18 | --- 19 | 20 | This is a reproducible Quarto document using `format: html`. 21 | It is written in Markdown and contains embedded Python code. 22 | When you run the code, it will produce a message. 23 | 24 | ```{python} 25 | print("Hello, world!") 26 | ``` 27 | 28 | ![An image]({{< placeholder 600 400 >}}){#fig-placeholder} 29 | 30 | {{< lipsum 1 >}} 31 | 32 | A reference to @fig-placeholder. 33 | 34 | The end. 35 | ```` 36 | ````` 37 | 38 | You can add some additional information that can help us to help you: 39 | 40 | - What Quarto version are you using? 41 | You can find the version of Quarto you used by running `quarto --version` in your terminal. 42 | - What version of the Quarto extension are you using? 43 | You can find the version of the Quarto extension you used by running `quarto list extensions` in your terminal. 44 | - What operating system are you using? 45 | Linux Ubuntu 20.04, macOS 11.2.3, Windows 10, _etc._ 46 | 47 | _Thank you for opening this discussion either to ask for help or to report a possible bug!_ 48 | - type: textarea 49 | attributes: 50 | label: Description 51 | description: Start your question/report! 52 | placeholder: | 53 | You can include Quarto document code which includes code blocks like this: 54 | 55 | `````md 56 | ````qmd 57 | --- 58 | title: "Reproducible Quarto Document" 59 | format: html 60 | engine: jupyter 61 | --- 62 | 63 | This is a reproducible Quarto document using `format: html`. 64 | It is written in Markdown and contains embedded Python code. 65 | When you run the code, it will produce a message. 66 | 67 | ```{python} 68 | print("Hello, world!") 69 | ``` 70 | 71 | ![An image]({{< placeholder 600 400 >}}){#fig-placeholder} 72 | 73 | {{< lipsum 1 >}} 74 | 75 | A reference to @fig-placeholder. 76 | 77 | The end. 78 | ```` 79 | ````` 80 | 81 | --- 82 | 83 | ### Additional information that can help us to help you 84 | 85 | - What Quarto version are you using? 86 | You can find the version of Quarto you used by running `quarto --version` in your terminal. 87 | - What version of the Quarto extension are you using? 88 | You can find the version of the Quarto extension you used by running `quarto list extensions` in your terminal. 89 | - What operating system are you using? 90 | Linux Ubuntu 20.04, macOS 11.2.3, Windows 10, _etc._ 91 | validations: 92 | required: true 93 | - type: markdown 94 | attributes: 95 | value: | 96 | _Thank you for opening this discussion either to ask for help or to report a possible bug!_ 97 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: mcanouil 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: Bug report 2 | description: Report an error or unexpected behaviour 3 | labels: 4 | - "Type: Bug :bug:" 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | Welcome! 11 | 12 | - type: checkboxes 13 | attributes: 14 | label: "I Have checked the following" 15 | options: 16 | - label: I have searched the issue tracker for similar issues 17 | required: true 18 | - label: I have the latest version of [Quarto CLI](https://github.com/quarto-dev/quarto-cli/releases/latest) 19 | required: true 20 | - label: I have the latest version of the Quarto extension 21 | required: true 22 | 23 | - type: textarea 24 | attributes: 25 | label: Bug description 26 | description: Description of the bug. 27 | placeholder: Please describe the bug here. 28 | 29 | - type: textarea 30 | attributes: 31 | label: Steps to reproduce 32 | description: | 33 | Tell us how to reproduce this bug. 34 | 35 | - type: textarea 36 | attributes: 37 | label: Actual behaviour 38 | description: Tell us what happens instead. 39 | 40 | - type: textarea 41 | attributes: 42 | label: Expected behaviour 43 | description: Tell us what should happen. 44 | 45 | - type: textarea 46 | attributes: 47 | label: Your environment 48 | description: | 49 | Please document the IDE (_e.g._ RStudio, Positron, VSCode, NVim), its version, and the operating system you're running (_e.g., MacOS Ventura 13.4, Windows 11, Linux Debian 11, _etc._). 50 | placeholder: | 51 | - IDE: RStudio 2023.03.1+446 | VSCode | Positron 52 | - OS: MacOS Ventura 13.4 | Windows | Ubuntu 53 | 54 | - type: markdown 55 | attributes: 56 | value: "_Thanks for submitting this bug report!_" 57 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Support 4 | url: https://github.com/mcanouil/quarto-revealjs-coeos/discussions 5 | about: Please ask and answer questions here. 6 | - name: Issue with Quarto CLI 7 | url: https://github.com/quarto-dev/quarto-cli 8 | about: Please report issues with the Quarto CLI here 9 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | labels: 8 | - "Type: Dependencies :arrow_up:" 9 | -------------------------------------------------------------------------------- /.github/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcanouil/quarto-revealjs-coeos/14038e4b5f23e5fb2cb847a39176f65d570f146a/.github/template.png -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Quarto Extension 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | version: 7 | type: choice 8 | description: "Version" 9 | required: false 10 | default: "patch" 11 | options: 12 | - "patch" 13 | - "minor" 14 | - "major" 15 | quarto: 16 | type: choice 17 | description: "Quarto version" 18 | required: false 19 | default: "release" 20 | options: 21 | - "release" 22 | - "pre-release" 23 | 24 | permissions: 25 | contents: write 26 | pull-requests: write 27 | id-token: write 28 | pages: write 29 | 30 | jobs: 31 | release: 32 | uses: mcanouil/quarto-workflows/.github/workflows/release-extension.yml@main 33 | secrets: inherit 34 | with: 35 | version: "${{ github.event.inputs.version }}" 36 | formats: "coeos-revealjs" 37 | tinytex: false 38 | quarto: "${{ github.event.inputs.quarto }}" 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.DS_Store 2 | /.luarc.json 3 | template_files/ 4 | template.html 5 | index.qmd 6 | _quarto.yml 7 | _site/ 8 | _extensions/mcanouil/iconify/ 9 | /.quarto/ 10 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | title: "Coeos Reveal.js Extension for Quarto" 3 | message: "If you use this project, please cite it as below." 4 | type: software 5 | authors: 6 | - family-names: "Canouil" 7 | given-names: "Mickaël" 8 | orcid: "https://orcid.org/0000-0002-3396-4549" 9 | repository-code: "https://github.com/mcanouil/quarto-revealjs-coeos" 10 | url: "http://m.canouil.dev/quarto-revealjs-coeos/" 11 | license: "MIT" 12 | date-released: "2025-05-25" 13 | version: 1.8.3 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Mickaël Canouil 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quarto Reveal.js template - Coeos 2 | 3 | 4 | [![License](https://img.shields.io/github/license/mcanouil/quarto-revealjs-coeos)](LICENSE) 5 | 6 | 7 | This is a repository for `Quarto` `revealjs` template. 8 | 9 | [![Screenshot of a dark grey title slide with a logo in the top right corner, a block left aligned in the center of the slide with a title in white, a subtitle in light grey, an horizontal rule in white, the author in white, institute in italics and light grey, and the full literal date. The footer of the slide includes from left to right, a menu icon, author and license, and the slide number.](.github/template.png)](https://m.canouil.dev/quarto-revealjs-coeos/) 10 | 11 | ## Installation 12 | 13 | This [Quarto](quarto.org) extension can be installed/used using the following command: 14 | 15 | - Install 16 | 17 | ```bash 18 | quarto add mcanouil/quarto-revealjs-coeos 19 | quarto add mcanouil/quarto-iconify # Optional 20 | ``` 21 | 22 | - Use 23 | 24 | ```bash 25 | quarto use template mcanouil/quarto-revealjs-coeos 26 | quarto add mcanouil/quarto-iconify # Optional 27 | ``` 28 | -------------------------------------------------------------------------------- /_extensions/coeos/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Mickaël Canouil 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /_extensions/coeos/_about.qmd: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | ::: {.content-hidden} 4 | This requires Iconify. 5 | 6 | ```sh 7 | quarto add mcanouil/quarto-iconify 8 | ``` 9 | ::: 10 | 11 | ::: {layout="[0.38, -0.02, 0.60]" layout-valign="center"} 12 | ``{=html} 13 | 14 | - [{{< iconify fa6-solid:house-chimney-user >}} mickael.canouil.fr](https://mickael.canouil.fr/){style="text-decoration: none;"} 15 | - [{{< iconify fa6-solid:envelope >}} pro@mickael.canouil.dev](mailto:pro@mickael.canouil.dev){style="text-decoration: none;"} 16 | - [{{< iconify fa6-brands:github >}} \@mcanouil](https://github.com/mcanouil/){style="text-decoration: none;"} 17 | - [{{< iconify fa6-brands:linkedin >}} mickaelcanouil](https://www.linkedin.com/in/mickaelcanouil/){style="text-decoration: none;"} 18 | - [{{< iconify fa6-brands:bluesky >}} \@mickael.canouil.fr](https://bsky.app/profile/mickael.canouil.fr/){style="text-decoration: none;"} 19 | - [{{< iconify fa6-brands:mastodon >}} \@MickaelCanouil\@fosstodon.org](https://fosstodon.org/@MickaelCanouil/){style="text-decoration: none;"} 20 | - [{{< iconify fa6-brands:x-twitter >}} \@MickaelCanouil](https://x.com/MickaelCanouil/){style="text-decoration: none;"} 21 | ::: 22 | -------------------------------------------------------------------------------- /_extensions/coeos/_code.qmd: -------------------------------------------------------------------------------- 1 | ```{r} 2 | #| include: false 3 | sysfonts::font_add_google("Alegreya Sans", "Alegreya Sans", regular.wt = 300) 4 | showtext::showtext_auto() 5 | source("_extensions/mcanouil/coeos/setup-ggplot2-coeos.R") 6 | ``` 7 | 8 | # PART 1 With `code` {.center .center-x} 9 | 10 | ## Introduction 11 | 12 | ### Subtitle 13 | 14 | `some code` and some text. 15 | A URL [mickael.canouil.fr](https://mickael.canouil.fr/). 16 | 17 | ```{r} 18 | #| echo: true 19 | 1 + 1 20 | ``` 21 | 22 | ```{r} 23 | #| echo: true 24 | x <- 1 25 | y <- x + 1 26 | y 27 | ``` 28 | 29 | ## GGPLOT2 With `code` 30 | 31 | ```{r} 32 | #| echo: true 33 | library(ggplot2) 34 | ggplot(mtcars, aes(wt, mpg)) + geom_point() 35 | ``` 36 | -------------------------------------------------------------------------------- /_extensions/coeos/_extension.yml: -------------------------------------------------------------------------------- 1 | title: Coeos Presentation Template 2 | author: Mickaël CANOUIL 3 | version: 1.8.3 4 | quarto-required: ">=1.6.40" 5 | contributes: 6 | formats: 7 | revealjs: 8 | theme: coeos.scss 9 | highlight-style: github-dark 10 | mermaid: 11 | theme: dark 12 | date-format: 'dddd[, the] Do [of] MMMM, YYYY' 13 | slide-number: c 14 | code-annotations: select 15 | footer: | 16 | mickael.canouil.fr 17 | | 18 | License: CC-BY-SA-4.0 19 | logo: coeos.svg 20 | include-in-header: 21 | - text: | 22 | 23 | include-after-body: 24 | - file: coeos.html 25 | -------------------------------------------------------------------------------- /_extensions/coeos/coeos.html: -------------------------------------------------------------------------------- 1 | 24 | 25 | 34 | 54 | 93 | 141 | -------------------------------------------------------------------------------- /_extensions/coeos/coeos.scss: -------------------------------------------------------------------------------- 1 | /*-- scss:defaults --*/ 2 | 3 | @import url(https://fonts.googleapis.com/css?family=Alegreya+Sans:300,300i,400,400i,500,500i,700,700i); 4 | // @import url(https://cdn.rawgit.com/tonsky/FiraCode/1.204/distr/fira_code.css); 5 | // @import url(https://use.fontawesome.com/releases/v6.1.1/css/all.css); 6 | 7 | // fonts 8 | $font-family-sans-serif: 'Alegreya Sans', 'Droid Serif', 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC', sans-serif !default; 9 | 10 | // colors 11 | $body-bg: #333333 !default; 12 | $body-color: #FAFAFA !default; 13 | $link-color: $body-color !default; 14 | 15 | $code-bg: $body-color !default; 16 | $code-color: $body-bg !default; 17 | 18 | $code-block-bg: lighten($body-bg, 5%) !default; 19 | $code-block-border-color: $body-color !default; 20 | 21 | $btn-code-copy-color: $body-color !default; 22 | 23 | /*-- scss:rules --*/ 24 | 25 | .picture { 26 | border-style: solid; 27 | border-width: 3pt; 28 | border-color: $body-color; 29 | border-radius: 50%; 30 | padding: 5pt; 31 | height: 50%; 32 | width: auto; 33 | } 34 | 35 | #title-slide { 36 | text-align: left; 37 | 38 | .subtitle, 39 | .institute, 40 | .quarto-title-affiliation, 41 | .quarto-title-author-email { 42 | font-style: italic; 43 | // font-size: 80%; 44 | color: #7F7F7F; 45 | } 46 | 47 | .author, 48 | .quarto-title-author-name { 49 | color: $body-color; 50 | } 51 | 52 | .quarto-title-authors { 53 | display: flex; 54 | justify-content: left; 55 | 56 | .quarto-title-author { 57 | padding-left: 0em; 58 | padding-right: 0em; 59 | width: 100%; 60 | } 61 | } 62 | 63 | p.author::before, 64 | div.quarto-title-author::before { 65 | content: ""; 66 | display: block; 67 | border: none; 68 | background-color: $body-color; 69 | color: $body-color; 70 | height: 3px; 71 | margin-bottom: 1em; 72 | } 73 | 74 | // p, a { 75 | // color: #7F7F7F; 76 | // } 77 | } 78 | 79 | .reveal .slide-number>a[href*='title-slide'] { 80 | display: none; 81 | } 82 | 83 | .footer { 84 | bottom: 10px !important; 85 | color: $body-color !important; 86 | } 87 | 88 | .slide-logo { 89 | display: block; 90 | position: fixed !important; 91 | top: 0 !important; 92 | right: 10px !important; 93 | max-height: 15% !important; 94 | height: 100% !important; 95 | width: auto !important; 96 | color: $body-color !important; 97 | z-index: unset !important; 98 | } 99 | 100 | .slide-menu-button { 101 | left: 10px !important; 102 | bottom: 10px !important; 103 | } 104 | 105 | .slide-number, 106 | .reveal.has-logo .slide-number { 107 | bottom: 10px !important; 108 | right: 10px !important; 109 | top: unset !important; 110 | color: $body-color !important; 111 | 112 | a { 113 | text-decoration: none !important; 114 | } 115 | } 116 | 117 | .cell-output { 118 | border: 1px solid $body-color; 119 | border-radius: 4px; 120 | } 121 | 122 | .center-x { 123 | text-align: center; 124 | } 125 | 126 | .center-xy { 127 | margin: 0; 128 | position: absolute; 129 | top: 50%; 130 | left: 50%; 131 | -ms-transform: translateY(-50%), translateX(-50%); 132 | transform: translateY(-50%), translateX(-50%); 133 | } 134 | 135 | .reveal a { 136 | text-decoration: underline; 137 | } 138 | 139 | code.sourceCode .code-annotation-anchor { 140 | color: darken($body-color, 25%) !important; 141 | border-color: darken($body-color, 25%) !important; 142 | background-color: $body-bg !important; 143 | } 144 | 145 | code.sourceCode .code-annotation-anchor .code-annotation-active { 146 | color: $body-bg !important; 147 | border-color: $body-bg !important; 148 | background-color: darken($body-color, 25%) !important; 149 | } 150 | 151 | .panel-tabset ul li a:focus, 152 | .panel-tabset ul li a:active { 153 | outline: none; 154 | box-shadow: none; 155 | } 156 | -------------------------------------------------------------------------------- /_extensions/coeos/coeos.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 24 | 26 | 29 | 33 | 34 | 37 | 57 | 58 | 61 | 81 | 82 | 83 | 106 | 109 | 110 | 112 | 113 | 115 | image/svg+xml 116 | 118 | 119 | 120 | 121 | 122 | 128 | 148 | 149 | 226 | 237 | 242 | 248 | 249 | 254 | 258 | 262 | 266 | 270 | 274 | 278 | 279 | 280 | 281 | -------------------------------------------------------------------------------- /_extensions/coeos/setup-ggplot2-coeos.R: -------------------------------------------------------------------------------- 1 | theme_coeos <- function( 2 | base_size = 11, 3 | base_family = "", 4 | base_line_size = base_size / 22, 5 | base_rect_size = base_size / 22 6 | ) { 7 | bc <- c("#333333", "#7F7F7F", "#FAFAFA") 8 | half_line <- base_size / 2 9 | ggplot2::theme( 10 | line = ggplot2::element_line( 11 | colour = bc[3], 12 | size = base_line_size, 13 | linetype = 1, 14 | lineend = "butt" 15 | ), 16 | rect = ggplot2::element_rect( 17 | fill = bc[1], 18 | colour = bc[3], 19 | size = base_rect_size, 20 | linetype = 1 21 | ), 22 | text = ggplot2::element_text( 23 | family = base_family, 24 | face = "plain", 25 | colour = bc[3], 26 | size = base_size, 27 | lineheight = 0.9, 28 | hjust = 0.5, 29 | vjust = 0.5, 30 | angle = 0, 31 | margin = ggplot2::margin(), 32 | debug = FALSE 33 | ), 34 | title = NULL, 35 | aspect.ratio = NULL, 36 | 37 | axis.title = NULL, 38 | axis.title.x = ggplot2::element_text(margin = ggplot2::margin(t = half_line), vjust = 1), 39 | axis.title.x.top = ggplot2::element_text(margin = ggplot2::margin(b = half_line), vjust = 0), 40 | axis.title.x.bottom = NULL, 41 | axis.title.y = ggplot2::element_text(angle = 90, margin = ggplot2::margin(r = half_line), vjust = 1), 42 | axis.title.y.left = NULL, 43 | axis.title.y.right = ggplot2::element_text(angle = -90, margin = ggplot2::margin(l = half_line), vjust = 0), 44 | axis.text = ggplot2::element_text(size = ggplot2::rel(0.8), colour = bc[3]), 45 | axis.text.x = ggplot2::element_text(margin = ggplot2::margin(t = 0.8 * half_line / 2), vjust = 1), 46 | axis.text.x.top = ggplot2::element_text(margin = ggplot2::margin(b = 0.8 * half_line / 2), vjust = 0), 47 | axis.text.x.bottom = NULL, 48 | axis.text.y = ggplot2::element_text(margin = ggplot2::margin(r = 0.8 * half_line / 2), hjust = 1), 49 | axis.text.y.left = NULL, 50 | axis.text.y.right = ggplot2::element_text(margin = ggplot2::margin(l = 0.8 * half_line / 2), hjust = 0), 51 | axis.ticks = ggplot2::element_line(colour = bc[3]), 52 | axis.ticks.x = NULL, 53 | axis.ticks.x.top = NULL, 54 | axis.ticks.x.bottom = NULL, 55 | axis.ticks.y = NULL, 56 | axis.ticks.y.left = NULL, 57 | axis.ticks.y.right = NULL, 58 | axis.ticks.length = ggplot2::unit(half_line / 2, "pt"), 59 | axis.ticks.length.x = NULL, 60 | axis.ticks.length.x.top = NULL, 61 | axis.ticks.length.x.bottom = NULL, 62 | axis.ticks.length.y = NULL, 63 | axis.ticks.length.y.left = NULL, 64 | axis.ticks.length.y.right = NULL, 65 | axis.line = ggplot2::element_blank(), 66 | axis.line.x = NULL, 67 | axis.line.x.top = NULL, 68 | axis.line.x.bottom = NULL, 69 | axis.line.y = NULL, 70 | axis.line.y.left = NULL, 71 | axis.line.y.right = NULL, 72 | 73 | legend.background = ggplot2::element_rect(fill = bc[1], colour = NA), 74 | legend.margin = ggplot2::margin(half_line, half_line, half_line, half_line), 75 | legend.spacing = ggplot2::unit(2 * half_line, "pt"), 76 | legend.spacing.x = NULL, 77 | legend.spacing.y = NULL, 78 | legend.key = ggplot2::element_rect(fill = bc[1], colour = bc[3]), 79 | legend.key.size = ggplot2::unit(1.2, "lines"), 80 | legend.key.height = NULL, 81 | legend.key.width = NULL, 82 | legend.text = ggplot2::element_text(size = ggplot2::rel(0.8)), 83 | legend.text.align = NULL, 84 | legend.title = ggplot2::element_text(hjust = 0), 85 | legend.title.align = NULL, 86 | legend.position = "right", 87 | legend.direction = NULL, 88 | legend.justification = "center", 89 | legend.box = NULL, 90 | legend.box.just = NULL, 91 | legend.box.margin = ggplot2::margin(0, 0, 0, 0, "cm"), 92 | legend.box.background = ggplot2::element_blank(), 93 | legend.box.spacing = ggplot2::unit(2 * half_line, "pt"), 94 | 95 | panel.background = ggplot2::element_rect(fill = bc[1], colour = NA), 96 | panel.border = ggplot2::element_rect(fill = NA, colour = bc[3], size = 0.5, linetype = "solid"), 97 | panel.spacing = ggplot2::unit(half_line, "pt"), 98 | panel.spacing.x = NULL, 99 | panel.spacing.y = NULL, 100 | panel.grid = ggplot2::element_line(colour = bc[2]), 101 | panel.grid.major = ggplot2::element_line(colour = bc[2], size = ggplot2::rel(0.60)), 102 | panel.grid.minor = ggplot2::element_line(colour = bc[2], size = ggplot2::rel(0.30)), 103 | panel.grid.major.x = NULL, 104 | panel.grid.major.y = NULL, 105 | panel.grid.minor.x = NULL, 106 | panel.grid.minor.y = NULL, 107 | panel.ontop = FALSE, 108 | 109 | plot.background = ggplot2::element_rect(colour = bc[1]), 110 | plot.title = ggplot2::element_text( 111 | size = ggplot2::rel(1.25), 112 | face = "bold", 113 | hjust = 0, 114 | vjust = 1, 115 | margin = ggplot2::margin(b = half_line) 116 | ), 117 | plot.title.position = "plot", 118 | plot.subtitle = ggplot2::element_text( 119 | size = ggplot2::rel(1), 120 | face = "italic", 121 | hjust = 0, 122 | vjust = 1, 123 | margin = ggplot2::margin(b = half_line) 124 | ), 125 | plot.caption = ggplot2::element_text( 126 | size = ggplot2::rel(0.75), 127 | face = "italic", 128 | hjust = 1, 129 | vjust = 1, 130 | margin = ggplot2::margin(t = half_line) 131 | ), 132 | plot.caption.position = "plot", 133 | plot.tag = ggplot2::element_text(size = ggplot2::rel(1.25), hjust = 0.5, vjust = 0.5), 134 | plot.tag.position = "topleft", 135 | plot.margin = ggplot2::margin(half_line, half_line, half_line, half_line), 136 | 137 | strip.background = ggplot2::element_rect(fill = bc[1], colour = bc[3]), 138 | strip.background.x = NULL, 139 | strip.background.y = NULL, 140 | strip.placement = "inside", 141 | strip.placement.x = NULL, 142 | strip.placement.y = NULL, 143 | strip.text = ggplot2::element_text( 144 | colour = bc[3], 145 | size = ggplot2::rel(0.8), 146 | margin = ggplot2::margin(0.8 * half_line, 0.8 * half_line, 0.8 * half_line, 0.8 * half_line) 147 | ), 148 | strip.text.x = NULL, 149 | strip.text.y = ggplot2::element_text(angle = -90), 150 | strip.switch.pad.grid = ggplot2::unit(half_line / 2, "pt"), 151 | strip.switch.pad.wrap = ggplot2::unit(half_line / 2, "pt"), 152 | 153 | complete = TRUE 154 | ) 155 | } 156 | 157 | ggplot2::theme_set(theme_coeos(base_size = 18, base_family = "Alegreya Sans")) 158 | 159 | if (nzchar(system.file(package = "ggtext"))) { 160 | ggplot2::theme_update( 161 | plot.title = ggtext::element_markdown(), 162 | plot.subtitle = ggtext::element_markdown(face = "italic"), 163 | plot.caption = ggtext::element_markdown(face = "italic"), 164 | axis.title.x = ggtext::element_markdown(), 165 | axis.text.x = ggtext::element_markdown(), 166 | axis.title.y = ggtext::element_markdown(), 167 | axis.text.y = ggtext::element_markdown() 168 | ) 169 | } 170 | ggplot2::update_geom_defaults("point", list(colour = ggplot2::theme_get()$line$colour)) 171 | 172 | options( 173 | ggplot2.discrete.colour = function(...) ggplot2::scale_colour_viridis_d(..., begin = 0.15, end = 0.85), 174 | ggplot2.discrete.fill = function(...) ggplot2::scale_fill_viridis_d(..., begin = 0.15, end = 0.85), 175 | ggplot2.continuous.colour = function(...) ggplot2::scale_colour_viridis_c(..., begin = 0.15, end = 0.85), 176 | ggplot2.continuous.fill = function(...) ggplot2::scale_fill_viridis_c(..., begin = 0.15, end = 0.85) 177 | ) 178 | -------------------------------------------------------------------------------- /template.qmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "A Title" 3 | subtitle: "A Subtitle" 4 | author: "Mickaël Canouil, *Ph.D.*" 5 | institute: "Freelance" 6 | date: today 7 | format: 8 | coeos-revealjs: 9 | output-file: index 10 | --- 11 | 12 | # PART 1 Without `code` {.center .center-x} 13 | 14 | ## New slide {.smaller} 15 | 16 | {{< lipsum 1 >}} 17 | 18 | ## Another slide {.smaller} 19 | 20 | ![An image]({{< placeholder 900 300>}}) 21 | 22 | ## Tabset {.smaller} 23 | 24 | :::: {.panel-tabset} 25 | 26 | ### Lipsum 27 | 28 | {{< lipsum 1-1 >}} 29 | 30 | ### Placeholder 31 | 32 | {{< placeholder 600 400 >}} 33 | 34 | ### Lipsum 2 35 | 36 | {{< lipsum 2-2 >}} 37 | 38 | ### Placeholder 2 39 | 40 | {{< placeholder 600 400 >}} 41 | 42 | ::: 43 | 44 | # PART 2 With `code` {.center .center-x} 45 | 46 | ## Code annotation 47 | 48 | ```{.python code-line-numbers="1-7|1|3|4|1-7"} 49 | import numpy as np # <1> 50 | 51 | def f(x): # <2> 52 | return np.sin(x) # <3> 53 | 54 | # Example of a simple function using NumPy 55 | f(0) 56 | ``` 57 | 58 | 1. Importing the NumPy library. 59 | 2. Defining a function `f` that takes an argument `x`. 60 | 3. Returning the sine of `x` using NumPy's `sin` function. 61 | --------------------------------------------------------------------------------