I would like to define a new set of labels for my pictures like this:
\usepackage{newfloat} \DeclareFloatingEnvironment[listname={Seznam grafů}]{Graf} However, latex refuses to recognize "ů" in the package option and throws an error on me:
! Package inputenc Error: Keyboard character used is undefined Minimal working example is this:
\documentclass[12pt,a4paper]{article}\usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[utf8]{inputenc} \usepackage[english,czech]{babel} \usepackage[nottoc]{tocbibind} \usepackage{newfloat} \DeclareFloatingEnvironment[listname={Seznam grafů}]{Graf} \begin{document} \tableofcontents \listoffigures \listofGrafs \end{document} The first compilation works, but then it fails on second compilation, as the generated .toc file is causing trouble (so this is similar to Problem with special characters in .toc files but the accepted solution there does not help as I specify inputenc early enough). The generated .toc file goes like this:
\select@language {czech} \contentsline {section}{Seznam obr\'azk\r {u}}{1} \contentsline {section}{Seznam graf·}{1} If I replace · with \r {u}}, the next compilation goes fine and a latex document with a TOC is generated, but I would have to do it before each compilation, wihch is not handy. Using \r{u} like this:
\DeclareFloatingEnvironment[listname={Seznam graf\r{u}}]{Graf} does not help.
Update: This has since been resolved: http://sourceforge.net/p/latex-caption/tickets/22/ (as of 16.09.2015, the bug should be uploaded to CTAN on 20.09.2015 - expect some time until it trickles down to your distribution)
graf\r{u}. Can you supply a minimal example? In my experiment I have no problem even withSeznam grafůůin the package options. The package options in the question areutf8,english, andczech, plain ASCII strings, limited to letters and digits.inputencerror message is quite inconsistent with optionutf8. The error message would beUnicode char ... not setup for use with LaTeX. The option ofinputencis different, notutf8, and the input encoding name would have been shown in the second line of the error messageKeyboard character used is undefined\\in inputencoding `...'.