[Tex/LaTex] Slovak ľ only once in the text

characters

I need to use Slovak ľ once in text and I do not want to use [slovak]{babel}

Is there a command (like \soft{l}) which would produce it?

Best Answer

It would be easiest, I think, if you could compile your document using either XeLaTeX or LuaLaTeX. That way, you won't have to deal with the vagaries of competing and conflicting font encodings.

enter image description here

\documentclass{article}
\usepackage{ifluatex,ifxetex}
\ifluatex\else\ifxetex % do nothing special ...
  \else % must be pdftex...
   \usepackage[utf8]{inputenc}
   \usepackage[T1]{fontenc}
\fi\fi
\usepackage{ebgaramond} % font package that works with pdfLaTeX, XeLaTeX, and LuaLaTeX :-)
\begin{document}
l ľ 
\end{document}

enter image description here

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc}
\DeclareTextCompositeCommand{\v}{OT1}{l}{l\nobreak\hspace{-.1em}'}
\DeclareTextCompositeCommand{\v}{T2A}{l}{l\nobreak\hspace{-.1em}'}
\begin{document}

{\fontencoding{OT1}\selectfont
\v{l} or just  ľ 
}

{\fontencoding{T1}\selectfont
\v{l} or just  ľ 
}

{\fontencoding{T2A}\selectfont
\v{l} or just  ľ 
}


\end{document}
Related Question