Using TeX to write Scientific reports

  • Thread starter Thread starter superkam
  • Start date Start date
  • Tags Tags
    Scientific
Click For Summary
SUMMARY

This discussion focuses on using TeX, specifically the MikTeX distribution and the fancyhdr package, to create a scientific report template that adheres to university guidelines. The user seeks to implement a front page header containing their name and student ID while maintaining a footer with page numbers on every page. Additionally, they aim to center section titles within their respective columns rather than the entire page. Suggestions include utilizing the revtex4 document class for better formatting and ease of use.

PREREQUISITES
  • Familiarity with TeX and LaTeX document preparation systems
  • Understanding of MikTeX installation and usage
  • Knowledge of the fancyhdr package for customizing headers and footers
  • Basic experience with document classes in LaTeX, particularly article and revtex4
NEXT STEPS
  • Explore the revtex4 document class for improved formatting in scientific reports
  • Learn how to customize headers and footers using the fancyhdr package
  • Research the use of the twocolumn option in LaTeX for document layout
  • Investigate additional packages for centering titles within columns, such as titlesec
USEFUL FOR

Undergraduate physics students, researchers preparing scientific reports, and anyone looking to enhance their skills in using TeX for academic writing.

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} %separation 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 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
1
Views
8K
  • · Replies 8 ·
Replies
8
Views
13K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
8K