Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Page numbering & Referencing.

  • 11-02-2012 2:15pm
    #1
    Registered Users Posts: 213 ✭✭


    Hopefully someone here can put me on the right path.

    After a disastrous episode with MS Word last Thursday while handing in a report I decided, after hearing good things about LaTeX that any further work I do will be done on it.

    I have another report due next Thursday and while it’s mostly done on Word I thought I could use it to practice on.

    So after watching a few tutorials I downloaded MiKTeX and Texmaker for doing the work on, as it has the autocomplete thing which I find handy. So I started yesterday and have got a pretty good idea of the basics like sectioning, images, tables and what not, but as you can see from the title I’m having a little problem with numbering and references.

    So with numbering; I’ve been able to get it more or less how I want it, with roman numerals on the contents, abstract etc and Arabic numbers in the remainder but for some reason I still have the number 1 on the title page.

    What I’d like is the titlepage numberless, then into i, ii, iii, for the next 3 pages and then on to 4, 5, 6… for the following pages.
    I’ve seen some stuff online already to fix it but they don’t seem to work. The code I have at the minute is:
    \documentclass[11pt,a4paper,oneside]{article}
    \usepackage{graphicx}
    \usepackage{cite}
    \begin{document}
    \title{XXXX}
    \author{Author:XXXX\\\\
    		Submitted to: \\\\
    		XXXX \\
    		and \\
    		XXXX}
    		
    \date{16 February 2012}
    \maketitle
    
    \pagebreak
    \pagenumbering{roman}
    \begin{abstract}
    \end{abstract}
    \pagebreak
    \tableofcontents
    \pagebreak
    \pagenumbering{arabic}
    \section{Introduction}
    

    I’m not exactly sure what I need to add in to fix this?

    Secondly the Referencing:
    I’ve downloaded JabRef for storing and organising them, however when I use \cite in the input file, I’m left with a question mark when I compile the PDF.

    Suggestion as to how to fix this would be welcome.

    Thanks in advance.


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 4,665 Mod ✭✭✭✭Tree


    Is article the right document class for you? I'd be inclined to use report if it's something big that needs a title page and a toc.

    Also, the on the first pass of compiling, the document wont collect the citations properly, usually needs a second pass. (and double check you have the right citation)


  • Registered Users Posts: 213 ✭✭random_guy


    Tree wrote: »
    Is article the right document class for you? I'd be inclined to use report if it's something big that needs a title page and a toc.

    It just a 10 page thing so nothing too major really, but it's easily changed.
    Tree wrote: »
    Also, the on the first pass of compiling, the document wont collect the citations properly, usually needs a second pass. (and double check you have the right citation)

    Yes, I saw in one of the youtube tutorials that you need to compile more than once however I've tried this and it still does not seem to work.
    I've presume what goes in after \cite is the Bibtexkey from JabRef?

    I also presumed, perhaps wrongly that LaTeX will search for the references in the same folder that it is saved in or do I need to change the path for it I wonder?


  • Registered Users Posts: 13,104 ✭✭✭✭djpbarry


    random_guy wrote: »
    After a disastrous episode with MS Word last Thursday while handing in a report I decided, after hearing good things about LaTeX that any further work I do will be done on it.
    Welcome - you are one of us now. You get to use the fancy bathrooms.
    random_guy wrote: »
    What I’d like is the titlepage numberless...
    Include this at the start of your title page:
    \thispagestyle{empty}
    
    random_guy wrote: »
    Secondly the Referencing:
    I’ve downloaded JabRef for storing and organising them, however when I use \cite in the input file, I’m left with a question mark when I compile the PDF.
    Ok, I presume you have the following where you want your bibliography to appear:
    \bibliographystyle{<[i]Some Reference Style[/i]>}
    \bibliography{<[i]Some .bib File[/i]>}
    
    Then, wherever you want a citation to appear, you use:
    \cite{<[i]Some Citation[/i]>}
    
    If all this is in place, you need to latex the document, then bibtex, then latex, then latex one last time.

    The first latex pass builds an auxiliary file containing references to all the citation keys in the document.

    Bibtex is then run to find those citation keys within your .bib file and put together a bibliography.

    Running latex again allows the bibliography to be incorporated into the document and formatted according to your style file.

    The final latex pass ensures that all your citations within the text correspond to the entries in the bibliography.

    Hope that all makes sense. Word actually does something pretty similar when used in conjunction with EndNote (for example), it just runs in the background while you type.


  • Registered Users Posts: 213 ✭✭random_guy


    Hmmmmm, getting somewhere, yet nowhere at all.

    Page number on the Cover page - Fixed by changing the document class to a report, however now I have Arabic numbers on the TOC and no numbers on the Abstract.

    References:
    So I now have:
    \documentclass[11pt,a4paper,oneside]{report}
    \usepackage{graphicx}
    \usepackage [top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}
    \usepackage{cite}
    
    at the start, along with:
    \bibliographystyle{chicago}
    \bibliography{References}
    
    in before the \end document. However, I still have some problems.

    On my version I have Quickbuild, LaTeX and BibTex options along with some others that I haven't really got involved with. When I run Quickbuild it runs fine (with the exception of the references etc).
    When I run LaTeX it comes up with a warning for each of my images that says "! LaTeX Error: Cannot determine size of graphic in DL1.png (no BoundingBox)." with DL1.png changing for each of my images.
    And finally when I run BibTex I get the following: "Error : could not start the command".

    Thanks for your help so far.

    Do the Fancy Bathrooms come with seat warmers? or are they an optional extra?


  • Registered Users Posts: 13,104 ✭✭✭✭djpbarry


    random_guy wrote: »
    Page number on the Cover page - Fixed by changing the document class to a report, however now I have Arabic numbers on the TOC and no numbers on the Abstract.
    Without seeing your TEX file, it's difficult to diagnose the problem.
    random_guy wrote: »
    So I now have:
    \documentclass[11pt,a4paper,oneside]{report}
    \usepackage{graphicx}
    \usepackage [top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}
    \usepackage{cite}
    
    Get rid of the cite package for now - you can include it later when you've got things working.
    random_guy wrote: »
    On my version I have Quickbuild, LaTeX and BibTex options along with some others that I haven't really got involved with. When I run Quickbuild it runs fine (with the exception of the references etc).
    When I run LaTeX it comes up with a warning for each of my images that says "! LaTeX Error: Cannot determine size of graphic in DL1.png (no BoundingBox)." with DL1.png changing for each of my images.
    Are you compiling with latex or pdflatex? Because the former won't be able to format PNG's.
    random_guy wrote: »
    And finally when I run BibTex I get the following: "Error : could not start the command".
    This is something specific to your system - I have no idea what the problem might be. I suggest you try compiling your document on the command line (it's very easy) and, if that works, then you can go back to using Texmaker (which I've never used, so I can't really advise on it).


  • Advertisement
  • Registered Users Posts: 213 ✭✭random_guy


    Hello, thanks for your help so far.

    This is where I stand now. On Saturday I played around with it a little bit and got it to the stage where it was actually running and then left it at that until yesterday evening.
    Then I ran it in TexWorks as opposed to Texmaker and what do you know, it works, references were all there and looking more or less correct.
    So last night and this morning I go back to Texmaker to finish putting in the text, compiling as I go and everything is working well. Until that is, just there a moment ago, when I have all my text, images etc finished and it decides to remove all the references and replace them with question marks again.

    The coding as it stands now is:
    \documentclass[11pt,a4paper,oneside]{report}
    \usepackage{graphicx}
    \usepackage [top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry}
    \usepackage{cite}
    \usepackage[longnamesfirst,nonamebreak]{natbib}
    
    \begin{document}
    \title{XXXX}
    \author{Author:XXXX\\\\
    		Submitted to: \\\\
    		XXXX \\
    		and \\
    		XXXX}
    		
    \date{16 February 2012}
    \begin{figure}[b] %[htb] = here, top, bottom
    \centering
    \includegraphics[scale=.5]{DL1.png}
    \caption{XXXX}
    \label{fig:XXXX}
    \end{figure}
    \maketitle
    
    \pagenumbering{roman}
    \begin{abstract}
    
    \end{abstract}
    
    %\pagebreak
    
    \tableofcontents
    %\pagebreak
    
    \pagenumbering{arabic}
    \chapter{Introduction}
    

    It's been more or less unchanged since I started.

    Any further suggestion would be welcome.
    I don't really want to fall at the final hurdle since I've actually been enjoying working with it so far.


  • Registered Users Posts: 13,104 ✭✭✭✭djpbarry


    random_guy wrote: »
    Then I ran it in TexWorks as opposed to Texmaker and what do you know, it works, references were all there and looking more or less correct.
    It would appear then that the issue is with Texmaker - the build configuration is obviously not set up properly. Have a look at this:
    http://www.xm1math.net/texmaker/doc.html#SECTION02

    I don't use that program, so I can't advise any further I'm afraid.


  • Registered Users Posts: 213 ✭✭random_guy


    I'm going to fire up my old thread again for this one.

    LaTeX has gone well for me; thesis is nearly written, maybe Friday I'll finally be done with it :)

    I do have three things I'm trying to finish of with the formatting though.

    The first is the page numbering - I've been asked to use arial (helvet in my case) but I notice that while the entire document changes to the new format with no problem, the page numbers stay as the original LaTeX format. Would anyone have a suggestion for that?

    The second is to do with the list of abbreviations. I just can't get it to work. I've tried the nomencl package, the glossary package and the acronym package. In fairness, I got the acronym package to work but it's not ideal as it doesn't put them in alphabetical order. Also, it doesn't suit the format I have for the list of figures/tables.

    The nomencl package seems to be what I need/give the results I want but in all the examples I read they say something like "makeindex file.glo -s nomencl.ist -o file.gls" or something to that extent. I use TeXworks so I have the option to make the index separately but I get an error that "Can't find Thesis Report Gl.idx". To be honest I'm totally lost with it.

    Thirdly, the format I have to use requires that the TOC is left justified with the chapter headings bold and the sub-headings as standard with no indent. So far I've not been able to find a way around that. Any examples online just don't suit.

    I'll give an idea of what the preamble is so far:
    \\documentclass[pdftex,11pt,a4paper]{report}
    
    \usepackage[T1]{fontenc}
    \usepackage[scaled]{helvet}
    \renewcommand*\familydefault{\sfdefault}
    
    \usepackage [top=2.5cm,bottom=2.5cm,left=3.0cm,right=2.0cm]{geometry}
    \usepackage{pdflscape}
    \usepackage[pdftex]{graphicx}
    \usepackage[usenames,dvipsnames]{xcolor}
    \usepackage[english]{babel}
    \definecolor{grey}{RGB}{187,187,187} %For titlepage
    \definecolor{lightgrey}{RGB}{220,220,220} %For titlepage
    \definecolor{lightgreen}{RGB}{96,176,80} %For titlepage
    \usepackage{textpos} 
    
    \usepackage{tikz}
    \usetikzlibrary{shapes,arrows}
    \usepackage{multirow}
    \usepackage{booktabs}
    
    \usepackage{hyperref} 
    \usepackage{longtable}
    \usepackage{cite}
    \usepackage[square]{natbib} 
    
    \usepackage{fancyhdr}
    \pagestyle{fancyplain}
    \lhead{Capacity Analysis of ...}
    \rhead{\includegraphics[scale=.25]{IEV.png}}
    \renewcommand{\headrulewidth}{0.4pt}
    \renewcommand{\footrulewidth}{0.4pt}
    
    \usepackage[printonlyused]{acronym}
    
    

    In the main body there's nothing too unusual. Tables, figures, equations, a few tikzpictures, citations. The usual basically.

    Thanks for your help :)


Advertisement