0

I am very new to Latex, plus i am using Lyx: Because that's pretty easy to use. And i am using a template which i found online. The problem i am having is that the chapter page is tilted towards right side and rest of the pages are tilted towards left side. this happens in all chapters. only the chapter page are totally on the right side. As i am very new to latex. I am not even sure where to to actually look to fix the problem. I have attached a picture below to show the problem, It might look ugly, but that's the best i could do. Anyway the top page is the chapter page and bottom page is it's continuation

Any suggestion on where to even look or how to fix this would help me alot.

EDIT1 enter image description here

this is the preamble i use:

\usepackage{svn-multi}
\svnid{$Id$}
%\usepackage{prelim2e}
%\renewcommand{\PrelimWords}{Draft Copy \svnkw{Id}}
%%\newcommand*{\mysvnrev}{\svnrev}
\usepackage[hyperindex=true,
            bookmarks=true,
            colorlinks=false,
            pdfborder=0,
            pagebackref=false,
            citecolor=blue,
            plainpages=false,
            pdfpagelabels,
            pagebackref=true,
            hyperfootnotes=false]{hyperref}
\usepackage[all]{hypcap}
\usepackage[palatino]{anuthesis}
\usepackage{afterpage}
\usepackage{graphicx}
\usepackage{thesissty}
%\usepackage[square]{natbib}
\usepackage[normalem]{ulem}
\usepackage[table]{xcolor}
\usepackage{makeidx}
\usepackage{cleveref}
\usepackage[centerlast]{caption}
\usepackage{float}
\urlstyle{sf}
\renewcommand{\sfdefault}{uop}
\usepackage[T1]{fontenc}
\usepackage[scaled]{beramono}
\usepackage{pifont}
\usepackage{rotating}
\usepackage{algorithmic}

\usepackage{multirow}

%%%% Old macros file includes
\usepackage{booktabs}
\usepackage{relsize}
\usepackage{xspace}
\usepackage{subfig}
\usepackage{listings}
%%%%%%%%

\newcommand{\cmark}{\ding{51}}
\newcommand{\xmark}{\ding{55}}

% renegade!
\setlength{\parindent}{0cm}
\setlength{\parskip}{4mm plus2mm minus3mm}
G.M.
  • 898
  • 5
  • 7
Aashu10
  • 59
  • 1
  • 9
  • Packages like blindtext and lipsum provide some dummy text. You can use that. A chapter title can be thought of easily as well (The journey of Carl Capybara). There really is not need to go mental with a marker to hide your text. :-) – Johannes_B Sep 06 '16 at 06:43
  • The document is set up for duplex printing (every side of the page has text, left and right). That is normal and needed for binding (Alltough, the margins are swapped here). Do you want to print only on one side of the page? – Johannes_B Sep 06 '16 at 06:45
  • @Johannes_B Haha sorry about the marker. yes, i would want to print it on 2 side. but it looks bad on the soft copy. This is my 1st time writing on lyx. Normally when i wirte on word. the margins are similar for both chapter page and other pages and it looks ok on the hard copy aswell. – Aashu10 Sep 06 '16 at 07:10
  • If you want to print on one side only, use the global option oneside. Where to put that in LyX, i don't know. – Johannes_B Sep 06 '16 at 07:36
  • No i want to print on both side of the paper. – Aashu10 Sep 06 '16 at 08:36
  • Use the geometry package to change the margins. The template may already use it. Out of interest, which template is it? Where can i find it? – Johannes_B Sep 06 '16 at 08:39
  • the template i used was: http://www.aarondefazio.com/tangentially/?p=19 you can go through the preamble and if there's a possibility of fixing this in preamble i would be glad. – Aashu10 Sep 06 '16 at 08:41
  • Honestly, LyX is quite complex and you need a basic knowledge of LaTeX. The template is huge, a lot of junk, wrong order of package. I cannot recommend it. The second section of Writing a scientific report suits perfectly here. – Johannes_B Sep 06 '16 at 08:51
  • Sadly i have written so much that changing everything would just do more harm than good. could you tell me how can i use geometry ? – Aashu10 Sep 06 '16 at 08:59
  • Try \geometry{hmargin=2cm} after loading the package. – Johannes_B Sep 06 '16 at 09:01
  • did, still did not work. it's worse now. Please check the edited pic. I edited the preamble too – Aashu10 Sep 06 '16 at 09:39
  • Please provide a minimal working example, that would be something we could really use. – Johannes_B Sep 06 '16 at 20:09
  • Yes, this template is bad for reasons @Johannes_B said but also from a LyX point of view because many of the packages and options are already included when necessary and can be configured in the interface, such as hyperref. Geometry has a dedicated configuration page (Margins) and need not be entered manually. I could write a more detailed reply for cleaning your document settings but I need to understand your question: Do you actually need to follow the ANU guidelines? If yes what are they? If not I would suggest changing to a simpler document class such as Koma-script book. – G.M. Sep 06 '16 at 23:24
  • @G.M. No i don't have to follow any ANU guideline, but it must be a normal thesis report. I'd very much appreciate it if you could do that for me. – Aashu10 Sep 07 '16 at 05:14
  • @G.M. any update? – Aashu10 Sep 07 '16 at 13:58

1 Answers1

4

It appears from the discussion that you do not actually need to follow Australian National University's guidelines. There is therefore no good reason to use this very complicated and low-quality template. The best thing you can do is to get rid of it entirely: remove all the custom preamble (except maybe what you understand and are sure that you really need and is not automatically provided by LyX — given what I see, you should probably remove almost everything). Also reset all document parameters that you do not understand.

Then the question is, how to get again a nice-looking document? Use the following guide to have a good starting point.

Simple document defaults to get started with report writing in LyX

Document class

This is the most important choice. I recommend one of the classes from KOMA-Script. They have sensible defaults, and later, a lot of customization options and a good manual (texdoc scrguien) to explain the customization options. Use the following guide to choose between the article class, the report class and the book class from KOMA-Script: https://tex.stackexchange.com/a/36989/87201.

Page Layout

Choose your format (A4 or US Letter). Set Two-Sided Document if relevant for you; it sets the margins and other things appropriately for two-sided printing.

Select Page Style > Headings. This prints the Chapter and the Section at the top of the page.

Margins

Trust KOMA-Script to come up with a good choice of margins. You can fine-tune the margin size under Document Class > Class Options > Custom. There, type DIV=n where n is an integer. It denotes the fraction of the page that must be reserved for margins (more precisely, all the page dimensions are computed so that the text width is (n-2)/n times the page width while remaining harmonious).

Under the Page Margins tab, make sure that Default Margins is selected. (This prevents the geometry package from loading, which would interfere with KOMA-Script.)

Fonts

If you need special symbols (e.g. if you need mathematical formulae) I recommend choosing one of the recent high-quality fonts that provide everything you need in one package. This includes the Latin Modern fonts (selectable from the interface) and also the STIX fonts (choose Default as Roman font in the interface and add \usepackage{stix} in the preamble; also choose a suitable sans-serif font).

If you do not need special symbols, you have more freedom in the font choice and the LyX interface provides a good sample.

It is also possible to select system fonts (LyX will automatically switch to XeTeX or LuaTeX). However I do not recommend this for a start especially if math fonts are needed.

Modules

LyX functionality is extended with modules. Under the Modules tab, select what is relevant for your field. For instance if you need theorem environment, select an appropriate Theorems module.

Hyperref support

Activate Hyperref Support under PDF Properties. Select Automatically Fill Header, Break Links Over Lines and No Frames Around Links.

Math Options

Make sure that all packages are set to load automatically.

Tables

I recommend using tables in the booktabs style also known as the Formal style in LyX (available from the table properties). Looking at the examples in the booktabs manual is recommended (texdoc booktabs). There is also a small section on it in LyX's Embedded Objects manual.

Bibliography

The standard bibliographic tool used by LyX is bibtex (starting from version 2.3, LyX also supports biblatex). Add your bibtex bibliography from the Insertion menu and choose the style according to the best practices of your field. (amsalpha is a good one for mathematics.)

Sub-documents

For long document separated into child documents, you only need to select the same document class and modules, and to set up the master document for each child.

If in addition you want to be able to compile child documents independently, you must apply the above settings for each child document. They are ignored when compiling from the master document.

Going further

Many more customizations are possible! For this I recommend going step-by-step and using the LyX manuals and the KOMA-Script manual as your primary source. Introduce in the preamble commands that you find on the Internet only after you understand them and you are sure that LyX or KOMA-Script do not provide simpler alternatives.

G.M.
  • 898
  • 5
  • 7
  • The above guide tries to be general. Let us know of any additional difficulty you encounter in the comments below. – G.M. Sep 07 '16 at 23:28
  • I understand your reply for a single file report. But i have multiple child files and 1 main master file. Do i apply these settings for both child and master documents? – Aashu10 Sep 08 '16 at 07:51
  • Only if you want to compile the children separately. I have amended the reply to explain this. – G.M. Sep 08 '16 at 16:07