It's worked for me. Similarly i have Makefile anf Dockerfile which doesnot have extensions too. How to make comments doxygen readable for Makefile/Dockerfile? For shell scipts which does not recognised by doxygen bu i am using doxygen-bash.sed
Comments should reable by doxygen for Makefile amd Dockerfile.
E.g. I have a file:
my-cmd
#/usr/bin/env python
print('hello')
or:
my-cmd-2
#/usr/bin/env bash
echo hello
the syntax highlighting is not working. It does work when I have files with extension however such as my-cmd.py or my-cmd-2.sh, so it seems that it is unable to recognize those file types by shebang.
Is this just a bug on both the Python and Bash plugins? Or is there some more global setting for it? Or is it just not possible in Eclipse currently?
I looked under the "Association" settings but I could only see filename based methods there.
Tested on Eclipse CDT 2022-09 with extensions PyDev 10.0.1 and Bash Editor 2.8.0.
I've downloaded VSCode and installed a Verilog extensions.
Reading VsCode manual there should be a build in Make command.
First I created some verilog files.
Then I created a MakeFile with a compile command for the verilog command.
From the Terminal window I write:
Make
The only response I get is something similar like this "Make not recognized"
Am I missing some steps here ?
I am new to ipython notebook, and I would like to convert my ipynb to pdf. But I get the following error when I try to Download as PDF via LaTex.
nbconvert failed: pdflatex not found on PATH
There is no documentation anywhere how to add pdflatex to my PATH. I use windows. Thank you!
A simple and surprisingly good solution is to print the notebook to pdf through the browser with ctrl+p. Just make sure your plots and figures are not on interactive mode otherwise they will not be displayed (set them to %matplotlib inline).
Exporting jupyter notebooks through latex is quite troublesome and takes a lot of tinkering to get something remotely close to publish ready. When I absolutely need publication quality I do it on a latex editor, but this tutorial goes in great length about doing it on jupyter.
A few useful tips to get better results:
Higher resolution plots
Hide your code-cells from the pdf
Take a look at these extensions to improve your jupyter documents
For Mac OS X, the solution for me was to install MacTex first and then export the path to find it:
### TeX
export PATH="/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin:$PATH"
You can add this to your .bash_profile or similar config file to load it every time.
See more here https://github.com/jupyter/nbconvert/issues/406
As said by Thomas K in the comments, you need to have Latex installed, and after add the path to the directory containing pdflatex.exe file to the PATH variable of your system.
I have looked for a lightweight distribution and tried installing TeXworks, but I didn't find any pdflatex.exe file.
So I have tried TeX Live, which worked fine creating the pdflatex.exe file under the target installation directory. This path should be like C:\...\texlive\2016\bin\win32.
Finally, you should just add this path to the PATH environment variable of your system (you can use the link shared by Thomas K).
As said here, you need to quit jupyter notebook and open a new command prompt after making any path changes, in order for jupyter to find the newly added item to the PATH.
Then, in Jupyter, you can check your environment variables by running the following (refer to this link for details):
import os
os.environ['PATH'].split(';')
and check if it contains the path to pdflatex.exe file.
If you get some trouble when exporting your notebook to pdf due to missing files/packages (this happened to me), refer to this link to search and install them under TeX Live.
For Linux, the reported error is due to the lack of XeLatex, part of the texlive-xetex package.
Installation in ubuntu will be:
sudo apt install texlive-xetex
Instead of using nbconvert what you can do is :
Download your ipynb file as HTML from File option.
Right-click and select print or use Ctrl+P.
Save as PDF
Easy.
Here is the full solution that worked for me (for Mac).
brew cask install mactex
$ cd ~/
$ touch .bash_profile
This will open the bash profile on TextEditor
$ open -e .bash_profile
Paste the following to the top and save
export PATH="/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin:$PATH"
Close any notebook you have and reopen it
Here is the notebook explaining it step by step:
https://github.com/ybaktir/notes/blob/master/Convert%20Jupyter%20Notebook%20to%20Pdf.ipynb
I agree that latex installation (at least on windows) is painful and the result in my case was not a great looking document. The ctrl-p method alone doesn't work great if you're running in JupyterLab, but if you export the notebook to HTML, then print from the browser, choosing PDF, the result is quite good.
I know my solution is not at a level. But it works !!
in your browser of notebook tab, simply do "ctrl + p" to get download in pdf
First export the notebook file to HTML (available through File> Download as..).
If you are using JupyterLab, then this is available under File > Export Notebook As....
Use (any) free online converters to convert html file to a pdf file. (One such free online converter is sejda (https://www.sejda.com/html-to-pdf)
Note, there are many such converters are available online.
I installed perl-support.vim into ~/.vim (unzipped). When I create a new .pl file it shows me the default template, which means my installation is successful (I guess). I have already added filetype plugin on in ~/.vimrc & /etc/vimrc.
How do I enter a perl-support command?
The write up recommends typing \isu in normal mode for creating a new sub, but the moment I hit i vim changes into insert mode and nothing intended happens.
What am I doing wrong?
Make sure you've enabled ftplugins with the filetype plugin on command in .vimrc, and of course make sure that the file you're editing is recognized as a Perl file (usually, by having a known extension, but you can force the matter by issuing the command set filetype=perl. If filetype plugins aren't enabled, or if the filetype isn't recognized, then the rest of perl-support won't get loaded at all.
As recommended by hobbs, set filetype=perl works.
However, I wanted to do this everytime I open a .t test file — which my vim does not recognize as perl files because the interpreter statement is also custom.
I checked out :help syntax in vim and saw this:
mkdir ~/.vim/ftdetect
cd ~/.vim/ftdetect
vim t.vim
which contains
au BufRead,BufNewFile *.t set filetype=perl
which means: if the file extension is .t then do set filetype=perl.
This can be useful for any other custom extension.
I found I had to install Perl::Tags before most things (esp. \ commands). Installing Perl::Tags made an error message thrown by filetype plugin on go away.
cpan> install Perl::Tags # make sure you say yes to any offer to install dependancies