Skip to content

Instantly share code, notes, and snippets.

@relekang
Created May 22, 2015 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save relekang/81d8c61cd5495419a184 to your computer and use it in GitHub Desktop.
Save relekang/81d8c61cd5495419a184 to your computer and use it in GitHub Desktop.

Writing latex with atom

Install language-latex and:

1. In init.coffee

path = require 'path'

atom.workspaceView.eachEditorView (editorView) ->
  editor = editorView.getEditor()
  if path.extname(editor.getPath()) is '.tex'
    try
      atom.workspace.panelContainers.left.panels[0].item.detach()
    catch e
      console.log e

2. In styles.less

atom-text-editor {
  &[data-grammar~=latex]::shadow {
    .gutter-container {
      display: none !important;
    }

    .lines {
      min-width: 700px;
      max-width: 700px;
      margin-left: auto;
      margin-right: auto;
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment