Emacs Chat 31: Pedro A. Aranda Gutierrez
| emacs, emacs-chatWe chatted with Pedro about Org Mode, LaTeX exports and font management including alternatives and things you can and can't do depending on your choices.
View in the Internet Archive, watch or comment on YouTube, read the transcript online, download the transcript (VTT or TXT), or e-mail me.
Chapters
- 0:00 Opening
- 1:24 Setting things up
- 2:33 Local variables
- 3:56 Mini export menu
- 4:17 Basic output with different fonts
- 4:49 Adding a code block as source
- 6:18 The problem with exporting Unicode
- 7:45 Trying a different font
- 9:05 LuaLaTeX
- 10:37 Switching to FreeSerif, FreeSans, and FreeMono
- 12:04 LuaLaTeX is slower
- 12:42 The fonts are rendered
- 13:42 The farmer on the donkey in front of the train
- 15:35 Unicode and LuaLaTeX
- 17:00 Emojis
- 18:37 Fallback fonts
- 21:39 Fallback configuration
- 22:47 Selecting fonts
- 24:10 Fallbacks
- 26:46 The LaTeX produced
- 27:21 Character families should be in the Messages buffer
- 30:09 Behind the scenes
- 31:00 Refreshing local variables
- 33:37 Scaling fonts to match lowercase
- 34:17 Specifying the fallbacks
- 35:33 HarfBuzz
- 36:17 Upcoming work on Babel (the LaTeX package)
- 37:02 More about HarfBuzz and ligatures?
- 39:23 Upcoming talk on accessible presentations
- 41:19 Upcoming work on Polyglossia and Babel
- 42:02 Chinese, Japanese, and Korean
- 44:22 The development process
- 48:12 Retirement
- 49:41 Fallback fonts
- 53:06 LaTeX versions
- 56:38 Sans serif fonts are better for accessibility
- 57:09 Wanting markup for sans serif
- 1:00:33 Contacting Pedro
Transcript
Expand this to read the transcript
Pedro: The things that I have here that might be interesting for people is that another thing that is quite recent for Emacs is that we are starting to have a lot of the configuration variables as local variables. So you don't have to go and get in your init's .el to have anything configured. Why? This is another sort of fight against the windmills I've had. Why? Because with this I can make my Org files more distributable, so I can share them with more people and they don't have to touch anything in their configurations. That's the basic idea. Small little trick that I have is that I'm using fancyvrb for everything instead of listings. And there was somewhere in the documentation, you also have an explanation for how to use fancyvrb to substitute listings and get nice listings in your LaTeX exported by Org. And that's the only thing. Initially, pdflatex, Everything is plain. If I go and just go and export...
Pedro: This is a mini export menu I have myself because I think it's much more handy than the export thing that we have in Org Mode. So I did a small one for me. And so I'm exporting to LaTeX and there you see the...
Pedro: I was very much inspired by what Pandoc is doing. In Pandoc, you can say, "I have my serif font, which is this font. For this font, I want these fallbacks because that's..." Fallback is, first of all, fallback fonts. Fallback is a term used by lualatex to say, if you can't find a character in a font, try to find it in another font. And then, if you provide lualatex with a list of fonts, it's going to be looking up the fonts to get your characters. That's the main idea. Prot: Let me ask something here, because if you notice the output... Of course, it is not what we want, but it is also not just the tofu, you know, like the missing character. If you notice, there is some kind of a symbol there going on. From what I recall, we have characters and then we have something that is called the grapheme or grapheme cluster, something like that, which is basically characters laid on top of each other to produce the emoji. It seems here that Free Font has the underlying characters, but maybe not the composition codes or something like that. Pedro: No. It only has some characters. It only has some some underlying characters. For example it only has the... It has the finger, but it doesn't have all the compositions that you need for that. Prot: Exactly. Sacha: That one in particular, I think, changes the color of it. So that's why. Pedro: Yes. And if you look at the, if we go back here, it's saying there's no character at all for the face. But if you go to the beginning, you will also notice that there was some, where was it? I've seen it. At some point, they are also telling you that the thing... where is it? Okay, fine. It's going to take too long to find. Sacha: It's fine. Besides, you fixed the problem, so you don't have to dig into the old way of doing things. Pedro: Yes, so that's my main problem right now. So I go and I'm going to go to the... I keep trying to use the teleconference, the conference screen, the shared screen instead of the red one. This is why sometimes I sort of get mixed up. We had this. And I'm just going to go and comment this out because I'm going to go for the new one.
Pedro: For the new one, I have a full example here. Here we go with the fontspec configuration, which is at the beginning. You say, what are you doing there, right? I know it might look a bit scary at the beginning but then if you if you're familiar with what Pandoc is doing it's not that different Sacha: Nonsense. It's not scary at all. We'll just copy whatever you post. Prot: Life is simple. Pedro: Yeah, no, but I mean, that's the basic idea. You have something very similar to this in the actual documentation, both in the docstring and in the manual. So all this process that I'm telling you is also part of the manual, step by step. So let's go for this and let's try to... First of all, I'm going to load my new variables. I'm going to refresh the variables. Let's go.
Pedro: If you have noticed before I compile, you see that each font has its own size. That is sometimes sort of not very nice, right? So what I would do... The next is I'm going to add a property to both the sans and the monophon to say, try to scale them so that they match the lowercase of the main font. That sort of makes them more proportional, better look and feel, right?
Pedro: This is the LaTeX that is produced. The important part is here. That's the fallbacks. If you see, I'm only having the Noto Color emoji font being included. Why? Because what I told you before, there is no Han, so there's no character being added there. I don't add the Han font because I don't need it. That's sort of a mini optimization that you may want to have. Next thing...
Pedro: I get my fonts scaled so that they look more or less the same size, which is a nice appearance. I have my listings and my outputs. And I have my emojis. Prot: This looks good. Pedro: This is basically what I need. Prot: Can I ask something? Two questions, actually. One is, I see the props parameter you have for the... if you switch to your Emacs buffer... Pedro: Just a second. I was on the wrong stream. Prot: Okay.
Pedro: And just before we close this, I've been showing what I mostly hear dominate, which is English, Spanish, or Latin alphabet. But with this package, we also have initial support for when you're using xelatex. There's a package which is called xeCJK to provide simplified Chinese, Japanese, and Korean documents. So this, with lualatex, raw, without any Babel or anything else, raw and monolingual, is also supported. What I basically do is I map what is on Overleaf describing how to do this with xelatex and this package which is called xeCJK. I map that with the same kind of header. You can use this kind of variables to do the same for this Chinese, Japanese, and Korean document. Sacha: Would you happen to have an example so that people can see what the markup looks like? Pedro: The markup, I mean, the idea would be instead of using main... I don't have an example here.. But the idea is that instead of calling the fonts main, sans, and mono, you have CJKmain. So you would have something like, the font would be like CJKMain. C, J, K. And the other thing is that you would have to change your compiler to xelatex. That's also very, very well documented in current main Org. So we have it. That would be more or less the effort of the last couple of years and how it has crystallized into things that are already in master.

