Background
I originally asked a question on Stackoverflow, asking how I add the IOP document class to the list of available document classes in Lyx. (I will try to remove or merge that out dated quesiton.)
I now understand that this is a 2-stage process. Stage 1 is to install IOP styles and cls files etc for Texlive, and Stage 2 is to update Lyx to be able to use these.
I have now successfully done this on a Linux Mint distro. The method is described below. I will try to keep this updated if anything changes. Hopefully I have provided enough info for anyone to be able to do this regardless of distribution or OS. If not, add a comment so I can add required info.
Useful References:
The following items helped me complete this process:
Lyx Wiki Page for IOP: http://wiki.lyx.org/Layouts/Iopart
Section 5.1 of the Customization Manual (Help) Document provided in Lyx.
Open Lyx and Goto: Help -> Customization -> Section 5.1 of Document
The IOP Latex Document download page: ftp://ftp.iop.org/pub/journals/ioplatexguidelines.tar.gz
Stage 1 - Installing IOP Document Files for Texlive (Or Miktex)
Windows Users: Check this link for directory location info: http://wiki.lyx.org/Layouts/Iopart
The first step is to download the relevant files for IOP documents from here: ftp://ftp.iop.org/pub/journals/ioplatexguidelines.tar.gz
If this link has expired, then do a duckduckgo search for "iop latex guidelines". The IOP have a .tar.gz file with all required files for Latex publishing included.
The next step is to find the correct Texlive directory. For me this was: /usr/share/texlive/texmf-dist/tex/latex If you are using miktex this will be different.
Using root privileges, create a directory in this folder: sudo mkdir iopart
Again using root privilages, extract the .tar.gz archive you downloaded to the directory iopart. After doing this and running the command ls, you should see the following files:
iopams.sty iopart12.clo IOPGraphicsGuidelines.pdf IOPLaTeXGuidelines.tex iopart10.clo iopart.cls IOPLaTeXGuidelines.pdf setstack.sty
Not all of these are important. You may wish to read through the PDF files which contain info on how to write an IOP accepted publication. I believe the .tex file contains an example template which may help you.
Finally, reconfigure Texlive by running the command sudo texhash.
You should now have the IOP Document Latex files installed and be able to use them with texlive.
Stage 2 - Reconfigure Lyx
This step is trivial, open Lyx and goto: [Menu Bar] -> Tools -> Reconfigure
Stage 3 - Open a new Lyx Document and Test
Goto: File -> New from Template -> Select iop-article.lyx
Goto: Document -> Settings : Check that the document type is "iop article"
Click the "View" button in Lyx which compiles and opens your document.
You should see a example pdf file with some mock contents.
Related
I want to compile uic to PySide6 but I don't find how to install pyside6-uic tool. Where can I install pyside6-uic? I downloaded PySide6 but command pyside6-uic doesn't work.
There is a reference here in the title:
https://doc.qt.io/qtforpython/tutorials/basictutorial/uifiles.html#using-ui-files-from-designer-or-qtcreator-with-quiloader-and-pyside6-uic
Step 1. If you installed PySide6
a. In a venv then go to your venv's folder.
b. Globally then go to your python installation folder.
Step 2. Go to Lib then site-packages then PySide6.
Step 3. Copy uic.exe ( or uic if the file extension are hidden) create a folder called bin and paste what you've copied inside it.
To compile ui files from:
QtDesigner: From the top menu select Form -> View Python Code... then click on the save icon (floppy disk) from the newly opened window.
Command Prompt: pyside6-uic.exe mainwindow.ui > ui_mainwindow.py
PowerShell: pyside6-uic.exe mainwindow.ui -o ui_mainwindow.py
If you using virtual environment, when you install pyside6 with pip in the virtual environment there is a folder named Scripts there is the pyside6-uic.exe tool.
if you have install pyside6 globally in your system and you use visual studio code you can use the extension PySide2-vsc then when you installed you can go to preferences > settings and search the PySide2-vsc extension settings then look for the "Command to compile a .ui file into python". Then you can use that feature with right-click on .ui files.
I could solve this issue to add this Path to my %PATH% Variable on windows.
C:\Users\<YOUR_USER_PATH_NAME>\AppData\Roaming\Python\Python311\Scripts
The pyside6-uic tool is supposed to be installed automatically when installing the Python package.
Check if uic is in PATH
When using loadUiType, the Qt documentation (here) states that :
The internal process relies on uic being in the PATH. The pyside6-uic
wrapper uses a shipped uic that is located in the
site-packages/PySide6/uic, so PATH needs to be updated to use that if
there is no uic in the system.
But even then, I got the following error :
Cannot run 'pyside6-uic': "execvp: No such file or directory" -
Exit status QProcess::NormalExit ( 255 )
Check if 'pyside6-uic' is in PATH
For me, pyside6-uic was not located in site-packages/PySide6/uic. When reinstalling the module with pip, I noticed this message :
WARNING: The scripts pyside6-assistant, pyside6-designer, pyside6-genpyi,
pyside6-linguist, pyside6-lrelease, pyside6-lupdate, pyside6-rcc and pyside6-uic are
installed in '/Users/<user>/Library/Python/3.8/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning,
use --no-warn-script-location.
So make sure to add the right directory to your $PATH variable.
Once it's done, you will be able to use the pyside6-uic command to generate a Python class from a UI file :
pyside6-uic mainwindow.ui > ui_mainwindow.py
Loading a .ui from code
You can also load a .ui file from your code using either:
loadUiType (doc page) :
This function generates and loads a .ui file at runtime, and it
returns a tuple containing the reference to the Python class, and the
base class.
or QUiLoader (doc page):
enables standalone applications to dynamically create user interfaces
at run-time using the information stored in UI files or specified in
plugin paths
from PySide6.QtUiTools import QUiLoader
ui_file = QFile("mainwindow.ui")
ui_file.open(QFile.ReadOnly)
loader = QUiLoader()
window = loader.load(ui_file)
window.show()
Generally speaking, use absolute paths to access your UI files. Relative paths are susceptible to errors.
Doxygen now allows to link md files to other md files with regular markdown syntax:
How do I link between markdown documents in doxygen?
I have the following file structure:
MyDir/README.md
MyDir/Docs/other.md
Linking from README.md to other.md is straigforward:
[My link](Docs/other.md)
However linking from other to Readme is not working:
[My back link](README.md)
Since doxygen generates its links relative to where it is run, and I am running doxygen on MyDir, that should be the correct relative path. I also tried
[My back link](../README.md)
Just in case, but no luck.
I'm getting an IOerror trying to open a HDF5 file, so I should use H5dump to check the file (according to: H5PY IOError: Unable to open file (File signature not found)). However, I have no clue what to download to obtain usage of the h5dump command.
I have already downloaded and built the binary distribution for centOS (https://www.hdfgroup.org/downloads/hdf5/) but that did not help. I have found the doc pages (https://support.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Dump). Every command is meticulously described, including h5dump, but they have not included a single download link for reasons incomprehensible for my tiny brain.
I've opened the HDF5 file with the HDFViewer tool, if thats anything. How do I get h5dump?
The utilities are included in the gzipped tarball (hdf5-1.10.5-linux-centos7-x86_64-shared.tar.gz) found at the link below. Look under Pre-built Binary Distributions:
DOWNLOAD HDF5
Once you extract the files, you will have a bin directory. That's where you will find h5dump and many other utilities. Good luck.
Background
I originally asked a question on Stackoverflow, asking how I add the IOP document class to the list of available document classes in Lyx. (I will try to remove or merge that out dated quesiton.)
I now understand that this is a 2-stage process. Stage 1 is to install IOP styles and cls files etc for Texlive, and Stage 2 is to update Lyx to be able to use these.
I have now successfully done this on a Linux Mint distro. The method is described below. I will try to keep this updated if anything changes. Hopefully I have provided enough info for anyone to be able to do this regardless of distribution or OS. If not, add a comment so I can add required info.
Useful References:
The following items helped me complete this process:
Lyx Wiki Page for IOP: http://wiki.lyx.org/Layouts/Iopart
Section 5.1 of the Customization Manual (Help) Document provided in Lyx.
Open Lyx and Goto: Help -> Customization -> Section 5.1 of Document
The IOP Latex Document download page: ftp://ftp.iop.org/pub/journals/ioplatexguidelines.tar.gz
Stage 1 - Installing IOP Document Files for Texlive (Or Miktex)
Windows Users: Check this link for directory location info: http://wiki.lyx.org/Layouts/Iopart
The first step is to download the relevant files for IOP documents from here: ftp://ftp.iop.org/pub/journals/ioplatexguidelines.tar.gz
If this link has expired, then do a duckduckgo search for "iop latex guidelines". The IOP have a .tar.gz file with all required files for Latex publishing included.
The next step is to find the correct Texlive directory. For me this was: /usr/share/texlive/texmf-dist/tex/latex If you are using miktex this will be different.
Using root privileges, create a directory in this folder: sudo mkdir iopart
Again using root privilages, extract the .tar.gz archive you downloaded to the directory iopart. After doing this and running the command ls, you should see the following files:
iopams.sty iopart12.clo IOPGraphicsGuidelines.pdf IOPLaTeXGuidelines.tex iopart10.clo iopart.cls IOPLaTeXGuidelines.pdf setstack.sty
Not all of these are important. You may wish to read through the PDF files which contain info on how to write an IOP accepted publication. I believe the .tex file contains an example template which may help you.
Finally, reconfigure Texlive by running the command sudo texhash.
You should now have the IOP Document Latex files installed and be able to use them with texlive.
Stage 2 - Reconfigure Lyx
This step is trivial, open Lyx and goto: [Menu Bar] -> Tools -> Reconfigure
Stage 3 - Open a new Lyx Document and Test
Goto: File -> New from Template -> Select iop-article.lyx
Goto: Document -> Settings : Check that the document type is "iop article"
Click the "View" button in Lyx which compiles and opens your document.
You should see a example pdf file with some mock contents.
I have a project in directory A and files that I use in all my projects are in directory B.
When I moved a .sty file from A to B, the main .tex file does not compile anymore.
The error is that the .sty file was not found. I am puzzled because:
Directory B is included in the path of the project.
I cleaned (deleted manually) all the auxiliary files used in the previous compilations.
I refreshed the project folders .
Did anyone had similar problems? Suggestions?
The file LaTeX.sublime-build, within the Sublime Text folder . . . /Packages/LaTeXTools, contains a $PATH for different operating systems.
For example, Sublime Text 2 on an OSX operating system, has a file located at ~/Library/Application Support/Sublime Text 2/Packages/LaTeXTools/LaTeX.sublime-build. The relevant line of code for a MacTeX TexLive 2012 installation is "path": "$PATH:/usr/texbin:/usr/local/bin",. The plugin LaTeXTools looks in that path for *.sty files that are a part of the TexLive installation. While it may be possible (under some circumstances) to place the *.sty files within the working directory of the *.tex file, this particular plugin looks to the path mentioned hereinabove. So one option would be to add additional locations to the $PATH to suit the needs of the user, or simply place the *.sty files within the path that is pre-defined by the plugin developer.