GeneralProblems with geometry, harvard, natbib

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Tom_EJ
Posts: 5
Joined: Mon Nov 21, 2016 4:33 pm

Problems with geometry, harvard, natbib

Post by Tom_EJ »

Dear Community,

I do not really know in which category my problems belong, so I try it here:
I have worked with latex for six month now, last week I changed my OS from Linux Mint to Linux Lite, then I installed the latex packages and tried to work on my old latex files, but – nothing seems to be in order anymore….when I hit “quick build” in any combination whatsoever, the small window below turns somewhat read with lots of error messages.

I have installed the following packages:

texlive
texlive-full
texmaker

My settings at the beginning of the document are:

Code: Select all

\documentclass[12pt,a4paper]{article}
\geometry{a4paper,left=30mm,right=30mm, top=1cm, bottom=2cm} 
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[square,sort]{natbib}    
\usepackage{graphicx}
\usepackage{inputenc}
\usepackage{listings}
\usepackage{harvard}
\usepackage{titling}
\usepackage[onehalfspacing]{setspace}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage[T1]{fontenc}
\usepackage{array}
\usepackage{enumitem}
\setlist[itemize]{nosep,label={\textbullet},leftmargin=*}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
\renewcommand\arraystretch{1.25}
\newcommand{\subtitle}[1]{%
  \posttitle{%
    \par\end{center}
    \begin{center}\large#1\end{center}
It took me some time to arrange all this a couple of months ago, although it still looks "quick and dirty”, however - all this worked with the old system, now I suppose I have to download something else but I have no clue what. Some of the most pushing error messages are:
! Undefined control sequence. \geometry
! LaTeX Error: Command \harvardurl already defined.Or name \end... illegal
!Citation 'French1978' on page 1 undefined
! Package inputenc Error: Unicode char د (U+62F)
That means the packages geometry and havard are missing I guess? Has anyone a clue how to get them?
Moreover, it is very annoying, that the citations do not work. The file literature.bib is in the same folder, at the end of my document I have:

Code: Select all

\bibliography{literature}
\bibliographystyle{agsm}
\end{document}
What could be the possible problem? And last: Does anyone know how to get the charset for English AND Arabic? I need to quote some Arab sources in my thesis.

Thanks for any help, even if it only solves parts of my problem! :)
Kind Regards
Tom
Linux Mint 18.2; KDE-Plasma5; 4.8.0-53-generic #56~16.04.1-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
TeX 3.14159265 (TeX Live 2015/Debian) kpathsea version 6.2.1

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Problems with geometry, harvard, natbib

Post by Stefan Kottwitz »

Hi Tom,

welcome to the forum!

You need to load the geometry package at the beginning, before using the \geometry command:

\usepackage{geometry}

And remove that if you don't need the harvard package:

\usepackage{harvard}

That's because natbib already defines the \harvardurl command.

Stefan
LaTeX.org admin
Tom_EJ
Posts: 5
Joined: Mon Nov 21, 2016 4:33 pm

Problems with geometry, harvard, natbib

Post by Tom_EJ »

Hi Stefan,

thanks a lot for your reply - that solved many of the errors! However, now the "citeasnoun" command doesn't work anymore...

Having the text:
Already in the 1950s the inconsistent use of methods and approaches in the comparative literature of political science was criticised \cite{Macridis1955} which resulted in a range of publications trying to sharpen the methodological awareness of the scientific community (amongst others \citeasnoun {Eckstein1963}, \citeasnoun{Kalleberg1966}, \citeasnoun{Przworski1970}, \citeasnoun{Satori1970}).
the "cite" command seems to work, while all "citeasnoun" commands cause the following error message:
! Undefined control sequence.
l.236 ...fic community (amongst others \citeasnoun
{Eckstein1963}, \citeasno...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Additionally, I get the message:

Package natbib Warning: Citation `)' multiply defined.
Package natbib Warning: Citation `)' multiply defined.

for line 1. But as you can see in my settings posted above, there is no citation...

Last but not least, I would like to generate a citation "like text text text (Weber 1968[1922]) text text text." I thought the following would work:

Code: Select all

@Book{Weber1968,
ALTauthor = {Weber, Max},
ALTeditor = {•},
title = {Economy and Society},
publisher = {Bedminster},
year = {1968[1922]},
OPTkey = {•},
OPTvolume = {•},
OPTnumber = {•},
OPTseries = {•},
address = {New York},
OPTedition = {•},
OPTmonth = {•},
OPTnote = {•},
OPTannote = {•}
}
...but it doesn't ... what options do I have? is there a chance?
Thank you so much
Tom
Linux Mint 18.2; KDE-Plasma5; 4.8.0-53-generic #56~16.04.1-Ubuntu x86_64 x86_64 x86_64 GNU/Linux
TeX 3.14159265 (TeX Live 2015/Debian) kpathsea version 6.2.1
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Problems with geometry, harvard, natbib

Post by Stefan Kottwitz »

You could load the har2nat package, that translates harvard syntax to natbib syntax:

\usepackage{har2nat}

(below the line that loads natbib).

Stefan
LaTeX.org admin
Post Reply