0

I'd like to print Current Date to PDF, using pdfLaTeX in TeXworks (Tex Live 2018). The problem, which occured to me is, that command \date{\today} prints me the current date, but with English names of Months. I'd like to see there Polish names. Like:

January -> Styczeń
February -> Luty

etc.

Is there a way to do this, by changing some config, without writing multiline code?

  • 9
    Does adding \usepackage[polish]{babel} to your document preamble do what you want? – David Purton Nov 22 '18 at 11:03
  • 5
    Next time please post a full minimal example, so we know what you are doing. Then we'd know if you are using babel or not as David suggested. – daleif Nov 22 '18 at 11:30
2

Thank you all.
I'm sorry for not passing all of the information. It helped adding line

\usepackage[polish]{babel}

Thank you very much! Please recieve my appology. To by correct, I will post full (after modifications) example, which works for me. I've taken it from guide, which is located here.
Thanks again.
Bye. Mike.

Post Scriptum: I've only added mentioned line \usepackage[polish]{babel}

\documentclass[a4paper,12pt]{article}

\usepackage[polish]{babel}
\usepackage{color}

\begin{document}

\title{My First Document}
\author{My Name}
\date{\today}
\maketitle

\pagenumbering{roman}
\tableofcontents
\newpage
\pagenumbering{arabic}

\section{Introduction}
This is the {\color{red}introduction.}

\section{Methods}

\subsection{Stage 1}
\label{sec1}
The first part of the methods.

\subsection{Stage 2}
The second part of the methods.

\section{Results}
Here are my results. Referring to section \ref{sec1} on page \pageref{sec1}

\end{document}
1

Assuming you do not want to load any packages (you want a minimal change....) Also, you did not provide a minimal example, but the article class file contains

\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}

Because it is a TeX \def, it can be overwritten with another \def without the usual LaTeX existence crosschecks.

Here is an example assuming that you can typeset the UTF-8 characters. Otherwise, you'd have to replace them with LaTeX escaped characters.

\def\today{\ifcase\month\or
  Styczeń\or Luty\or Marzec\or Kwiecień\or Maj\or Czerwiec\or
  Lipiec\or Sierpień\or Wrzesień\or Październik\or Listopad\or Grudzień\fi
  \space\number\day, \number\year}
  • Since recently, UTF-8 is the default input encoding for pdflatex too (latex-project.org/news/2018/04/10/…). – gusbrs Nov 22 '18 at 11:56
  • @gusbrs Ok, nice, but that is just the file encoding. It does not solve the issue that many characters cannot be mapped to a font. But I am not sure. – Jonathan Komar Nov 22 '18 at 12:07
  • 1
    You still need the font encoding I suppose, and the font has to support the characters. But, as far as I understand it, with UTF-8 as input encoding, there is no need to use escaped characters any longer (which was already the case if you used \usepackage[utf8]{inputenc}). – gusbrs Nov 22 '18 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.