summaryrefslogtreecommitdiffstats
path: root/2025/captions/emacsconf-2025-latex--latex-export-in-orgmode-the-overhaul--pedro-a-aranda-gutirrez--main.vtt
blob: 5a734387ed1da16d9afdcd9bf1045398b4e91955 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
WEBVTT captioned by sachac

NOTE Introduction

00:00:00.140 --> 00:00:04.456
Okay. Good afternoon, morning or evening,

00:00:04.457 --> 00:00:06.519
whatever it is in your time zone.

00:00:06.520 --> 00:00:10.959
I'm Pedro Aranda and I'm going to be talking about

00:00:10.960 --> 00:00:12.959
what I've been doing

00:00:12.960 --> 00:00:16.999
with the latest backend in Org Mode

00:00:17.000 --> 00:00:24.719
and the different... Sorry... and the way it treats fonts.

00:00:24.720 --> 00:00:28.279
Just a couple of words before

00:00:28.280 --> 00:00:30.359
I am going to go through motivation,

00:00:30.360 --> 00:00:35.279
the evolution and get you an idea of what you can get

00:00:35.280 --> 00:00:38.079
from the feature branch that I have started

00:00:38.080 --> 00:00:41.399
and give a couple of demos.

NOTE Motivation

00:00:41.400 --> 00:00:47.779
Actually, my motivation is I was using ox-latex currently

00:00:47.780 --> 00:00:51.439
and ox-beamer for as a foundation for my activities,

00:00:51.440 --> 00:00:54.399
mainly for lecture notes and lecture slides

00:00:54.400 --> 00:01:01.359
so I came from pure LaTeX and beamers

00:01:01.360 --> 00:01:04.519
and for me the real cool use case,

00:01:04.520 --> 00:01:05.959
or I would say this was

00:01:05.960 --> 00:01:07.959
the killer use case for me was

00:01:07.960 --> 00:01:09.239
I have a programming lecture,

00:01:09.240 --> 00:01:12.199
which is sort of a Python 101,

00:01:12.200 --> 00:01:14.199
and when I'm live in the lecture,

00:01:14.200 --> 00:01:18.279
I can go, and if the pupils ask me, I can modify code,

00:01:18.280 --> 00:01:21.079
show modified code and results on the fly,

00:01:21.080 --> 00:01:25.119
and that's something that really impresses the kids

00:01:25.120 --> 00:01:30.159
and makes them understand what we are talking about.

00:01:30.160 --> 00:01:34.399
From my pro... subjective point of view, in some,

00:01:34.400 --> 00:01:38.159
mainly in ox-beamer, some of the things that I was missing

00:01:38.160 --> 00:01:41.879
is that emojis would really break the monotony

00:01:41.880 --> 00:01:47.679
and I missed the support for emojis and stock Beamer themes.

00:01:47.680 --> 00:01:52.159
And some fonts I also found were suboptimal

00:01:52.160 --> 00:01:56.639
or difficult to adapt in case they need an adaptation.

00:01:56.640 --> 00:02:01.799
So, for example, people who need special fonts

00:02:01.800 --> 00:02:05.799
because of their special capabilities,

00:02:05.800 --> 00:02:11.159
it's difficult to get those fonts from the stock themes

00:02:11.160 --> 00:02:17.359
and from the stock font implementations you have there.

00:02:17.360 --> 00:02:21.479
So, requirements from the Emacs side to do this is none,

00:02:21.480 --> 00:02:24.999
because basically, okay, the only thing I want

00:02:25.000 --> 00:02:27.159
is to work on a vanilla Emacs,

00:02:27.160 --> 00:02:28.399
which is more or less recent,

00:02:28.400 --> 00:02:30.119
because yes, I'm a bit of a freak

00:02:30.120 --> 00:02:32.479
and I compile it every two, three...

00:02:32.480 --> 00:02:36.839
I get it from master and compile it every two, three days.

00:02:36.840 --> 00:02:40.599
And yahoo, I had to change to a new Mac,

00:02:40.600 --> 00:02:47.359
and I'm able now to get my vanilla Emacs within four.

00:02:47.360 --> 00:02:53.359
So that was a big accomplishment in these last days.

NOTE Evolution

00:02:53.360 --> 00:02:55.119
What is the evolution?

00:02:55.120 --> 00:03:00.719
I mean my personal evolution and my take of ox-latex

00:03:00.720 --> 00:03:05.919
was I put everything in a in a LaTeX file

00:03:05.920 --> 00:03:09.959
and I input it through the LaTeX header, and that's it.

00:03:09.960 --> 00:03:12.319
But that was not very beginner-friendly,

00:03:12.320 --> 00:03:15.719
and once I had some people interested in this,

00:03:15.720 --> 00:03:19.159
"oh wow, I can modify the code on the fly

00:03:19.160 --> 00:03:21.119
and see the results on the fly,"

00:03:21.120 --> 00:03:26.719
it was more difficult for them to give it a go.

00:03:26.720 --> 00:03:32.359
So I just... Because they,

00:03:32.360 --> 00:03:36.919
there are people who have not that big,

00:03:36.920 --> 00:03:41.159
that much experience with LaTeX

00:03:41.160 --> 00:03:44.919
and it can even be a bridge to introduce people into LaTeX.

00:03:44.920 --> 00:03:48.959
So, in any case, it was not very beginner-friendly

00:03:48.960 --> 00:03:52.799
and I had complaints on that.

00:03:52.800 --> 00:03:57.159
So, what I think was, we can do better.

00:03:57.160 --> 00:04:00.399
My first attempt was something that was completely neutral

00:04:00.400 --> 00:04:02.879
to Babel or Polyglossia.

00:04:02.880 --> 00:04:06.199
and it was made basically for font LaTeX

00:04:06.200 --> 00:04:08.839
although some of the things can... for lualatex

00:04:08.840 --> 00:04:14.279
and some of the things can also be used with xelatex.

00:04:14.280 --> 00:04:16.519
So overriding template fonts

00:04:16.520 --> 00:04:21.279
and taking into account fallback fonts

00:04:21.280 --> 00:04:23.839
was something that I learned

00:04:23.840 --> 00:04:27.959
when we started this conversation,

00:04:27.960 --> 00:04:29.839
and the only problem with this

00:04:29.840 --> 00:04:34.407
is that fallback fonts only work for lualatex

00:04:34.408 --> 00:04:36.307
because xelatex doesn't support them.

00:04:36.308 --> 00:04:40.540
Actually, fallback fonts is a lua feature.

00:04:40.541 --> 00:04:45.319
There was already something in the list

00:04:45.320 --> 00:04:48.399
regarding script detection which helped me a lot.

00:04:48.400 --> 00:04:52.399
So big recognition to Juan M. Macias for that,

00:04:52.400 --> 00:04:57.679
and for his publishing the algorithm or the script

00:04:57.680 --> 00:05:04.399
in the org mode mailing list.

00:05:04.400 --> 00:05:11.319
And then came my sort of little nightmare,

00:05:11.320 --> 00:05:14.174
which was when we started talking

00:05:14.175 --> 00:05:19.039
about internationalization or localization.

00:05:19.040 --> 00:05:21.599
Looking back, I have a very strange feeling

00:05:21.600 --> 00:05:22.919
about a blurring target there.

00:05:22.920 --> 00:05:29.679
Because the reality, being very, very frank, did I need it?

00:05:29.680 --> 00:05:34.919
Really no, because I just needed

00:05:34.920 --> 00:05:39.999
to add Spanish with Babel and that was it.

00:05:40.000 --> 00:05:43.199
Well actually for me it still is

00:05:43.200 --> 00:05:46.519
and you can put the British, German or Italian

00:05:46.520 --> 00:05:48.359
it continues to be true for me,

00:05:48.360 --> 00:05:51.839
so I had personally, I had little interest in doing that,

00:05:51.840 --> 00:05:55.319
but I took it as a challenge

00:05:55.320 --> 00:06:02.479
which has shown to be really tough.

NOTE What do you get from the feature branch?

00:06:02.480 --> 00:06:04.955
What do you get from the feature branch?

00:06:04.956 --> 00:06:08.999
The feature branch adds font management for fontspec,

00:06:09.000 --> 00:06:10.839
which is not strictly needed

00:06:10.840 --> 00:06:14.919
when you are on Latin, Cyrillic, and Greek scripts

00:06:14.920 --> 00:06:18.579
as long as the fonts in your template support them.

00:06:18.580 --> 00:06:28.799
But again, it's a nice way to get better support here.

00:06:28.800 --> 00:06:33.039
You don't need it if you're happy with the fonts you get

00:06:33.040 --> 00:06:38.439
from the templates that you use both for Beamer

00:06:38.440 --> 00:06:40.359
and the document classes in LaTeX.

00:06:40.360 --> 00:06:43.639
If you don't want to use alternative fonts,

00:06:43.640 --> 00:06:47.999
you don't need it, but you would need it.

00:06:48.000 --> 00:06:50.639
Of course, if you don't want things like,

00:06:50.640 --> 00:06:55.719
for example, emojis or need emojis,

00:06:55.720 --> 00:06:59.359
you really don't need fallback fonts.

00:06:59.360 --> 00:07:05.319
So my idea is that the next thing that you can add

00:07:05.320 --> 00:07:07.319
is Babel and Polyglossia here

00:07:07.320 --> 00:07:13.079
for enhanced localization and multilingual documents there.

00:07:13.080 --> 00:07:17.799
And at the end, my vision was that the keywords involved

00:07:17.800 --> 00:07:19.799
would be language, the main language.

00:07:19.800 --> 00:07:23.039
And then a nice idea from Ihor

00:07:23.040 --> 00:07:27.199
was to put all the secondary languages there too.

00:07:27.200 --> 00:07:30.559
Then specify the LaTeX compiler.

00:07:30.560 --> 00:07:32.639
Then what I've added is a keyword

00:07:32.640 --> 00:07:34.279
which is `#+LATEX_MULTI_LANG:`

00:07:34.280 --> 00:07:37.879
which can be fontspec or babel or polyglossia

00:07:37.880 --> 00:07:40.319
for localized documents.

00:07:40.320 --> 00:07:45.359
By default, this thing is nil and when it is nil,

00:07:45.360 --> 00:07:51.719
you get the behavior from Org Mode

00:07:51.720 --> 00:07:56.559
that you already are used to if you don't want to switch.

00:07:56.560 --> 00:08:00.559
Jing Huang was there and I was really,

00:08:00.560 --> 00:08:03.479
was chirped into the conversation

00:08:03.480 --> 00:08:06.799
and really helpful and a big thanks to him

00:08:06.800 --> 00:08:10.974
because he also had an easy idea

00:08:10.975 --> 00:08:13.079
to support Chinese and Japanese documents,

00:08:13.080 --> 00:08:17.239
so that the only thing that you need is to add the language

00:08:17.240 --> 00:08:21.859
that you're going to write your document in.

00:08:21.860 --> 00:08:23.639
Very, very big thank you for that,

00:08:23.640 --> 00:08:25.399
because that was really a challenge

00:08:25.400 --> 00:08:29.279
not being able to decipher

00:08:29.280 --> 00:08:32.639
what I was what I was coding there

00:08:32.640 --> 00:08:34.439
in terms of: I have a document,

00:08:34.440 --> 00:08:37.519
I copy and paste it from some place,

00:08:37.520 --> 00:08:40.039
and from there, I get my answer, I get my PDF,

00:08:40.040 --> 00:08:47.279
and I compare whether it is correct or not.

NOTE Behind the scenes: .dir-locals.el

00:08:47.280 --> 00:08:50.239
So what is behind the scenes?

00:08:50.240 --> 00:08:52.959
I've always suggested that in order

00:08:52.960 --> 00:08:55.239
to use the feature branch efficiently,

00:08:55.240 --> 00:08:59.919
you create a file with the default values

00:08:59.920 --> 00:09:02.439
you need for your variables,

00:09:02.440 --> 00:09:06.199
and that's this famous .dir-locals.el files.

00:09:06.200 --> 00:09:10.239
What I do is, I have a generic one

00:09:10.240 --> 00:09:12.079
in my home documents directory,

00:09:12.080 --> 00:09:16.599
and this is used for all the org documents

00:09:16.600 --> 00:09:20.559
that are in subdirectories from there.

00:09:20.560 --> 00:09:24.039
Why? Because normally you will not be

00:09:24.040 --> 00:09:26.599
changing your fonts that often,

00:09:26.600 --> 00:09:29.599
and if you need, you can always go

00:09:29.600 --> 00:09:33.479
and have your configuration locally.

00:09:33.480 --> 00:09:38.639
So it's this point where I'm collecting

00:09:38.640 --> 00:09:40.759
my font configuration and

00:09:40.760 --> 00:09:47.519
for me, this gives me a very, very nice quick start

00:09:47.520 --> 00:09:49.639
for new documents and presentations.

00:09:49.640 --> 00:09:54.239
And there you can even configure a lot of compiler

00:09:54.240 --> 00:09:56.839
and font language management too,

00:09:56.840 --> 00:10:00.919
so you have everything in a file.

00:10:00.920 --> 00:10:04.759
And the other nice thing for that

00:10:04.760 --> 00:10:08.479
is that you can also include that in a subdirectory.

00:10:08.480 --> 00:10:13.199
And if this subdirectory is something that you're sharing

00:10:13.200 --> 00:10:14.479
in a project with other people,

00:10:14.480 --> 00:10:17.759
you are already configuring the, say,

00:10:17.760 --> 00:10:23.559
quote, unquote, corporate look and feel for your documents

00:10:23.560 --> 00:10:26.079
in that project for everyone

00:10:26.080 --> 00:10:28.919
and no one else has to care about

00:10:28.920 --> 00:10:35.119
how this document has to be configured.

00:10:35.120 --> 00:10:38.679
One of the things that I really like in this approach

00:10:38.680 --> 00:10:40.439
is that it is a grow-as-you-go.

00:10:40.440 --> 00:10:44.079
So, for example, you can start with something like that,

00:10:44.080 --> 00:10:48.439
which is I have my fonts, my basic fonts for main,

00:10:48.440 --> 00:10:51.479
which is the serif font, for sans,

00:10:51.480 --> 00:10:54.079
which is the sans serif font, for maths,

00:10:54.080 --> 00:10:58.639
and for the mono, with some features like to make them scale.

00:10:58.640 --> 00:11:03.739
This is something that is provided by you

00:11:03.740 --> 00:11:05.359
through the fontspec package,

00:11:05.360 --> 00:11:08.959
and you're happy with it, and you work with it,

00:11:08.960 --> 00:11:11.919
and in a given moment,

00:11:11.920 --> 00:11:14.439
you go and you have your own problems

00:11:14.440 --> 00:11:15.779
or your own challenge,

00:11:15.780 --> 00:11:20.279
and you need to have, for example, emojis for one of the fonts,

00:11:20.280 --> 00:11:24.959
and what you do is, in this case, you just add the emojis

00:11:24.960 --> 00:11:31.239
as a fallback font in the font that where you want to replace this.

00:11:31.240 --> 00:11:37.339
This is what I'm doing right now for this presentation, and you will see...

00:11:37.340 --> 00:11:39.119
You can always, as I've said,

00:11:39.120 --> 00:11:42.359
you can always have your dir-locals,

00:11:42.360 --> 00:11:46.319
and you can copy that into a working directory

00:11:46.320 --> 00:11:49.439
which needs special adaptations or has special needs,

00:11:49.440 --> 00:11:54.119
and from there, you have that directory

00:11:54.120 --> 00:11:59.079
with your modified or customized dir-locals.el file.

NOTE When fontspec is not enough

00:11:59.080 --> 00:12:05.439
So, fontspec is normally enough,

00:12:05.440 --> 00:12:09.379
but sometimes, you can't control all the fonts

00:12:09.380 --> 00:12:15.479
with fontspec only, and there you have a polyglot here

00:12:15.480 --> 00:12:19.319
and babel coming to your help.

00:12:19.320 --> 00:12:21.359
This may also be the case

00:12:21.360 --> 00:12:25.119
that you are working in an intended language,

00:12:25.120 --> 00:12:28.959
I don't know which, but an intended language, and you found,

00:12:28.960 --> 00:12:31.279
and you wanted to see how that was configured,

00:12:31.280 --> 00:12:34.999
and you found the latest example

00:12:35.000 --> 00:12:38.639
that used Babel or Polyglossia.

00:12:38.640 --> 00:12:42.559
The exporter provides you variables

00:12:42.560 --> 00:12:48.679
to configure both fontspec, Polyglossia and Babel.

00:12:48.680 --> 00:12:56.799
So just as an example of how I picture this is,

00:12:56.800 --> 00:12:59.359
uh, you find it in the Internet,

00:12:59.360 --> 00:13:01.679
something like that, uh, something like this,

00:13:01.680 --> 00:13:05.599
because you have your document and you need Thai.

00:13:05.600 --> 00:13:09.999
So, and I found an example in the internet

00:13:10.000 --> 00:13:13.359
that tells me that I'm going to be using Babel.

00:13:13.360 --> 00:13:15.079
Main is going to be English.

00:13:15.080 --> 00:13:20.339
And I'm also going to have Thai.

00:13:20.340 --> 00:13:23.840
And then they tell me that, for English,

00:13:23.841 --> 00:13:26.639
I'm going to be using Noto Serif for the main,

00:13:26.640 --> 00:13:30.082
for the main of the serif font,

00:13:30.083 --> 00:13:31.759
Noto Sans for the sans font,

00:13:31.760 --> 00:13:35.799
and then when I'm writing things in Thai,

00:13:35.800 --> 00:13:41.106
I'm going to be using Noto Serif Thai and Noto Sans Thai.

00:13:41.107 --> 00:13:42.399
That's what I see in the Internet.

00:13:42.400 --> 00:13:47.159
So what you can always do, what you would do in this case,

00:13:47.160 --> 00:13:54.279
is I'm going to get and map the font configurations

00:13:54.280 --> 00:13:59.239
from the latest into this variable.

00:13:59.240 --> 00:14:03.479
Things that you have to take into account here

00:14:03.480 --> 00:14:05.107
is, for example, the language.

00:14:05.108 --> 00:14:07.774
The language here is Thai. You have the language

00:14:07.775 --> 00:14:10.559
that you're intending this font for is Thai.

00:14:10.560 --> 00:14:16.319
So this appears here. In case you don't have any language,

00:14:16.320 --> 00:14:19.439
like in the first two lines,

00:14:19.440 --> 00:14:21.039
you just say that the language is nil,

00:14:21.040 --> 00:14:23.959
which is the language for the default language.

00:14:23.960 --> 00:14:26.799
The other thing is in my example,

00:14:26.800 --> 00:14:29.374
in this example that I found in the Internet,

00:14:29.375 --> 00:14:40.174
I have my properties for the fonts in this part in LaTeX,

00:14:40.175 --> 00:14:43.907
and I put them as properties here.

00:14:43.908 --> 00:14:53.519
That's the whole idea behind the feature branch.

00:14:53.520 --> 00:15:01.640
The babelprovide part is generated or is also integrated

00:15:01.641 --> 00:15:11.319
from the Org header, mainly from the language line.

00:15:11.320 --> 00:15:14.600
We have a variable in case you need to tweak it,

00:15:14.640 --> 00:15:21.079
but normally the defaults provided by Org are good enough.

NOTE Rationale behind my take at LaTeX font management

00:15:21.080 --> 00:15:27.679
So what is the rationale behind my take at LaTeX font management?

00:15:27.680 --> 00:15:31.359
That's something that might be something very personal.

00:15:31.360 --> 00:15:33.759
When am I using fontspec?

00:15:33.760 --> 00:15:37.239
I'm using fontspec when I'm with Lua- or xelatex,

00:15:37.240 --> 00:15:40.279
and I want fonts that are different

00:15:40.280 --> 00:15:42.439
from those specified in the LaTeX class.

00:15:42.440 --> 00:15:49.279
That's point number one. I will also go for fontspec

00:15:49.280 --> 00:15:52.599
when I need to support scripts,

00:15:52.600 --> 00:15:54.559
but I'm missing in the fonts I use,

00:15:54.560 --> 00:15:59.479
and I can use fallback fonts for that. I have two.

00:15:59.480 --> 00:16:05.239
The only limitation I have here is the following:

00:16:05.240 --> 00:16:09.039
all languages must be left to right.

00:16:09.040 --> 00:16:12.799
And if you don't say anything at all,

00:16:12.800 --> 00:16:16.519
the LaTeX backend assumes that you want the dates,

00:16:16.520 --> 00:16:18.599
standard names for the abstract and so on

00:16:18.600 --> 00:16:21.039
in American English, if you're using them.

00:16:21.040 --> 00:16:24.759
In many cases, you're not using any sort of

00:16:24.760 --> 00:16:26.274
abstract, table of contents, and so on,

00:16:26.275 --> 00:16:27.879
and you don't need that.

00:16:27.880 --> 00:16:34.119
The important thing is maybe date management.

00:16:34.120 --> 00:16:36.199
If you need dates, headings

00:16:36.200 --> 00:16:40.359
or anything in any other language or locale,

00:16:40.360 --> 00:16:46.199
then yes, then you need to use Babel or Polyglossia.

00:16:46.200 --> 00:16:52.959
Choice, Depends. Can use polyglossia here,

00:16:52.960 --> 00:16:56.039
or you can use Babel, whatever you want.

00:16:56.040 --> 00:16:58.599
Also, in some cases, it will depend

00:16:58.600 --> 00:17:00.399
if you've been researching a bit

00:17:00.400 --> 00:17:02.439
of how this is done with pure LaTeX,

00:17:02.440 --> 00:17:05.639
it will be also depending on, uh,

00:17:05.640 --> 00:17:07.799
on the examples that you get.

00:17:07.800 --> 00:17:10.999
So, what can you, when you are using

00:17:11.000 --> 00:17:12.639
Babel or Polyglossia here, what do you have?

00:17:12.640 --> 00:17:16.919
You have your dates, your headings, and so on.

00:17:16.920 --> 00:17:20.999
You might need to control the text

00:17:21.000 --> 00:17:22.919
in the sense that what passage

00:17:22.920 --> 00:17:24.519
is written in what language.

00:17:24.520 --> 00:17:29.159
For example, for things like hyphenation

00:17:29.160 --> 00:17:37.119
and some ways of writing the hyphens in a

00:17:37.120 --> 00:17:42.519
and direct speech and things like that.

00:17:42.520 --> 00:17:45.519
And the other place where you need

00:17:45.520 --> 00:17:47.279
other Babel or Polyglossia here,

00:17:47.280 --> 00:17:50.439
and you will see that, because all examples

00:17:50.440 --> 00:17:53.319
that you can get for later, in this case,

00:17:53.320 --> 00:17:56.140
is when you have a language

00:17:56.141 --> 00:17:59.407
that uses right to left alignment

00:17:59.408 --> 00:18:06.439
like Arabic, Hebrew and others.

00:18:06.440 --> 00:18:14.479
So one note of, I would say, care is you always use the,

00:18:14.480 --> 00:18:16.639
if you use Unicode fonts

00:18:16.640 --> 00:18:19.719
that includes the scripts as you need,

00:18:19.720 --> 00:18:28.239
you will have done, that will be a great leap for you

00:18:28.240 --> 00:18:34.479
because that simplifies the configuration a lot.

NOTE Demonstrations

00:18:34.480 --> 00:18:36.839
Now, a couple of demos.

00:18:36.840 --> 00:18:39.319
I don't know if you've noticed

00:18:39.320 --> 00:18:43.199
first demo is that I'm using

00:18:43.200 --> 00:18:47.519
fonts that are not the official fonts

00:18:47.520 --> 00:18:48.959
in this Beamer template,

00:18:48.960 --> 00:18:51.399
which is by the way Boadilla.

00:18:51.400 --> 00:18:53.959
This would be the first thing.

00:18:53.960 --> 00:18:56.599
So I've been using other fonts,

00:18:56.600 --> 00:19:01.679
and they are, at least from what I get in class,

00:19:01.680 --> 00:19:03.759
they are more readable than the official...

00:19:03.760 --> 00:19:06.279
than the default fonts in Polyglossia,

00:19:06.280 --> 00:19:12.239
that you get in Babel for the Boadilla theme.

00:19:12.240 --> 00:19:14.319
Another thing is what I've told you,

00:19:14.320 --> 00:19:18.959
I have my own things like emojis.

00:19:18.960 --> 00:19:22.799
Now, if you allow me for a second,

00:19:22.800 --> 00:19:26.999
I'm going to switch to the Emacs

00:19:27.000 --> 00:19:36.759
which is running behind the scenes to show you what.

00:19:36.760 --> 00:19:42.119
Okay, fine. So, this is the presentation.

00:19:42.120 --> 00:19:44.799
that I have here, and as you see,

00:19:44.800 --> 00:19:54.839
I'm using Lua LaTeX and just fontspec,

00:19:54.840 --> 00:19:59.440
given I don't know why I would need this,

00:19:59.480 --> 00:20:01.079
this is an English presentation,

00:20:01.080 --> 00:20:03.039
but just to show you what you can do,

00:20:03.040 --> 00:20:09.359
if I go back here, and I go to the beginning of the presentation,

00:20:09.360 --> 00:20:11.171
and now what...

00:20:11.172 --> 00:20:12.940
[Ihor]: I don't think you're showing anything

00:20:12.941 --> 00:20:18.479
[Pedro]: Oh, thank you.

00:20:18.480 --> 00:20:21.399
Okay, this is the presentation, right?

00:20:21.400 --> 00:20:23.540
So what I'm going to do is, I'm going to go back

00:20:23.541 --> 00:20:31.200
and I'm going to show the full screen.

00:20:31.201 --> 00:20:32.639
And in this full screen,

00:20:32.640 --> 00:20:34.759
you see the presentation on one side

00:20:34.760 --> 00:20:40.599
and you see Emacs on the other side. Oh, still nothing.

00:20:40.600 --> 00:20:44.319
Yeah, we're not seeing your screen at the moment, sorry.

00:20:44.320 --> 00:20:47.719
Oh, thank you. Thank you for that.

00:20:47.720 --> 00:20:52.879
Now it's starting to come. Okay. Yay! Fine.

00:20:52.880 --> 00:21:00.399
So this presentation, I've done it with Lua LaTeX,

00:21:00.400 --> 00:21:06.439
and what I add here is fontspec and English language.

00:21:06.440 --> 00:21:10.240
Just to show you, but with the same configuration,

00:21:10.280 --> 00:21:11.839
with the same fontspec configuration,

00:21:11.840 --> 00:21:20.473
but adding Polyglossia.

00:21:20.474 --> 00:21:23.159
I just have enough with adding Polyglossia

00:21:23.160 --> 00:21:28.799
with the Spanish language to get my dates correctly,

00:21:28.800 --> 00:21:32.559
and this is something... I'm going to see the date in English,

00:21:32.560 --> 00:21:46.719
and if I now go and recompile it, in a couple of seconds,

00:21:46.720 --> 00:21:48.999
you will see that the date is in Spanish.

00:21:49.000 --> 00:21:53.879
We are using the same... Which I can show, by the way.

00:21:53.880 --> 00:21:58.079
I see just by adding polyglossia here,

00:21:58.080 --> 00:22:02.339
I can get my dates in Spanish.

00:22:02.340 --> 00:22:09.559
What... I have included the dir-locals

00:22:09.560 --> 00:22:16.959
in these lines, but just to discuss it a bit more.

00:22:16.960 --> 00:22:19.439
I have it for all the presentations.

00:22:19.440 --> 00:22:24.319
I think it was here. No. For the demo,

00:22:24.320 --> 00:22:28.799
for the presentations I use for Emacs conferences,

00:22:28.800 --> 00:22:33.959
I have it, and it's something like this.

00:22:33.960 --> 00:22:37.359
Actually, you don't need a fallback

00:22:37.360 --> 00:22:40.107
for the main font here

00:22:40.108 --> 00:22:44.607
because the presentations are done with the sans font,

00:22:44.608 --> 00:22:46.559
so the only thing that I would really need

00:22:46.560 --> 00:22:48.199
would be something like this.

00:22:48.200 --> 00:22:53.919
This can be commented, and the same happens here

00:22:53.920 --> 00:22:57.474
with the mono. This can be also commented.

NOTE Demo: Emoji

00:22:57.475 --> 00:23:00.399
The only thing where I would really need

00:23:00.400 --> 00:23:02.119
a fallback font is here,

00:23:02.120 --> 00:23:04.319
and what this is telling me is that

00:23:04.320 --> 00:23:07.079
you have a fallback for the emoji,

00:23:07.080 --> 00:23:09.799
for the emoji script,

00:23:09.800 --> 00:23:14.740
and you need to use the Apple Color Emoji font

00:23:14.741 --> 00:23:15.399
with a modifier,

00:23:15.400 --> 00:23:18.759
which in this case is that you need

00:23:18.760 --> 00:23:22.874
to have the Harfbuzz renderer.

00:23:22.875 --> 00:23:24.599
That's the only thing that you really need.

00:23:24.600 --> 00:23:26.679
Where do I get all these things from?

00:23:26.680 --> 00:23:29.039
All these things I get from the different parts

00:23:29.040 --> 00:23:33.179
and from different scripts in the Internet.

NOTE Demo: Letter

00:23:33.180 --> 00:23:38.039
I also have a couple of other things to show.

00:23:38.040 --> 00:23:42.919
For example, first of all, I do not need this.

00:23:42.920 --> 00:23:44.749
This is a letter that I've been writing this morning

00:23:44.750 --> 00:23:55.640
and I'm not using the feature branches at all,

00:23:55.641 --> 00:23:58.119
because I just needed a sans font,

00:23:58.120 --> 00:24:02.119
and it's going to be a letter that I'm writing in

00:24:02.120 --> 00:24:06.119
with the sans font, and the only thing I need

00:24:06.120 --> 00:24:08.679
was Spanish polyglossia for the date.

00:24:08.680 --> 00:24:14.719
Anyhow, how did... What was my first thing that I did

00:24:14.720 --> 00:24:19.639
with the back end? Back in I think it was April,

00:24:19.640 --> 00:24:23.079
we had a... this comes from the mailing list,

00:24:23.080 --> 00:24:26.759
we had someone who had this problem right,

00:24:26.760 --> 00:24:29.559
and he wanted to add emojis,

00:24:29.560 --> 00:24:33.039
and he had problems with the verbatim font,

00:24:33.040 --> 00:24:35.279
and that's how everything got started.

00:24:35.280 --> 00:24:43.859
If you now go and I get my LaTeX for that running.

00:24:43.860 --> 00:24:50.559
Well, I actually, all my LaTeX is supported for that.

00:24:50.560 --> 00:24:58.119
And this was what I showed in one of the Emacs, Org Mode meetups.

00:24:58.120 --> 00:25:00.079
And there you see that we have the emojis.

00:25:00.080 --> 00:25:06.879
We had the fonts for the different things. We had maps.

00:25:06.880 --> 00:25:13.799
And you could even go and add scripts

00:25:13.800 --> 00:25:16.319
and little passages and different scripts.

00:25:16.320 --> 00:25:22.359
And this was done with the same principles that I want.

00:25:22.360 --> 00:25:25.439
I have my main font. I have the emojis.

00:25:25.440 --> 00:25:30.559
and I want, I have my son's phone and I have the emojis,

00:25:30.560 --> 00:25:32.959
the Han for Japanese and the Kana for Japanese,

00:25:32.960 --> 00:25:36.799
so that these characters here,

00:25:36.800 --> 00:25:40.679
both in the sons and in the serif passages

00:25:40.680 --> 00:25:44.399
are included correctly in the PDF.

NOTE Demo: Side by side

00:25:44.400 --> 00:25:49.999
And a third thing of what you can do...

00:25:50.000 --> 00:25:53.439
I've also shown this, so this is more

00:25:53.440 --> 00:25:55.799
for people who have not seen it.

00:25:55.800 --> 00:26:01.399
This is a side-by-side passage of...

00:26:01.400 --> 00:26:04.919
well, actually, the beginning of the analysis by Xenophon

00:26:04.920 --> 00:26:12.919
both in in Greek and in German, with some comments.

00:26:12.920 --> 00:26:18.679
And if I go... This is done with Polyglossia.

00:26:18.680 --> 00:26:24.240
If I go once again and produce

00:26:24.241 --> 00:26:37.999
the PDF for this... Just a second...

00:26:38.000 --> 00:26:41.119
Come on. There you are. You get this.

00:26:41.120 --> 00:26:46.399
And there you see different fonts.

00:26:46.400 --> 00:26:48.239
Which fonts am I using for this?

00:26:48.240 --> 00:26:53.879
I'm using for the main font for me is FreeSerif.

00:26:53.880 --> 00:27:01.479
This listing is produced with DejaVu Sans Mono.

00:27:01.480 --> 00:27:12.899
And using Polyglossia here, I'm able to go and define

00:27:12.900 --> 00:27:15.799
the Greek polyton for the variant,

00:27:15.800 --> 00:27:18.799
for the serif variant with the Noto Serif font,

00:27:18.800 --> 00:27:26.199
just to differentiate it from the German text.

00:27:26.200 --> 00:27:30.279
And nice thing is that both in the German text

00:27:30.280 --> 00:27:37.359
you see for example here, and with the Greek text,

00:27:37.360 --> 00:27:40.879
everything is scaled to match

00:27:40.880 --> 00:27:44.119
the lower case of the main font, which is FreeSerif.

00:27:44.120 --> 00:27:45.879
So that everything looks

00:27:45.880 --> 00:27:49.359
extremely uniform and nice to read.

00:27:49.360 --> 00:27:53.759
So that's what you want to do.

00:27:53.760 --> 00:27:56.519
That's what you can do with this.

00:27:56.520 --> 00:28:12.599
Just a couple of final words on this.

NOTE Thanks

00:28:12.600 --> 00:28:16.839
I want to thank once again Juan Manuel Macias and Jing Huang

00:28:16.840 --> 00:28:19.919
for what they have shared.

00:28:19.920 --> 00:28:24.079
And I also want to thank everybody

00:28:24.080 --> 00:28:26.479
for productive contributions to the discussion.

00:28:26.480 --> 00:28:32.159
I'm saying this because I think I need a longer rest

00:28:32.160 --> 00:28:37.039
and I'm going to be leaving

00:28:37.040 --> 00:28:39.607
the feature font untouched for a couple of months

00:28:39.608 --> 00:28:42.220
so that people can take... the feature branch

00:28:42.221 --> 00:28:43.519
untouched for a couple of months

00:28:43.520 --> 00:28:47.599
to see if people want to use it, and how they want to use it,

00:28:47.600 --> 00:28:49.919
and then maybe in the future, we can discuss

00:28:49.920 --> 00:28:52.559
if we want to integrate it or not,

00:28:52.560 --> 00:29:24.839
or if people need it and all that. Now questions, comments?

00:29:24.840 --> 00:29:39.240
[Ihor]: I think there was one question on Etherpad for...

00:29:39.241 --> 00:29:47.119
[Pedro]: Beautiful. I think that goes beyond fonts right.

NOTE Q: What about video (mp4) support for ox-latex?

00:29:47.120 --> 00:29:52.839
Someone is asking what about how is about video

00:29:52.840 --> 00:29:56.319
mainly MP4 support on ox-latex.

00:29:56.320 --> 00:29:58.799
"I started the presentations with many videos.

00:29:58.800 --> 00:30:14.739
This is something that really pushed me back using ox-latex."

00:30:14.740 --> 00:30:18.799
What I would say to this is, I mean this goes beyond

00:30:18.800 --> 00:30:24.319
what we're discussing here with fonts.

00:30:24.320 --> 00:30:29.319
I would advise you to go and get the same

00:30:29.320 --> 00:30:35.239
or have the same thing that I did,

00:30:35.240 --> 00:30:42.279
which was, first of all, try to write it in LaTeX,

00:30:42.280 --> 00:30:49.599
and then, once you have the minimal working examples,

00:30:49.600 --> 00:30:53.159
you can get the LaTeX parts

00:30:53.160 --> 00:31:00.319
integrated into your own presentation.

00:31:00.320 --> 00:31:01.319
That's what I've been doing.

00:31:01.320 --> 00:31:04.519
By the way, I still do it, for example, not in this,

00:31:04.520 --> 00:31:06.079
but for my lectures,

00:31:06.080 --> 00:31:09.119
I have a lot of... I'm using a lot of ticks

00:31:09.120 --> 00:31:12.479
to do graphs and animated graphs.

00:31:12.480 --> 00:31:18.319
And that's `#+begin_export latex` `#+end_export` LaTeX.

00:31:18.320 --> 00:31:24.279
That's what I'm doing.

00:31:24.280 --> 00:31:27.274
[Ihor]: Videos are generally a bit tricky because you cannot...

00:31:27.275 --> 00:31:31.119
Not every viewer will play them.

00:31:31.120 --> 00:31:35.119
so I think there is something called pdfpc that can,

00:31:35.120 --> 00:31:37.399
this provides a LaTeX package

00:31:37.400 --> 00:31:39.079
where you can include videos,

00:31:39.080 --> 00:31:44.399
and then they can be played through that specific program.

00:31:44.400 --> 00:31:46.239
And JavaScript embedding,

00:31:46.240 --> 00:31:49.999
that can only be done through Acrobat Reader,

00:31:50.000 --> 00:31:54.519
which is like also finicky. Sure, yes.

00:31:54.520 --> 00:32:03.999
[Pedro]: As you said, there are many things that need to be changed.

00:32:04.000 --> 00:32:07.199
But I mean it's always a thing of taking it

00:32:07.200 --> 00:32:11.359
and trying to see what you can do

00:32:11.360 --> 00:32:13.319
and what the specifics are.

00:32:13.320 --> 00:32:17.079
Maybe this can be done with Acrobat

00:32:17.080 --> 00:32:23.959
and with a couple of extra packages and who knows.

00:32:23.960 --> 00:32:26.359
And you can always keep it as as LaTeX

00:32:26.360 --> 00:32:34.599
as fragments inside Org, I think. Any other questions?