[Sacha]: But first, I will press the go live button because this time I'm going to remember. Okay, now I think we are live. Welcome to Emacs Chat 31. Today we have Pedro Aranda Gutierrez, who is here to talk about all the cool things with Org LaTeX Export. And Prot is here also because he knows a lot more about fonts and writing in multiple languages and all that stuff. So I'm counting on Prot to ask questions when my mind just goes like, ooh, cool demo. [Pedro]: Hello, here we are. So yes, I wanted to talk about what is news for all. At least this part, the integration of the basic font management with lualatex is in main right now in Org Mode. [Prot]: Very well, very well. [Pedro]: I was not expecting that to happen, but it happened. So that's the situation. And I would just like to go stepwise on what you have to do, what you can do, what you can't do with these things. This is my Emacs 31 compiled a couple of days ago and I'm on devel. I'm on main here, on main for Org mode. I have a small Org file here which initially I'm going to be using pdflatex to compile, with a trick: I'm not compiling in the background, but I have a script here in the terminal to have a bit more of feedback or direct feedback of what is happening. If we go through this... I mean this is basically my template to start any article. It's going to be an article. we are going to use pdflatex. And the other thing is I have a very small thing with the default font. Then I have also the Sans Serif font. I also have some monospaced fonts with it. 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... 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... This was quick, of course, but what you see is I have my serif, my sans serif, and I have my monofont and that's nice, right? So that's one of the things that we always want to have. Now, the next thing is everything would be nice. And now I need my [??], full file where I have the rest of the things that I want to copy and paste into this presentation. Everything would be nice if I just were to go and add a small command to do things, but I'm only going to be listing the source. So let me just go and check that. If I do like this, so I have a small listing. Why do I need listings? This is partially for my lectures. I want to share code with my students and tell them how to program, right? Or they are in a lab and they need an example of a command that they need to achieve a search and output in the computer. So what I would do, first step, which would also work with pdflatex, is I'm going to go and export the source. If I now go and export the source, I got a second compile, and now you see that I included the command. Nice thing about using fancyvrb here is that as I have fancyvrb here configured, I'm using the listings stuff, but this is the configuration for fancyvrb. I can include things like a frame to separate code from other things in the document. But now here problems started and this is this was practically what happened two years ago when someone asked in the list how can I do this and the thing is he also wanted to have something like I want to export both so I also want to export the results. Let's see what happens in this case. It's the tree command so it will be showing a couple of files that I have on my on my system and let's see what happens with pdflatex. It seems to be working, but then if you go to the log, and this is why I have the log here, you start seeing a lot of errors. Why? Because it has records that do not exist. [Prot]: Missing characters. [Pedro]: Missing characters and things like that. So this was the question. How can I solve this? The obvious answer is pdflatex is not as good with UTF-8 extended, so migrate to lualatex. That was one of the things. But you could actually do it. Before going to that, people said, let's go back and put source. You already have the different font packages in in pdflatex, so why not using one of the font packages that you have, for example, the Bera fonts. This Bera font here Bera, Bera Sans and Bera Mono should allow you to do what you want to do. I checked. What I'm doing here is I have my local variables. I've refreshed my local variables to include in the packages, the packages for Bera, Bera sans, and Bera mono. Let's see what happens. If I go just for the source, I get the Bera thing. So there should be some sort, I get the Bera font integrated. So there should be some hope with this. Fine. So let's go back into doing things with the results included. Bad luck. We continue to have this problem. This is inherent to pdflatex. Right? So we have to move to lualatex, right? And now to be able to do what I'm doing here with lualatex and with my script in the background to see what is happening, I just need to get out and get in again. So we were at this point, we had the Bera fonts. Let's go to see the Bera fonts just with a source on lualatex. This is something that some people ask. The Bera fonts don't have the mono font. So we have to move to something else. Fine. That's point number one. And since that does not work... [Prot]: Sans also, right? You should have a sans-serif line. I didn't see that. [Pedro]: Yes. Exactly. So the Bera fonts, as some people suggested, do not work with lualatex as we want. So if this doesn't work and the corresponding is not one-to-one, so why not go directly into using the full thing with lualatex, right? The first thing I would have to do is I'm going to get rid of the Bera fonts here in my local variables. I put it at the end. So now with my local variables like this, I'm only going to have packages like enumitem and fancyvrb. I'm going to be using lualatex and now in a very big first thing, what I would have to do is to start with my LaTeX header and then start with my setmainfont. Let's say we use the simple ones, the setmainfont FreeSerif, FreeSans... As always, the fingers are... And here you go with the mono, and with the mono right. Let's try this at this point in time. What will happen? I'm going to be using the free fonts directly with lualatex and with lualatex commands. Let's see what happens here. Starts compiling, starts compiling. lualatex is slower, yes. That's the main drawback, mainly for people who want to have equations, LaTeX preview. In Org, when they want to have the preview for equations and maths and so on in Org Mode, that is the main challenge because lualatex gets slower, and that will of course make them not be able to get a flashy auto-refreshing display and so on. But the thing for me and for my manuals, if you want to say it like this, is that first of all we have here the serif fonts, you have the sans fonts, you have the mono font with the free fonts, right? So the next thing that came in was of course, let's see what happens with the listing. Takes longer, but that is something that I can use to show my students how things will look like in the screen. And this was a question that was raised beginning of 2024 in the list. [Sacha]: I appreciate your persistence. [Pedro]: Yes. There's this film, Spanish film from the 30s, from beginning of the 30s. It was still Republic before the Civil War. And there's a man dressed as a farmer in Aragon (they are known to be very stubborn) on his donkey on a train track, and the train behind him, and he doesn't move from the track. The only thing he's saying, "You can toot as much as you want, I'm not going to move. If you want to move, move yourself." So he continues. And the train, and the people: "Why don't you move?" At the end, they come to a joint, he continues on the road, and the train takes the other track. When the train goes by, he says, I told you, you had to go another way. So this is more or less, this in Spanish has become a saying. It's more than a phrase. It's a chufla chufla. And I'm a bit of a chufla chufla. When I think that there's something that needs to be done, I can be very stubborn. [Prot]: And of course you need to be stubborn because these sorts of things are tricky and they require time. Especially on a mailing-list-driven workflow, you have to listen to what users want. You have to take in feedback. It is a slow process. You really have to be patient and stubborn, for sure. [Pedro]: Yes. Basically, my motivation was I know that I need it. Maybe other people don't want to say, but they need it also. [Prot]: Can I ask a comment? Can I ask a question here or will you continue? Because I want to clarify the Unicode characters. Earlier we were getting an error. Now we see the tree. Is this because of FreeFont? Is this because of lualatex? Is it a combination? What exactly helped us fix this? [Pedro]: Okay, it's a very, very good question. I was forgetting that. So here we have a combination. lualatex is handling the UTF characters very nicely. Something that pdflatex did not or was very difficult to have them done, doing it. The second thing is that Free Mono has these display characters. which is also important. And of course, if you want to use free mono, you need to use lualatex to drive the thing. So it's the three things. You have the right font, the right compiler and the right environment. So the next thing is, of course, also on the list. Once again, I need my full because it's going to be a bit quicker than if I go writing everything on my own. If I go down... There was someone saying, "Hey, I want my emojis." [Sacha]: They're very important, you know. [Pedro]: Yeah, I know. For me, it's as important as for anyone. Because maybe you want this, or if you're just... If I'm on a manual, I might want to point out things like... And then I go with the hand, with the body, with the hand, with the... single finger which is the S and then I just want to point at things like this for example and to make it... I might want to highlight something that people have to do with this. Let's try with this current configuration. If I try with this current configuration... And there we are going to see the second part of the answer to Prot's question: we start compiling, we start compiling, we start compiling, and then suddenly we have like two characters which are not part of the thing. Why? Because they are not part of Free Font. Or in this case they are not part of FreeSerif. They are not included in FreeSerif. I need something else. There's where the full thing came in. 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. 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. What I'm saying here is I have a main font, I have a sans font, and I have a mono font, right? That's something that I also had here... about here in this part. The next thing that I'm saying is that the font is free serif, which is this mapping, but saying that for main I'm going to use free serif, for sans I'm going to use free sans, and for mono I'm going to use Noto Sans Mono. Why Noto Sans Mono? Because I like it. It's a bit of a change too. So you can also see that you can mix font families and so on. Basically I like it because it's very readable. And it's very accessible. So for this, everything would be what I had before, right? 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? Now comes the really nice thing, the fallbacks. We've said, fallback is what? Fallback is an alternative font I want to add to the document when a character is missing. I could just have a list of different fonts and go with it and have lualatex decide which characters to use. But that would make the whole thing very, very, very slow. So there's one extra step here, which is look at the document, find what kind of Emacs scripts you have in the document. Then, if you need to add fallbacks, add them for the scripts that are present in the document. For example, in this case, we have the emojis. These are the ones that I want to change. But I don't have any simplified Chinese here, so there's not going to be any Han character in the document, so it's not going to be included in the produced LaTeX. That's the whole idea of the fallbacks. You have fallbacks for the fonts that need them. You might want to have fallbacks for sans serif, maybe, if you need it. If not, you can omit it. In this case, we are only having fallbacks here in the serif font, so I'm only going to be adding the serif, the fallbacks for serif. So that's the basic idea. If you go to Pandoc and you read the documentation, you will notice that most of the things are okay. It's not an Emacs Lisp list here or a plist because it's YAML, but it's very similar. I did some state-of-the-art research before actually coming at the end to this definition. So now, before I compile and we see that we have everything we want, I'm also going to show you what is produced. [Sacha]: Let's see. [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... [Sacha]: Sorry, how do people find out what keys they need to put into that alist? Can they describe-char for example to see whether they need to put in emoji or some other...? [Pedro]: That's a very good question. For that, I need to get to the Messages, or... Oops. I have Warnings... Where is it? You should normally have, in your Messages, a message from Org Mode telling you that it found the characters. I don't know why I'm not seeing it here. [Sacha]: Is it maybe in that Tilix window that you have there with a make edit? [Pedro]: No, no, no. It's inside the Emacs. And I'm not finding it. I'm not finding it. I don't know why, but it should be there. Normally, Org Mode would tell you that you have these and those characters, that you have the different families. You will also see it if I were to, say... I'm going to move this out so I don't have fallbacks. This would be a basic configuration. So now that I have my fallbacks out, and I go and I... So you see that I don't have fallbacks. And then if I go to the warrings, where is it? [Prot]: Maybe messages? [Pedro]: To the messages, exactly. I'm sorry, I don't find it. [Sacha]: It's okay. [Pedro]: But there is a message, I'm sure there is a message which tells you which families or which scripts you have in your document. [Sacha]: All right. No problem. I'm sure all of this will come with wonderful documentation because the Org project is very good at that. [Pedro]: Yes. We spend a lot of time going through the documentation. The current documentation currently has undergone a lot of scrutiny both by Ihor and by myself. I've rewritten it two or three times to make it clearer as I gained insights into what I wanted to tell people and At one point in time I isolated myself completely. I rewrote everything. I forgot about all the exchanges I had with Ihor and I had my own ideas of what I wanted to say. I rewrote everything from scratch and suddenly Ihor said, this is what I wanted. Currently the documentation is at least a bit more than just usable. Let's go back to this. As you see... This is something stupid. I mean, you see that this refresh local variables is a small function that I've written myself. Since I'm working a lot with local variables, I'm also trying to have shortcuts for all this kind of things. [Sacha]: Oh, I thought C-c C-c did that in the directive. [Pedro]: Sometimes it does not, or at least... the case is... I did it myself. I rewrote everything to be sure that I got my local variables, my directory variables, and everything nice as I wanted. Once I have this... Once again... There. If I now go and compile for the last time... What is missing? What have I done wrong? [Sacha]: Do you want a series of undoes? [Pedro]: I'm going to go the quick way. [Prot]: I think there was a missing parenthesis in that. [Pedro]: Yeah, somewhere. [Prot]: Yeah, yeah, yeah, there it is. [Pedro]: No, it looks right, actually. No, yes, because I've copied it from my notebook. [Sacha]: It's not doing the thing yet. [Pedro]: Yeah, yeah. And that comes... That's something that I... So at least if you do it like this... I don't know why this hand does not work correctly with Noto Color Emoji. Another takeaway. You have to find your own wonderful emoji file. The other one is Apple. Apple Color Emoji has a different [??] for emojis. That's something that I also wanted to highlight. Sometimes you don't get the full... It's important you have to do a lot of look and find. But at least with this you get your... At least with this, what do I get? 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. So you see you have that props, and then you are passing it a string. In the fallbacks, you have a slightly different expression where you have the font set, and then you pass it the font, but for example, with Noto Color Emoji, you are not just passing Noto Color Emoji, you are also passing a parameter to me that looks like the pango markup, whereas the other one looks like something else, another markup. I just want to ask if you know, off the top of your head, if the documentation for Pango and for whatever else that is, is clearly available somewhere so that we can follow it because one issue I always find with LaTeX or with anything that has to do with these complex things is that they assume you are a domain expert. And it's like, okay, just do fonts the way you do it in LaTeX. And I'm like, okay, how do you do it... [Pedro]: "No, but how?" Yeah, I know. Exactly. That part is extremely complex. Because in this case, what you're saying is do whatever you do with your normal fonts if you don't have the colon. If you have the colon, then what they say is you need to have, in this case, you need to have the HarfBuzz rasterizer or however it is called. And that... Yes, you're completely right. This is a problem with the documentation. I have... To the best of my knowledge, the only ones that really need harf are the emojis. That's the example. For the rest of the font, at least at this point in time, you don't need, or with this feature set, you don't need any sort of extra things. The extra things will come in the future, when you try to integrate things like Babel, with controlling the fonts in Babel, which I personally already have running, but it's not yet integrated into Org Mode. That's going to take another year, I think. [Prot]: But you are persistent, so yeah, you will do it. [Pedro]: Yeah, no, no. I mean, I want to have it. I need it also. At least I would like to see it officially sanctioned by whoever needs to sanction it before I retire in two years, so that people can use it once I retire. [Prot]: Good, good. The other question I have related to this and emoji is I remember when HarfBuzz was discussed in the context of integrating it with Emacs. Maybe that was Emacs 28 or something along those lines. There was this point. Now, maybe I am conflating things, but there was this point that with this included, like you build Emacs with support for HarfBuzz and now it also supports ligatures. Now, a ligature is something that is fancy. Like, for example, you take three characters, like the equal sign in JavaScript, three equal signs, and you make it look like one character. I don't know if this is part of what you are doing here. [Pedro]: Well, a very good question. This discussion that there was on Emacs 28 for HarfBuzz (yes or no) and ligatures and all these kind of things has not helped. Let's say it this way... It adds confusion. In this context, sorry to be that clear. Why? Because you have to think it as two different, this is two different, completely different pairs of shoes. [Sacha]: Okay, because we're saying it's not LaTeX export. [Pedro]: Yes, so I'm delegating as much as I can to lualatex and to all these, so ligatures and things like that are part of LaTeX. I don't want to treat them at all. The only point where I need to sort of touch lower level, which would be like HarfBuzz, for example, is telling lualatex to use HarfBuzz to include some characters. So that's the full question. [Sacha]: So far you've shown us how to include Unicode in the output and also how to specify fallback fonts for things like emojis and other things that are not included in your main font. Were there other parts of your very large patch? [Pedro]: Oh, the other parts, which are not... Well, I mean, the current state is that we have all this. We also have support for accessible presentations, and there... In EmacsConf 26, we're going to have a presentation on how this came to life by the person who inspired it, and by the person who wrote it, yours truly. The third thing that we have for that, we also have a lot of things related with metadata management for LaTeX and for PDF documents. That's also something where I directly call on experts to help us because I know what I know, which is at this point I know I don't know. That's my current situation. I know very little about all this document metadata stuff. I'm learning in the process of writing things for accessible presentations. I'm also learning things related with tagging PDFs and the tag PDF and all this kind of packages which are emerging right now and latest. And all this kind of things. This integration, which is starting to be fruitful. I already have... I'm using it with a couple of students who need that. They can access my presentations right now. I'm also sort of using them as guinea pigs, as willing guinea pigs. I'm going beyond presentations to providing them with documents and so on, and they provide feedback about how accessible those documents are and so on. For that, we need help. Then the other big thing which is still part of our conversation right now is the Polyglossia and Babel packages. Polyglossian Babel for internationalization. For example, Babel is very nice in managing left to right and right to left and things like that. [Sacha]: I don't suppose you have a quick demonstration? [Pedro]: Not yet. That would be another long presentation to show you all the kinds of things that we can do. 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. [Sacha]: I'm quite curious about the development process. Since it's a large change and it's taking a while to develop, what was it like for you to keep it going despite all the developments in Org underneath? [Pedro]: Well, it's not that difficult. At the end, I needed to learn to use VC. Last year in Emacs, I'm doing everything from the VC package in Emacs. So I have a nice workflow there to go and get my... I have two... On one side, I'm, of course, going back and putting everything into the main Org git. But I'm also having my own Codeberg with most things that I'm using. With Emacs it's quite easy to go, either modify one and have the things pushed up, or generating the patches so that Ihor blesses them, puts them into main. Or when I'm doing lots of things that I need for a certain point, I go to my Codeberg. There I have my FontSpec 3 branch. There I do my own changes. I check them. I test them. I test drive them. Because, yes, it's been a lot of work to have everything running. But it's always based on real life. And how would... I try to say how would someone do it, who knows a bit about Emacs and a bit about LaTeX and wants to write as little as possible. [Sacha]: This is so much better than the other way of specifying a new LaTeX command that just changes the font for that one specific character and then you have to use it for all the emojis that you have in your document. So having it automatically fall back is so much nicer. [Pedro]: Yeah, no, I mean, I was not going to go the PDF way of having every emoji that I want, recoded, and then inserted into the document. I tried some. What was it? When did we start? I tried it like eight years ago, and I decided once I have emojis in a nice way, I will use them. So my first manuals, if you go back, the first manuals that I distributed for that specific course did not have any emojis. So I was able to do basically this, which was what I needed for... I started with a header like this. And then when things came and I also needed to go like the scaling, what I did was scale. So this was my beginning in all this. And these were the commands that I always had in the beginning with my lualatex. The moment I moved to lualatex which was when I needed to do things like this. Then once I wanted to go further, then I started. When this came to the mailing list, my first answer was I'm doing this. And then the next question was, what about the emojis? That sort of triggered the rest. [Sacha]: You mentioned wanting to retire in two years. I very much hope that you will retire and do even more Emacs. [Pedro]: I want to continue because it's a nice pastime. I want to transition from my tool at work, or in this case, my tool at the university, to this is a nice pastime to keep this up and running. It would be a real pity to lose all this. [Sacha]: I'm sure we can find you volunteer guinea pigs. [Pedro]: I hope I'll get more and more, because the more people test it, the better it will get. And I'm really looking forward to... I mean, I already showed all the things that you can do in the last big... In the last Emacs conference last winter. So I'm not going to repeat this here. So the talk, because I think it's more important to go move on to the next big thing and have people doing accessible documents. I'll keep on top of my donkey with the train behind me until I get Babel and Polyglossia also integrated. [Prot]: Nice, nice, nice. Let me ask you the other question I had, which maybe it is simple. Because you mentioned that you want to have local variables so that the documents are portable, which brings me to the question about specifying generic fonts. Like, can you do something like use whatever the system has for Serif, Sans, Mono? Or you always have to specify a font family, like Free Serif, Noto Sans, etc. [Pedro]: At this point, this was a very very long discussion with Ihor. Do you want to have generics or do you want to have specifics? I was looking more towards specifics. Why? Because in my experience, I mean, before I started lecturing, I was for a long time in a research and development company. We had European projects. There you had your own LaTeX templates. There you had to specify each and every font. Then in parallel with that, in the company they had their own templates for PowerPoint, for Word and so on, and you had to specify each and every font that you wanted to use. So I've been mapping my experience in my prior life into this. Having font families might be nice. For example, Bera, I said at the beginning, that's one of the things that might be interesting, right? But as you see, even in pdflatex, with Bera, you have to include three different packages. So what's the difference between including three different packages, or directly saying, here, you have three different fonts, one for main, one for... it's only one for main, one for sans and one for... That's the only thing that you have in LaTeX. [Sacha]: So, not like the CSS way of specifying multiple fonts just in case one of them is not there? [Pedro]: No. I mean, in this case, you are always going to go with what the system has. Normally, most of the fonts that, at least most of the fonts that I recommend to use, are fonts that are included because you have your LaTeX installed underneath. It's not that I'm going to be there with a, I don't know, what was this, what was it? Well, there was this Telefonica font family. No one is going to have it in real life. But the Free fonts are part of LaTeX. Another font that I really like a lot, because it's very, very readable, is the TeX Gyre family. TeX Gyre is very, very readable. They have all kinds of fonts. I'm using two. Why? Because it's part of LaTeX. And by the way, all this that I've shown today can be done with a LaTeX which is basically 2024. What I'm going to be showing in December needs a very, very modern LaTeX. Why? Because accessibility has not been in the wire for the last... Well, it has only been in the wire for the last months. So, the real support for accessibility things comes with very, very modern LaTeX stuff. But this is something you can do with, I mean, Ubuntu 2024, I'm sure, and Ubuntu even earlier, you could also do. Because the LaTeX is not that fancy. I think fallback fonts are already a well-established mechanism in lualatex for a lot of time. [Sacha]: Would you happen to know if the widely released LaTeX 2024, for example, might have support for multiple fallback fonts? [Pedro]: That should be starting 2020. [Sacha]: Okay. So it's just in the Org side where you might say main, this font is just Free Serif, and not Free Serif, something, something. [Pedro]: Yeah exactly all right because... [Sacha]: I do actually use custom fonts. When I export my configuration, I want to use my handwriting for the titles, but of course nobody else is going to have my handwriting... I mean, it's public but people are not going to go to the trouble of downloading it, so yes, it would be nice to have that fallback. Not that I'm saying, "Please get on your donkey and go in that direction..." [Pedro]: No, of course not. But in this case, good news for you, if you have this as a ttf or as an otf font, then you can include that as your main font, and the PDF that you post at the end will have that already embedded, so you can produce your PDFs with your fonts. The thing is, if you want to share the font, if you want to share the source and then have other people compile it, then you have to tell them to install the fonts that are missing. But I think that's something that happens always. You enter a company, they have their own fonts. The first thing that you have to do, if you don't get a pre-installed computer: download the fonts. If you want to produce documents for the company, you have to download the fonts and install them so that you can produce. You don't have a boss telling you, no, the fonts, the fonts, the fonts. [Prot]: It's part of the brand, of course, yeah. [Pedro]: Yeah, no, no, it's a very important part of the brand. [Sacha]: And of course, LaTeX is very good for controlling all these matters of presentation. [Pedro]: Exactly. I mean one of the things that I I like most... Once again, here I've tried a couple of times to have a movement in that direction, a bit more control of fonts within a LaTeX document or within an Org document. What you can do now is in LaTeX you can go and say no, the main font is SF family. That's the default font so that you have everything in some series. That's something that, by the way, enhances accessibility. Because there are some people who will just collapse with serif fonts and they need sans serif. The other thing, the step that I wanted to move forward is I want to highlight some words with Sans Serif. Instead of bold or with the emphasis with the italics and so on, why not make some words stand out with sans serif? That's something that I also discussed in the Org list and no one wanted that. That's a pity. [Prot]: Because it might introduce new markup, of course. [Pedro]: Yes. I would need just one more markup. And I was like, "Another one, please?" "No." [Sacha]: I see. I've been just overriding the standard one because, for example, I won't actually underline things. So I just change my underline to be something else. But of course, as a general practice, it's not going to be that useful. You only have so many emphasis characters. [Pedro]: Yeah, no, of course. But if you don't want to underline another thing that many people find disturbing or really challenging, this is why I'm saying, let's try to also have the possibility of having a specific markup just for Sans Serif for that. It's all accessibility. I'm quite, how can I say, I'm very sensible to this kind of things. I'm very sensitive to this kind of things. Mainly because I've been from very, very young, I've been very involved in the disability world. [Sacha]: I'm looking forward to hearing more about your accessibility improvements in December at EmacsConf. Thank you so much for working on this. [Pedro]: You're welcome. Thank you, yes. [Sacha]: You showed us Unicode, you showed us emojis, you showed us theoretically how you would do it for non-Latin character sets. It will all be wonderfully documented. And it is now in Org Devel, right? [Pedro]: It's in Org Main. [Sacha]: Oh, sorry, yes. Org Main. So it'll make it into its release. I'm looking forward to seeing all of that. [Pedro]: It should be like Org 10 when it comes into being. People will still need to download stuff and compile it on their own. That's the main problem. That's the only thing that I would like to see advance at some point. But maybe that's with the next Emacs, with Emacs 32. [Sacha]: Okay. Looking forward to seeing how that works out. If people are curious, they can find you on the Org Mode mailing list and volunteer to be guinea pigs for various things. Your code is already in main, so it's easy enough to try out. And thank you very much for sharing the demonstration today. [Pedro]: Okay, fine. Thank you very much. Just one small comment. I'm also maintaining LaTeX and Beamer in Org. So any bugs, any questions, anything through the mailing list and I'll try to answer as soon as possible. [Sacha]: I will end the stream there so people have an hour of wonderful stuff to listen to. Thanks everyone for joining. [Pedro]: Thank you. [Prot]: Thank you.