Update Makefile to use latexmk, and some minor improvements to the basic concepts section
I added a make preview target to the Makefile, which should make it easier to avoid edit compile cycles with an appropriate viewer. On Linux, to use evince as your previewer, add the line below to ~/.latexmkrc:
$pdf_previewer = "start evince"
I left it out of the custom config because it's likely different people will want to use different viewers.
Thanks for opening your first pull request here! If you have any questions, feel free to mention one of the conveners, previous contributors, or attend our weekly meeting (see https://hepsoftwarefoundation.org/workinggroups/training.html). Also, sometimes PRs go unnoticed, so don't hesitate to @mention some of us, if we do not come back to you within a few days.
Congrats on merging your first pull request! We at HSF are proud of you!
Thanks! I will submit the next changes soon.
I'm realizing this was merged only now as... nothing works anymore on my local box ! You're supposing here a number of things which are non standard, starting with the presence of latekmk on the system, which I did not have. Ok, installing was not too difficult, but now it fails at least in 2 ways :
- make clean does not do much (you've dropped all the lines dropping temporary files)
- make fails, complaining on missing File `fontawesome.sty'
Can we go back to more standard tools ?
In case others have the same issue, package texlive-fonts-extra brings fontawesome.sty.
Except installing it depended on another 41 packages and used 1.6GB of disk !!! Can we go back to more lightweight things ?
Also I found another issue : once the build failed, installing the missing pieces does not help. The build will fail again and again if you do not do a manual make clean
Last point : the build is now completely silent. You have no clue what's going on. I admit that the previous output was a bit too generous, but I'd like to see some progress. (Side note, we should fix the problems leading to the generosity of the previous output, these were all real warnings)
Hi @sponce. I understand your frustration, but let me explain things a bit so you can decide if you want to revert changes, or if you can just adjust what's there. I based the changes on what was available in the image, as I thought that most people were using GitHub to build and only downloading the PDF later (I saw problems locally when trying to build myself the first time I tried to build). Latexmk is quite common to use for projects that have to be built multiple times, as it takes care of rebuilding when necessary, calling bibtex, etc.
Let's start with make clean. There were two targets, clean and clobber, which I mapped to latexmk -c and latexmk -C, the second one should leave you only the PDF, while the first will clean only some files to allow for a faster recompilation. The file talk/.latexmkrc has settings to control what's removed:
$clean_ext = "cut lex lgb lgp mw nav snm vrb _minted-%R/* _minted-%R";
Try make clobber and let me know if that's not doing the job for you. You can add more extensions to be removed to clean_ext, or we can just make make clean call what's now called by make clobber and drop make clobber.
The fontawesome.sty missing is not something related to the build changes, but to the YouTube channels page, where I added symbols based on this font. If you think it brings too many dependencies, then we'd have to replace the calls to fontawesome with images. Locally, you can just comment out that slide if you don't want to install it.
The build was extremely verbose before, but if you don't like how it's now, it's just a matter of removing the -quiet option being passed to latexmk in the Makefile if you want to make it permanent, or using make V=1 to have the verbose output enabled.
I thought that most people were using GitHub to build
For tiny fixes maybe (although I do not) but for developing new set of slides, it's not really working. Delay is far too long and you cannot compile only your chapter.
Let's start with make clean. There were two targets, clean and clobber
Ok, here my problem seems to be lying in the fact that you've changed the meaning of clean and clobber. What used to be clean is now clobber (leaving only the pdf) and clobber does not exist anymore (was dropping the pdf on top of clean). But you've introduced a "clean only some files to allow for a faster recompilation" which was not existing. I'm not sure whether that last one is useful/safe, but certainly I was caught by the change of meaning of the original ones
The fontawesome.sty missing is not something related to the build changes, but to the YouTube channels page,
Why did we need that special font there ? I would indeed avoid bringing more dependencies than needed if it does not bring a real plus. here I do not see why youtube page would not use the same font as the rest.
The build was extremely verbose before
Yes indeed, but all lines were actual issues. So we should rather solve them than hide them. Of course I've never manage to find time for it and we all know how picky latex can be in these cases. But my fear is that we know hide more serious stuff.
Bottom line : I believe we can have a nice working state by :
- changing the font for youtube
- removing the -quiet in the Makefile
- fixing the make clean. I believe my problem was that .log file should have been dropped also. Not sure Can you try it ?
Yeah, only the page you see on #383 needs the font, to show the YouTube channel symbol before the channel names. I can replace that with a small SVG or PNG file.
I can remove -quiet if you don't like to just type make V=1, I think I will make verbose the default, and add make QUIET=1 to have a quiet build then, or just override the latexmk options adding -quiet by hand when necessary.
I will make make clean remove all but the PDF, and make clobber remove all including the PDF. I will put up a pull request for this soon.
Thanks a lot. For the youtube part, can we not just drop the symbol and replace the red part by "youtube" on each line. I mean, we just have twice the same words there. By the way, maybe we should darken the red to make it more readable
One curiosity, after dnf install texlive, a call to dnf install texlive-fontawesome just added a few kb to my system:
thinkpad talk $ sudo dnf install texlive-fontawesome
[sudo] password for amadio:
Last metadata expiration check: 1:54:02 ago on Wed 25 Jan 2023 09:43:34 AM CET.
Dependencies resolved.
===============================================================================================================================================================================================================================================================================================================================
Package Architecture Version Repository Size
===============================================================================================================================================================================================================================================================================================================================
Installing:
texlive-fontawesome noarch 9:20200406-25.el9 appstream 519 k
Transaction Summary
===============================================================================================================================================================================================================================================================================================================================
Install 1 Package
Total download size: 519 k
Installed size: 699 k
Is this ok [y/N]: y
Downloading Packages:
texlive-fontawesome-20200406-25.el9.noarch.rpm 6.4 MB/s | 519 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 6.3 MB/s | 519 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : texlive-fontawesome-9:20200406-25.el9.noarch 1/1
Running scriptlet: texlive-fontawesome-9:20200406-25.el9.noarch 1/1
Verifying : texlive-fontawesome-9:20200406-25.el9.noarch 1/1
Installed:
texlive-fontawesome-9:20200406-25.el9.noarch
What distro are you using?
Thanks a lot. For the youtube part, can we not just drop the symbol and replace the red part by "youtube" on each line. I mean, we just have twice the same words there. By the way, maybe we should darken the red to make it more readable
Using "YouTube" for all the channels will likely look worse than now (more repetitive), and C++Now's YouTube channel is called BoostCon, and other channels have variations too. I think it will look better if we just use an image for the channel icon. I will darken the red a bit, though, as you suggested.
What distro are you using?
debian unstable. But it of course all depends on what was already installed. I have a quite small system, built from scratch with only what I need.
For YouTube, ok for me the way you describe it