Skip to content

LaTeX-inspired utility classes #85

@vincentdoerig

Description

@vincentdoerig

I noticed that a few LaTeX inspired utility classes would be a good addition to recreate common LaTeX type and spacing commands. The nomenclature is inspired by Tailwind CSS while maintaining the semantic meaning of LaTeX commands. This would allow users to quickly apply LaTeX-like styling without writing custom CSS.

Class CSS Styles LaTeX Analogy
.text-justify text-align: justify; Default LaTeX paragraph
.text-right or .text-ragged-right text-align: right; \raggedright (default from #79)
.text-left or .text-ragged-left text-align: left; \raggedleft
.text-center text-align: center; \centering
.text-tiny font-size: ??; \tiny
.text-scriptsize font-size: ??; \scriptsize
.text-footnote font-size: ??; \footnotesize
.text-small font-size: ??; \small
.text-large font-size: ??; \large
.text-xlarge font-size: ??; \Large
.vspace-sm margin-top: 1em; margin-bottom: 1em; \vspace{1em}
.vspace-md margin-top: 2em; margin-bottom: 2em; \vspace{2em}
.cols-2 column-count: 2; \begin{multicols}{2}
.cols-3 column-count: 3; \begin{multicols}{3}
.font-sans font-family: var(--font-sans); \textsf{text}
.font-mono font-family: var(--font-mono); \texttt{text}
.indent-pars text-indent: var(--text-indent-size); Default paragraph indent (already in library)
.no-indent text-indent: 0; \noindent (already in library)
.list-alpha list-style-type: lower-alpha; \begin{enumerate}[a)]
.list-roman list-style-type: lower-roman; \begin{enumerate}[i)]

I will try to find the right values for the text sizing.

I'm open to discuss adding more spacing utilities (e.g. hspace-*) or other common commands that would benefit from having a utility class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions