I just started using Atom for LaTeX, and i use a lot of snippets to make my life easier.
Now, this often means that i will "nest" snippets, meaning i might use a snippet for a fraction ...
\frac{$1}{$2} $0
... and then insert another snippet inside of this one, e.g.
\sqrt{$1} $0
Now, i have an issue where the pointers "break" when nesting the snippets. So, when i insert the square root snippet into the fraction snippet, the function to tab into the next pointer continues for the squareroot snippet, but breaks for the fraction snippet.
Is there a way to circumvent this?
Thanks :)
As of December 2018... this has been an issue for a while now. Atom's snippets package doesn't do well when trying to insert a snippet with tab stops into another snippet with tab stops. You can view the issue here:
https://github.com/atom/snippets/issues/152
Also, there has been a pull request to fix the issue, but it hasn't been merged into the master branch... and it's quite old and because of that, the patch has some file conflicts so you can't just apply the patch without resolving those conflicts. You can view that pull request here:
https://github.com/atom/snippets/pull/192
This may be fixed in the future, but I wouldn't hold my breath. Your best bet for fixing this issue is to either fork the snippets package and create your own that works as expected or to try to use the code here to patch your local copy of the snippets package
Related
I often put the following lines at the beginning of my Maxima files
load("operatingsystem")$
chdir("/Users/tilda/Documents/progs/maxima/spm/")$
to make sure that output created by other programs from within Maxima is written into the current working directory as indicated above.
It does its job, yet this method is rather inflexible as the user's home directory, i.e.
/Users/tilda
is hardcoded into the program. So, when I exchange these files, users have to manually edit and adjust the code to their $HOME. To fix this I changed the code to various forms of
load("operatingsystem")$
chdir("$HOME/Documents/progs/maxima/spm/")$
just to get (Lisp) error messages. After consulting the manual and some trial and error I came up with this:
(%i1) load("operatingsystem")$
getenv("HOME")$
chdir(%)$
chdir("Documents/progs/maxima/spm/")$
getcurrentdirectory();
which works fine. For other users, i.e. matthias, the current directory now indeed is in their path.
(%o5) /Users/matthias/Documents/progs/maxima/spm/
However, I wonder if there is a more elegant and shorter way to achieve this.
Any suggestions appreciated.
Cheers
Tilda
I'm trying to compile a LaTex file online with sharelatex. It works fine, but on top of my generated references the first seems to be broken. It only shows " [1] ." . All other 25 references seem to be fine. It is also awkward that the [1] reference doesn't even appear in the document anywhere.
I'm not sure, but I think this warning might be connected, since it is the only one I get:
/usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/blx-bibtex.def Package biblatex Warning: Using fall-back BibTeX(8) backend: functionality may be reduced/unavailable.
The bibilography is generated with \printbibliography
I found a solution after looking on the right forum:
https://tex.stackexchange.com/questions/365060/warning-using-fall-back-bibtex8-backendbiblatex-functionality-may-be-redu
I had to use
\usepackage[backend=bibtex,style=numeric,sortcites,natbib=true,sorting=none]{biblatex}
instead of
%\usepackage[backend=bibtex, style=numeric]{biblatex}
I still don't really get why it works now. The warning is still displayed, but the problem with the first reference is gone. When i try to use biber with \usepackage[backend=biber, style=numeric]{biblatex} it simply doesn't output any table of references.
edit:
It seems what I thought fixed it here didn't, but just hid the broken reference in between fine ones. I made a mistake in the .bib file, one closing bracket } to much. I didn't notice it before because I didn't know how to assassinate the broken reference with its counterpart in the .bib file.
i am reading swift from apple docs and learning about statements. but couldnot find any information about the Line Control Statements.
According to the docs
A line control statement is used to specify a line number and filename
that can be different from the line number and filename of the source
code being compiled. Use a line control statement to change the source
code location used by Swift for diagnostic and debugging purposes.
A line control statement has the following forms:
#sourceLocation(file: filename, line: line number)
#sourceLocation()
My question is when should i use it? The docs lags an example about the topic.Any links or some hints would be helpful.
This isn't the sort of thing you'd ever need as a beginner, and you could probably go through an entire career without using it. It seems to be meant for use in tools that generate source code. See the comments in the original feature proposal for the complete story.
TL/DR: Don't worry about it, you'll never need it.
I've been learning Ruby/Rails with vim. Tim Pope's rails.vim seems like a really good tool to traverse files with, but I keep getting these pesky "E345 can't find file in path" errors. I'm not vim expert yet, so the solution isn't obvious. Additionally, I've tried this and it doesn't apply to my problem.
As an example of the problem. I have a method format_name defined in app/helpers/application_helper.rb and it is used in app/helpers/messages_helper.rb. Within the latter file I put my cursor over the usage of format_name and then hit gf and I get that error. Similar disfunction with commands like ]f and [f
However, it works sometimes. I was able to gf from user to the app/models/user.rb
Ideas?
I think that is a limitation of rails.vim. It does not support “finding” bare methods. Supporting something like that would require one of the following:
an exhaustive search of all the source files for each “find” request
(which could be expensive with large projects),
“dumb” indexing of method names
(e.g. Exuberant Ctags and gControl-]; see :help g_CTRL-]), or
smart enough parsing of the code to make a good guess where the method might be defined
(which is hard to do properly).
If you know where the method is, you can extend many of the navigation commands with a method name:
:Rhelper application#format_name
But, you do not have to type all of that in. Assuming the cursor is on format_name you can probably just type:RhTabspaceappTab#Control-R Control-W (see :help c_CTRL-R_CTRL-W).
In LaTeX, the \includeonly statement exists to selectively add or exclude sub-documents.
One quirk in the whole process is that when sections are excluded, LaTeX decides to insert a page-break. The article at To have no pagebreak after \include in LaTeX recommends using newclude to avoid this issue. This package defines \include* which provides a work-around by omitting the implied \clearpage.
I am occasionally seeing the behaviour where if I comment out lines of my \includeonly statement the sub-document still gets included. Has anyone else seen this behaviour?
For whatever reason, everything is now working as it should.
Just in case the order of the \usepackage directives is important, in the working version \usepackage{newclude} is the first command after \documentclass{article}.
It's not a bug, it's a feature. Really. Does \input do what you need, rather than \include?