drvinceknight / amwoss

Applied mathematics problems with Open Source Software: Operational Research with Python and R.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in sed command when doing the substitutions

eljost opened this issue · comments

Thanks for making this book available. I heard about it in the Talk Python To Me Podcast.

When building the book using the provided Anaconda environment this line leads to an error:

c.run(f"cd build; sed -i '.bak' 's/{key}/{value}/g' chapters/*/main.tex")

My sed (version 4.8) seems to dislike the '.bak' part.

sed: -e expression #1, char 1: unknown command: `.'

Changing it to

c.run(f"cd build; sed '-i.bak' 's/{key}/{value}/g' chapters/*/main.tex")

solves the issue. Maybe this line can be updated.

And just to document a 2nd issue here: Compiling the book using inv compile also required me to install the texlive-langgreek latex-package, otherwise errors related to the epigrafica package and LGR encoding appeared. I guess there is nothing you could or would have to do about this, but I just wanted to document this here, because other people may have similar issues.

All the best
Johannes

Thanks for this @eljost!

Apologies for the delay in replying, I was away for a week and still working my way back through things.

Will make the changes you're suggesting but yeah not sure what we can do about the texlive-langgreek issue. Perhaps we should/could document that in the README.md.

I have opened #143 which I believe addresses this @eljost. Thanks again for the really helpful contribution.