noties / Markwon

Android markdown library (no WebView)
https://noties.io/Markwon/
Apache License 2.0
2.68k stars 298 forks source link

Latex in recyclerview scrolling error #384

Open adrian011494 opened 2 years ago

adrian011494 commented 2 years ago
  1. I am using Markdown in a recyclerview and when scrolling down it changes direction upwards when having to render several LaTeX formulas.

    var markwon = Markwon.builder(context)
        .usePlugin(StrikethroughPlugin.create())
        .usePlugin(TaskListPlugin.create(context))
        .usePlugin(HtmlPlugin.create())
        .usePlugin(LinkifyPlugin.create(true))
        .usePlugin(MarkwonInlineParserPlugin.create())
        .usePlugin(JLatexMathPlugin.create(ScreenUtil.dip2fpx(context, 18.0f)) { builder ->
    
            builder.inlinesEnabled(false)
    
            // by default true
            builder.blocksEnabled(true)
    
            // executor on which parsing of LaTeX is done (by default `Executors.newCachedThreadPool()`)
            builder.executorService(Executors.newCachedThreadPool())
    
            builder.errorHandler { latex, error ->
    
                LOG.e(latex)
                LOG.e(error)
                null
            }
    
        })
        .build()
$$ {\rotatebox{0}\mathbb{\scalebox{50}{\textcolor{black}{\shadowbox{\text{Canserbero}$$

**GRUPO PARA CHAT Y COMPARTIR TEMAS**

 ʟɪɴᴋ [**CANSERBEROPORSIEMPRE**](https://chat.todus.cu/6212eb85cd57505fb30dc4fbad52b176)

**COMPARTE**

$$\rotatebox{0}{\Huge\mathrm{\textcolor{black}{Tirone. González }}}$$

**Admini: ᴀʟᴍɪɢʜᴛʏ↯ᴄᴀɴ**

https://user-images.githubusercontent.com/19525321/148575768-77dade8f-03cb-428c-aebd-6a0c6514ef00.mp4

noties commented 2 years ago

Hello @adrian011494 ,

can you check the rendering in RecyclerView without LaTeX plugin? Just to make sure that it is the cause of this behaviour.

For me it seems that LaTeX is unlikely causing this. It might be that there is an issue with the RecyclerView setup. Can you share how you initialize and use it?