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

Convert NARK to reStructuredText #1303

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

AA-Turner
Copy link
Collaborator

@AA-Turner AA-Turner commented Jul 14, 2023

This PR converts the Suggested Variable Naming Conventions in the Econ-ARK Toolkit (NARK) to reStructuredText and removes the LaTeX sources. This makes NARK accessible on the website, whereas it was previously only readable as the pre-rendered PDF (or, by rendering the PDF yourself).

The only outstanding problem is the lack of the \mathbbmss macro in MathJax -- see e.g. mathjax/MathJax#792. Would changing it simply to \mathbb be acceptable?

A

cc: @MridulS

(note: this PR is based on top of #1302, only the final 2 commits are part of this PR)

@llorracc
Copy link
Collaborator

llorracc commented Jul 14, 2023 via email

@AA-Turner
Copy link
Collaborator Author

Thanks Chris--done!

@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (2209109) 72.55% compared to head (375f16d) 72.55%.

❗ Current head 375f16d differs from pull request most recent head a76563a. Consider uploading reports for the commit a76563a to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1303   +/-   ##
=======================================
  Coverage   72.55%   72.55%           
=======================================
  Files          78       78           
  Lines       13009    13009           
=======================================
  Hits         9439     9439           
  Misses       3570     3570           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alanlujan91
Copy link
Member

@AA-Turner will we still be able to reproduce the pdf file from the rst?

@AA-Turner
Copy link
Collaborator Author

@alanlujan91

rst2xetex NARK.rst NARK.tex --stylesheet="wasysym,psibycus,cancel,amssymb,amsfonts,latexsym" --latex-preamble="\setmainfont{DejaVu Serif}\setsansfont{DejaVu Sans}\setmon
ofont[HyphenChar=None,Scale=MatchLowercase]{DejaVu Sans Mono}"
xelatex NARK
xelatex NARK

This exports NARK as a PDF, though as econtex.cls and accoutrements aren't included it doesn't look the same. An option could be to re-write the four key files (econtex.tex, econtex.sty, econtexSetup.sty, econtexShortcuts.sty) in a compatible way with Sphinx, though this would take some time.

The additional problem specifically with NARK is the mathbbmss vs mathbb divide: we can't use mathbbmss as it doesn't render in HTML, but mathbb looks very different from mathbbmss in TeX. I've attempted to overcome this by switching to using Unicode characters (ℝ & 𝕣), but this causes further issues with font selection for XeLaTex or LaTeX.

Appreciate this isn't great -- I'm not a TeX expert though, so if you've any advice I'd appreciate it. (I've just spent the last four hours struggling through myriad different TeX compilation failures // Docutils/Sphinx edge-cases with overriding LaTeX output!)

A

@llorracc
Copy link
Collaborator

Long-term plan is that we need to develop our own files, at a minimum

econark.sty
econark.bib
econark.cls

My whole econtex apparatus is now posted in a private repo https://github.com/econ-ark/resources to which I can invite interested parties as collaborators.

It is basically the cobbled-together accretion of all the packages and other things I have needed at any point in order to get something done (papers, lecture notes, presentations, etc). So it's a big sloppy mess. A radically slimmed-down version of it could constitute the econark.cls file. The existing econark.sty file might need to be trimmed and also augmented -- the goal is to have the same names in latex code as in python code for the same items. And we need a global bibliography file containing both our own materials and the materials cited in our own materials. This is a work in progress that @camriddell and @alanlujan91 among others are aware of.

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

Successfully merging this pull request may close these issues.

6 participants