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

fixed Dockerfile #103

Merged
merged 1 commit into from
Jun 26, 2015
Merged

fixed Dockerfile #103

merged 1 commit into from
Jun 26, 2015

Conversation

awalterschulze
Copy link
Contributor

fix for issue #102

matze added a commit that referenced this pull request Jun 26, 2015
@matze matze merged commit 67f9afe into matze:master Jun 26, 2015
@benjamin-weiss
Copy link
Contributor

Some remarks:

  • Pygments is no longer needed, as we don't use minted in the demo presentation anymore.
  • The build.sh is still not entirely fixed, as we added references to the demo presentation. So why not use latexmk to build the demo presentation? Or couldn't that even be solved by docker-run: docker-build $(DEMO_PDF)?
  • As I don't really know docker I'm not sure if I'm right with this one. I don't think you build the documentation and add it to the container. Right?

@awalterschulze
Copy link
Contributor Author

Ok we can remove the installation of pygments :)
Ok so we can change xelatex to latetmk?
I mount the whole folder into the container and then simply build inside the container. Then the output is placed in the folder, since it was mounted.
I don't know if I fully understand what you are trying to say?

@benjamin-weiss
Copy link
Contributor

We added a pdf documentation file. So what happens now when you run make all the first time is the following:

# create the sty files
latex mtheme.ins
# create the documentation
latexmk -xelatex -output-directory=.temptex mtheme.dtx
cp .temptex/mtheme.pdf .
# create the demo presentation
latexmk -xelatex -output-directory=.temptex demo.tex
cp .temptex/demo.pdf .

You can obviously skip the part with the temporary folder as this is only a way to keep the top directory clean, but as far as I see it you are missing the documentation. And latexmkis just a convenient script which takes care of the multiple builds (among other things). So you don't have to take care of calling xelatex multiple times of your own.

@awalterschulze
Copy link
Contributor Author

This means you could make the build.sh file contain

#!/bin/sh
set -xe
latex mtheme.ins
latexmk -xelatex mtheme.dtx
latexmk -xelatex demo.tex

or even

#!/bin/sh
set -xe
latex mtheme.ins
latexmk -xelatex demo.tex

@benjamin-weiss
Copy link
Contributor

The first one is right. In the second one you are again missing the documentation.

@awalterschulze
Copy link
Contributor Author

Yes I guess it depends on the usecase.
Do you want to build the whole mtheme or just the user's slides.
But I am happy with either.

@awalterschulze
Copy link
Contributor Author

I have tested both and they work well.

@benjamin-weiss
Copy link
Contributor

I don't want to use docker at all. 😏 But I think it would be useful to have the documentation of the theme.

@awalterschulze
Copy link
Contributor Author

That's my main reason for docker, testable installation documentation.
Its just a coincidence that I can also use it to build.

@awalterschulze
Copy link
Contributor Author

Ok so then yes the docs should also be built.
Are you going to make a pull request or should I?

@benjamin-weiss
Copy link
Contributor

Thinking about it again. Why is it necessary to build demo.pdf and mtheme.pdf in a separate script at all. The best way is probably as I proposed earlier: Just add dependencies to docker-build.

docker-run: docker-build $(DEMO_PDF) $(MANUAL_PDF)

Then if docker-run is executed Make checks if those files are up to date and if not they are automatically created.

@benjamin-weiss
Copy link
Contributor

And of course the sty files.

docker-run: docker-build $(DEMO_PDF) $(MANUAL_PDF) $(STY)

@awalterschulze
Copy link
Contributor Author

I tested that, but the docker still runs every time and then the docker tells me that the files are up to date.

@benjamin-weiss
Copy link
Contributor

I don't know if I have understood you. So it works? What happens if you remove demo.pdf mtheme.pdf and all sty files are they recreated?

@awalterschulze
Copy link
Contributor Author

Ok wait wait, I am a bit tired, I mis read your comment.

Thinking about it again. Why is it necessary to build demo.pdf and mtheme.pdf in a separate script at all. The best way is probably as I proposed earlier: Just add dependencies to docker-build.

docker-run: docker-build $(DEMO_PDF) $(MANUAL_PDF)
Then if docker-run is executed Make checks if those files are up to date and if not they are automatically created.

The idea is that you should be able to build without having the fonts or even latex installed on your own computer. These dependencies should only be installed inside the docker.

@benjamin-weiss
Copy link
Contributor

Ah. Ok, now I get the point of the build.sh. Took me a while. Then another thought how we could get rid of the build.sh. Wouldn't it be possible to run make all inside the docker?

@awalterschulze
Copy link
Contributor Author

Yes I was just lazy :)
I just need to install make inside the docker.

@awalterschulze
Copy link
Contributor Author

You caught me.

@awalterschulze
Copy link
Contributor Author

It just takes forever to install texlive-full, so when I modify the apt-get line, it takes quite a while to test.

@benjamin-weiss
Copy link
Contributor

😁

Well then I think this is probably the best way to do it, even though it will take a while to test. Agreed?

Are you going to make a pull request or should I?

You should do it.

@awalterschulze
Copy link
Contributor Author

Its running :)

@awalterschulze
Copy link
Contributor Author

Ok I'll look at this again tomorrow or monday.

@awalterschulze
Copy link
Contributor Author

I now get the following error:

* Redefining document command \oldstylenums with arg. spec. 'm' on line 107.
*************************************************
) (/usr/local/texlive/2012/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/local/texlive/2012/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/local/texlive/2012/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/local/texlive/2012/texmf-dist/tex/latex/tipa/t3enc.def
(/usr/local/texlive/2012/texmf-dist/tex/latex/euenc/eu1lmss.fd)))
(/usr/local/texlive/2012/texmf-dist/tex/latex/fontspec/fontspec.cfg)))kpathsea: Invalid fontname `Fira Sans Light', contains ' '


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "Fira Sans Light" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................

l.26 ...    BoldFont={Fira Sans}]{Fira Sans Light}

@awalterschulze
Copy link
Contributor Author

@benjamin-weiss
Copy link
Contributor

Drop the $(DEMO_PDF) $(MANUAL_PDF) $(STY). This was a proposal before I understood what the build.sh is actually for.

@awalterschulze
Copy link
Contributor Author

Perfect :)

@awalterschulze
Copy link
Contributor Author

Thank you for pushing me, this is much better :)

@benjamin-weiss
Copy link
Contributor

Does this also work?

docker-run: docker-build
    docker run --rm=true --name $(DOCKER_CONTAINER) -i -t -v `pwd`:/data $(DOCKER_IMAGE) /data/make

Then we could delete the build.sh file.

@awalterschulze
Copy link
Contributor Author

Thats true
just make instead of /data/make

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

Successfully merging this pull request may close these issues.

3 participants