On Windows 10, I have MiKTex (as admin) installed and updated. Within VS Code, I have installed the LaTeX Workshop extension, but my document will not compile. I require lualatex, so I have moved that "recipe" to the "first" position in LaTeX Workshop's .json file, but compiling throws the message Recipe terminated with error. Looking at the console shows Undefined control sequence with my document's file path c:\Users\...etc... -- this is relating to the first line of the document [1,1] where I have the typical \documentclass[12pt]{article}.
It seems that the extension isn't able to locate the Path to the LaTeX executables...does this sound right? It is almost like it is looking in my files own directory for the LaTeX classes and packages, etc. In my Windows System Environment Variables, the path to C:\Program Files\MiKTeX 2.9\miktex\bin\x64\ seems to be correctly configured. Oddly, if I try to compile using pdflatex, it does not seem to encounter this specific issue (rather showing the error that I need to use lualatex, which I am trying to do).
Has anyone had this issue, or knows a way to fix it?
1: It might be some problem related to "pdftex vs pdflatex"... Now I have the same but looking for the solution... (Win10; VSCode + Latex Workshop extension; WSL2; TexLive 2020 on Ubuntu 20.04;)
2: I've found something... in: "latex-workshop.latex.tools"
{
"name": "pdflatex",
"command": "pdftex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
],
"env": {}
},
I changed "command": "pdftex" to "command": "pdflatex"
Now it is working.
Make sure you got TeX Live installed. The installation takes some time, but as you've installed it, it should work.
Related
I am trying to complete a paper in latex downloaded from an online template.
there shows an error while compiling:
This is BibTeX, Version 0.99d (MiKTeX 21.6)
The top-level auxiliary file: Islam2021.aux
I couldn't open style file IEEEbib.bst
---line 69 of file Islam2021.aux
: \bibstyle{IEEEbib
: }
I'm skipping whatever remains of this command
I found no style file---while reading file Islam2021.aux
(There were 2 error messages)
Process exited with error(s)
How can I fix this?
IEEEbib.bst is not a default style include in tex distributions. Either you can download it from wherever you have your online template from or you could try your luck with a random version of the file from somewhere on the internet, e.g.
https://2021.ieeeicassp.org/Papers/PaperFormat/IEEEbib.bst
(this might be a different version and might give different results ...)
I am currently using sphinx 1.4.9 for documents creation. While giving make latexpdf, I get the following error.
(/usr/share/texmf/tex/latex/upquote/upquote.sty)
(/usr/share/texmf/tex/latex/float/float.sty)
(/usr/share/texmf/tex/latex/graphics/graphicx.sty
(/usr/share/texmf/tex/latex/graphics/graphics.sty
(/usr/share/texmf/tex/latex/graphics/trig.sty)
(/usr/lib/texmf/tex/latex/config/graphics.cfg)))
(/usr/share/texmf/tex/plain/misc/pdfcolor.tex)
(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
(/usr/share/texmf/tex/latex/hyperref/pd1enc.def)
(/usr/lib/texmf/tex/latex/config/hyperref.cfg)
(/usr/share/texmf/tex/latex/oberdiek/kvoptions.sty)
****! Package keyval Error: pdfencoding undefined.****
See the keyval package documentation for explanation.
I have searched for pdfencoding in the sphinx.egg, also it only appears in sphinx.sty.
but I don't know how to define this pdfencoding. whether to edit conf.py or how to do.
Your hyperref is outdated. Sphinx 1.4.x series was tested to work with Ubuntu Precise (Debian/TeXLive 2009). I can not try it but here is a hack which may help you out. However, perhaps other parts will fail as your TeX install is really old...
put
'passoptionstopackages' : """
\\let\\originalPassOptionsToPackage\\PassOptionsToPackage
\\makeatletter
\\def\\PassOptionsToPackage#1{%
\\def\\#tempa{#1}\\def\\#tempb{pdfencoding=unicode}%
\\ifx\\#tempa\\#tempb\\expandafter\\#gobbletwo
\\else\\expandafter\\originalPassOptionsToPackage\\fi {#1}}
\\makeatother
""",
inside the latex_elements configuration variable of conf.py. Could work ...
I have a simple dart class I am trying to test.
To test it I need to open a txt file, feed the content to an instance of the class and check that the output is correct.
Where do I place this txt file? The txt file is useless outside of testing.
Also, related, how do I acess its directory consistently? I tried placing it in the test folder, but the problem is that:
System.currentDirectory
Returns a different directory if I am running the test on its own or the script calling all the other test dart files on at a time
I check if System.currentDirectory is the directory containing the pubspec.yaml file, if not I move the current directory upwards until I found the directory containing the pubpsec.yaml file and then continue with the test code.
Looks like package https://pub.dev/packages/resource is also suitable for this now.
I have still not found a definitive answer to this question. I've been looking for something similar to the testdata directory in Go and the src/test/resources directory in Java.
I'm using Android studio and have settled on using a test_data.dart file at the top of my test directory. In there I define my test data (mostly JSON) and then import it into my individual tests. This doesn't help if you need to deal with binary files but it has been useful for my JSON data. I'll also inject the JSON language with //language=json so I can open the fragment in a separate window to format.
//language=json
const consolidatedWeatherJson = '''{
"consolidated_weather": [
{
"id": 4907479830888448,
"weather_state_name": "Showers",
"weather_state_abbr": "s",
"wind_direction_compass": "SW",
"created": "2020-10-26T00:20:01.840132Z",
"applicable_date": "2020-10-26",
"min_temp": 7.9399999999999995,
"max_temp": 13.239999999999998,
"the_temp": 12.825,
"wind_speed": 7.876886316914553,
"wind_direction": 246.17046093256732,
"air_pressure": 997.0,
"humidity": 73,
"visibility": 11.037727173307882,
"predictability": 73
}
]
}
''';
Using the Alt + Enter key combination will bring up the Edit JSON Fragment option. Selecting that open the fragment in a new editor and any changes made there (formatting for example) will be updated in the fragment.
Not perfect but it solves my issues.
I am trying to use the LOVE graphics library for Lua, and use Sublime text 2 to write in. The LOVE website says i can use this code:
{
"selector": "source.lua",
"cmd": ["C:/Program Files/LOVE/love.exe", "$file_path"],
"shell": true
}
to create a build system that will allow me to run my scripts directly from inside Sumblime text. but when i use this build system with ctrl+B it says:
" 'C:/Program' is not recognized as an internal or external command, operable program or batch file."
it is stopping at the space in "Program Files". how do i stop it doing this?
The problem is the space in the filename that is being wrongly used as a parameter delimiter.
Depending on your environment you can either double quote the executable name or use dir /x to get the short (8.3) filename for the path.
You can just move "LOVE" directory in C Drive like
C:\LOVE
It will work.
My current custom LaTeX sublime build goes:
{
"path":"/bin:/usr/texbin:/usr/bin",
"cmd": ["sh", "-c", "pdflatex main.tex && open main.pdf"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": ["source.latex"],
}
And it's working great when I select it manually. However, I'm switching back and forth between python scripts and my latex code, so I want to set the build system to "automatic" and let Sublime know that it needs to run LaTeX for .tex files. I tried source.tex, source.latex, source.LaTeX... I think I'm barking up the wrong tree.
edit: I found out that by pressing Cmd+Alt+P I get some information about what the Syntax Highlighter is aware of. It seems to suggest that the right selector would be text.tex.latex... but it doesn't work.
Have you tried just using "selector": "text.tex.latex", without the square brackets? Worked for me.