From e67f01a9bd695707a9b81d5afb1a83cf25b4739f Mon Sep 17 00:00:00 2001 From: Thooooor <46197373+Thooooor@users.noreply.github.com> Date: Sun, 1 May 2022 01:11:32 +0800 Subject: [PATCH 1/2] Add 'displayMode' in katexSettings The value of 'displayMode' is the opposite of the value of 'inline'. --- packages/react-notion-x/src/third-party/equation.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-notion-x/src/third-party/equation.tsx b/packages/react-notion-x/src/third-party/equation.tsx index 9a7d870b1..e8a92c05e 100644 --- a/packages/react-notion-x/src/third-party/equation.tsx +++ b/packages/react-notion-x/src/third-party/equation.tsx @@ -7,6 +7,7 @@ import { useNotionContext } from '../context' import { cs } from '../utils' const katexSettings = { + displayMode: false, throwOnError: false, strict: false } @@ -20,7 +21,7 @@ export const Equation: React.FC<{ const { recordMap } = useNotionContext() math = math || getBlockTitle(block, recordMap) if (!math) return null - + katexSettings.displayMode = !inline; return ( Date: Sun, 1 May 2022 01:38:14 +0800 Subject: [PATCH 2/2] Update equation.tsx --- packages/react-notion-x/src/third-party/equation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-notion-x/src/third-party/equation.tsx b/packages/react-notion-x/src/third-party/equation.tsx index e8a92c05e..23cf6d7dd 100644 --- a/packages/react-notion-x/src/third-party/equation.tsx +++ b/packages/react-notion-x/src/third-party/equation.tsx @@ -21,7 +21,7 @@ export const Equation: React.FC<{ const { recordMap } = useNotionContext() math = math || getBlockTitle(block, recordMap) if (!math) return null - katexSettings.displayMode = !inline; + katexSettings.displayMode = !inline return (