Re: [R-pkg-devel] R package submission fails due to mathjaxr package

2021-06-21 Thread Viechtbauer, Wolfgang (SP)
Hi Marc,

Thanks for the additional details. 

As far as I can tell, the problem has nothing to do with mathjaxr, but your use 
of LaTeX commands that are not supported in creating the pdf manual (which is 
not done by mathjaxr but R itself). See:

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Mathematics

You can use AMS extensions for the HTML docs since those are supported by 
Mathjax, but not for the pdf manual.

So, for the pdf manual, you will have to write the equation without the use of 
AMS extensions (and indeed use \mjtdeqn).

Best,
Wolfgang

>-Original Message-
>From: Marc Scherstjanoi [mailto:marc.scherstja...@thuenen.de]
>Sent: Sunday, 20 June, 2021 23:16
>To: Viechtbauer, Wolfgang (SP)
>Cc: Tiago Olivoto; Max Turgeon; r-package-devel@r-project.org
>Subject: Re: R package submission fails due to mathjaxr package
>
>Hi Wolfgang, Tiago and Max
>
>thank you for your reply. Let me first apologize. "due to mathjaxr" sounds a 
>bit
>harsh after the second reading.
>I am very thankful for this nice package. It works really well for all of the
>equations I have, and the HTML it creates is just nice.
>The only problem is the PDF and I also found out that the align function 
>(amsmath
>latex package) is the actual error source. Furthermore, "\cr" is also giving an
>error message.
>
>For example, having
>
>\mjdeqn{\begin{align} A_e(t) &= \left(A^T \cdot xi(t) \right)^T \cr &= A \cdot
>diag(xi(t)) \end{align}}{Ae(t) = (A^T * xi(t))^T = A * diag(xi(t))}
>
>in the \details section of the .Rd file leads to
>
>"LaTeX errors:
>! LaTeX Error: Environment align undefined."
>
>when building with "R CMD build /home/.../package"
>
>but passes with "R CMD build /home/.../package --no-manual".
>
>The aim of the align command is to set several equations in certain horizontal
>positions (mostly oriented on the "="s, indicated by the "&"s) one below the
>other.
>I read about the possibility to use \mjtdeqn instead of \mjdeqn to specify 
>LaTeX
>commands for the PDF and HTML pages differently.
>However, if the pdf necessarily needs to be created when submitting the 
>package,
>it would be better to have the equations aligned there as well.
>For readability it would be a plus as I don't just have a couple of equations 
>and
>equation systems.
>
>We are using the following setup:
>Added "mathjaxr" to Imports and RdMacros fields of the DESCRIPTION file.
>Added import(mathjaxr) to the NAMESPACE file.
>Added "\loadmathjax" to the \description section.
>
>I would be grateful for any idea how to convince the pdfTeX of the align 
>command
>or a similar solution.
>
>Marc
>
>- Ursprüngliche Mail -
>Von: "Viechtbauer, Wolfgang (SP)" 
>
>An: "Marc Scherstjanoi" , r-package-devel@r-
>project.org
>Gesendet: Sonntag, 20. Juni 2021 11:08:56
>Betreff: RE: R package submission fails due to mathjaxr package
>
>Hi Marc,
>
>mathjaxr maintainer here. Can you provide a minimal reproducible example
>illustrating the problem? If this is another case where the LaTeX command for
>Mathjax does not work directly for creating the pdf (or vice-versa), then I 
>would
>like to document this (and a possible workaround) as was done here:
>
>https://github.com/wviechtb/mathjaxr#issues
>
>Best,
>Wolfgang
>
>>-Original Message-
>>From: R-package-devel [mailto:r-package-devel-boun...@r-project.org] On 
>>Behalf Of
>>Marc Scherstjanoi
>>Sent: Friday, 18 June, 2021 22:22
>>To: r-package-devel@r-project.org
>>Subject: [R-pkg-devel] R package submission fails due to mathjaxr package
>>
>>Hi,
>>
>>I am about to sumbmit an R package.
>>
>>It passed the
>>"R CMD check /package... --as-cran --no-manual"
>>but not the
>>"R CMD check /package... --as-cran".
>>
>>Our way of presenting mathematical equations by using the mathjaxr package 
>>seems
>>to be not supported.
>>As a result, building pdf fails automatically.
>>
>>We have already been aware of that and would like to submit the
>>package manual pdf separately.
>>
>>How can this be done?
>>Can our submission work without the rd to pdf process?
>>Or is there a way to include the mathjaxr style for the texing?
>>
>>Thank you in advance,
>>
>>Marc
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R package submission fails due to mathjaxr package

2021-06-20 Thread Marc Scherstjanoi
Hi Wolfgang, Tiago and Max

thank you for your reply. Let me first apologize. "due to mathjaxr" sounds a 
bit harsh after the second reading.
I am very thankful for this nice package. It works really well for all of the 
equations I have, and the HTML it creates is just nice.
The only problem is the PDF and I also found out that the align function 
(amsmath latex package) is the actual error source. Furthermore, "\cr" is also 
giving an error message.

For example, having 

\mjdeqn{\begin{align} A_e(t) &= \left(A^T \cdot xi(t) \right)^T \cr &= A \cdot 
diag(xi(t)) \end{align}}{Ae(t) = (A^T * xi(t))^T = A * diag(xi(t))} 

in the \details section of the .Rd file leads to

"LaTeX errors:
! LaTeX Error: Environment align undefined."

when building with "R CMD build /home/.../package"

but passes with "R CMD build /home/.../package --no-manual".

The aim of the align command is to set several equations in certain horizontal 
positions (mostly oriented on the "="s, indicated by the "&"s) one below the 
other. 
I read about the possibility to use \mjtdeqn instead of \mjdeqn to specify 
LaTeX commands for the PDF and HTML pages differently.
However, if the pdf necessarily needs to be created when submitting the 
package, it would be better to have the equations aligned there as well.
For readability it would be a plus as I don't just have a couple of equations 
and equation systems.

We are using the following setup:
Added "mathjaxr" to Imports and RdMacros fields of the DESCRIPTION file.
Added import(mathjaxr) to the NAMESPACE file.
Added "\loadmathjax" to the \description section.

I would be grateful for any idea how to convince the pdfTeX of the align 
command or a similar solution.

Marc




- Ursprüngliche Mail -
Von: "Viechtbauer, Wolfgang (SP)" 
An: "Marc Scherstjanoi" , 
r-package-devel@r-project.org
Gesendet: Sonntag, 20. Juni 2021 11:08:56
Betreff: RE: R package submission fails due to mathjaxr package

Hi Marc,

mathjaxr maintainer here. Can you provide a minimal reproducible example 
illustrating the problem? If this is another case where the LaTeX command for 
Mathjax does not work directly for creating the pdf (or vice-versa), then I 
would like to document this (and a possible workaround) as was done here:

https://github.com/wviechtb/mathjaxr#issues

Best,
Wolfgang

>-Original Message-
>From: R-package-devel [mailto:r-package-devel-boun...@r-project.org] On Behalf 
>Of
>Marc Scherstjanoi
>Sent: Friday, 18 June, 2021 22:22
>To: r-package-devel@r-project.org
>Subject: [R-pkg-devel] R package submission fails due to mathjaxr package
>
>Hi,
>
>I am about to sumbmit an R package.
>
>It passed the
>"R CMD check /package... --as-cran --no-manual"
>but not the
>"R CMD check /package... --as-cran".
>
>Our way of presenting mathematical equations by using the mathjaxr package 
>seems
>to be not supported.
>As a result, building pdf fails automatically.
>
>We have already been aware of that and would like to submit the
>package manual pdf separately.
>
>How can this be done?
>Can our submission work without the rd to pdf process?
>Or is there a way to include the mathjaxr style for the texing?
>
>Thank you in advance,
>
>Marc

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R package submission fails due to mathjaxr package

2021-06-20 Thread Viechtbauer, Wolfgang (SP)
Hi Marc,

mathjaxr maintainer here. Can you provide a minimal reproducible example 
illustrating the problem? If this is another case where the LaTeX command for 
Mathjax does not work directly for creating the pdf (or vice-versa), then I 
would like to document this (and a possible workaround) as was done here:

https://github.com/wviechtb/mathjaxr#issues

Best,
Wolfgang

>-Original Message-
>From: R-package-devel [mailto:r-package-devel-boun...@r-project.org] On Behalf 
>Of
>Marc Scherstjanoi
>Sent: Friday, 18 June, 2021 22:22
>To: r-package-devel@r-project.org
>Subject: [R-pkg-devel] R package submission fails due to mathjaxr package
>
>Hi,
>
>I am about to sumbmit an R package.
>
>It passed the
>"R CMD check /package... --as-cran --no-manual"
>but not the
>"R CMD check /package... --as-cran".
>
>Our way of presenting mathematical equations by using the mathjaxr package 
>seems
>to be not supported.
>As a result, building pdf fails automatically.
>
>We have already been aware of that and would like to submit the
>package manual pdf separately.
>
>How can this be done?
>Can our submission work without the rd to pdf process?
>Or is there a way to include the mathjaxr style for the texing?
>
>Thank you in advance,
>
>Marc

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R package submission fails due to mathjaxr package

2021-06-18 Thread Tiago Olivoto
Hi Mark,
I'm the maintainer of the 'metan' R package that uses mathjaxr. Please, be
sure you are declaring mathjaxr on 'Imports', not 'Suggest' field. In my
case, some time ago, I received an email from the CRAN team suggesting this
change. Please, let us know if this works!
Best,
Tiago


Em sex., 18 de jun. de 2021 às 17:42, Marc Scherstjanoi <
marc.scherstja...@thuenen.de> escreveu:

>
> Hi,
>
> I am about to sumbmit an R package.
>
> It passed the
> "R CMD check /package... --as-cran --no-manual"
> but not the
> "R CMD check /package... --as-cran".
>
> Our way of presenting mathematical equations by using the mathjaxr package
> seems to be not supported.
> As a result, building pdf fails automatically.
>
> We have already been aware of that and would like to submit the
> package manual pdf separately.
>
> How can this be done?
> Can our submission work without the rd to pdf process?
> Or is there a way to include the mathjaxr style for the texing?
>
> Thank you in advance,
>
> Marc
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R package submission fails due to mathjaxr package

2021-06-18 Thread Max Turgeon
Hi Marc,

At the risk of sounding silly, did you follow the instructions in the README 
for the mathjaxr package? 
https://cran.r-project.org/web/packages/mathjaxr/readme/README.html

I've never used it myself, but I can see about 30 packages on CRAN that 
reverse-import mathjaxr. I spot checked some of them, and they all passed the 
CRAN checks.

Of course, you may very well be using Mathjax differently than them, in which 
case perhaps this issue should be brought up to the mathjaxr package maintainer.

Best,


Max Turgeon
Assistant Professor
Department of Statistics
Department of Computer Science
University of Manitoba
maxturgeon.ca



From: R-package-devel  on behalf of Marc 
Scherstjanoi 
Sent: Friday, June 18, 2021 3:22 PM
To: r-package-devel@r-project.org 
Subject: [R-pkg-devel] R package submission fails due to mathjaxr package


Caution: This message was sent from outside the University of Manitoba.


Hi,

I am about to sumbmit an R package.

It passed the
"R CMD check /package... --as-cran --no-manual"
but not the
"R CMD check /package... --as-cran".

Our way of presenting mathematical equations by using the mathjaxr package 
seems to be not supported.
As a result, building pdf fails automatically.

We have already been aware of that and would like to submit the
package manual pdf separately.

How can this be done?
Can our submission work without the rd to pdf process?
Or is there a way to include the mathjaxr style for the texing?

Thank you in advance,

Marc

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel