Giter Site home page Giter Site logo

mathjaxr's Introduction

Hi there!

Work Details

  • I am associate professor of methodology and statistics in the Department of Psychiatry and Neuropsychology at Maastricht University in the Netherlands
  • I do research on the statistical methods for meta-analysis and the analysis of multilevel and longitudinal data, with particular emphasis on computational statistics and software development

Most Important Projects

Get in touch

mathjaxr's People

Contributors

dmurdoch avatar gregordecillia avatar wviechtb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mathjaxr's Issues

R-hub builder says `NOTE: Package has help file(s) containing install/render-stage \Sexpr{} expressions but no prebuilt PDF manual.`

What I see

Three R-hub builder platforms out of three return a NOTE, Package has help file(s) containing install/render-stage \Sexpr{} expressions but no prebuilt PDF manual. and I expect that this will cause problems if I actually try to submit this package to CRAN with that NOTE.

What I expect

That using mathjaxr package as described in the documentation will pass CRAN tests (and R-hub builder as well).

Reproducible steps

I'm probably missing something obvious (or not following documentation) but here's what's happening ...

  1. devtools::create("../TestingMathJaxR") and switch to that directory

  2. usethis::use_gpl3_license("My Name"), usethis::use_package("mathjaxr")

  3. Add RdMacros: mathjaxr to DESCRIPTION on line between RoxygenNote: 7.2.0 and Imports: mathjaxr and change email under Authors@R to an email that R-hub builder recognizes

  4. usethis::edit_file("R/hello.R")

  5. Add a very small function to R/hello.R

    #' Title
    #' 
    #' \loadmathjax
    #' Description
    #' 
    #' @param arg1 arg1 details
    #' @param arg2 arg2 details
    #' 
    #' @details
    #' \mjtdeqn{B_{T,U} = REL_{T,U} - RES_{T,U) + UNC_{T,U}}{B_{T,U} = REL_{T,U} - RES_{T,U) + UNC_{T,U}}{... a plain text translation ...}
    #' 
    #' @return Sum
    #' @export
    #' @import mathjaxr
    #' 
    #' @examples
    #' \dontrun{
    #' testOut <-
    #'   testFunction(3, 2)
    #' }
    testFunction <- function(arg1, arg2) {
      out <- sum(arg1, arg2)
    
    return(out)
    }
    
  6. devtools::load_all("."), devtools::document(), devtools::build()

  7. devtools::check() is 0 errors, 0 warnings, and 0 notes

  8. `mathjaxr::preview_rd("man/testFunction.Rd", type = "pdf") looks good

  9. devtools::check_rhub(platforms = "windows-x86_64-devel")` returns

    NOTE: Package has help file(s) containing install/render-stage \Sexpr{} expressions but no prebuilt PDF manual.
    

There are other NOTES too, but this is the note that affects my real package. I looked at other packages in the "Reverse imports" list on the mathjaxr CRAN page but don't see that they are having problems, so I'm wondering what I'm doing wrong.

Resolutions attempted

  • Adding @noMd tag just below @export tag
  • Using \mjdeqn instead of \mjtdeqn
  • Trying \loadmathjax{} instead of \loadmathjax

Paragraphs starting with an equation puts attached text on new paragraph

If I have a paragraph starting with \mjseqn{} or \mjeqn{}{}, everything after it is put in a new paragraph. As soon as I add a word in front of the macros, it works as intended.

#' Note that \mjseqn{S} can also be empty.
#'
#' \mjseqn{S} should be on the same line as the rest of the sentence.
#'
#' Unlike Lexcel, ...

Rendered math equation that displays the text after the equation on the next line.

This is rendered in RStudio, both with the mathjaxr::preview_rd function as well as with ?myFunction after doing a devtools::install()

Putting \mjeqn{} as the first thing in a paragraph renders incorrectly

This StackOverflow question shows that R renders HTML incorrectly when an \mjeqn{} macro is the first thing in a paragraph. The example there has a paragraph consisting of this line:

\mjeqn{foo^{bar}}{foo^bar} estimates bas.

which renders as

foo^bar

estimates bas.

This happens because the \mjeqn macro expands into an \out{} macro, which is not considered to be text by the Rd rendering machinery, so R thinks the paragraph starts after the macro. A workaround mentioned on SO is to put \emph{} on the line ahead of the \mjeqn, so that R thinks the \out appears in the middle of a paragraph.

Maybe mathjaxr could do that: instead of emitting a naked \out, it could prefix it with \emph{} or some other invisible text so that R realizes it is in a paragraph.

Another possibility would be to fix the R conversion code, but I think \out could be used in situations where you don't want R to see text, so that would likely have worse side effects.

equations not rendered in Rstudio server help pane

I am trying to use the mathjaxr package to inline equations in roxygen2 generated documentation. I followed the steps on the github website to install mathjaxr. Testing the display via preview_rd(...) produces the correct result. However, trying directly to display the help via ?... shows the equations verbatim. In the developer console I see that the mathjax library is not loaded due to MIME type mismatch:

The resource from “http://localhost:8787/help/library/mathjaxr/doc/mathjax/es5/tex-chtml-full.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).

I managed to solve the issue by adding the following line to /etc/rstudio/rserver.conf
server-add-header=X-Content-Type-Options:

Formulas are now rendered correctly in the help pane shown by RStudio server. If it is of importance, there are still some error messages in the firefox developer console,

Uncaught InternalError: too much recursion
combineConfig http://localhost:8787/help/library/mathjaxr/doc/mathjax/es5/tex-chtml-full.js:949
combineConfig http://localhost:8787/help/library/mathjaxr/doc/mathjax/es5/tex-chtml-full.js:955
combineConfig http://localhost:8787/help/library/mathjaxr/doc/mathjax/es5/tex-chtml-full.js:955
...

and

Source map error: Error: request failed with status 404
Resource URL: http://localhost:8787/help/library/mathjaxr/doc/mathjax/es5/tex-chtml-full.js
Source Map URL: css_util.js.map

Undefined control sequence when running devtools::check_win_release()

I don't know if this is a mathjaxr problem or if I messed up in the submission process, but my documentation seems to render fine in RStudio and devtools::check() does not appear to be mad about anything.

Only if I run devtools::check_win_release() or devtools::check_mac_release() do I get an undefined control sequence error (I think it's complaining about \text).

The problematic documentation might be this one.

#' Dominance
#'
#' Calculate dominance score vectors for each players.
#'
#' \loadmathjax
#' A player's dominance vector is calculated by cumulatively adding up the
#' amount of times they appear in each `rankingCoalition`. E.g. in a game with
#' eight coalitions, if player 1 appears in coalitions placed at 1, 3, and 6,
#' their dominance vector is \[1, 1, 2, 2, 2, 3, 3, 3\].
#'
#' Player \mjseqn{i} dominates player \mjseqn{j} if for each index
#' \mjeqn{x, \text{Score}(i)_x \geq \text{Score}(j)_x}{x, Score(i)_x >= Score(j)_x}.
#'
#' @template param/game
#' @template param/players
#'
#' @family score vector functions
#'
#' @references
#' \insertRef{2017axiomaticAndAlgorithmicPerspectives}{socialranking}
#'
#' @examples
#' game <- newGame(c(1,2), ">", 1, ">", 2)
#'
#' # `1`: c(1, 2, 2)
#' # `2`: c(1, 1, 2)
#' dominanceScores(game)
#'
#' # calculate for selected number of players
#' dominanceScores(game, c(2))
#'
#' @export
dominanceScores <- function(game, players = NULL) {
  # ...
}

And I think the relevant error message may be this one:

/private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383: Undefined control sequence.
<argument> x, \text 
                    {Score}(i)_x \geq \text {Score}(j)_x
l.383 ...ext{Score}(i)_x \geq \text{Score}(j)_x}{}
                                                    .
? 
/private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383: Emergency stop.

Here's the whole build log.

> devtools::check_win_release()
ℹ Building windows version of mypackage (0.1.0)
Email results to [email protected]?
1: Yes
2: I forget
3: Nope

Selection: 1
✓  checking for file ‘/Users/myname/Documents/Programming/R/mypackage/DESCRIPTION’ ...
─  preparing ‘mypackage’: (362ms)
✓  checking DESCRIPTION meta-information ...
─  installing the package to process help pages
   Loading required namespace: mypackage
─  saving partial Rd database
─  building the PDF package manual
   Hmm ... looks like a package
   Converting Rd files to LaTeX .
   Creating pdf output from LaTeX ...
   Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
     Running 'texi2dvi' on 'Rd2.tex' failed.
   LaTeX errors:
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383:  ==> Fatal error occurred, no 
   output PDF file produced!
   Output:
   This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2022/dev) (preloaded format=pdflatex)
    restricted \write18 enabled.
   entering extended mode
   
   (/private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild1548
   45771e875/mypackage/.Rd2pdf87172/Rd2.tex
   LaTeX2e <2021-11-15> patch level 1
   L3 programming layer <2021-11-22>
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/book.cls
   Document Class: book 2021/10/04 v1.4n Standard LaTeX document class
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/bk10.clo))
   (/usr/local/Cellar/r/4.1.2/lib/R/share/texmf/tex/latex/Rd.sty
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ifthen.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/tools/longtable.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/tools/bm.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/alltt.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/tools/verbatim.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/url/url.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/textcomp.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/fontenc.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/times.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/inconsolata/zi4.sty
   `inconsolata-zi4' v1.12, 2019/05/17 Text macros for Inconsolata (msharpe)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/xkeyval/xkeyval.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/xkeyval.tex
   (/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/xkvutils.tex
   (/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/keyval.tex)))))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
   (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/hyperref.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/iftex/iftex.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
   (/usr/local/texlive/2021/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hycolor/hycolor.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/auxhook/auxhook.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/kvoptions/kvoptions.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/pd1enc.def)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/hyperref-langpatches.def
   ) (/usr/local/texlive/2021/texmf-dist/tex/generic/intcalc/intcalc.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/puenc.def)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/bitset/bitset.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/atbegshi-ltx.sty))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/hpdftex.def
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/atveryend-ltx.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
   
   (/usr/local/texlive/2021/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
   )))
   
   Package hyperref Warning: Option `hyperindex' has already been used,
   (hyperref)                setting the option has no effect on input line 377.
   
   
   Package hyperref Warning: Option `pagebackref' has already been used,
   (hyperref)                setting the option has no effect on input line 377.
   
   ) (/usr/local/texlive/2021/texmf-dist/tex/latex/base/makeidx.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty)
   Writing index file Rd2.idx
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/t1ptm.fd)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
   No file Rd2.aux.
   (/usr/local/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
   [Loading MPS to PDF converter (version 2006.09.02).]
   ) (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/nameref.sty
   (/usr/local/texlive/2021/texmf-dist/tex/latex/refcount/refcount.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/gettitlestring/gettitlestring.s
   ty)) (/usr/local/texlive/2021/texmf-dist/tex/latex/inconsolata/t1zi4.fd)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/t1phv.fd) [1{/usr/local/te
   xlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2]
   Overfull \hbox (26.35909pt too wide) in paragraph at lines 123--126
   [][]\T1/zi4/m/n/10 cpMajorityComparison[][][] \T1/ptm/m/n/10 (game, i, j) > 0 a
   nd sub-tract those where [][]\T1/zi4/m/n/10 cpMajorityComparison[][][] \T1/ptm/
   m/n/10 (game, i, j) < 0. 
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/t1cmtt.fd)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ts1cmtt.fd) [3]
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/ts1ptm.fd) [4]
   Overfull \hbox (48.76862pt too wide) in paragraph at lines 284--284
    []\T1/zi4/m/n/9 stopifnot(scores$p1Score == length(scores$p1WinningCoalitions)
    - length(scores$p2WinningCoalitions))[] 
   [5] [6]
   /private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383: Undefined control sequence.
   <argument> x, \text 
                       {Score}(i)_x \geq \text {Score}(j)_x
   l.383 ...ext{Score}(i)_x \geq \text{Score}(j)_x}{}
                                                     .
   ? 
   /private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383: Emergency stop.
   <argument> x, \text 
                       {Score}(i)_x \geq \text {Score}(j)_x
   l.383 ...ext{Score}(i)_x \geq \text{Score}(j)_x}{}
                                                     .
   /private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383:  ==> Fatal error occurred, no 
   output PDF file produced!
   Transcript written on Rd2.log.
   Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
     Running 'texi2dvi' on 'Rd2.tex' failed.
   LaTeX errors:
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383:  ==> Fatal error occurred, no 
   output PDF file produced!
   Output:
   This is makeindex, version 2.15 [TeX Live 2021] (kpathsea + Thai support).
   Scanning input file ./Rd2.idx....done (40 entries accepted, 0 rejected).
   Sorting entries....done (209 comparisons).
   Generating output file ./Rd2.ind....done (69 lines written, 1 warning).
   Output written in ./Rd2.ind.
   Transcript written in ./Rd2.ilg.
   This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2022/dev) (preloaded format=pdflatex)
    restricted \write18 enabled.
   entering extended mode
   
   (/private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild1548
   45771e875/mypackage/.Rd2pdf87172/Rd2.tex
   LaTeX2e <2021-11-15> patch level 1
   L3 programming layer <2021-11-22>
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/book.cls
   Document Class: book 2021/10/04 v1.4n Standard LaTeX document class
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/bk10.clo))
   (/usr/local/Cellar/r/4.1.2/lib/R/share/texmf/tex/latex/Rd.sty
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ifthen.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/tools/longtable.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/tools/bm.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/alltt.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/tools/verbatim.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/url/url.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/textcomp.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/fontenc.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/times.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/inconsolata/zi4.sty
   `inconsolata-zi4' v1.12, 2019/05/17 Text macros for Inconsolata (msharpe)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/xkeyval/xkeyval.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/xkeyval.tex
   (/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/xkvutils.tex
   (/usr/local/texlive/2021/texmf-dist/tex/generic/xkeyval/keyval.tex)))))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
   (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/hyperref.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/iftex/iftex.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/infwarerr/infwarerr.sty))
   (/usr/local/texlive/2021/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/pdfescape/pdfescape.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hycolor/hycolor.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/auxhook/auxhook.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/kvoptions/kvoptions.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/pd1enc.def)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/hyperref-langpatches.def
   ) (/usr/local/texlive/2021/texmf-dist/tex/generic/intcalc/intcalc.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/etexcmds/etexcmds.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/puenc.def)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/bitset/bitset.sty
   (/usr/local/texlive/2021/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/atbegshi-ltx.sty))
   (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/hpdftex.def
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/atveryend-ltx.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
   
   (/usr/local/texlive/2021/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
   )))
   
   Package hyperref Warning: Option `hyperindex' has already been used,
   (hyperref)                setting the option has no effect on input line 377.
   
   
   Package hyperref Warning: Option `pagebackref' has already been used,
   (hyperref)                setting the option has no effect on input line 377.
   
   ) (/usr/local/texlive/2021/texmf-dist/tex/latex/base/makeidx.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty)
   Writing index file Rd2.idx
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/t1ptm.fd)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
   (./Rd2.aux)
   (/usr/local/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
   [Loading MPS to PDF converter (version 2006.09.02).]
   ) (/usr/local/texlive/2021/texmf-dist/tex/latex/hyperref/nameref.sty
   (/usr/local/texlive/2021/texmf-dist/tex/latex/refcount/refcount.sty)
   (/usr/local/texlive/2021/texmf-dist/tex/generic/gettitlestring/gettitlestring.s
   ty)) (./Rd2.out) (./Rd2.out)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/inconsolata/t1zi4.fd)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/t1phv.fd) (./Rd2.toc)
   [1{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
   [2]
   Overfull \hbox (26.35909pt too wide) in paragraph at lines 123--126
   [][]\T1/zi4/m/n/10 cpMajorityComparison[][][] \T1/ptm/m/n/10 (game, i, j) > 0 a
   nd sub-tract those where [][]\T1/zi4/m/n/10 cpMajorityComparison[][][] \T1/ptm/
   m/n/10 (game, i, j) < 0. 
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/t1cmtt.fd)
   (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ts1cmtt.fd) [3]
   (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/ts1ptm.fd) [4]
   Overfull \hbox (48.76862pt too wide) in paragraph at lines 284--284
    []\T1/zi4/m/n/9 stopifnot(scores$p1Score == length(scores$p1WinningCoalitions)
    - length(scores$p2WinningCoalitions))[] 
   [5] [6]
   /private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383: Undefined control sequence.
   <argument> x, \text 
                       {Score}(i)_x \geq \text {Score}(j)_x
   l.383 ...ext{Score}(i)_x \geq \text{Score}(j)_x}{}
                                                     .
   ? 
   /private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383: Emergency stop.
   <argument> x, \text 
                       {Score}(i)_x \geq \text {Score}(j)_x
   l.383 ...ext{Score}(i)_x \geq \text{Score}(j)_x}{}
                                                     .
   /private/var/folders/qx/bgjnqy_92gg8nsxvgzhsjf2c0000gn/T/RtmpM9RAC3/Rbuild15484
   5771e875/mypackage/.Rd2pdf87172/Rd2.tex:383:  ==> Fatal error occurred, no 
   output PDF file produced!
   Transcript written on Rd2.log.
   Error in running tools::texi2pdf()
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
  System command 'R' failed, exit status: 1, stdout & stderr were printed
Type .Last.error.trace to see where the error occurred

For the last error trace I get:

> .Last.error.trace

 Stack trace:

 1. devtools::check_win_release()
 2. devtools:::check_win(pkg = pkg, version = "R-release", args = args,  ...
 3. pkgbuild::build(pkg$path, tempdir(), args = args, manual = manual,  ...
 4. withr::with_temp_libpaths(rcmd_build_tools(options$cmd, c(options$path,  ...
 5. base:::force(code)
 6. pkgbuild:::rcmd_build_tools(options$cmd, c(options$path, options$args),  ...
 7. pkgbuild:::with_build_tools({ ...
 8. base:::withCallingHandlers(callr::rcmd_safe(..., env = env, spinner = FALSE,  ...
 9. callr::rcmd_safe(..., env = env, spinner = FALSE, show = FALSE,  ...
 10. callr:::run_r(options)
 11. base:::with(options, with_envvar(env, do.call(processx::run,  ...
 12. base:::with.default(options, with_envvar(env, do.call(processx::run,  ...
 13. base:::eval(substitute(expr), data, enclos = parent.frame())
 14. base:::eval(substitute(expr), data, enclos = parent.frame())
 15. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs,  ...
 16. base:::force(code)
 17. base:::do.call(processx::run, c(list(bin, args = real_cmdargs,  ...
 18. (function (command = NULL, args = character(), error_on_status = TRUE,  ...
 19. base:::throw(new_process_error(res, call = sys.call(), echo = echo,  ...

 x System command 'R' failed, exit status: 1, stdout & stderr were printed 

In my package DESCRIPTION I made sure to add mathjaxr.

Package: socialranking
Title: Social Ranking solutions for ordinal data on coalitions
Version: 0.1.0
Authors@R: c(person("Me", "Meson", email = "[email protected]", role = c("aut", "cre")))
Maintainer: Felix Fritz <[email protected]>
Description: ...
License: GPL-3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RdMacros:
    mathjaxr,
    Rdpack
Suggests: 
    relations (>= 0.6.10),
    clipr (>= 0.7.1),
    testthat (>= 3.0.0)
Imports:
    sets (>= 1.0.20),
    rlang (>= 0.4),
    mathjaxr (>= 1.4-0),
    Rdpack (>= 0.7)
Config/testthat/edition: 3

For devtools::build_manual() I only get an Error: Failed to build manual - nothing else.

Did I forget anything?

Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘mathjaxr’

Hi everyone,

When trying to install packages for meta-analysis ("meta", or "metafor"), the package ‘mathjaxr’ is pointed as a required dependency:

https://cran.rstudio.com/bin/windows/Rtools/ also installing the dependencies ‘mathjaxr’ (...)

But, it fails with the following explanation:
" Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘mathjaxr’ "

If anybody can help? Thanks in advance!
David

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.