Convert Figma logo to code with AI

James-Yu logoLaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.

11,306
546
11,306
0

Top Related Projects

1,686

An implementation of the Language Server Protocol for LaTeX

Quick Overview

The LaTeX-Workshop extension for Visual Studio Code is a powerful tool that enhances the LaTeX editing experience within the popular code editor. It provides a comprehensive set of features to streamline the LaTeX writing and compilation process, making it easier for users to create high-quality technical documents.

Pros

  • Seamless Integration: The extension integrates seamlessly with Visual Studio Code, providing a familiar and intuitive user interface for LaTeX editing.
  • Real-Time Preview: The extension offers a real-time preview of the compiled LaTeX document, allowing users to see the changes they make in the editor immediately.
  • Automated Compilation: The extension automatically compiles the LaTeX document, saving users time and effort.
  • Extensive Functionality: The extension includes a wide range of features, such as code completion, syntax highlighting, and support for various LaTeX packages and commands.

Cons

  • Steep Learning Curve: The extension's extensive functionality can be overwhelming for users who are new to LaTeX or Visual Studio Code.
  • Dependency on External Tools: The extension relies on external LaTeX distribution and tools, which may require additional setup and configuration.
  • Potential Compatibility Issues: The extension may not always work seamlessly with all LaTeX distributions and configurations, leading to compatibility issues.
  • Limited Customization: While the extension provides many features, the level of customization available may be limited compared to other LaTeX editing tools.

Code Examples

N/A (This is not a code library)

Getting Started

N/A (This is not a code library)

Competitor Comparisons

1,686

An implementation of the Language Server Protocol for LaTeX

Pros of texlab

  • texlab is a standalone Language Server Protocol (LSP) implementation for LaTeX, which means it can be integrated with a wide range of text editors and IDEs.
  • texlab is written in Rust, which provides better performance and reliability compared to the Python-based LaTeX-Workshop.
  • texlab supports a wider range of LaTeX features, including forward and inverse search, code completion, and diagnostics.

Cons of texlab

  • texlab has a steeper learning curve compared to LaTeX-Workshop, as it requires setting up the LSP client in your text editor.
  • texlab may not have as many features and customization options as LaTeX-Workshop, which has a larger community and more active development.

Code Comparison

LaTeX-Workshop (Python):

def build_latex(self, tex_root: str) -> None:
    """Build LaTeX project."""
    self.logger.info('Building LaTeX project: %s', tex_root)
    self.manager.build(tex_root)

texlab (Rust):

pub fn build_latex(&self, tex_root: &str) -> Result<(), Error> {
    self.logger.info(&format!("Building LaTeX project: {}", tex_root));
    self.manager.build(tex_root)
}

The code snippets show that both LaTeX-Workshop and texlab provide a build_latex function to build a LaTeX project. The main difference is that the texlab implementation is written in Rust, which may provide better performance and error handling compared to the Python-based LaTeX-Workshop.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Visual Studio Code LaTeX Workshop Extension

version updated release

downloads installs rating license

TeX Live on Windows TeX Live on macOS TeX Live on Linux

LaTeX Workshop is an extension for Visual Studio Code, aiming to provide core features for LaTeX typesetting with Visual Studio Code.

This project won't be successful without contributions from the community, especially from the current and past key contributors:

Thank you so much!

Note that the latest version of LaTeX-Workshop requires at least VSCode 1.96.0 (December 2024 or later).

Manual

The manual of the extension is maintained as a wiki

Table of Contents

Features (Taster)

This is not a complete list but rather a preview of some of the coolest features.

  • Build LaTeX (including BibTeX) to PDF automatically on save.

    build process gif
  • View PDF on-the-fly (in VS Code or browser).

    demo of preview feature
  • Direct and reverse SyncTeX. Click to jump between location in .tex source and PDF and vice versa.

    demo of SyncTeX
  • Intellisense, including completions for bibliography keys (\cite{}) and labels (\ref{}).

    intellisense demo
  • LaTeX log parser, with errors and warnings in LaTeX build automatically reported in VS Code.

    error reporting demo
    • Linting
    auto \item demo
  • Snippets

    • A lot of LaTeX commands can be typed using snippets starting in \, then type part of the command to narrow the search.

      auto \item demo
    • Surround some selected text with a LaTeX command using ctrl+l, ctrl+w (⌘+l, ⌘+w on Mac). A new menu pops up to select the command. This works with multi selections. The former approach using \ has been deprecated.

      wrap demo
    • We also provide a few other suggestion mechanisms

      • Greek letters are obtained as @ + letter. Some letters have variants, which are available as @v + letter. See here.

        greek letters demo
      • Common environments can be obtained by BXY where XY are the first two letters of the environment name, eg. BEQ gives the equation environment. If you want the star version of the environment, use BSXX, eg. BSEQ gives the equation* environment. See here.

        BSAL demo
      • Common font commands can be obtained by FXY where XY are the last two letters of the font command name, eg. FIT gives \textit{}. See here.

        FBF demo
      • Many other maths symbols can be obtained with the @ prefix. See here.

        \frac shortcut demo \int shortcut demo
  • Shortcuts

    • In addition to snippets, there are shortcuts provided by the extension that allow you to easily format text (and one or two other things).

      \emph{} demo
  • When the current line starts with \item or \item[], hitting Enter automatically adds a newline starting in the same way. For a better handling of the last item, hitting Enter on a line only containing \item or \item[] actually deletes the content of the line. The alt+Enter is bind to the standard newline command. This automatic insertion of \item can be deactivated by setting latex-workshop.bind.enter.key to false.

    auto \item demo
  • Preview on hover. Hovering over the start tag of a math environment causes a mathjax preview to pop up.

    equation hover demo

GitHub

The code for this extension is available on github at: https://github.com/James-Yu/LaTeX-Workshop

Like this work?

  • :smile: Star this project on GitHub and Visual Studio Marketplace
  • :blush: Leave a comment
  • :relaxed: Thank the develops and community for their effort.

License

MIT