Using TeX to write Scientific reports

  • Thread starter Thread starter superkam
  • Start date Start date
  • Tags Tags
    Scientific
AI Thread Summary
A second-year undergraduate physics student is transitioning from MS Word to TeX for writing a lab report and is seeking help with template formatting. They aim to create a front page header with their name and date, while ensuring a footer with page numbers appears on every page. The student is using the fancyhdr package but struggles with applying different header styles to the first page. Additionally, they want to center section titles within their columns rather than on the page. Suggestions include using the revtex4 class for a more streamlined layout and adhering to university submission guidelines for formatting.
superkam
Messages
17
Reaction score
0

Homework Statement


Hi,

Sorry if this is the wrong part of the forum (or even the wrong forum!) but I'm a second year undergraduate physics student, trying to use TeX to write a lap report for the first time (I've previously been using MS Word). Basically before I start writing the actual report I'm trying to get a template set up to fit both my Universities guidelines and to (hopefully) look something like this: http://www.phys.ufl.edu/courses/phy4803L/sample-paper.pdf

I've sent several hours on this template already, and I think I'm almost there, there's just two things that I don't seem to be able to accomplish. These are:
- Having a header (e.g. name, date etc ) on just the front page, but having a footer (page number on EVERY page).
- Centering a section's title in the middle of the column in which it belongs in (not centering it in the middle of the page!)

2. The attempt at a solution

Here is my source code, as I said I haven't added any text yet as I am only up to creating the template for my work (note I am using the fancyhdr package for my headers and footers, I am using a text editor called WinShell, and I am also using MikTeX but I'm not sure what this does).\documentclass[12pt,a4paper]{article}
\usepackage{setspace} %
\onehalfspacing % Line spacing
\usepackage{fullpage} % Margin setting
\usepackage{multicol} %Using columns
\setlength{\columnsep}{25pt} %Seperation BETWEEN columns
\usepackage{fancyhdr} %Package for headers and footers
\pagestyle{fancy}
\usepackage{graphicx} % For images
\usepackage{float} % For tables and other floats
\usepackage{amsmath} % For math
\usepackage{amssymb} % For more math

\fancyhead{}
\renewcommand{\headrulewidth}{0.0pt}

\lhead{Student Code \\ \today}
\chead{}
\rhead{Name}

\fancyfoot{}
\rfoot{\pageof}

\begin{document}
\begin{center}
{ \vspace*{5pt} }
\Large \textbf{Applications of Ultrasound}
\end{center}

\begin{center}
\vspace{12pt} Abstract text here...
\end{center}

\begin{multicols}{2}
[\section{Introduction}]
Introduction text here...
\end{multicols}

\begin{multicols}{2}
[\section{Theory}]
Theory text here...
\end{multicols}

\begin{multicols}{2}
[\section{Methodology}]
Text here...
\end{multicols}

For the headers I have tried using the 'thispagestyle' function, but I find this affects both the header and the footer so it is not very useful. I also know within the 'fancyhead{}' environment you can specify where you want the header to appear, but I only know how to do this so that it appears on odd/even pages etc, not just the first page.

For centering the title in the columns I really don't know what to do, I've tried adding an indent/spaces before the title, but this is a 'cheap' way of trying to solve this issue, and the number label is not shifted by this amount as it is added by LaTeX automatically adds the number in.

Any tips on how to resolve these issues would be very much appreciated! As I do not want to have to go back to using MS Word (where trying move images/graphs is even more of a nightmare than this!).

Thank you in advance!
 
Last edited:
Physics news on Phys.org
Why do you need a header on the front page? Can't you just put a title and your name in the main part of the document?

If you want your outcome to look like the example you give, why don't you just use revtex4? It's much neater than your forcing of the columns (at the very least, you should probably use the twocolumn option of article).
 
Last edited:
cristo said:
Why do you need a header on the front page? Can't you just put a title and your name in the main part of the document?

If you want your outcome to look like the example you give, why don't you just use revtex4? It's much neater than your forcing of the columns (at the very least, you should probably use the twocolumn option of article).

Hi sorry, I need a header (i.e. my name and student ID) on the front page as it is part of the submission guidelines set by my University, and how exactly do I use this 'revtex4'? The only thing I want to be the same as in the example really is the columns, figures etc. To adhere to my submission guidelines I need to use 12pt size font, 1.5line spacing, the header mentioned above, and page numbering in the footer.
 

Similar threads

Replies
3
Views
2K
Replies
4
Views
3K
Replies
8
Views
12K
Replies
1
Views
4K
Replies
1
Views
3K
Replies
1
Views
8K
Back
Top