代码之家  ›  专栏  ›  技术社区  ›  Cettt

Mathjax不在闪亮的应用程序中工作

  •  0
  • Cettt  · 技术社区  · 7 年前
    例如,我试图从 this question 和mathjax expression did not show运行代码。

    Shinyapp(ui=Shinyui(fluidpage(sliderinput(“order”,withmathjax(“order”,\(k\))),min=3,max=7,value=4,step=1) uioutput(“lastslider”)), 输出$lastSlider<-rendrui({ L<-作为.integer(输入$iknots) })

    你知道为什么会这样吗? 这里是 sessioninfo()的输出

    r版本3.4.4(2018-03-15)
    平台:x86 U 64-W64-MingW32/X64(64位)
    运行环境:Windows 7 x64(内部版本7601)Service Pack 1
    
    矩阵产品:默认
    
    区域设置:
    [1]lc_collate=德语_australia.1252 lc_ctype=德语_australia.1252 lc_monetary=德语_australia.1252
    [4]lc_numeric=c lc_time=German_Australia.1252
    
    附加基础包:
    [1]统计图形grdevices utils datasets methods base
    
    其他附加包装:
    [1]闪亮的1.0.5
    
    通过命名空间加载(未附加):
    [1]编译器_3.4.4 r6_2.2.2 htmltools_0.3.6 tools_3.4.4 yaml_2.1.16 rcpp_0.12.16
    [7]jsonlite_1.5 Digest_0.6.13 Xtable_1.8-2 httpuv_1.3.5 mime_0.5
    

    事先谢谢。this question Mathjax的表达没有显示出来。

    library(shiny)
    shinyApp(ui = shinyUI(fluidPage(sliderInput("order", withMathJax("Order, \\(k\\)"), min = 3, max = 7, value = 4, step = 1), 
                                    sliderInput("iknots", "iKnots", min = 0, max = 10, value = 5, step = 1),
                                    uiOutput("lastSlider"))), 
    
             server = shinyServer(function(input, output, clientData, session) { 
               output$lastSlider<- renderUI({
                 k <- as.integer(input$order)
                 l <- as.integer(input$iknots) 
                 sliderInput("xi1",label =  withMathJax(paste0("\\(\\xi_{", k + l, "}\\)")), min = 0, max = 10, step = 0.1,value=input$xi1)
               })
    
             }))
    

    enter image description here

    你知道为什么会这样吗? 这是的输出sessionInfo()以下内容:

    R version 3.4.4 (2018-03-15)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows 7 x64 (build 7601) Service Pack 1
    
    Matrix products: default
    
    locale:
    [1] LC_COLLATE=German_Austria.1252  LC_CTYPE=German_Austria.1252    LC_MONETARY=German_Austria.1252
    [4] LC_NUMERIC=C                    LC_TIME=German_Austria.1252    
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    other attached packages:
    [1] shiny_1.0.5
    
    loaded via a namespace (and not attached):
     [1] compiler_3.4.4  R6_2.2.2        htmltools_0.3.6 tools_3.4.4     yaml_2.1.16     Rcpp_0.12.16   
     [7] jsonlite_1.5    digest_0.6.13   xtable_1.8-2    httpuv_1.3.5    mime_0.5   
    

    事先谢谢。

    1 回复  |  直到 6 年前
        1
  •  0
  •   Stéphane Laurent    6 年前
    新雅普( 流体页面( 使用mathjax(), })
    
    

    enter image description here