forked from Shinonome/dots-hyprland
sidebar: ai: fix latex
This commit is contained in:
@@ -102,7 +102,8 @@ const Latex = (content = '') => {
|
|||||||
// You can add this line in the middle for debugging: echo "$text" > ${filePath}.tmp
|
// You can add this line in the middle for debugging: echo "$text" > ${filePath}.tmp
|
||||||
const renderScript = `#!/usr/bin/env bash
|
const renderScript = `#!/usr/bin/env bash
|
||||||
text=$(cat ${filePath} | sed 's/$/ \\\\\\\\/g' | sed 's/&=/=/g')
|
text=$(cat ${filePath} | sed 's/$/ \\\\\\\\/g' | sed 's/&=/=/g')
|
||||||
LaTeX -headless -input="$text" -output=${outFilePath} -textsize=${fontSize * 1.1} -padding=0 -maxwidth=${latexViewArea.get_allocated_width() * 0.85}
|
cd "$(dirname $(command -v LaTeX))"
|
||||||
|
./LaTeX -headless -input="$text" -output=${outFilePath} -textsize=${fontSize * 1.1} -padding=0 -maxwidth=${latexViewArea.get_allocated_width() * 0.85} > /dev/null 2>&1
|
||||||
sed -i 's/fill="rgb(0%, 0%, 0%)"/style="fill:#000000"/g' ${outFilePath}
|
sed -i 's/fill="rgb(0%, 0%, 0%)"/style="fill:#000000"/g' ${outFilePath}
|
||||||
sed -i 's/stroke="rgb(0%, 0%, 0%)"/stroke="${darkMode.value ? '#ffffff' : '#000000'}"/g' ${outFilePath}
|
sed -i 's/stroke="rgb(0%, 0%, 0%)"/stroke="${darkMode.value ? '#ffffff' : '#000000'}"/g' ${outFilePath}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -99,5 +99,6 @@ install-MicroTeX (){
|
|||||||
x make -j32
|
x make -j32
|
||||||
x sudo mkdir -p /usr/local/bin
|
x sudo mkdir -p /usr/local/bin
|
||||||
x sudo cp ./LaTeX /usr/local/bin/
|
x sudo cp ./LaTeX /usr/local/bin/
|
||||||
|
x sudo cp -r ./res /usr/local/bin/
|
||||||
x cd $base
|
x cd $base
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user