sublimetext / latextools Goto Github PK
View Code? Open in Web Editor NEWLaTeX plugin for Sublime Text
Home Page: https://latextools.readthedocs.io/
LaTeX plugin for Sublime Text
Home Page: https://latextools.readthedocs.io/
CMD+Shift+[
and CMD+Shift+]
are keyboard shortcuts to change to the previous and next tabs respectively. LatexTools uses those same keybindings to insert LaTeX commands and enclose environments.
Hello everyone,
I have been using Sublime Text 2 with LatexTools for some time now and was very satisfied. Today I started adding a glossary to my text and LatexTools doesn't seem to handle the makeglossaries command very well or at all.
Maybe someone can clafify this for me if it is possible to integrate the makeglossaries command into the normal Latex build process or if it will be added in the future in LatexTools.
Thanks in advance.
All the best,
qdoobp
When there is an \input{x} for a file that does not exist, an exception is thrown when searching for refs and citations, and no refs or citations are produced. Instead, non-existent files should be silently skipped (solution could be to add try/except IOError).
Often problems come from corrupt helper files (*.aux, *.toc etc.). An user option to "clear the dir" would be nice. If you don't like it as extreme as text mate is doing it (kill everything except the tex file) you could keep the pdf :->
Is this possible? In a multi-file project the "ref_" auto-complete-thing isn't quite enough.
Thanks.
If I write 'cite_' and hit Ctrl-Space, I get autocomplete for all words with "c" in the document. This document has two bib files if that might be a cause. The other file I tried with only one bib file is fine.
u'/Users/nernst/Dropbox/research/papers/techdebt12/techdebt.tex']
Welcome to thread Thread-3
7
Finished normally
0
Parsing log file
!TEX root = /Users/nernst/Dropbox/research/papers/techdebt12/techdebt.tex
Jump to: 0 0
True
None
_etic
\bibliography{abbr-long,techdebt}
Files:
[u'abbr-long', u'techdebt']
/Users/nernst/Dropbox/research/papers/techdebt12/abbr-long.bib
/Users/nernst/Dropbox/research/papers/techdebt12/abbr-long.bib has 20 lines
Traceback (most recent call last):
File "./sublime_plugin.py", line 236, in on_query_completions
File "./latex_cite_completions.py", line 151, in on_query_completions
AttributeError: 'NoneType' object has no attribute 'group'
_etic
Projects using \include
are not supported!
When build my latex file (multiple documents), Skim does not open it at the correct page. If the pdf is open, it will open to random page in the front matter, but if it is already open, it stays on same page it was on before. The same thing happens with Jump to PDF (cmd-shift-J).
I'm using OS X 10.7.2, Sublime Text 2 build 2126 and Skim 1.3.18 (69).
i would expect it to look through my bib file by key, or title, or author. i don't really understand what it is doing, but it does not seem to be any of those things. perhaps somebody could explain? otherwise, this package is totally awesome.
For some documents, I prefer to use XeLaTeX rather than LaTeX, as allows for things like using system fonts. It would be great to have this settable in an option, or perhaps at the top of a TeX file in a comment somewhere. Under TextMate, I'd add %!TEX TS-program = xelatex
to the top of a file to tell it to use a different engine.
I get the following error in my console when trying to use your plugin:
Traceback (most recent call last):
File "./sublime_plugin.py", line 57, in reload_plugin
File "./DDEExecute.py", line 2, in
from ctypes import *
File ".\ctypes__init__.py", line 10, in
ImportError: No module named _ctypes
I'm not sure if this is a ST2 issue or a LaTeXTools problem, but I thought I'd let you know. Thanks for all your hard work!
i am running Scientific Linux 6.
i followed the first 2 steps to install LaTeXTools, but there is no 3rd step for linux systems?
when i try to build, the console displays:
[Compiling texfile.tex]
but as far as i can tell, nothing else happens, ie, the tex file is not compiled.
any suggestions are appreciated.
I've been rooting around in the LaTeXTools package (wanting to implement TeXCount.pl), and discovered that, on Windows, when a non-.tex file is in the open view, the View PDF and Jump to PDF commands fail to warn the user as expected. Instead, the following is printed to the console:
Traceback (most recent call last):
File ".\sublime_plugin.py", line 339, in run_
File ".\viewPDF.py", line 15, in run
AttributeError: 'View' object has no attribute 'fileName'
Sadly my lack of knowledge of Windows (usually on *nix!) and Python (usually in Perl!) make me unable to work out what's going on.
I am running ST2 (Build 2139 ) and MacTex 2011 on Lion. I have a simple single page latex document. But when building it nothing is generated and the console shows the following error:
Writing file /Users/jens/paper.tex with encoding UTF-8
Traceback (most recent call last):
File "./sublime_plugin.py", line 259, in run_
File "./makePDF.py", line 390, in run
TypeError: cannot concatenate 'str' and 'list' objects
Why snippets are
\emph{$SELECTION}
when all of then should be (TeX verbatim.sublime-snippet):
\verb|${1:$SELECTION}|
It then is able to make verb not only to the selection, but also to make a skeleton for a new verb leaving the cursor correctly inside the curly braces.
LaTeXTools lacks of many of the snippets TextMade had, and are spread over many incoherently named .sublime-snippets, when there are so many styles to apply (bold, emph, tt, rm, large, tiny… etc) that as files will mesh the LaTeXTools directory with funny named files.
Why not a simple plugin to make all these simple wrappers (other for typical environments) called via a well organized two ST2 key combinations?
Thanks!
I built my LaTeX project, and didn't see any warnings about overfull hboxes, which actually were in log. Is this functionality supported? The thing is that my project consist of several files, but adding extra comment at a first line as you recommended, anyway, didn't help. However, everyrhing else works as expected.
I have built a TeX file with ST2, but after I built the TeX file I get a prompt saying that 'Cannot launch Viewer, Make sure its in your PATH'. So I have put my Adobe Acrobat Reader in the path variable like this.'C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRD32.exe' but still I get the same error. Are there any clear steps to do this with AdobeAcrobat Reader rather than Sumatra PDF?
I tried to compile a latex doc and something was wrong so I corrected the mistake and did a "build" again, but LatexTools kept throwing some errors, so after fooling around, I realized that deleting all the "build" files (dvi, bbl, log, fdb_latexmk, blb and aux), the build succeed. I understand that Latextools was using old files because of that, I think the user would appreciate a clean command to delete all the temporary files.
Thank you.
I have the following line in my Latex code:
" \bibliography{literatur} % Sie benötigen eine *.bib-Datei "
Cite-completion in ST2 does not work, as it crashes with the following error message:
" UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 34: ordinal not in range(128) "
Line 100 says:
"print bib_command"
Apparently, the umlaut in the comment is unexpected for bib_command. After I put a comment sign in front of this line, everything worked again...
Best regards,
Robert
Windows, Calling Sumatra
Sumatra not running, launch it
Traceback (most recent call last):
File ".\sublime_plugin.py", line 267, in run_
File ".\viewPDF.py", line 18, in run
TypeError: 'module' object is not callable
The console reports the following:
[u'texify', u'-b', u'-p', u'--tex-option="--synctex=1"', u'X:\\Users\\NoWhereMan\\Documents\\Universita\\2011Tesi\\trunk\\papers\\icooolps\\icooolps.tex']
Welcome to thread Thread-5
2
Finished normally
0
Parsing log file
Exception in thread Thread-5:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File ".\makePDF.py", line 299, in run
File ".\makePDF.py", line 194, in parseTeXlog
IndexError: pop from empty list
I have fixed the problem by adding len(files)>0
on line 193 of makePDF.py :
while len(files)>0 and len(line)>0 and line[0]==')':
The script for getting citations from a .bib file stops working when .bib files include comments in the format specified here. Here is a minimal example:
@article{plato,
title="Hello world",
author="Plato"
}
@comment{hello}
If I type cite<tab>
I simply get the default autocompletion behavior of ST2. If I remove the @comment
entry from the bib file, cite<tab>
outputs, as expected, \cite{plato}
. With the @comment
entry, cite<tab>
only outputs words starting with a 'c' from the current .tex file.
Traceback (most recent call last):
File "./sublime_plugin.py", line 337, in run_
File "./makePDF.py", line 373, in run
File "./getTeXRoot.py", line 10, in get_tex_root
TypeError: coercing to Unicode: need string or buffer, NoneType found
//
Hi all,
I am running OSX 10.7 and getting this error when trying to build any LaTeX file a pdf. I have installed LaTeXTools as instructed, etc. If anyone could help out, that would be lovely. I do not know Python so I’ve no idea where to start.
Many thanks,
Em
Just after reading this ", and also to minimize clashes with existing (and standard) ST2 bindings" I read C-1 in Linux/Windows or Cmd-1 in Mac… Well, what key shortcut does Windows/Linux use for changing current buffer to the one in the n open file? In Mac is Cmd-1…
Why not to use the classic Alt-w, letter as now?
Hello !
I just discovered this tool for ST2.
It's great. I just have one question.
If the xelatex and xetex compilation
aviable, how to configure it ?
Thanks by advance.
Just the tiniest of issues: If I type "begin", then press tab and then type "itemize", ST2 automatically adds an item to the body of the itemize environment. But there backslash in from of the "item" is missing and tabbing once again places the caret in front of the item instead of behind it.
Again, not really important (and yes, I know I can get the itemize environment through the item tab trigger). I just thought I'd throw it on the pile.
I've just spent an age trying to work out why neither my Mac nor Windows machines were doing anything when I tried to build my .tex file; finally I discovered that my latex.sublime-build file had been silently overwritten, replacing my custom command (just using lualatex instead of pdflatex). Is there anything that can be done so that the user gets a warning, or at least a (prominent) notification that the package has changed? I appreciate that this may be unfixable.
Furthermore, texlive 2012 has been released so updating the references in the build file might be a good idea.
I understand that Preview doesn't provide the extra features Skim does, but i believe it should also be supported, as it is the default PDF viewer for every OS X user. That would also drop any external dependency for LaTeXTools, making it a more mature application. Support for Skim could still be present, being it either an option or the default, but reverting to Preview whenever Skim is not present.
Please discuss.
I've just installed Sublime Text 2 and am getting an error message when I attempt to compile any Latex file. It is pointing to an issue with a line in the makepdf.py file. Here's the error message:
Writing file /Users/Mark/Documents/BuildError.tex with encoding UTF-8
[u'latexmk', u'-e', u"$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S'", u'-f', u'-pdf', u'/Users/Mark/Documents/BuildError.tex']
Welcome to thread Thread-4
2
Exception in thread Thread-4:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner
self.run()
File "./makePDF.py", line 260, in run
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Any suggestions as to what might be causing this exception, or how I can fix it?
Hey,
are there any plans, to allow cites and refs over multiple files? For example: When I have three files
main.tex
section.tex
section2.tex
where section.tex contains a label. Then I can't use "ref_" from section2.tex. Also the "Goto Anything" function only works within the currently opened document.
Greetz and thanks for the great job done so far!
Clicking on errors in the message window does not cause my cursor to jump to the corresponding error in the tex source.
I'm running ST2 2217.
An example of log file output that has this behaviour is:
[Compiling /private/tmp/test.tex]
There were errors in your LaTeX source
/private/tmp/test.tex:5: Undefined control sequence. [Test \ZZZtextbf]
[Done!]
Where ever I click in the text above I can't get it to jump to line 5. The "next error" function also has no effect.
The problem happens regardless of what I try to compile. Here is the simple example that produced the output above:
\documentclass{article}
\begin{document}
Test \ZZZtextbf{this}.
\end{document}
I'm afraid I'm not particularly knowledgeable in this area, so I can't be more specific. A friend recommended that I use Sublime Text 2 for LaTeX, and I wound up using this extension. It works fine for all of my various math assignments that I have been working on, but the plugin stalls when I try to compile a lab report I've been working on. The report is perfectly fine, and compiles fine in TeXWorks - I'm using MiKTeX. I would imagine there might be some trouble with the rather complicated ACS styles (it's not the first time they've given me troubles), but this error isn't very telling. I pasted the console output below and have uploaded the complete log to:
{link removed}
... (sliced to remove unnecessary things). See comment below for further details.
[u'texify', u'-b', u'-p', u'--tex-option="--synctex=1"', u'C:\Users\Jacob\Documents\College\CHM 343 (Lab)\Lab 5_report.tex']
Welcome to thread Thread-3
2
Finished normally
0
Parsing log file
Exception in thread Thread-3:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File ".\makePDF.py", line 299, in run
File ".\makePDF.py", line 218, in parseTeXlog
File ".\makePDF.py", line 57, in handle_warning
IndexError: list index out of range
When there is a build error, if you double click the error, it opens a newfile instead of jumping to the line in the file.
For example,:
There were errors in your LaTeX source
C:...\background.tex [3]:69: Undefined control sequence. [The \turbulent]```
will create a new file background.tex [3] instead of opening background.text to line 69.
Hello,
I use archlinux and installed LaTeXTools with Package Control.
But there seems to be something wrong.
Eg after hitting ctrl+b for building i receive following errors:
Traceback (most recent call last):
File "./sublime_plugin.py", line 325, in run_
File "./makePDF.py", line 348, in run
File "./getTeXRoot.py", line 10, in get_tex_root
TypeError: coercing to Unicode: need string or buffer, NoneType
And viewpdf results in this:
Traceback (most recent call last):
File "./sublime_plugin.py", line 327, in run_
File "./viewPDF.py", line 13, in run
File ".\posixpath.py", line 95, in splitext
File ".\genericpath.py", line 91, in _splitext
AttributeError: 'NoneType' object has no attribute 'rfind'
any suggestions what could be the problem?
regards
Hi,
iIn my case, on OS X 10.7.2 with MacTeX 2011 updated, last SL 2 beta, the compilation does not create pdf's from the eps figures.
Best
Christian
When using "%!TEX root = pathtoroot" the cite completion fails with "Cannot find \bibliography{} command!"
A lot of keyboard shortcuts described in the README don't seem to work on Linux (under Gnome 3 at least). "Ctrl+Shift+]" is particularly missed. Others like bf - [TAB] work as expected. Additionally, the build command doesn't launch the pdf-viewer, which is only a minor inconvenience.
It might be my non-US keyboard or the changes in tab-completion in the newest S2, but the features are nonetheless dearly missed.
Is it possible to use a .bib file not in the working directory for completions? Can't find a way to do it, but maybe I'm missing something?
Things for me to remember.
1/23/2012
Must apt-get install latexmk explicitly (not just texlive)
Super key brings up fancy search / Launchpad clone / Win8 Start thingy. Must either remap that (probably more practical) or remap all keybindings that use the super key (scary!)
I have tried to compile som *.tex files in folders with Norwegian letters (æ,ø,å, although other "funny" letters don't seem to work either), and get stuck on compiling without any error messages. They work fine if I move them to folders without the letters. It would be nice if it wasn't necessary to change folder names in order to use this.
According to the readme, paths with spaces don't work with miktex, but these actually seem to work fine.
Hi,
I have a file called library.bib in my local texf tree, so that I can use is in all my documents. When I try to use cite_
in LaTeX tools, it fails because it looks for the file in the local directory, which obviously fails.
Having bib files in the texmf tree is standard practice in LaTeX, any way the plugin can conform to it?
Right now you have to include a header in each file to link to master. Would it be so difficult to use the project functionality in ST2. This way you can chech for ref, cite, etc. in project files only.
I think it should be great having this kind of issue.
It'd be great to see a high level view of my Tex document to see how everything is laid out. TextMate has this kind of support in the symbols menu at the bottom of the document and it's pretty great.
For example.
The comments in "Default (OSX).sublime-keymap" indicate that you're aware of this problem. I've fixed it locally, but I think you should avoid clobbering sublime keybindings in a package. My first reaction was to uninstall this package because I could no longer navigate between files the way I was used to.
Both searches don't work for me.
Minor thing: same 'sh' fix should apply to viewPDF.py
Popen(['sh'] + viewercmd + [pdfFile], cwd=script_path)
Also, the script evince_sync works with python2, Arch Linux unfortunately changed the symlinks so that 'python' always refers to python3.
So line 13 should read
python2 evince_backward_search "$PDFFILE" "$EDITORCMD"&
at least on Arch Linux. That doesn't entirely fix it though. "python2 evince_forward_search bla.pdf 1058 bla.tex" works on command line, so that's ok.
ST2 build 2181. MiKTeX 2.9. Windows 7 64 bit.
I only see [Compiling ...
in console but I know the errors exist because SumatraPDF doesn't open/update and I don't see [Done!]
.
The log file exists with the errors correctly listed. They just don't appear in the ST2 console.
Hi Marciano,
First of all I would like to thank you for a very good package.
I was wondering if you had any plans of supporting biblatex and biber?
It would be greatly appreciated as these packages adds utf8 capabilities, and hence, in many cases are a better option than bibtex.
cheers,
Jørgen
In OS X, LaTeXTools' toggle_focus
key binding in (super+ctrl+f
) conflicts with ST2's default toggle_full_screen
key binding. I've manged work around the problem by re-mapping toggle_focus
to super+ctrl+b
, but an official alternative key binding would be a better solution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.