Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I read that LaTeX is all about "typesetting". What does that mean? What is typesetting?

I read some FAQs, they showed the code, not the output.

Following are my needs and I am not sure whether LaTeX is what I need, or I am looking in the wrong direction.

  • I don't write books, but I study a topic from different online sources and then plug in what is important in a text file.
  • I need to create an index (like we have in books). I should be able to click on that index link to be taken to that chapter. It should be easy to edit the indexes, and well as insert new chapters in between the previous ones.
  • I am a programmer, therefore I need to write properly indented code in a text file (which doesn't support automatic indenting). The code and the explanation has to be in the same file.
  • Sometimes, I need to create some flowcharts/UML too. I have tools for doing the same, but I want that those images be pasted in my text file.

Is LaTeX perfect for these needs?

share|improve this question
1  
All of this should be possible. More importantly, what is your intended result, a website, a PDF, a report for university/your employer? –  Psirus Feb 8 '12 at 6:33
2  
Well, LaTeX can certainly work with your requirements. Things like the index and linking are simple to manage and automatic with makeindex and hyperref. You should never need to edit the actual index itself once set up. There are a number of packages for handling code, such as listings which can do what you need too. UML was addressed in this question. –  qubyte Feb 8 '12 at 6:35
    
@Psirus My output should be a Pdf. :) –  TheIndependentAquarius Feb 8 '12 at 6:35
1  
@AnishaKaul: A brief answer to your question is that pdflatex (which you will most likely use) allows JPG, PNG and PDF images. You don't cut and paste, rather you include them. en.wikibooks.org/wiki/LaTeX/Importing_Graphics –  qubyte Feb 8 '12 at 7:19
2  
nitens.org/taraborelli/latex could be interesting for you. It contains some examples (only the output, not the code) why typesetting with LaTeX could be preferred. –  jofel Feb 8 '12 at 8:51

2 Answers 2

up vote 11 down vote accepted

As wikipedia defines it:

Typesetting is the composition of text by means of types.

That is, the creation of text by arranging glyphs or symbols in a proper way. Thus, what TeX does is to facilitate the settings for the format and the typesetting (how to put the text in your document, maybe you need two columns or one, maybe you need certain margins, and you can write your text once and change the format easily). And LaTeX facilitates the writing and the typesetting by providing a set of macros to use. (See more details on the difference between LaTeX and TeX and what are they.)

I think that (La)TeX and friends are really good for any type of document that you want to write, given that you want to put enough effort to reach certain level that allows you to write it as easily as other type of software. Consequently, the use of (La)TeX allows you to reuse part or all your text, and diagrams easily. There is a huge community and examples out there that can help you get wherever you want to go. Moreover, there are many packages that will help you do fancy things. (See this showcase of some possibilities.)

For example, for the code that you want to use, you can highlighted and re use it using the listings package, for your graphics you can use TikZ or PSTricks. Also, you can include and place the figures any way you want, for an idea of what you can do see this.

share|improve this answer
    
That's all VERY helpful. :hattip: I checked the FAQs, they all show code, but not the output - very surprising. –  TheIndependentAquarius Feb 8 '12 at 6:50
2  
Most of the time those FAQs are for showing how to use it, assuming that you already want to use it. But, if you want to see the capabilities I suggest you to see this site. It is not by any means complete, but shows different examples that may help you imagine all the potential (La)TeX has to offer. –  adn Feb 8 '12 at 6:58
    
Well, I don't think I would have asked this question if those faqs had shown the outputs. :) :) Your link is indeed beautiful. –  TheIndependentAquarius Feb 8 '12 at 7:07
    
@AnishaKaul: In many cases you can simply compile the codes provided in FAQs. Or, if it is not a minimal working example (MWE), you can put it into a minimal document and compile. –  Dror Feb 8 '12 at 7:09
    
@Dror Thanks for the info, but actually before doing anything I just wanted to know whether I was looking in the right direction or not. –  TheIndependentAquarius Feb 8 '12 at 7:11

Well, LaTeX can certainly work with your requirements. Things like the index and linking are simple to manage and automatic with makeindex and hyperref. You should never need to edit the actual index itself once set up. There are a number of packages for handling code, such as listings which can do what you need too.

For UML diagrams, there was a discussion in this question. If you have a simple image of a UML diagram to place in your document, then pdflatex, which you will likely use, supports PNG, JPG, and PDF. Rather than cut and paste, images are included.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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