In the middle of the desert you can say anything you want
Diagrams
This shows how to use fragments inside code/diagram segments: Fragment Layout Elements in Reveal.JS · quarto-dev/quarto-cli · Discussion #3685
Non-quarto solutions:
style=invis
: sum [label="∑", fillcolor="#27ae60", shape=circle, style=invis];
1This makes everything invisible by default, uncommenting the lines makes the parts visible
digraph G {
rankdir=LR;
node [shape=circle, style=invis, fontcolor=white, fontsize=18, fillcolor="white", color="white"];
edge [color="white", fontcolor="white"];
graph [color="white"];
subgraph cluster_1 {
#label = "Inputs";
// uncomment for visibility:
node [fillcolor="#2c3e50", style="filled"]
n0 [label=<1>];
n1 [label=<x<SUB>1</SUB>>];
n2 [label=<x<SUB>2</SUB>>];
n3 [label=<x<SUB>n</SUB>>];
{ rank=same; n0; n1; n2; n3; }
}
subgraph arrows {
// uncomment for visibility of arrows:
edge [color="black", fontcolor="black"];
node [style="filled", fillcolor="#27ae60"];
n0 -> sum [label=<w<SUB>0</SUB>>];
n1 -> sum [label=<w<SUB>1</SUB>>];
n2 -> sum [label=<w<SUB>2</SUB>>];
n3 -> sum [label=<w<SUB>n</SUB>>];
sum [label="∑"];
}
subgraph end {
// uncomment for visibility
edge [color="black", fontcolor="black"];
node [style="filled", fillcolor="#27ae60"];
activation [label="∫", fillcolor="#f39c12", shape=circle];
// Output node
output [label="y", fillcolor="#8e44ad"];
// Other edges
sum -> activation;
activation -> output;
}
}
qr https://www.eff.org/
at DuckDuckGozipinfo
lists everythingssine/pptx2md: a pptx to markdown converter does this automatically!
--qmd
// Ha: [Falk358/quarto_translator: A python project for translating quarto markdown files using the openai API](https://github.com/Falk358/quarto_translator+
How do I write LaTeX with colors in quarto presentations? · quarto-dev/quarto-cli · Discussion #4429
$$\begin{aligned}
\color{green}{\bf{Net Benefit}} = \frac{\color{green}{\bf{TP}}}{\text{N}} - \frac{\color{red}{\bf{FP}}}{\text{N}} * {\frac{{p_{t}}}{{1 - p_{t}}}}
\end{aligned}$$
$$\color{red}{w_0} + x_1*w_1 + x_2*w_2 + x_1*w_1$$
It uses the usual names: LaTeX Color Definitions
Actually2 these: MathJax-src/ts/input/tex/color/ColorConstants.ts at master · mathjax/MathJax-src
HA, it can even do usual RGB hex colors!
The useful to me are Cardinal/Carmine and Cerulean/Blue?..
Modifying the MathJax size · quarto-dev/quarto-cli · Discussion #2392 only global
Mathjax supports things like \tiny{w_..}
! (Changing mathjax’s font size - Stack Overflow)
Quarto: How to right justify text in PDF and HTML - Stack Overflow:
\`\`\`{=html}
<style>
.flushright {
text-align: right;
}
</style>
::: {.flushright}
But actually,
::: {style="text-align: right;"}
$\small{E(W) = \frac{1}{n} \sum_{i=1}^{n} \mathcal{L} \left( \color{blue}{f(x^{(i)}; W)}, \color{red}{y_{true}^{(i)}} \right)}$
:::
Preview in a long/high browser window to see what the actual width of the presentation is. PDF export also uses the actual width
\times
in latex→
)Closing the window with the kitty terminal through qtile/OS means often asks you whether you really want to, as sth is running there.
Kitty has Ctrl+Shift+W
which closes the terminal no questions asked.
Used Apps/Dia - GNOME Wiki! all my life and love it, but
News! 2011-Dec-18: Version 0.97.2 has been released.
Depends on python 2.7 and is very problematic to install now. I’ll miss it.
I hear https://draw.io is a good alternative.
I’ll add a list of options here next time I need this.
(But for older dia files I’ll have to edit maybe later: it could be installed on a Windows machine and export a broken .SVG which I could then edit in Inkscape.)
Context: in a paper, using PDF graphics is much better than e.g. PNG, because antialiasing (230628-1313 Saving plots matplotlib seaborn plotly PDF). Assume you need to crop one, and taking a PNG screenshot won’t cut it, because it would defeat the entire purpose.
TL;DR: in \includegraphics
, trim=left bottom right top
(in cm)
positioning - How can I crop included PDF documents? - TeX - LaTeX Stack Exchange:
includegraphics[clip, trim=0.5cm 11cm 0.5cm 11cm, width=1.00\textwidth]{PDFFILE.pdf}
BUT! If I’m ever in this situation, inkscape can really nicely open a PDF and export only the selected things, also as PDF.
… test the results by downloading the PDF from overleaf and opening it locally, because antialiasing w/ imported vector pictures can be broken from within the preview window.
Usual:
format:
revealjs:
logo: logo.png
theme: [default, custom.scss]
Adding after the first one, so no !important
needed1:
format:
revealjs:
logo: logo.png
header-includes: |
<link href="custom.css" rel="stylesheet">
Inline w/o declaring classes2:
Some [red words]{style="color:#cc0000"}
or:
::: {style="font-size: 1.5em; text-align: center"}
styling an entire div
:::
Insert custom css into revealjs presentation · Issue #746 · quarto-dev/quarto-cli ↩︎
Excellent list of bits: Meghan Hall ↩︎
For yay, the cache is in
$HOME/.cache/yay/
If the package is there, then:
sudo pacman -U ./quarto-cli-1.4.555-1-x86_64.pkg.tar.zst
Then pin the package in /etc/pacman.conf:
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg = quarto-cli
#IgnoreGroup =
Then yay -Syu
will ignore it as well:
:: Synchronizing package databases...
endeavouros is up to date
core is up to date
extra is up to date
multilib is up to date
:: Searching AUR for updates...
-> quarto-cli: ignoring package upgrade (1.4.555-1 => 1.5.52-1)
:: Searching databases for updates...
there is nothing to do
Refs: How do you downgrade an AUR package? : r/archlinux
For not-AUR, there’s the downgrade
command: archlinux-downgrade/downgrade: Downgrade packages in Arch Linux
Better preview at a specific port, handy for restarting after editing CSS. Similar to quarto project frontmatter preview: port: 4444 browser: false
.
quarto preview slides.qmd --port 4444 --no-browser
In frontmatter:
logo
is in bottom-right+
footer-logo-link
footer
for all slides
footer
shift-heading-level-by
, number-offset
, number-section
, number-depth
— will touch if I need this.In front matter:
header
: one header text for all presentationtitle-as-header
,subtitle-as-header
: if true
, place the presentation frontmatter’s title
/subtitle
as header if one not provided (overwriting the header
value)
hide-from-titleSlide
: all
/text
/logo
to hide it from title slidesc-sb-title
: if true
, h1/h2 slide titles will appear in the slide header automatically when slide-level
is 2 or 3Divs with classes:
.header
: slide-specific header
Excellent example from its docu of dynamic per-(sub-)section headers:
Since .s[c|b]-title
is present always, text added that way will be present on the title slide regardless of settings. … and — adding text to a presentation through CSS is, well, ..
.reveal-header .sc-title {
background-color: red;
&::before {
content: 'sc-title header content';
}
}
Slightly better ugly hack: main header text split in three, with two aligned l/r correspondingly.
.header-right {
// text-align: left;
float: right;
background-color: pink;
display: inline-block;
}
.header-left {
// text-align: left;
float: left;
background-color: yellow;
display: inline-block;
}
::: header
[left]{.header-left} and not left [and right]{.header-right}
:::
Result:
Improved the above to support both footer and headers I have a hammer and everything is a nail SCSS can do mixins let’s use them
// L/R margins of the footer — if logo is wider than this, it may overlap right footer text.
// By default, logo max-height is 2.2em, width auto based on this.
$footer-margin: 5em;
// left or right column bits
%hfcol {
display: inline-block;
}
/* L/R columns in header */
.reveal .reveal-header .rightcol {
@extend %hfcol;
float: right;
}
.reveal .reveal-header .leftcol {
@extend %hfcol;
float: left;
}
/* L/R columns in footer */
.reveal .footer .leftcol {
@extend %hfcol;
float: left;
margin-left: $footer-margin;
}
.reveal .footer .rightcol {
@extend %hfcol;
float: right;
margin-right: $footer-margin;
}
Usage:
## I am a slide with custom headers
And With content
::: footer
[Left footer]{.leftcol} Center footer [Right footer]{.rightcol}
:::
::: header
[Left header]{.leftcol} Center header [Right header]{.rightcol}
:::
Frontmatter usage works only for footer, likely header
doesn’t support markup.
footer: "Center footer [right]{.rightcol} [left]{.leftcol}" # CHANGEME
Result:
PROBLEMS:
This works almost perfectly, including missing values:
::: footer
::: {.columns}
:::: {.column width="20%"}
left
::::
:::: {.column width="50%"}
Center footer
::::
:::: {.column width="20%"}
right
::::
:::
:::
It even works inside frontmatter as multiline string (not that it’s a good idea):
footer: |
::: {.columns}
:::: {.column width="20%"}
left
::::
:::: {.column width="50%"}
FB5 – Informatik und Sprachen: Deep Learning (MDS)
::::
:::: {.column width="20%"}
::::
:::
This removes the margin placing it exactly in the same place as a normal footer:
.reveal .footer p {
margin: 0 !important;
}
(but headers don’t work)
A filter that parses frontmatter and puts things in the correct places.
For later.