Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate PDFs in the directory containing tex file by default #1538

Closed
NagabhushanSN95 opened this issue Jul 31, 2020 · 15 comments · Fixed by #1553
Closed

Generate PDFs in the directory containing tex file by default #1538

NagabhushanSN95 opened this issue Jul 31, 2020 · 15 comments · Fixed by #1553
Assignees
Labels
enhancement New feature or (non bug related) change to the program.
Milestone

Comments

@NagabhushanSN95
Copy link

Hi,
I recently installed ubuntu on my system and have a fresh installation of PyCharm and installed TeXiFy-Idea v0.6.10. I use stand-alone tex files. When I compile them (ctrl+shift+F10), the pdf is generated in home by default. In previous version, there was an option to select output files with tex file. Is it possible to do the same in the new version?

I know I can specify the output location, but then I'll have to do this for every run config that I have.

@NagabhushanSN95 NagabhushanSN95 added the untriaged Issue type still needs to be triaged or verified. label Jul 31, 2020
@PHPirates
Copy link
Collaborator

Like in /home/main.pdf? That is very strange, because the default is the out/ directory in the project, and otherwise (perhaps also for your standalone files) the directory of the main file.
Is your main file /home/main.tex? Or where is it?

@NagabhushanSN95
Copy link
Author

Neither my project nor my tex file is in home.
My project is nested deep inside home and tex file is still deeper.

Is there a flag or switch that will make the output to be placed along with tex file?

@PHPirates
Copy link
Collaborator

@NagabhushanSN95 I cannot reproduce the problem, this is what I did:

  • Open a project in IntelliJ
  • Open a file ~/Downloads/1538/main.tex which is not in the project
  • Compile
  • Find output file in ~/Downloads/1538/out/main.pdf

Can you confirm that you get the output file ~/main.pdf instead of the one I mentioned in this situation?

I did change some related things for 0.7, perhaps you can try the latest alpha build?
See the wiki for how to install an alpha version: https://github.com/Hannah-Sten/TeXiFy-IDEA/wiki/Alpha-builds

@PHPirates PHPirates added more-info-needed More information is needed from the person filing the issue. and removed untriaged Issue type still needs to be triaged or verified. labels Aug 10, 2020
@NagabhushanSN95
Copy link
Author

@PHPirates I tried with version 0.7-rc3

By standalone file, I meant I'm not using a latex project, but a file within the current project directory. For example, I have python project at folder .../Resources. My tex file is located in .../Resources/Literature/Paper/Notes/Notes.tex. Even with 0.7-rc3, the output file is generated at /home/nagabhushan. I've attached a screenshot below for reference.

image
This is the default configuration generated when I press ctrl+shift+F10

@NagabhushanSN95
Copy link
Author

For reference, the default configuration generated by plugin 0.6.8 is as follows

image

Is it possible to add that checkbutton Separate output files from source again? So that I can just disable that option, independent of what deffault output directory TeXiFy-IDEA chooses.

@PHPirates
Copy link
Collaborator

Thanks for the information, but I still cannot reproduce the problem with PyCharm 2020.2 and TeXiFy 0.7-rc3. I created a Python project in ~/Downloads/1538_pycharm/ with a LaTeX file ~/Downloads/1538_pycharm/resources/literature/notes.tex and the output file directory of the generated run config is ~/Downloads/1538_pycharm/out.
So unless you created a PyCharm project directly in your home folder, I don't see how this happens.
I looked in the code, but we take mainFile.parent as default directory, unless there is a known content root.

Can you check that there exists no folder ~/.idea?

@NagabhushanSN95
Copy link
Author

I checked there is no folder at ~/.idea.
Anyway, in your setup atleast, the default directory chosen is $PROJECT_DIR/out. Right?
Is it possible to allow a checkbutton to make the default output directory the same as src file? (exactly like it was in v0.6.8)

@PHPirates
Copy link
Collaborator

Is it possible to allow a checkbutton to make the default output directory the same as src file? (exactly like it was in v0.6.8)

No checkbuttons: it could create conflicts with the full path we now have. I can try to implement something so you can write for example $mainFile/out for an out directory next to the main file. Perhaps this would solve your problem as well.

@PHPirates PHPirates added enhancement New feature or (non bug related) change to the program. and removed more-info-needed More information is needed from the person filing the issue. labels Aug 15, 2020
@NagabhushanSN95
Copy link
Author

Cool. Thank you very much :)

@NagabhushanSN95
Copy link
Author

Hi, thanks for adding this. Is this available in latest alpha build?

@PHPirates
Copy link
Collaborator

@NagabhushanSN95 Not yet, wanted to wait with the new alpha build until 0.7 is released (probably tomorrow). You can try this build, let me know if you have feedback:
TeXiFy-IDEA-0.7-rc4.3.zip

https://github.com/Hannah-Sten/TeXiFy-IDEA/wiki/Run-configurations#outputpath

@NagabhushanSN95
Copy link
Author

NagabhushanSN95 commented Sep 4, 2020

Hi, sorry for late reply. I tried the above version (rc4.3). I was able to add {mainFileParent} and {projectDir} in the output directory field in the latex template run configuration. But it is not working as expected. When I create a new run configuration for a tex file (stand-alone) using ctrl+shift+F10, the output directory falls back to default directory you had mentioned i.e. {projectDir}/out. Both {mainFileParent} and {projectDir} didn't work. I've attached the screenshots below

  1. Using {mainFileParent}
    Template:
    image

Auto-generated run configuration:
image

  1. Using {projectDir}
    Template:
    image

Auto-generated run configuration
image

PS: My project directory root is /home/nagabhushan/HDD01/Data/Studies/07_IISc/Research/Resources

@PHPirates
Copy link
Collaborator

Thanks for trying it out, it seems indeed that it doesn't work with standalone files yet. Will look into that soon

@PHPirates
Copy link
Collaborator

I fixed a mistake in there, can you check if that resolves the problem?
TeXiFy-IDEA-0.7.1-alpha.2.1.zip

(I still have to do the same for the auxil directory, working on that)

@NagabhushanSN95
Copy link
Author

This worked!!! Thanks a ton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or (non bug related) change to the program.
Projects
None yet
2 participants