Giter Club home page Giter Club logo

latex-environment's Introduction

latex-environment

Overview

This is Quarto extension that enables divs to be output as a custom environment in LaTeX. This is useful when you'd like to share content between LaTeX and other formats, but need the content to be placed in an environment when emitting LaTeX.

Installation

To install this extension in your current directory (or into the Quarto project that you're currently working in), use the following command:

quarto install extension quarto-ext/latex-environment

Usage

Environments

Divs with a class name listed in the in the environments key will be emitted in LaTeX as an environment with the provided name (or the class name itself if no name is provided). All of the following are valid:

environments: center
environments: [center]
environments:
  center: center-env

Example

---
title: LaTeX Environment
format:
   pdf: default
   html: default
filters:
   - latex-environment
environments: [center]
---

::: {.center}
The contents of this div will be output in a `center`
LaTeX environment, but will appear in HTML (and any other output 
format as a simple div with the class `center`)
:::

Commands

Spans with a class name listed in the in the commands key will be emitted in LaTeX as a command with the provided name (or the class name itself if no name is provided). All of the following are valid:

commands: ce
command: [ce]
commands:
  ce: ce-command

Example

---
title: LaTeX Command
format:
   pdf:
     include-in-header: 
       text: |
         \usepackage{mhchem}
   html: default
filters:
   - latex-environment
commands: [ce]
---

This will replace spans of class `ce` with the `\ce{}` command for LaTeX output, 
but leave the spans intact for HTML output. So `[H2SO4]{.ce}` becomes [H2SO4]{.ce}.

latex-environment's People

Contributors

dragonstyle avatar jjallaire avatar nenuial avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.