diff --git a/client/src/components/GIFTCheatSheet/GiftCheatSheet.tsx b/client/src/components/GIFTCheatSheet/GiftCheatSheet.tsx
index 4dc9f1e..179e454 100644
--- a/client/src/components/GIFTCheatSheet/GiftCheatSheet.tsx
+++ b/client/src/components/GIFTCheatSheet/GiftCheatSheet.tsx
@@ -137,19 +137,14 @@ const GiftCheatSheet: React.FC = () => {
-
8. LaTeX et Markdown
+
8. LaTeX
- Les format LaTeX et markdown sont supportés dans cette application. Vous devez cependant penser
+ Le format LaTeX est supporté dans cette application. Vous devez cependant penser
à 'échapper' les caractères spéciaux mentionnés plus haut.
Exemple d'équation:
- {'$$x\\= \\frac\\{y^2\\}\\{4\\}$$'}
- {'\n$x\\= \\frac\\{y^2\\}\\{4\\}$'}
-
-
Exemple de texte Markdown:
-
- {'[markdown]Grâce à la balise markdown, Il est possible d\'insérer du texte *italique*, **gras**, du `code` et bien plus.'}
+ {'$$x\\= \\frac\\{y^2\\}\\{4\\}$$'}
diff --git a/client/src/components/GiftTemplate/templates/TextType.ts b/client/src/components/GiftTemplate/templates/TextType.ts
index b250637..bf9a3a3 100644
--- a/client/src/components/GiftTemplate/templates/TextType.ts
+++ b/client/src/components/GiftTemplate/templates/TextType.ts
@@ -9,7 +9,6 @@ interface TextTypeOptions extends TemplateOptions {
function formatLatex(text: string): string {
return text
.replace(/\$\$(.*?)\$\$/g, (_, inner) => katex.renderToString(inner, { displayMode: true }))
- .replace(/\$(.*?)\$/g, (_, inner) => katex.renderToString(inner, { displayMode: false }))
.replace(/\\\[(.*?)\\\]/g, (_, inner) => katex.renderToString(inner, { displayMode: true }))
.replace(/\\\((.*?)\\\)/g, (_, inner) =>
katex.renderToString(inner, { displayMode: false })
diff --git a/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx b/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx
index d3e7a82..54022a3 100644
--- a/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx
+++ b/client/src/components/Questions/MultipleChoiceQuestion/MultipleChoiceQuestion.tsx
@@ -1,10 +1,8 @@
// MultipleChoiceQuestion.tsx
-import React, { useEffect, useState } from 'react';
+import React, { useState } from 'react';
+import Latex from 'react-latex';
import '../questionStyle.css';
import { Button } from '@mui/material';
-import TextType from '../../GiftTemplate/templates/TextType';
-import { TextFormat } from '../../GiftTemplate/templates/types';
-import Latex from 'react-latex';
type Choices = {
feedback: { format: string; text: string } | null;
@@ -14,7 +12,8 @@ type Choices = {
};
interface Props {
- questionContent: TextFormat;
+ questionTitle: string | null;
+ questionContent: string;
choices: Choices[];
globalFeedback?: string | undefined;
handleOnSubmitAnswer?: (answer: string) => void;
@@ -22,24 +21,22 @@ interface Props {
}
const MultipleChoiceQuestion: React.FC