Fonts & Character SetsPrinting the character Ð

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
Khamira
Posts: 3
Joined: Fri Feb 22, 2013 1:43 pm

Printing the character Ð

Post by Khamira »

Hey guys,

I got a big problem and I don't know why it won't work.
I'm writing a thesis right now and in this thesis is supposed to be this D: Ð. But it won't work. It's a black square and not a D.
I created a test file and that one worked, so I think our praembel file is not right. But my latex skills are very limited in the moment and google didn't really help :-(

Code: Select all

\documentclass{article}

\usepackage[T1]{fontenc}
\begin{document}
\DJ
\end{document}
This one is the test file and this is how our praembel looks like:

Code: Select all

\documentclass[12pt,onecolumn,headsepline,numbers=noenddot,bibliography=totocnumbered,oneside,a4paper,fleqn,BCOR8mm]{scrbook}%listof=numbered,
  %\usepackage[colorlinks]{hyperref}
  \usepackage{ngerman,a4}
  \usepackage{cmbright}
  \usepackage{color}
  \usepackage[latin2]{inputenc}  
  \usepackage[T1]{fontenc}
  \usepackage{graphicx}  %[draft]
%  \usepackage[nooneline,bf,hang]{caption2} WARNINGS
  \usepackage{multicol}
%  \usepackage{subfigure}
  \usepackage{rotating}
  \usepackage{ae}
  \usepackage{longtable}
  \usepackage{url}
  \usepackage[version=3]{mhchem}
  \usepackage{amsmath}
	\usepackage{SIstyle}
%  \usepackage[bookmarks,dvips,pdfhighlight=/O,pdfstartview=FitH,linktocpage={true}]{hyperref} WARNINGS
\usepackage[bookmarks]{hyperref} 
  \usepackage[numbers]{natbib} 
  \bibliographystyle{dinat} 
  \pagestyle{headings}
  \graphicspath{{eps-Bilder/}}
  \setlength{\unitlength}{1cm}
  \setlength{\parindent}{0cm}
  \setlength{\parskip}{1.8ex plus0.5ex minus0.5ex}
  \setlength{\baselineskip}{1.5ex plus0.5ex minus0.5ex}
  \sloppy

  \setlength{\textwidth}{17cm}
  \setlength{\textheight}{24cm}
  \setlength{\evensidemargin}{-0.5cm}
  \setlength{\oddsidemargin}{-0.5cm}
  \setlength{\topmargin}{-1cm}
  \setlength{\footskip}{8ex}


\begin{document}

\author{}
\title{}
\maketitle
\setcounter{page}{1}
\tableofcontents
\pagenumbering{arabic}
\bibliographystyle{plain} % h-physrev3
%

\bibliography{literatur}

\end{document}
It would be so great if anyone could help and if I'm in the wrong part of the board, I'm very sorry...
Thanks a lot!
Last edited by Stefan Kottwitz on Fri Feb 22, 2013 2:05 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Printing the character Ð

Post by Stefan Kottwitz »

Hi Khamira,

welcome to the board!

The character Ð will be correctly printed if you would not load the ae package. Check if you really need it.

Stefan
LaTeX.org admin
Khamira
Posts: 3
Joined: Fri Feb 22, 2013 1:43 pm

Re: Printing the character Ð

Post by Khamira »

That really worked :-D Awesome! Thank you!

The only problem now is that the whole text is not fat anymore and it's really hard to read.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Printing the character Ð

Post by Stefan Kottwitz »

The Computer Moder Bright font (cmbright) is lighter than the default Computer Modern sans serif font. Perhaps you would like to use that - because the ae package switches to this font. That's the reason why it looks more fat.

You could simply replace

Code: Select all

\usepackage{cmbright}
by

Code: Select all

\renewcommand*{\familydefault}{\sfdefault}
without loading ae.

Stefan
LaTeX.org admin
Khamira
Posts: 3
Joined: Fri Feb 22, 2013 1:43 pm

Re: Printing the character Ð

Post by Khamira »

Thanks a lot!
Everything is working again with the D :-D
Thanks for the help!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Printing the character Ð

Post by Stefan Kottwitz »

You are welcome.

And if you like, just a few further comments on the preamble. Perhaps you used an existing template, which may be improved.
  • The ngerman package is working but considered as obsolete, better use babel with ngerman option:

    Code: Select all

    \usepackage[ngerman]{babel}
  • Instead of color, I would load the xcolor package which is more capabable.
  • The url package is not needed since you use hyperref.
  • SIstyle will not be further developed, it's superseded by siunitx.
  • Some recommend not to use \graphicspath, but TEXINPUTS instead (l2tabuen), though I guess it's more convenient.
  • \sloppy is not so good for beautiful typesetting. There are other ways to improve line breaking and justification.
  • Setting margins and text dimensions via \setlength can lead to problems if it's not correctly calculated. The geometry package provides a good interface for this, and calculates missing dimensions.
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Printing the character Ð

Post by localghost »

Just some additions to Stefan's list.
  • Forget the a4 package. It is obsolete. The geometry package has already been mentioned to set up page and paper dimensions.
  • For languages like German the inputenc package with its fixed input selection might be replaced by a semi-automatic mechanism with selinput from the oberdiek bundle.

    Code: Select all

    \usepackage{selinput}
    \SelectInputMappings{
      adieresis={ä},
      germandbls={ß}
    }
  • If you are interested in sans serif fonts with math support, take a look at iwona, kurier or lxfonts.

Best regards and welcome to the board
Thorsten
Post Reply