Skip to content

Commit

Permalink
fix language choice UI bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dainiak committed Dec 14, 2023
1 parent 2560a7d commit d18ef1d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion content/en/tex/formulae-advanced.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
\section{Math environments in amsmath package}
\section{Advanced Math Environments in LaTeX}
\par In this section, we'll explore some of the advanced math environments provided by the \verb"amsmath" package in LaTeX. These environments are essential for formatting complex mathematical expressions, especially when dealing with multi-line equations.

\subsection{The Equation and Split Environments}
Expand Down Expand Up @@ -48,27 +47,35 @@ \section{Exercise}
\begin{staticpart}
Type the formulas choosing the appropriate amsmath environments.
\subsection{First}
\htmlblockquote{
\begin{equation}
e=mc^2
\end{equation}
}

\subsection{Second}
\htmlblockquote{
\begin{gather*}
d = \sqrt{ (x_2 - x_1)^2 + (y_2 - y_1)^2 } \\
\cos \alpha = \frac{b^2 + c^2 - a^2}{2bc}
\end{gather*}
}

\subsection{Third}
\htmlblockquote{
\begin{multline*}
P(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + \cdots + \\
+ a_n x^n = \sum_{k=0}^n a_k x^k
\end{multline*}
}

\subsection{Fourth}
\htmlblockquote{
\begin{align}
\sin 2x &= 2 \sin x \cos x \\
1 &= \sin ^2 x + \cos ^2 x
\end{align}
}

\end{staticpart}

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<h1 class="card-title" id="mainTitle">Interactive Introduction to \( \LaTeX \)</h1>

<div class="form-group">
<h5 class="card-title" id="headerKeywordSearch">Smart Search</h5>
<h5 class="card-title" id="headerKeywordSearch">Search</h5>
<form id="searchForm" class="form-inline" role="search" action="">
<label><input type="text" id="searchInput" class="form-control" autocomplete="off">
<span class="input-group-btn"><button class="btn btn-outline-secondary" type="submit"><i class="fa fa-search"></i></button></span></label>
Expand Down
2 changes: 1 addition & 1 deletion js/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ let I18N_STRINGS_ALL = {

function setUILanguage(language=null){
if(!language)
language = navigator.languages.indexOf('ru') >= 0 ? 'ru' : 'en';
language = localStorage.getItem('displayLanguage') || (navigator.languages.indexOf('ru') >= 0 ? 'ru' : 'en');

window.I18N_STRINGS = I18N_STRINGS_ALL[language];
window.confirmationSwitchToKaTeX = I18N_STRINGS["confirmation.SwitchToKaTeX"];
Expand Down
2 changes: 1 addition & 1 deletion js/ilatexprimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ $(function() {

$(function(){
initializeDarkThemeSwitch();
setUILanguage('ru');
setUILanguage();
masterReload();
});
});

0 comments on commit d18ef1d

Please sign in to comment.