简单的Latex渲染插件
-
基于java调用命令行的Latex插件,需要安装latex渲染工具和ImageMagick转换工具。
功能非常简单,就是利用机器人渲染latex并且发送图片到群里。
用于打败只有其他架构才有latex渲染工具的垄断
github:khjxiaogu/MiraiLatexPlugin
当前插件还在设计阶段,欢迎在github issue提交各种意见和建议。 -
新手有点没明白怎么用,为什么会报错2022-03-02 20:35:44 W/stderr: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: message is empty
2022-03-02 20:35:44 W/stderr: at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
2022-03-02 20:35:44 W/stderr: at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
2022-03-02 20:35:44 W/stderr: at com.khjxiaogu.LatexPlugin.Main.TimedExecute(Main.java:34)
2022-03-02 20:35:44 W/stderr: at com.khjxiaogu.LatexPlugin.Main.lambda$onEnable$1(Main.java:46)
2022-03-02 20:35:44 W/stderr: at com.khjxiaogu.LatexPlugin.CommandUtils$1.onGroup(CommandUtils.java:26)
2022-03-02 20:35:44 W/stderr: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2022-03-02 20:35:44 W/stderr: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
78)
2022-03-02 20:35:44 W/stderr: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:43)
2022-03-02 20:35:44 W/stderr: at java.base/java.lang.reflect.Method.invoke(Method.java:567)
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$i
nvokeWithErrorReport(JvmMethodListenersInternal.kt:140)
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$registerEventHandler$callM
ethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:1)
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$callMethod$2
.invokeSuspend(JvmMethodListenersInternal.kt:154)
2022-03-02 20:35:44 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2022-03-02 20:35:44 W/stderr: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2022-03-02 20:35:44 W/stderr: at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:39)
2022-03-02 20:35:44 W/stderr: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
2022-03-02 20:35:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
2022-03-02 20:35:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750
)
2022-03-02 20:35:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
2022-03-02 20:35:44 W/stderr: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
2022-03-02 20:35:44 W/stderr: Caused by: java.lang.IllegalArgumentException: message is empty
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.internal.contact.GroupImpl.sendMessage(GroupImpl.kt:183)
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.contact.Group.sendMessage(Group.kt:185)
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.contact.Group$sendMessage$3.invoke(Group.kt)
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.contact.Group$sendMessage$3.invoke(Group.kt)
2022-03-02 20:35:44 W/stderr: at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inli
ned$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:205)
2022-03-02 20:35:44 W/stderr: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2022-03-02 20:35:44 W/stderr: at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
2022-03-02 20:35:44 W/stderr: at me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspendKt.$runSuspend$(RunSuspend.kt:18)
2022-03-02 20:35:44 W/stderr: at net.mamoe.mirai.contact.Group.sendMessage(Group.kt)
2022-03-02 20:35:44 W/stderr: at com.khjxiaogu.LatexPlugin.Main.lambda$onEnable$0(Main.java:50)
2022-03-02 20:35:44 W/stderr: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2022-03-02 20:35:44 W/stderr: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2022-03-02 20:35:44 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
2022-03-02 20:35:44 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
2022-03-02 20:35:44 W/stderr: at java.base/java.lang.Thread.run(Thread.java:831)