Converted Files cause LaTeX to behave oddly.
Using the command
Upload all shared notes
, to load everything into github with the following configuration (attached), LaTeX tends to act oddly.
First, Github seems it will parse equations surrounded by $$
fine, but will be aligned to the left instead of front and center like it should.
Second, Github seems to NOT parse equations surrounded by $$
when using \begin{align}
and \end{align}
within it to align a multi-line equation.
This is shown on the two screenshots that follow, one that shows the preview and one that shows the code.
I don't exactly know if it's a problem of a wrong setting, or if it's a setting that needs to be added to accommodate the way Github seems to do markdown.
Thank you for any responses!12 Replies
Nor related with Publisher nor Obsidian, sorry
I mean, obviously its not Enveloppe that's specifically causing the problem, it's github. But the plugin was developed to get around the way github's markdown parses stuff and change it in the process right? I was wondering if there was a way to use the plugin to possibly add those line gaps automatically, because adding them in Obsidian makes the whole thing look double spaced (ugly).
I tried using the
Text replacer
for this, to see if I could get it to make:
into
AKA, adding a line gap before and after it (since it's the same set of symbols on the top and bottom).
But alas, the text box for it is only 1 line instead of multiple.
Apologies if I'm out of line with pushing the issue further, Enveloppe is the only thing I can find right now that (for the most part) converts ObsidianMD to GithubMD without a lot of pain.
okay im dumb, regex does let me do this (for the most part) now it's just debugging my complete lack of regex knowledge
oh hey same problem... #How to replace text with newline?maybe that's why its not working?
oh wait, i forgot to rever it back to before testing
nonetheless, it does the same thing even with
\r
before the \n
okay well, i dont know enough regex to understand your work around you mentioned in the other thread, but i wont ping you, assuming it's about 2am for you rn. hope i can get some clarification in the morning/when you are free! thank you again!Did you try the regex on regex101?
I did, the output should be right, but it dont do nun
Did you set ECMAScript?
By any chance can you send me as text the regex? I can look
Btw, chatgpt is pretty good for regex
set ECMAScript? idk what that is 😭
uhm... sure. i can even send you the md file if you'd like- here:
oh crap, i think that one pinged you, i did NOT mean to do that, im sorry 😭
i tried chatgpt for a new set of regex, it gave me:
look for:
(?<!\n)\$\$(.*?)\$\$(?!\n)
return: \n$$\1$$\n
so instead of looking for specifically the $$
with the \begin{align}
after it (on the next line) and \end{align}
before it, it would just look for any set of $$
, ingore anything between them, and so long as they didnt have a linebreak before or after, it would give one 🤔 though... maybe it should be an "if they have a line break already, still mark it as okay" to let it go. either way, i was unsuccessful getting that to work.
i've found getting obsidianmd to github is way more stupidly complex that i originally thought. even the way it handles linebreaks and bullet points and such. i've kinda started looking into Quartz to host a static site on github pages with the exact (almost) same parser that obsidian uses, or at least handle the display of markdown files the same wayYeah, GFM can be a bit complex... That's why I use quartz xD