RePsychLing / ZiFPsychLing

Papers and code snippets from the ZiF workshop
0 stars 0 forks source link

Switch to jnw (Julia noweb) input using minted environment #1

Open dmbates opened 4 years ago

dmbates commented 4 years ago

@palday @kleinschmidt I have switched to a Julia noweb (.jnw) source file for papers/LMMFormulation and modified papers/Makefile to use the texminted doctype and xelatex.

In general it is better to keep a terminal running and use a single Julia process to rerun the weave call every time that you modify LMMFormulation.jnw so that the JIT compilation overhead is amortized over multiple calls. The Makefile entries are primarily there to remind me what the call should look like.

Right now I am trying to get the paper to format correctly. I think it needs further tweaking to accept the UTF-8 characters in the code and code-output blocks. If anyone has magic incantations to allow xelatex to use more utf-8 characters in native input I would appreciate hearing of them.

kleinschmidt commented 4 years ago

In my experience the problem with UTF8 and latex is often on the font end (the default font doesn't include glyphs for a lot of UTF8). But it's been a while since I wrestled with that...

palday commented 4 years ago

I thought this but somehow forgot to write it -- in my experience, it's also the font that's missing the glyphs, regardless of whether you're using LaTeX (since I did part of my education in Germany, I got some experience in writing LaTeX with non ASCII character sets) or XeLaTeX. If I recall correctly, you can tell XeLaTeX to do special things for certain symbols, e.g. automatically changing to the mathmode font for theta, beta, etc. Looks like it's the mathspec package that you want:

\setmathsfont(Digits,Greek)[Uppercase=Plain,Lowercase=Regular,Scale=MatchLowercase]{GFS Porson}