Code Monkey home page Code Monkey logo

latex-solarized's Introduction

Solarized LaTeX Listings

This provides three LaTeX packages using the Solarized theme with the LaTeX listings package for code listings. It just defines Solarized color codes and provides two packages, solarized-light and solarized-dark, for changing the colors of the listings.

Download

First off, fork and clone (or simply clone) the repository:

# If you forked:
$ git clone https://github.com/<your-username>/latex-solarized.git

# If you didn't
$ git clone https://github.com/jez/latex-solarized.git

This is entirely up to you, but I like to keep all my LaTeX files in one place, a folder called ~/programming/LaTeX/, so I'd clone into this folder. You should choose a location that make sense to you.

Next up, we need to tell LaTeX where it can find the files we just cloned. Normally, the process would be to copy these files into a specific folder for LaTeX. However, this has a couple disadvantages, most notably that it makes updating a pain. Instead, we're going to symlink these files into place. If you've never heard about symlinks, you may want to read up about them, and checkout man ln (the man page for the command used to create links).

Installation

LaTeX package files need to be placed in a machine-dependent location in order for them to be usable with \usepackage{}. This location varies, but you can use the command kpsewhich -var-value=TEXMFHOME to figure out what the root folder is for your machine. If this command didn't work, you might have a non-standard installation of LaTeX. Check here for more help.

Within the folder returned by kpeswhich, you'll need to create the folder tex/latex/, and then create the links with ln -s <path-to-your-clone>/*sty tex/latex/.

Note: the following example uses a) the path where I personally installed latex-solarized, and b) the command tree which just lists directory contents. This command might not be available, but it's not necessary.

Installation

Usage

Now you're all set! You should be able include \usepackage{solarized-light} or \usepackage{solarized-dark} to start using Solarized colors with your LaTeX code listings. You might also want to read up on LaTeX code listings here and here.

Example

There are some examples in the examples/ folder.

Light example

Known Issues

When using the dark theme, if the line spacing isn't quite right, you will get thin lines of from the page background showing between the lines of the listing. There are some solutions outlined here, but none were easily incorporated into this package.

License

MIT License. See LICENSE.

latex-solarized's People

Contributors

jez avatar

Watchers

Junaid Hasan avatar

Forkers

ejetzer

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.