edemaine / texlish

Better LaTeX that compiles to LaTeX
https://texlish.org/
MIT License
20 stars 0 forks source link

Verbatim environments #2

Open edemaine opened 3 weeks ago

edemaine commented 3 weeks ago

We need to capture verbatim environments so that we don't process their arguments (including Markdown and colon processing). In particular:

We'll also eventually want a way to add to this list, both globally for packages via some kind of type definition file, and locally within a document via a manual override.

diomidov commented 3 weeks ago

Weak disagree on \url and \href. I want to be able to define a command like \oeis{000027} that becomes \href{https://oeis.org/A000027}{A000027}. You can't easily do this on coauthor because the parser has special treatment for \href.

diomidov commented 3 weeks ago

Instead of having a fixed list of verbatim environments, we could have verbatim syntax that you can use with any environment, e.g.

```\verbatim
* This is not a list
* This is **not bold**
edemaine commented 3 weeks ago

Yeah, I was thinking of the following for avoiding all Texlish magic and writing raw LaTeX:

>>tex
  * This is not a list
  * This is **not bold**

I don't understand your point about \url/\href. We don't want to add emphasis to URLs.

diomidov commented 3 weeks ago

I want to be able to use the texlish equivalent of #1 inside \href. I agree that emphasis is not useful.

edemaine commented 3 weeks ago

Ah, got it. Currently, we don't have our own notation for defining macros. Using TeX's #1 will work just fine. But I agree, when/if we define our own notation, it should work inside \url and \href, but not \verb/verbatim. Fun!

diomidov commented 3 weeks ago

But what if I want to generate python code dynamically? :zany_face:

edemaine commented 3 weeks ago

Then don't use verbatim 🙂 It wouldn't work in LaTeX either.