Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Some queries about the latest sjlatex

    Fellow Statalisters (especially StataCorp)

    I recently tried to update my version of sjlatex to the latest version (dated 29aug2018), and tried to run the doit.bat file (using MiKTeX Version 2.9 under Windows 10). However, LaTeX complained

    LaTeX Error: Environment threeparttable undefined.

    I tried the experiment of adding the command

    \usepackage{threeparttable}

    to the preamble in the file main.tex (having previously installed the threeparttable package on the fly). This time, LaTeX only got confused in a more complicated way. and still didn't work, I also tried executing the sequence of commands

    > latex main
    > bibtex main
    > latex main
    > latex main
    > dvips main.dvi -o main.ps

    at the command prompt, but LaTeX still failed as before.

    According to the online help for sjlatex,, SJ LaTeX has been tested using MiKTeX version 2.3 under Windows and using teTeX versions 1.0 to 3.0 under Unix. However, MiKTeX version 2.3 is superseded, and teTeX (as I understand it) is no longer even being updated (although it may work). And the TeX community seem to recommend us to use TeX Live (which has multiple maintainers who can presumably therefore fall under buses with a clear conscience)..

    Do StataCorp have a recommended way of converting the latest main.tex to .ps and/or .pdf? (The latest version seems to \input readme.tex which seems to \input sj.tex which seems to contain the offending threeparttable environment.)

    Best wishes

    Roger



  • #2
    Looks like we made some changes to a table example in stata.tex
    but forgot to update main.tex with the new package dependencies.

    main.tex was missing the following lines
    Code:
    \usepackage{threeparttable}
    \usepackage{tabularx}
    We have updated the production files at www.stata-journal.com
    so sjlatex will now pull down a working main.tex
    containing the above lines.

    As Roger points out, the TeX distributions notes at then end of the help
    file for sjlatex are out of date. We are currently using TeX
    Live 2013 (and 2014), and believe the Stata Journal files should work
    properly with more recent TeX Live distributions, including recent
    MacTeX (macOS) and MiKTeX (Windows) distributions.

    Comment


    • #3
      As long as StataCorp is updating these files, you may want to have a look at the instructions for citing Stata manuals.

      Table 1, which is defined in -stata.tex- included by -main.tex-, has only a subset of the manuals. Missing are BAYES, FN, IRT, ME, PSS, SEM, and TE, which have macros defined in -stata.sty-.

      The style file, in turn, is missing CM, DSGE, ERM, FMM, LASSO, META, RPT, and SP, for which no macros are defined. (These are also missing from Table 1.) This is apart from I, GSM, GSU and GSW, which appear in neither.

      Looking at the macros in -stata.sty- it is not hard to see how one could cite a manual such as LASSO, so this is not a big issue. As the number of manuals is now quite large, however, I wonder if a set of macros based on the usual manual abbreviations would be easier to remember and maintain.

      Comment


      • #4
        Many thanks to Jeff Pitblado for his prompt fix. The new version of main.tex is compiling like a dream using the new doit.bat, at least under my MiKTeX 2.9.

        Thanks also to Jeff for reassuring me that StataCorp has now updated to TeX Live 2013 (and 2014). I look forward to the happy day when I too can use TeX Live under Linux. (I am warned that MiKTeX and TeX Live cannot really cohabot under the same Windows operating environment, as they both need to modify the default path in different ways in order to work properly.)

        Best wishes
        Roger

        Comment


        • #5
          The LaTeX files downloadable via sjlatex have been updated; stata.sty now defines the complete set of macros to reference Stata manual entries, and the table in stata.tex now shows them off.

          Comment


          • #6
            Originally posted by Roger Newson View Post
            Many thanks to Jeff Pitblado for his prompt fix. The new version of main.tex is compiling like a dream using the new doit.bat, at least under my MiKTeX 2.9.

            Thanks also to Jeff for reassuring me that StataCorp has now updated to TeX Live 2013 (and 2014). I look forward to the happy day when I too can use TeX Live under Linux. (I am warned that MiKTeX and TeX Live cannot really cohabot under the same Windows operating environment, as they both need to modify the default path in different ways in order to work properly.)

            Best wishes
            Roger
            If you're on Windows and want to have access to both MikTeX and TeX Live, one workaround you might try would be to install Cygwin and its TeX Live. That should avoid conflicts between MikTeX and TeX Live. Of course it's a bit of a hassle setting up and there may be complications I haven't forseen -- I'm primarily a MikTeX user but have had success with Cygwin's texlive, although only a handful of times and only fairly simple documents.

            Comment

            Working...
            X