Comments (16)
Too bad. As it is, the feature is pretty much useless as soon as you have more than one file in your document. :/
from latexer.
@reitzig It may actually be even simpler!
It looks like @Focus built in support for using TEX root. So, all you should need to do is step 2; no YAML should be necessary. (The YAML becomes important if you write in Markdown).
Can you try the following?
- open a supplementary file
- Set TEX root to your main file
- Make sure a valid bibliography resource is defined in your main file
- With your supplementary file open, check whether autocomplete works
- Report back here with your results :-)
from latexer.
Any plans on fixing this? This still remains with latexer 0.3.0 and atom 1.24.1.
from latexer.
I note that the second use case is addressed by adding %!TEX root = ...
to every non-main file. That's a fair solution, if not a very convenient one.
Alternative ideas to (trying to) find out which BibTeX files are referenced:
- Use information from opened BibTeX files.
- Use information from all BibTeX files in current project folders.
- Allow users to mark relevant BibTeX files for the current project (in the tree view, or with a project config file).
from latexer.
I am confused as to why you would have the bibtex file under chapter1.tex. Would it not make sense just to have it under mythesis.tex?
from latexer.
@Focus My usecase is to have \addbibresource
in preamble.tex
.
What you write (which corresponds to my second paragraph) happens all the time, of course, but the plugin does not resolve this case either. That said, you may want to have one BibTeX file when writing books with chapter bibliographies.
The abstract issue is: the way LaTeX works, you can specify BibTeX sources almost anywhere in the project, and reference the data everywhere. Latexer currently only looks for linked files in the current file.
from latexer.
Hm. I might implement this at some point but to be honest it is pretty low on the priority list.
from latexer.
latexer is excellent....thank @Focus
also thanks @reitzig, the %!TEX root = ...
hack for the multifile support is awesome, good enough for me
from latexer.
@reitzig We just merged #49, which may solve your issue?
It allows you to specify bibliographic info in a YAML-formatted metadata block at the top of your document.
Please let me know if this helps you.
From the Updated README:
Latexer finds your bibfiles
Latexer will automatically scan your document to find your bibfiles. For example, if your document contains the command
\bibliography{mybib1.bib, mybib2}
, latexer will find and then scan through the files namedmybib1.bib
andmymbib2.bib
to get the citations. Additionally, Latexer will look for BibTeX files given in the current file of the form\addbibresource
and\addglobalbib
.You can also specify bibfiles using a YAML metadata block at the top of your document. If you choose to write in Markdown on RMarkdown, Latexer will automatically look for the
bibliography
key in your YAML and scan any files specified for citations.
from latexer.
Looks good! So the workflow would be:
- Add
.bib
files to YAML meta block in the main file. - Add
%!TEX root = ...
in all supplementary TeX files.
Right?
from latexer.
- is what I didn't have, defining the bib files in a preamble file. Hence, the ticket. ;)
from latexer.
@reitzig - ah. Just trying to help.
So, is there anything else you need to solve your problem? If not, we can probably close the issue :-)
from latexer.
There should be an optional configuration file .latexer
or .latexer.json
where the %!TEX root = mainfile.tex
can be defined, it is not very nice to put it in each and every .tex
file.
from latexer.
I have a similar problem. I have my root file root.tex
with an \input{header}
and an \include{chapters/chapter1}
line in it. The header.tex
file has the \bibliography
line in it and in chapter1.tex
I'm using \cite{}
. %!TEX root = ...
is defined in both of them. But nothing shows up.
It seems that latexer doesn't check more 'layers' than the the file you're in and the root file.
from latexer.
@hendrikbl hmm. Would you be able to create a simple reproducible example?
Also, a few questions:
- What version of the package are you using?
- Which version of atom are you using?
- Can you confirm on your system that latexer does work in the simple case of a single .tex and bibliography file in the same parent directory?
from latexer.
Here is an example.
Autocompletion works fine from within header.tex
but shows nothing from within root.tex
or chapters/chapter1.tex
.
To answer your questions:
- Latexer 0.3.0
- Atom 1.21.2
- Yes, it works fine in that case.
from latexer.
Related Issues (20)
- Cloned latexer package cannot find module atom-space-pen-views HOT 2
- Bibliography autocompletion enhancement HOT 1
- Environment auto-completion is overzealous and creates \end{} when one already exists HOT 1
- We should use a persistent datastore for speed improvements HOT 3
- Feature request: Adding support for glossary HOT 1
- Support list autocontinuation HOT 1
- After selecting ref/cite from a list, not able to get back cursor. HOT 1
- Dropdown menu not showing up in Atom 1.17 HOT 4
- Creating too many ends of environments (when activating autocomplete environments) HOT 5
- Failed to activate the latexer package HOT 1
- Citation assistance for parencite HOT 4
- Wrapping math and macros
- Modal Panel broken with theme HOT 3
- Feature request: Adding support for Acronym
- TEX Root command to static
- Feature request: autocomplete for bib and refs from separate directory
- Feature Request: display the content of bibtex citation items
- Feature request: addbibresource remote support + better suffix handling
- Failed to load the latexer package
- Feature request : use texmf directory to find the bib file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latexer.