Open alekhe opened 4 months ago
Why are you using a non-UTF-8 setup nowadays?
@alekhe Can you double check the encoding of your file? If it works with utf8, maybe your file is actually encoded in utf8?
Indeed: I'm struggling to know how to create a file with this encoding - my normal editor can't
The encoding is a bit outdated but not really relevant. You get the same warning in utf8 with this:
\documentclass{article}
\usepackage{hyperref}
\usepackage[T2A]{fontenc}
\hypersetup{pdftitle=\CYRN}
\begin{document}
xxx
\end{document}
The problem is that hyperref only defines cyrillic commands if cyrillic has been loaded earlier.
Add this before the \documentclass command:
\providecommand\CYRDZE{}
@u-fischer So not-beamer
s fault?
@josephwright well beamer loads hyperref a bit early. But in view that I claim that one should resolve loading order dependencies, I would say, open an issue for hyperref.
Why are you using a non-UTF-8 setup nowadays?
Unfortunately I have to use BibTeX, which can’t deal correctly with UTF-8 encoded bib files.
Can you double check the encoding of your file? If it works with utf8, maybe your file is actually encoded in utf8?
Yes, I checked. Moreover, if the source encoding is different from [cp866]{inputenc}
then the resulting PDF will not be readable.
Indeed: I'm struggling to know how to create a file with this encoding - my normal editor can't
There are settings in TeXstudio, Notepad++, Notepad2 (et el.), Vim. I haven’t worked in TeXworks.
The encoding is a bit outdated but not really relevant. You get the same warning in utf8 with this:
I don’t know how this works, but you get no warnings if you write \CYRN
in a “natural” way:
\documentclass{article}
\usepackage{hyperref}
\usepackage[T2A]{fontenc}
\hypersetup{pdftitle=Н}
\begin{document}
xxx
\end{document}
well beamer loads hyperref a bit early. But in view that I claim that one should resolve loading order dependencies, I would say, open an issue for hyperref.
I found out that hyperref
should be loaded after fontenc
. That is, this one results in warnings with symbols removed:
\documentclass{article}
\usepackage{hyperref}
\usepackage[T2A]{fontenc}
\usepackage[cp866]{inputenc}
\usepackage[russian]{babel}
And this one works fine:
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage{hyperref}
\usepackage[cp866]{inputenc}
\usepackage[russian]{babel}
Is it possible to tell beamer to \usepackage
(with options) before hyperref
?
A workaround:
\RequirePackage[T2A]{fontenc}
\documentclass{beamer}
Why don't you use what I suggest?
\providecommand\CYRDZE{}
\documentclass{beamer}
should work fine.
Yes, you’re right, it works fine. Thank you.
I just didn’t get (and still don’t) what that meant. E.g., changing \CYRDZE
to \CYRA
doesn’t work. So I decided to play around.
hyperref is currently using \CYRDZE
as a test to decide if cyrillic has been loaded or not.
Ah, OK, thank you!
I’m using 8-bit input encoding and some sort of a clash happens with encodings for
hyperref
. For my\title
,\subtitle
and\author
(which I set in the preamble), I getThe title page is correctly produced, but the PDF properties (title and author) do not contain removed symbols. Everything is alright if I use
article
andhyperref
.Example:
I tried
usepdftitle=false
with\hypersetup{...}
, andhyperref={unicode=true}
in options, but no success.Everything’s fine if UTF-8
inputenc
is used.