Closed ShiqiYang2022 closed 1 year ago
@gentzkow
I have completed the tasks listed per https://github.com/gentzkow/template/issues/86#issue-1886725615 reformatting template to fit .tex
compile. The draftable diff between the .tex
compile and the original one is here.
There are two notes worth mentioning:
gs.run_latex()
need to be upgraded. Currently run_latex
doesn't handle the compilation of nested .tex
structures when make.py
and paper.tex
reside in different directories. Here's why:
gs.run_latex()
executes a shell command from the directory where make.py
is located.paper.tex
is in a different directory, any nested .tex
files it refers to will have their paths interpreted relative to make.py
, not paper.tex
..tex
files.To solve this, I updated gs.run_latex()
and metadata
in this commit in https://github.com/gslab-econ/gslab_make/issues/64, and opened a pull request to merge into gslab_make/master
.
.tex
compile locally vs. Overleaf compile can be properly managed.Overleaf uses the latest version of TexLive to compile, and we can always shift to old TexLive versions. For details please refer to the official blog here. Fortunately our lab-manual also request using TexLive. So theoretically if we set the TexLive version in Overleaf consistent with our local end, we should not see difference between the outputs. The version control for lab member should not be a big issue.
The draftable diff using template
between local and Overleaf compile is here, no difference found.
The only potential risk is some collaborators might use a different TeX distribution (e.g., MiKTeX). To trying avoid this, we can(and we should) use the packages that only are part of the standard TeX distribution and specify old package versions. This general idea is specified in Gentzkow and Shapiro(2014) so lab member should know that. For collaborators not familiar with our style of coding, even if they very unfortunately failed compile on local end, they always have plan B, i.e. do it on Overleaf; and this is way better than lyx -- if you fail to compile lyx
, you do not have alternatives.
I am opening a PR(#88) of this issue, and once we merge both issue branches of template
and gslab_make
to master
, the switch from lyx
to .tex
compile is finished. Please let me know for any of your thoughts. Thanks!
In this issue we reformat the template to substitute from .lyX
to .tex
compile for our standard paper development process. We discussed how to manage the difference in https://github.com/gentzkow/template/issues/86#issuecomment-1768660960.
This thread continued in the associated PR (https://github.com/gentzkow/template/pull/88). The errors are addressed in #89, #90, https://github.com/gslab-econ/gslab_make/issues/64, and https://github.com/gslab-econ/gslab_make/pull/65 as follow-up issues and PRs.
Merged to master in c5f5695. Final state of issue branch here.
In this issue we will reformat the template to substitute from
.lyX
to.tex
compile for our standard paper development process.Goals of this issue:
.lyx
formats inpaper_slides/code
to.tex
formatsLyx
version ofpaper_slides
intoextensions/lyx
..tex
compile locally vs. Overleaf compile. Investigate on how to manage differences.This issue is originated from https://github.com/gentzkow/template/issues/84#issuecomment-1650960177 and is related to https://github.com/gentzkow/template/issues/85.
cc: @gentzkow @jc-cisneros @snairdesai