BibTeX, biblatex and biber ⇒ problem with spanish accents
problem with spanish accents
Hello guys. I have written my first chapter with LaTex and all fine. The problem is with the bibliography I have just started. By default I use ISO-8859-15 but when I try to open the recently new created file for the bibliography I received the following message: It seems that this file cannot be correctly decoded with the default encoding setting. Use the encoding UTF 8. So I use the encoding UTF8 for my bibliography. It works perfectly well with bibliography with no accents but when I put an accent I get instead of an accent a question mark and I don't know why. I cannot figure out whether it is an encoding problem or something different. Please help me guys.
Example bibliography:
@book{jones2008,
title={Feast: why humans share food},
author={Jones, Martin},
publisher={Oxford University Press},
year={2008}
}
@book{sanmartiysantacana2005,
title={Els ibers del nord},
author={Sanmartí, Joan y Santacana, Joan},
publisher={Editorial Dalmau},
year={2005}
}
The problen is with the accent in Sanmartí(second entry), I get Sanmart?.
I use the following packages:
\begin{flushright}
?
\end{flushright}\begin{flushright}
\end{flushright} \documentclass[11pt,a4paper,oldfontcommands]{memoir}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{microtype}
\usepackage[dvips]{graphicx}
\usepackage{xcolor}
\usepackage{times}
\usepackage{epigraph}
\usepackage[utf8]{inputenc}
\usepackage[
breaklinks=true,colorlinks=true,
%linkcolor=blue,urlcolor=blue,citecolor=blue,% PDF VIEW
linkcolor=black,urlcolor=black,citecolor=black,% PRINT
bookmarks=true,bookmarksopenlevel=2]{hyperref}
\usepackage{geometry}
% PDF VIEW
% \geometry{total={210mm,297mm},
% left=25mm,right=25mm,%
% bindingoffset=0mm, top=25mm,bottom=25mm}
% PRINT
\geometry{total={210mm,297mm},
left=20mm,right=20mm,
bindingoffset=10mm, top=25mm,bottom=25mm}
\OnehalfSpacing
% \linespread{1.3}\selectfont{}
% \abnormalparskip{10pt}
%\usepackage{parskip}
\setlength{\parskip}{0.1mm plus0.0mm minus0.0mm}
%\linespread{1.3}
%%% CHAPTER'S STYLE
\chapterstyle{hansen}
%\chapterstyle{ger}
%\chapterstyle{madsen}
%\chapterstyle{ell}
%%% STYLE OF SECTIONS, SUBSECTIONS, AND SUBSUBSECTIONS
\setsecheadstyle{\Large\bfseries\sffamily\raggedright}
\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\bfseries\sffamily\raggedright}
%%% STYLE OF PAGES NUMBERING
%\pagestyle{companion}\nouppercaseheads
%\pagestyle{headings}
%\pagestyle{Ruled}
\pagestyle{plain}
\makepagestyle{plain}
\makeevenfoot{plain}{\thepage}{}{}
\makeoddfoot{plain}{}{}{\thepage}
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}
\maxsecnumdepth{subsection} % chapters, sections, and subsections are numbered
\maxtocdepth{subsection} % chapters, sections, and subsections are in the Table of Contents
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\raggedbottom
\usepackage[round]{natbib}
\usepackage{cite}
\begin{document}
%\selectlanguage(spanish)
\bibliographystyle{apalike}
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
% TITLEPAGE
%
% due to variety of titlepage schemes it is probably better to make titlepage manually
%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\thispagestyle{empty}
\frontmatter
{%%%
\sffamily
\centering
\Large
~\vspace{\fill}
{\huge
Indiketia: evolución política del territorio
}
\vspace{2.5cm}
{\LARGE
Your name
}
\vspace{3.5cm}
A thesis submitted in partial fulfillment for the\\
degree of Doctor of Philosophy\\[1em]
in the\\[1em]
Faculty Name\\
University Name
\vspace{3.5cm}
Supervisor: Joan
\vspace{\fill}
May 2013
%%%
}%%%
\cleardoublepage
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\tableofcontents*
\clearpage
\listoffigures
\clearpage
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\mainmatter
\include{preiberico}
\include{iberos}
\include{Introduction}
%\bibliographystyle{unsrt}
\bibliography{bibliografia}
\end{document}
.
Example bibliography:
@book{jones2008,
title={Feast: why humans share food},
author={Jones, Martin},
publisher={Oxford University Press},
year={2008}
}
@book{sanmartiysantacana2005,
title={Els ibers del nord},
author={Sanmartí, Joan y Santacana, Joan},
publisher={Editorial Dalmau},
year={2005}
}
The problen is with the accent in Sanmartí(second entry), I get Sanmart?.
I use the following packages:
\begin{flushright}
?
\end{flushright}\begin{flushright}
\end{flushright} \documentclass[11pt,a4paper,oldfontcommands]{memoir}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{microtype}
\usepackage[dvips]{graphicx}
\usepackage{xcolor}
\usepackage{times}
\usepackage{epigraph}
\usepackage[utf8]{inputenc}
\usepackage[
breaklinks=true,colorlinks=true,
%linkcolor=blue,urlcolor=blue,citecolor=blue,% PDF VIEW
linkcolor=black,urlcolor=black,citecolor=black,% PRINT
bookmarks=true,bookmarksopenlevel=2]{hyperref}
\usepackage{geometry}
% PDF VIEW
% \geometry{total={210mm,297mm},
% left=25mm,right=25mm,%
% bindingoffset=0mm, top=25mm,bottom=25mm}
\geometry{total={210mm,297mm},
left=20mm,right=20mm,
bindingoffset=10mm, top=25mm,bottom=25mm}
\OnehalfSpacing
% \linespread{1.3}\selectfont{}
% \abnormalparskip{10pt}
%\usepackage{parskip}
\setlength{\parskip}{0.1mm plus0.0mm minus0.0mm}
%\linespread{1.3}
%%% CHAPTER'S STYLE
\chapterstyle{hansen}
%\chapterstyle{ger}
%\chapterstyle{madsen}
%\chapterstyle{ell}
%%% STYLE OF SECTIONS, SUBSECTIONS, AND SUBSUBSECTIONS
\setsecheadstyle{\Large\bfseries\sffamily\raggedright}
\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\bfseries\sffamily\raggedright}
%%% STYLE OF PAGES NUMBERING
%\pagestyle{companion}\nouppercaseheads
%\pagestyle{headings}
%\pagestyle{Ruled}
\pagestyle{plain}
\makepagestyle{plain}
\makeevenfoot{plain}{\thepage}{}{}
\makeoddfoot{plain}{}{}{\thepage}
\makeevenhead{plain}{}{}{}
\makeoddhead{plain}{}{}{}
\maxsecnumdepth{subsection} % chapters, sections, and subsections are numbered
\maxtocdepth{subsection} % chapters, sections, and subsections are in the Table of Contents
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\raggedbottom
\usepackage[round]{natbib}
\usepackage{cite}
\begin{document}
%\selectlanguage(spanish)
\bibliographystyle{apalike}
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
% TITLEPAGE
%
% due to variety of titlepage schemes it is probably better to make titlepage manually
%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\thispagestyle{empty}
\frontmatter
{%%%
\sffamily
\centering
\Large
~\vspace{\fill}
{\huge
Indiketia: evolución política del territorio
}
\vspace{2.5cm}
{\LARGE
Your name
}
\vspace{3.5cm}
A thesis submitted in partial fulfillment for the\\
degree of Doctor of Philosophy\\[1em]
in the\\[1em]
Faculty Name\\
University Name
\vspace{3.5cm}
Supervisor: Joan
\vspace{\fill}
May 2013
%%%
}%%%
\cleardoublepage
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\tableofcontents*
\clearpage
\listoffigures
\clearpage
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%---%%%
\mainmatter
\include{preiberico}
\include{iberos}
\include{Introduction}
%\bibliographystyle{unsrt}
\bibliography{bibliografia}
\end{document}
.
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
problem with spanish accents
LaTeX editors use utf-8 by default for about ten years. I suggest to make a save copy of your project and convert it to utf8.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
problem with spanish accents
Hello Johannes, I hope you can help me to save a copy and convert it to utf-8 please, as I am 50 years old and I struggle with these things. So I go to file on my tex maker and a save a copy, lets say with the name hello, into the folder in which I have all my LaTex files. Will it save all my project, that is, the file in which I have all the commands and the file in which I have the chapter, called preiberico? Once it is save, how can I convert the save copy into utf-8? Thansk!
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
problem with spanish accents
Make a copy of your project on a USB stick and put that stick in the drawer of your desk. Just in case. Just to be sure.
Open the different tex files one by one with a simple text editor like notepad, and copy the whole content over to your TeX editor and save it there. Once you are done and all files are saved again, check that you change the option for package intputenc to utf8.
Open the different tex files one by one with a simple text editor like notepad, and copy the whole content over to your TeX editor and save it there. Once you are done and all files are saved again, check that you change the option for package intputenc to utf8.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
problem with spanish accents
Hello again Johannes and thanks for your help. One quick question from me:
I have made a copy of my project.
right, so I copy and save all the content, both the source code and the chapter with the code and the writing, on notepad. After, I guess that I have to save again all the files from the notepad into the file in which I have all Latex files but with a different name, isn't true? What I am not getting is when or how do I convert these files into utf8, unless you mean that when saving the files on notepad there is an option to change the code of the source. Thanks and sorry for my clumsiness
I have made a copy of my project.
right, so I copy and save all the content, both the source code and the chapter with the code and the writing, on notepad. After, I guess that I have to save again all the files from the notepad into the file in which I have all Latex files but with a different name, isn't true? What I am not getting is when or how do I convert these files into utf8, unless you mean that when saving the files on notepad there is an option to change the code of the source. Thanks and sorry for my clumsiness
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
problem with spanish accents
Open the files with notepad and copy the content to your LaTeX editor. Save the content under a new name.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
problem with spanish accents
When open the files with notepad the encoding field gives various options, among which is uft8, I have to choose this one isn't it, because by default it says ANSI
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
problem with spanish accents
Is the simple windows notepad really giving you any options when opening a file?
I haven't been on a windows machine for years, i cannot tell.
Here is a german link that might be helpful https://texwelt.de/fragen/2656/wie-uber ... nem-editor
I haven't been on a windows machine for years, i cannot tell.
Here is a german link that might be helpful https://texwelt.de/fragen/2656/wie-uber ... nem-editor
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
problem with spanish accents
nearly there! once I have all files saved with a new name, do I have to configure texmaker with font encoding-->utf-8 and restart texmaker? Many thanks
problem with spanish accents
If I open the file in notepad with the default code, which is ANSI, it comes out as in my file, like this
%\fancyhead[LE]{}
%\fancyfoot{} % clear all footer fields
%\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\footrulewidth}{0.4pt}
\setcounter{secnumdepth}{3} % para que ponga 1.1.1.1..
\setcounter{tocdepth}{3} % para que añadir las secciones en el índice...
%\begin{document}
\chapter[Capítulo 2. La construcción política de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurdán]
{Capítulo 2. La construcción política de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurdán}
%\chapter{Capítol 1.\\intruducció}0.
el coche verde
IF I OPEN IT with uft8 it comes out with questions marks
\chapter[Cap�tulo 2. La construcci�n pol�tica de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurd�n]
{Cap�tulo 2. La construcci�n pol�tica de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurd�n}
What would you do Johannes, any suggestions?
%\fancyhead[LE]{}
%\fancyfoot{} % clear all footer fields
%\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\footrulewidth}{0.4pt}
\setcounter{secnumdepth}{3} % para que ponga 1.1.1.1..
\setcounter{tocdepth}{3} % para que añadir las secciones en el índice...
%\begin{document}
\chapter[Capítulo 2. La construcción política de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurdán]
{Capítulo 2. La construcción política de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurdán}
%\chapter{Capítol 1.\\intruducció}0.
el coche verde
IF I OPEN IT with uft8 it comes out with questions marks
\chapter[Cap�tulo 2. La construcci�n pol�tica de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurd�n]
{Cap�tulo 2. La construcci�n pol�tica de la comunidad, la identidad y el territorio. La Primera Edad del Hierro en el Ampurd�n}
What would you do Johannes, any suggestions?