latex

ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

两盒软妹~` 提交于 2021-02-10 23:16:09
问题 This problem ties in with the many discussions about the Xerces dependency hell, but I can't seem to solve it. I'm trying to export LaTeX code to PDF in Java. My code is part of an OSGI bundle for Cytoscape 3.4 and is managed and built with Maven. The LaTeX library is jlatexmath (1.0.6) and to write to SVG and PDF I want to try the apache fop (0.95) libs. Fop is depending on a whole range of batik libraries, which in turn depend on xml-apis (1.3.04). With xml-apis included, I get this error:

ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

房东的猫 提交于 2021-02-10 23:13:20
问题 This problem ties in with the many discussions about the Xerces dependency hell, but I can't seem to solve it. I'm trying to export LaTeX code to PDF in Java. My code is part of an OSGI bundle for Cytoscape 3.4 and is managed and built with Maven. The LaTeX library is jlatexmath (1.0.6) and to write to SVG and PDF I want to try the apache fop (0.95) libs. Fop is depending on a whole range of batik libraries, which in turn depend on xml-apis (1.3.04). With xml-apis included, I get this error:

ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

吃可爱长大的小学妹 提交于 2021-02-10 23:05:31
问题 This problem ties in with the many discussions about the Xerces dependency hell, but I can't seem to solve it. I'm trying to export LaTeX code to PDF in Java. My code is part of an OSGI bundle for Cytoscape 3.4 and is managed and built with Maven. The LaTeX library is jlatexmath (1.0.6) and to write to SVG and PDF I want to try the apache fop (0.95) libs. Fop is depending on a whole range of batik libraries, which in turn depend on xml-apis (1.3.04). With xml-apis included, I get this error:

Sphinx automodule, no text wrap in class name (latexpdf)

会有一股神秘感。 提交于 2021-02-10 22:42:19
问题 I'm generating pdf using make latexpdf of Sphinx. This mostly works fine but I have a quite deep folder structure for my project resulting in class names that do not fit on the page. Anyone who knows how I can tackle this? Here is a screenshot of the problem: 回答1: Hi I hope you found the solution if not add the code below in the preamble of your conf.py \makeatletter \renewcommand{\pysigline}[1]{% \setlength{\py@argswidth}{\dimexpr\labelwidth+\linewidth\relax}% \item[{\parbox[t]{\py@argswidth

Knitr: Turning the R chunk figure caption 90 degrees inline Latex

大憨熊 提交于 2021-02-10 20:25:14
问题 Here is my a code to demo what I cannot do. I use an R chunk to make a figure and use out.extra='angle=90' to make the figure post sideways on the page. Now how do I get my caption to go sideways too? \documentclass{article} \usepackage{subcaption} \begin{document} <<test-plot,echo=FALSE,fig.cap="I would like to be posted sideways under figure, NOT HERE",out.extra='angle=90'>>= plot(1) abline(0, 1) plot(rnorm(10)) for(i in 1:10) { abline(v = i, lty = 2) } @ \end{document} 来源: https:/

Knitr: Turning the R chunk figure caption 90 degrees inline Latex

孤人 提交于 2021-02-10 20:22:08
问题 Here is my a code to demo what I cannot do. I use an R chunk to make a figure and use out.extra='angle=90' to make the figure post sideways on the page. Now how do I get my caption to go sideways too? \documentclass{article} \usepackage{subcaption} \begin{document} <<test-plot,echo=FALSE,fig.cap="I would like to be posted sideways under figure, NOT HERE",out.extra='angle=90'>>= plot(1) abline(0, 1) plot(rnorm(10)) for(i in 1:10) { abline(v = i, lty = 2) } @ \end{document} 来源: https:/

Substitute in sympy wihout evaluating or simplifying the expression

拜拜、爱过 提交于 2021-02-10 18:04:04
问题 Consider the follwing example: from sympy import * x = Symbol('x') f = sqrt(3*x + 2) Now I want to substitute a number, say 5 for x and get a LaTeX represenation, in this case it should return \\sqrt(3\\cdot 5 + 2) How can I do this? I tried latex(f.subs(x,2,evaluate=False)) but this results just in \\sqrt(17) . 回答1: Use UnevaluatedExpr(5) instead of 5: >>> latex(f.subs(x, UnevaluatedExpr(5))) '\\sqrt{2 + 3 \\cdot 5}' This wrapper prevents the expression inside of it ("5") from interacting

How to propagate `\n` to sympy.latex()

僤鯓⒐⒋嵵緔 提交于 2021-02-10 15:59:52
问题 The Goal is to format a polynomial with more than 6 parameters into a plot title. Here is my polynomial parameter to string expression function, inspired by this answer, followed by sym.latex() : def func(p_list): str_expr = "" for i in range(len(p_list)-1,-1,-1): if (i%2 == 0 and i !=len(p_list)): str_expr =str_expr + " \n " if p_list[i]>0: sign = " +" else: sign = "" if i > 1: str_expr = str_expr+" + %s*x**%s"%(p_list[i],i) if i == 1: str_expr = str_expr+" + %s*x"%(p_list[i]) if i == 0: str

Hot to get a bold odd-numbered list in LaTeX?

烈酒焚心 提交于 2021-02-10 15:28:30
问题 \begin{enumerate}[label=\textbf{\arabic*.}] \item Numbered 1 \addtocounter{enumi}{1} \item Numbered 3 \addtocounter{enumi}{1} \item Numbered 5 \addtocounter{enumi}{1} \item Numbered 7 \addtocounter{enumi}{1} \item and so on... \end{enumerate} Is there a better way to get enumerate to give you a list of just the odd numbers without having to add an \addtocounter between every item? 回答1: Reworking this reference from TeX.SX quickly enough, my first suggestion would be the following, using the

Indenting disturbed when adding superscript to rowname of a grouped row using kable in latex

ぃ、小莉子 提交于 2021-02-10 15:07:28
问题 How do I add superscript to name of a particular row of a table created using kable in latex environment (this link gives solution for markdown). I tried following: at2=cbind(1:5,6:10,11:15) rownames(at2)=c("one", "two", "three", "four$^1$", "five") kable(at2,format = "latex",booktabs=T) But this isn't working. For image of result click this EDIT: The first problem is solved with escape = FALSE but now a new problem related to indentation has come up. I am using group_rows which automatically