Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ◦ with \circ in math mode #54

Closed
wants to merge 1 commit into from
Closed

Conversation

raol
Copy link
Contributor

@raol raol commented Oct 2, 2017

Closes #42

@Blaisorblade
Copy link
Contributor

Thanks for this! I'd rather write

\newcommand \funcompose {\ensuremath{\circ}}

and use \funcompose for \ensuremath{\circ} to allow changing it if the need arises. The 2nd part might be change-and-replace.

Though I'd wait what @hmemcpy says—I'm just a passerby.

@hmemcpy
Copy link
Owner

hmemcpy commented Oct 2, 2017

I started replacing various \code with an inline $f \circ g$. It ends up looking "mathy" and no need to \ensuremath everywhere.

@Blaisorblade
Copy link
Contributor

@hmemcpy That's more natural TeX; but multi-letter identifiers can be problematic.

Have you looked into lhs2TeX? That's what people use in many modern ICFP/Haskell Symposium papers—it lets you write |foo . bar| and convert it to $\mathit{foo} \circ \mathit{bar}$ (where \mathit renders its argument as a word).

I've used lhs2TeX to write the actual math in my PhD thesis, which is an abuse I don't recommend; but using it for rendering Haskell-like code might be good. I suspect the category-theoretical formulas are "actual math" but lhs2TeX might scale for them.
*LaTeX offers lower-level control, which you need once the equations get complex enough.

Either way, if you are in for the long term, you might want to decide on lhs2TeX sooner rather than later.

@hmemcpy
Copy link
Owner

hmemcpy commented Oct 2, 2017

@Blaisorblade sounds great! I'll look into it, thanks!
Meanwhile, I started #56, where I attempt to use some macros I found... Any comments/improvements are most welcome!

@raol
Copy link
Contributor Author

raol commented Oct 2, 2017

@hmemcpy as far as I understand $ $ is the same as \ensuremath{}.

Then I propose to close this PR, but I'll take part 2 and will convert it to math fully.
Ok?

@Blaisorblade
Copy link
Contributor

@hmemcpy as far as I understand $ $ is the same as \ensuremath{}.

Nitpick FYI: \ensuremath also works in math mode (which can be opened also by things that expand to $ or $$), while $...$ doesn't work when you're already inside math mode.

@@ -245,7 +245,7 @@ \section{Representable Functors}\label{representable-functors}
It must respect naturality conditions, and it must be the inverse of α:

\begin{Verbatim}[commandchars=\\\{\}]
α β = id = β α
α \ensuremath{\circ} β = id = β \ensuremath{\circ} α
Copy link
Contributor

@mseri mseri Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about moving also \neq, \alpha, \beta, \gamma, delta, \epsilon, ... to their LaTex math counterparts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the Unicode gives the same result (with the right packages like unicode-math, not sure it's setup here), and the source is more readable. Maybe we should move the Unicode alpha inside math mode.

Copy link
Contributor

@mseri mseri Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the change should be part of #56

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm inclined to leave the unicode symbols as is, if they render fine. Most of them do.

@hmemcpy
Copy link
Owner

hmemcpy commented Oct 2, 2017

Yeah, I think to close this PR and, for now, just do the $..$ etc. styling, as this wiki suggests https://en.wikibooks.org/wiki/LaTeX/Mathematics
Thanks again for the help!

@hmemcpy hmemcpy closed this Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants