Skip to content

Commit 46ea5ed

Browse files
authored
Merge pull request #2341 from codeeu/dev
Update LatexCleaner and participation tex files attempt to fix issues…
2 parents 257028a + ab2a609 commit 46ea5ed

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

app/Traits/LatexCleaner.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ trait LatexCleaner
66
{
77
public function tex_escape($string)
88
{
9-
10-
$string = str_replace('"', "''", $string);
11-
$string = str_replace('Ȋ', 'Î', $string);
12-
139
$map = [
10+
'ʼ' => "'", // Replace Unicode apostrophe with standard apostrophe
11+
'ə' => '\\textschwa{}', // Handle ə
1412
'#' => '\\#',
1513
'$' => '\$',
1614
'%' => '\\%',
@@ -23,12 +21,13 @@ public function tex_escape($string)
2321
'}' => '\\}',
2422
];
2523

26-
$string = preg_replace_callback("/([\^\%~\\\\#\$%&_\{\}])/",
24+
$string = preg_replace_callback(
25+
"/([\^\%~\\\\#\$%&_\{\}ʼ])/",
2726
function ($matches) use ($map) {
28-
foreach ($matches as $match) {
29-
return $map[$match];
30-
}
31-
}, $string);
27+
return $map[$matches[0]] ?? $matches[0];
28+
},
29+
$string
30+
);
3231

3332
return $string;
3433
}

resources/latex/participation.tex

100644100755
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\documentclass[12pt]{article}
22
\usepackage[T2A,T1]{fontenc}
33
\usepackage[utf8]{inputenc}
4-
\usepackage[greek,russian,english,ukrainian,turkish,azerbaijani]{babel}
4+
\usepackage[russian,english]{babel}
55
\usepackage{mathpazo}
66
\renewcommand{\familydefault}{\sfdefault}
77
\usepackage[landscape,a4paper]{geometry}
@@ -15,12 +15,15 @@
1515
\usepackage{textcomp}
1616
\usepackage{paratype}
1717
\usepackage{tgpagella}
18+
\usepackage{tipa}
1819

19-
20+
% Declare font substitution for Cyrillic encoding
2021
\DeclareFontFamilySubstitution{T2A}{\rmdefault}{PTSerif-TLF}
2122

23+
% Define custom color
2224
\definecolor{myorange}{RGB}{226, 83, 48}
2325

26+
% Background image setup
2427
\newcommand\BackgroundPic{%
2528
\put(0,0){%
2629
\parbox[b][\paperheight]{\paperwidth}{%
@@ -31,31 +34,27 @@
3134
\vfill
3235
}}}
3336

34-
35-
3637
\begin{document}
3738
\AddToShipoutPicture{\BackgroundPic}
3839
~
3940
\vspace{2.2cm}
4041
~
4142
\begin{center}
42-
4343
\vspace{5.9cm}
4444

4545
{\centering\fontsize{36}{48}\selectfont
4646
\begin{otherlanguage*}{russian}
47-
\textcolor{myorange}{<CERTIFICATE_HOLDER_NAME>}
47+
\textcolor{myorange}{Білоголова Дар'я} % Replace placeholder here
4848
\end{otherlanguage*}
4949
\par}
5050

5151
\begin{table}[h]
5252
\footnotesize
53-
5453
\begin{center}
5554
\fontsize{24}{36}\selectfont
5655
\vspace{1.6cm}
5756
\begin{otherlanguage*}{russian}
58-
\textcolor{myorange}{<EVENT_NAME>}
57+
\textcolor{myorange}{Соціальна інженерія в цифровому просторі} % Event name
5958
\end{otherlanguage*}
6059
\end{center}
6160
\end{table}
@@ -65,9 +64,7 @@
6564
\begin{center}
6665
\hspace{-0.5cm}
6766
\begin{otherlanguage*}{russian}
68-
\textcolor{black}{<EVENT_DATE>}
67+
\textcolor{black}{12/11/2026} % Event date
6968
\end{otherlanguage*}
70-
%\end{tabular}
71-
7269
\end{center}
73-
\end{document}
70+
\end{document}

resources/latex/participation_greek.tex

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
\documentclass[12pt]{article}
22
\usepackage[T1,LGR,T2A]{fontenc}
33
\usepackage[utf8]{inputenc}
4-
\usepackage[greek,russian,english,ukrainian,turkish,azerbaijani]{babel}
4+
\usepackage[greek,russian,english]{babel}
55
\usepackage{mathpazo}
66
\renewcommand{\familydefault}{\sfdefault}
77
\usepackage[landscape,a4paper]{geometry}

0 commit comments

Comments
 (0)