7

I am writing my bachelor's thesis and it needs to be written in Romanian. While writing some math formula, I wanted to write "and". It translates to "și". As it turns out, my LaXeTeX compiler can't render the ș (S-comma).

This is my code:

\begin{align}
       & \mathlarger{Fie\quad X(N) = x_0, x_1, x_2, \dots, x_{N-1}} \\
       & \mathlarger{unde\ N \in \mathbb{N} \ și\ k \in \{0,1,2,\dots,N/2\}} \\
       & \mathlarger{Avem:}
\end{align}

and this is the output:

Output of the above code

How might I be able to show that S-comma?

3 Answers3

14

Words, even without accents should not be in math italic, so

\text{unde} and \text{și}

David Carlisle
  • 757,742
4

In addition to rendering text-type words that may appear in a math expression in text mode (via a \text directive, say), you may want to execute a single \large instruction before entering math mode instead of executing \mathlarger at the start of every singe row in the align environment.

enter image description here

\documentclass{article} % or some other suitable document class
\usepackage[romanian]{babel}  % optional
%\usepackage{relsize} % for \mathlarger macro, not needed below
\usepackage{amsmath}  % for \text macro and align env.
\usepackage{amssymb}  % for \mathbb macro
\counterwithin{equation}{section} % just for this example

\begin{document} \setcounter{section}{3} % just for this example

\par \begingroup \large % <-- execute this before entering display math mode \begin{align} & \text{Fie}\quad X(N) = x_0, x_1, x_2, \dots, x_{N-1} \ & \text{unde $N \in \mathbb{N}$ și $k \in {0,1,2,\dots,N/2}$} \ & \text{Avem:} \end{align}

\endgroup

\end{document}

Mico
  • 506,678
  • 1
    Sorry, but the \begingroup\large you recommend would have very adverse effects on the text preceding the display, assuming that no blank line appears in between. – egreg Jun 17 '22 at 07:44
  • @egreg - I've thrown in a \par directive and and an extra blank line. I realize that this approach conflicts with the general stricture against starting off display math material with a paragraph break. In the present case, though, this conflict may be the least of several evils, given that \large is supposed to prevail for the math material... – Mico Jun 17 '22 at 07:51
  • 1
    Sorry, but the cure is worse than the disease. By the way, I see no reason whatsoever for making equations bigger. – egreg Jun 17 '22 at 10:37
  • 1
    @egreg - What would be your preferred alternative? (FWIW, I can also see no reason whatsoever for increasing the font size for the three lines in question.) – Mico Jun 17 '22 at 11:45
  • See answer to know how I'd do it. – egreg Jun 17 '22 at 13:28
4

If you really want larger font size in the display, you can avoid \mathlarger, but I'd not do it: a math display is already prominent enough.

In any case, you need \text for textual parts in math material.

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{etoolbox}

\usepackage{lipsum}

\makeatletter % see https://tex.stackexchange.com/a/288889/4427 % detach \eqref processing from \tag processing \let\tagform@ref\tagform@ \let\maketag@@@ref\maketag@@@ \patchcmd{\eqref}{\tagform@}{\tagform@ref}{}{} \patchcmd{\tagform@ref}{\maketag@@@}{\maketag@@@ref}{}{} % redefine \tagform@ to use the current size \def\tagform@#1{% \maketag@@@{\saved@size(\ignorespaces#1\unskip@@italiccorr)}% } % in general \saved@size does nothing \def\saved@size{}

% now we define a wrapper \NewDocumentEnvironment{largerdisplay}{O{\large}mb} {% #1 = desired size (default \large), #2 = type of display, #3 = body \protected@edef\saved@size{\fontsize{\f@size}{0}\selectfont}% $$\begin{minipage}{\displaywidth} \abovedisplayskip=0.8ex \belowdisplayskip=\z@ #1\noindent \begin{#2}#3\end{#2}% \end{minipage}$$}{\ignorespacesafterend} \makeatother

\begin{document}

\lipsum[1][1-4] \begin{largerdisplay}{align} & \text{Fie } X(N) = x_0, x_1, x_2, \dots, x_{N-1} \ & \text{unde }N \in \mathbb{N} \text{ și } k \in {0,1,2,\dots,N/2} \ & \text{Avem:} \end{largerdisplay} \lipsum[2][1-4]

\end{document}

enter image description here

Compare with the simple align:

enter image description here

egreg
  • 1,121,712