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

Register to General ? #18

Open
jonathanBieler opened this issue Jan 22, 2020 · 9 comments
Open

Register to General ? #18

jonathanBieler opened this issue Jan 22, 2020 · 9 comments

Comments

@jonathanBieler
Copy link
Contributor

Hey @rened, it looks like this package wasn't registered to General. If you want I can do the update. It would be nice if you could add me as a collaborator, otherwise I'll be bothering you quite a bit :

https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository

@famura
Copy link

famura commented Oct 21, 2022

I am quite new to Julia, so please excuse this beginner question. Is this issiue why I get

(docs) pkg> add LaTeX
ERROR: The following package names could not be resolved:
 * LaTeX (not found in project, manifest or registry)

@jonathanBieler
Copy link
Contributor Author

@famura this package is not registered and not up-to-date. I got a PR for updating it but it wasn't merged, you can try this, it might work :

]add https://github.com/jonathanBieler/LaTeX.jl.git

@famura
Copy link

famura commented Oct 21, 2022

@jonathanBieler thank you for the explanation. I tried your suggestion and it worked 👍

@jonathanBieler
Copy link
Contributor Author

Maybe I should register my fork, I still find this package useful at times.

@famura
Copy link

famura commented Oct 21, 2022

Sounds like a good idea. That would make it easier to run it within gh workflows.

@famura
Copy link

famura commented Oct 21, 2022

This is a bit off-topic @jonathanBieler, but do you know how I can compile a tex-file from Julia? I know that this package is more about creating the latex content programatically, however in my case there is already a main.tex and I just want to compile and display a pdf from it.

@famura
Copy link

famura commented Oct 21, 2022

I tried LaTeX.openpdf(joinpath(PROJECT_ROOT_DIR, "paper", "main.tex")) but that crashed, and I assume that the latex argument of makepdf is expecting sth else than a tex-document.

@jonathanBieler
Copy link
Contributor Author

@famura I think running that line should do it (with texname being the path to your tex file) :

https://github.com/rened/LaTeX.jl/blob/master/src/LaTeX.jl#L113

@famura
Copy link

famura commented Nov 9, 2022

In the end, I solved my problem with your hint, but without LaTeX.jl :)

I have a page called "paper.md" which dispalyes the current WIP build of the paper. This file, just like the rest of the doc lives in the docs folder which is located in the ROOT_DIR. The paper is build in the paper folder which is also located in the ROOT_DIR. Finally, the resulting pdf is displayed in the "paper.md" file which is included in the doc just like Documenter.jl does it with other markdown files.

```@eval
import MyProject

cd(joinpath(MyProject.ROOT_DIR, "paper"))

output = read(`pdflatex -shell-escape -halt-on-error main.tex`,String)
occursin("Error:", output) && println(output)

cp(joinpath(MyProject.ROOT_DIR, "paper", "main.pdf"), joinpath(MyProject.ROOT_DIR, "docs", "build", "main.pdf"))
nothing
```@raw html
<object data="../main.pdf" type="application/pdf" width="900px" height="1100px">
    <embed src="../main.pdf">
        <p>This browser does not support PDFs. Please download the PDF to view it: <a href="../main.pdf">Download PDF</a>.</p>
    </embed>
</object>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants