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

Answer by Alexander Nigl for Implement LaTeX accent macros

$
0
0

Python 3, 203 bytes

Without bonus:

l=list(input())b=list(""*len(l))try: while 1:s=l.index("\\");t=l[s+1];del l[s+6];del l[s:s+5];b[s] = "b"==t and "_" or "d"==t and "." or "h"==t and "^" or "*";except:print("".join(b)+"\n"+"".join(l));

I really hope there is a shorter version.


Viewing all articles
Browse latest Browse all 6

Trending Articles



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