Quantcast
Channel: Implement LaTeX accent macros - Code Golf Stack Exchange
Viewing all articles
Browse latest Browse all 6

Answer by PurkkaKoodari for Implement LaTeX accent macros

$
0
0

Pyth, 5146454341 40 bytes

I remove the curly braces and split at \, just like Reto Koradi's CJam answer does. The codes bar, dot and hat are recognized simply by the last decimal digit of the character code of the first character, modulo 3. I just add barf(RIP)"""" to the first part and remove it in the end to save the code for handling the first part specially.

jtMsMCm,+@".^_"eChd*\ -ld4>d3c-+*4Nz`H\\

Try it online.Test suite.


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>