|
|
@ -1,4 +1,5 @@
|
|
|
|
import TeX from "@matejmazur/react-katex";
|
|
|
|
import TeX from "@matejmazur/react-katex";
|
|
|
|
|
|
|
|
import clsx from "clsx";
|
|
|
|
import "katex/dist/katex.min.css";
|
|
|
|
import "katex/dist/katex.min.css";
|
|
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
interface Props {
|
|
|
@ -7,7 +8,7 @@ interface Props {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const Math: React.FC<Props> = ({ content, block }: Props) => {
|
|
|
|
const Math: React.FC<Props> = ({ content, block }: Props) => {
|
|
|
|
return <TeX className="max-w-full inline-block overflow-auto" block={block} math={content}></TeX>;
|
|
|
|
return <TeX className={clsx("max-w-full", block ? "w-full block" : "inline text-sm")} block={block} math={content}></TeX>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default Math;
|
|
|
|
export default Math;
|
|
|
|