I'm sorry if I misunderstood your question, but I'll do my best.
There are many (and I mean MANY) packages to accommodate encoding of different "delicate" symbols like rare letters from little known languages. Vietnamese, Chinese, Slovenian (my language; you've probably never heard of it) etc. are all represented by plethora of CTAN packages. So to start, we're going to solve your issue of displaying á
and š
.
Let's start with the easier one, á
. We can get a solid result even without any additional packages (don't get confused by amsmath
package, I only let it in because without it functions \forall
, \in
, \iff
and \cup
can't be compiled). Here's the code:
\documentclass[13,legalpaper]{article}
\usepackage{amsmath}
\begin{document}
$\forall d \in days : d > 0 \iff (\acute{a}Name \cup šName)$
\end{document}
Here you can see, that á
got substituted by \acute{a}
. But now we have a problem. If you only intend on using this command in math mode, that's fine, but if you want output it in text mode that won't work. To achieve the latter, we must turn to a different command:
\documentclass[13,legalpaper]{article}
\begin{document}
\'{a}
\end{document}
Here we see that á
is once again replaced, this time with \'{a}
.
Now onto š
. Once again, in math mode, a substitution should suffice:
\documentclass[13,legalpaper]{article}
\usepackage{amsmath}
\begin{document}
$\forall d \in days : d > 0 \iff (\acute{a}Name \check{s}Name)$
\end{document}
And in the normal text:
\documentclass[13,legalpaper]{article}
\usepackage{amsmath}
\begin{document}
\v{s}
\end{document}
Note that if you want to have serif á
and/or š
, you don't have to use math mode! You can simply italicise the whole thing altogether:
\documentclass[13,legalpaper]{article}
\usepackage{amsmath}
\begin{document}
\textit{\'{a} \v{s}}
\end{document}
BUT THIS IS NOT THE BEST WAY TO GO ABOUT!!!
Now I'm going to bring out the big guns: encoding. Who would want to write \'{a}
and/or \v{s}
every time he/she wants to write such a character in his/her native language? No one. That's why LaTex has a wonderful package called babel
. Let me show you (a quick note: I'm using slovene
package, because I'm from Slovenia (google it) you can use any version of bable
, but I personally advise you to use the one that corresponds to your native language; hence the "standard" babel
formula: \usepackage[INSERT YOUR LANGUAGE HERE]{babel}
):
\documentclass[13,legalpaper]{article}
\usepackage[slovene]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
áš
\end{document}
Simple as that! I have to mention that you MUST include \usepackage[utf8]{inputenc}
as it indicates the compilation protocol. All languages with exotic letters must do that as the adherent Tex compiler isn't advanced enough to handle these newer symbols. And once you've done that you're set! Just watch (note: don't get confused by \setlength{\parindent}{0cm}
, it's just a bit of code that removes space before paragraph, so everything is aligned correctly):
\documentclass[13,legalpaper]{article}
\usepackage[slovene]{babel}
\usepackage[utf8]{inputenc}
\begin{document}
\setlength{\parindent}{0cm}
This is a normal text: Upám, da ti je bil ta odgovor v pomoč!\\
This is an italicised text: \textit{Upám, da ti je bil ta odgovor v pomoč!}\\
This is symbol usage in math mode: $\check{z} + \check{s} + \check{c} = \acute{a}$
\end{document}
Important: Do NOT try to write š
, č
, á
etc. in math mode. This will only produce a large amount of errors. Remember: WE USE ONLY MATH ACCENTS IN MATH MODE!
And a quick tutorial on how to change the font:
\documentclass[13,legalpaper]{article}
\usepackage[slovene]{babel}
\usepackage[utf8]{inputenc}
\usepackage{times}
\begin{document}
\setlength{\parindent}{0cm}
This is a normal text: Upám, da ti je bil ta odgovor v pomoč!\\
This is an italicised text: \textit{Upám, da ti je bil ta odgovor v pomoč!}\\
This is symbol usage in math mode: $\check{z} + \check{s} + \check{c} = \acute{a}$
\end{document}
Note the \usepackage{times}
I added to change text font from Computer Modern to Times New Roman. Easy, isn't it? Well, of course you must first know font name in order to compile it. If you compile the code, you can see that math font DIDN'T change. If you want to accommodate the latter as well, you can perform some other LaTex tricks, which are a bit more complicated, but I'm sure you'll get through. Just read this brilliant post: how to select math font in document.
I hope this post was helpful. I wish you countless hours of fun with LaTex!