sidebar: ai: latex: left align, nicer /test cmd

This commit is contained in:
end-4
2024-03-21 19:45:25 +07:00
parent f0bd088001
commit c0b79cb6c8
2 changed files with 16 additions and 27 deletions
+15 -26
View File
@@ -59,31 +59,20 @@ export default (text) => {
return output.join('\n'); return output.join('\n');
} }
export const markdownTest = `# Heading 1 export const markdownTest = `## Inline formatting
## Heading 2 - **Bold** *Italics* __Underline__
### Heading 3 - \`Monospace text\` 🤓
#### Heading 4 - Colors
##### Heading 5 - Nvidia green #7ABB08
1. yes - Soundcloud orange #FF5500
2. no ## Code block
127. well \`\`\`cpp
- Bulletpoint starting with minus #include <bits/stdc++.h>
* Bulletpoint starting with asterisk const std::string GREETING="UwU";
--- int main() { std::cout << GREETING; }
- __Underline__ __ No underline __
- **Bold** ** No bold **
- _Italics1_ *Italics2* _ No Italics _
- A color: #D6BAFF
- nvidia green: #7ABB08
- sub-item
\`\`\`javascript
// A code block!
myArray = [23, 123, 43, 54, '6969'];
console.log('uwu');
\`\`\` \`\`\`
- Random instruction thing ## LaTeX
- To update arch lincox, run \`sudo pacman -Syu\` \`\`\`latex
\`\`\`tex \\frac{d}{dx} \\left( \\frac{x-438}{x^2+23x-7} \\right) = \\frac{-x^2 + 869}{(x^2+23x-7)^2} \\\\\\\\ cos(2x) = 2cos^2(x) - 1 = 1 - 2sin^2(x) = cos^2(x) - sin^2(x)
\\frac{d}{dx} \\left( \\frac{x-438}{x^2+23x-7} \\right) = \\frac{-x^2 + 869}{(x^2+23x-7)^2} \\\\ \\frac{d}{dx} \\left( \\frac{x-438}{x^2+23x-7} \\right) = \\frac{-x^2 + 869}{(x^2+23x-7)^2}
\`\`\` \`\`\`
`; `;
@@ -82,7 +82,7 @@ const Latex = (content = '') => {
const latexViewArea = Box({ const latexViewArea = Box({
// vscroll: 'never', // vscroll: 'never',
// hscroll: 'automatic', // hscroll: 'automatic',
homogeneous: true, // homogeneous: true,
attribute: { attribute: {
render: async (self, text) => { render: async (self, text) => {
if (text.length == 0) return; if (text.length == 0) return;