0

Possible Duplicate:
Style/class tutorials

I am a newbie at LaTeX. But I need start from my own text style in LaTeX. I want to setup page format, margins, paragraphs style, fonts, etc. Can you please give me a link to the guide or show me your simple class? I was searching through the internet and I have not found any good tutorials for beginners.

marked as duplicate by qubyte, yo', Seamus, doncherry, Marco Daniel Apr 2 '12 at 13:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Before you starting to write your own document class you should learn the basics of LaTeX. – Marco Daniel Apr 2 '12 at 12:40
  • 3
    Can you elaborate on why you need to write your own document class? It is probably sufficient to load a ready made one and use packages to tweak it. In any case, it's not a great idea to do this before you've had a reasonable amount of experience. – qubyte Apr 2 '12 at 12:40
  • OK, Can I setup my own margins and fonts in document class article.? – itun Apr 2 '12 at 12:42
  • @itun Yes you can. One way is to use the geometry package. There are also many other "article" type of classes provided by the various journals for example revtex4. – Yiannis Lazarides Apr 2 '12 at 12:46
  • 1
    I recommend reading The Not So Short Introduction to LaTeX2e, or some other text listed at tex.stackexchange.com/q/11/4012 – doncherry Apr 2 '12 at 12:58
4

Have a look at

  • the clsguide about macros for package/class writers, and how to setup own classes
  • the dtxtut about how to pack your file as most package/class authors do
  • the LaTeX Companion about writing own classes

Since you are a beginner it is maybe preferable to start with an easy \input file and not writing a class. Just create a file (e.g.) header.tex

\documentclass{article}
\usepackage[margin=2cm]{geometry}
% ...

and us it like

\input{header}
\begin{document}
   Hello World!
\end{document}

To make you file available for multiple project you can save it in the user texmf tree. To find the right path call kpsewhich -var-value=TEXMFHOME in your terminal. It is possible that you must create the path first. then store your header.tex at <TEXMFHOME>/tex/latex/header.tex

  • I don't see making header.tex as a good idea, because when you change this header.tex file, some of your documents might stop working. I believe that a copy-paste method is more proper here. (I mean, when you start a new document, you take the headers from the previous one and modify what has to be modified.) – yo' Apr 2 '12 at 12:49
  • That’s the same with an own (and even possible but seldom with a public) class … – Tobi Apr 2 '12 at 14:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.