1

I'm working on a simple TeX here based on KOMA-Script that I'm trying to customize. I don't want a thesis or a book, I'm trying to create a simple design, with header and footer information and text between those. Simple huh? But damn, LaTeX is hard! I have the following source and a few questions:

\documentclass[a4paper]{scrbook}
\usepackage[portuguese]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{lipsum}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\setheadsepline{1pt}
\setfootsepline{1pt}

\ihead{My Default Text}
\ohead{\leftmark}
\ifoot{My Default Footer Text}
\ofoot{Page \thepage}
\cfoot{}

\begin{document}

\tableofcontents

\chapter{Intro}
\section{What's Lorem Ipsum?}
\lipsum[1-8]
\section{Why Lorem Ipsum?}
\lipsum[1-8]

\chapter{Working with Lorem Ipsum}
\section{I say. What on Earth is Lorem Ipsum?}
\lipsum[1-8]
\section{Lorem Ipsum is dead?}
\lipsum[1-8]

\end{document}
  • How can I change the default font to FreeSans?
  • How can I change the default text size? And the default size for header/footer notes?
  • The pages have different margins, some are padded to one side while others are padded to another. How can I make all pages have the same margin/padding?
  • How can I make the chapter information (number, name and a list of the sections contained in it) appear in one page, without any content?
  • How can I make the chapter information page have a different header note? (bigger font, different content)
  • How can I include sample code?
  • Can I create some kind of "blockquote" that contains an icon and I can write text next to it? Similar to the "For Dummies" books notes.
doncherry
  • 54,637
JamieJ
  • 133
  • 11
    That's an awful lot of questions. At least some of which should be google-able... Maybe tighten your question to the one of these that is most important/is giving you the most trouble. – Seamus Jun 14 '11 at 18:06
  • I already googled a lot and read the entire KOMA script manual. That's how i got the document above written. But i really need help with this one and Google doesn't have any info. Trust me. I've been working on this Latex thing for days now. =p – JamieJ Jun 14 '11 at 18:24
  • 1
    @JamieJ: Welcome to tex.sx! I second @Seamus, you could also take a look in an introduction like this one, where you'll find answers to some basic questions, or use the search function of this site to find some inspiration. Besides that, Google and ctan.org are your best friends. If you can't figure something out at all, try to ask one concise question per post. In general, if you don't want to write a big-scale document, I recommend not using scrbook but scrartcl (Koma article) or simply article (or scrreprt/report). – doncherry Jun 14 '11 at 18:24
  • http://tex.stackexchange.com/questions/5339/how-to-specify-font-size-less-than-10pt, http://tex.stackexchange.com/questions/867/syntax-coloring-in-latex, http://tex.stackexchange.com/questions/3001/list-sections-of-chapter-at-beginning-of-that-chapter – Caramdir Jun 14 '11 at 18:39
  • Thanks for the comments, guys. But, as far as documentation that can be found on Google and CTAN, i already researched everything. I'm asking those specific questions because i couldn't sort them out alone, even with the docs. If you're not interested, it's fine, but even willing to pay for help on this one. Thanks in advance. – JamieJ Jun 14 '11 at 19:05
  • Two second google: paperTeX? – Frank Zafka Jun 14 '11 at 19:18
  • If i'm not asking too much, or being invasive, can anyone please tell me how do i change the document font? I want it to have sans-serif only, and use FreeSans. Is this too hard? – JamieJ Jun 14 '11 at 19:25
  • I don't think FreeSans has been packaged for LaTeX. At least the Font Catalogue doesn't list it. But see, for example, [http://tex.stackexchange.com/questions/6982/no-simple-utf8-support-in-latex/6998#6998](this answer). – Caramdir Jun 14 '11 at 19:31
  • Ok, but what's the command for changing it? – JamieJ Jun 14 '11 at 19:39
  • \setmainfont gives Undefined control sequence. \setmainfont – JamieJ Jun 14 '11 at 19:39
  • @JamieJ I reccommend you try reading the not so short introduction. By page 9 you'll have seen that changing the document main font size is as easy as putting an option like 11pt or 12pt in the options to your documentclass call. – Seamus Jun 14 '11 at 21:27
  • 1
    @JamieJ then I'd recommend you look at some of these answers. Once you've done that, maybe come back with some more specific questions that we can then try and answer. – Seamus Jun 14 '11 at 21:29
  • 2
    @JamieJ How to ask is also worth looking at in order to know how to ask good questions. – Seamus Jun 14 '11 at 21:57
  • Googling or yahooing or binging sometimes wastes your time and sometimes you will get the answer faster here. But asking a bunch of questions in one thread will make us get confused to attach the proper tags for you. Attaching all tags to your single thread is not a good idea, right? – Display Name Jun 14 '11 at 23:20
  • 1
    if you really read all the documents as you claimed, you won't have questions like how to custom foot/head, that's simple in KOMA-script or in memoir or with fancyhdr or whatever. Free documents. You either won't have questions like changing margin (typearea), or change head/foot for chapter page (plain page style redefine), or text size (see standard latex document, distributed with latex). Indeed you will only need to ask the first and last questions. Asking questions is no problem. But don't pretend you tried everything while you didn't, and then cry for help. – Yan Zhou Jun 14 '11 at 23:51
  • 2
    @JamieJ: As others have already noted, asking a large number of questions in a single 'question' is not encouraged on tex.sx, as the model here is very much one question idea in one post. I'd also second the idea that you need to spend time learning LaTeX. You will profit much more by tackling problems one at a time than by jumping in and trying to alter several things at once. Several of the questions you've asked have been covered before, and so it is not surprising that one of the responses you got was to search more carefully. The community here is helpful, but it is a two-way street. – Joseph Wright Jun 16 '11 at 08:05

1 Answers1

42

Against my better judgement, here are some answers to your questions. As others have noted many are already answered on the site or are in the KOMA documentation. Not every link below is KOMA-specific, so there may be some differences, but there are plenty of KOMA users here, so if you ask specific questions one at a time, you may get a better response.

  • How can I change the default font to FreeSans?

I don't know if there is pdfLaTeX support for FreeSans, but if you use XeLaTeX or LuaLaTeX you can load any font in your system

Here's an example

Section headers in Century Gothic, text in Garamond

If there is pdfLaTeX support, then

Simplest way to typeset entire document in sans serif (Helvetica)

  • How can I change the default text size?

KOMA manual section 3.4

  • And the default size for header/footer notes?

KOMA manual section 3.2.1, also:

How to change the formatting/font of page numbers?

  • The pages have different margins, some are padded to one side while others are padded to another. How can I make all pages have the same margin/padding?

When using a book class (memoir), text shifts from left to right on each page

For KOMA, load with option [twoside=false].

  • How can I make the chapter information (number, name and a list of the sections contained in it) appear in one page, without any content?

List sections of chapter at beginning of that chapter

  • How can I make the chapter information page have a different header note? (bigger font, different content)

Chapter 4 of the KOMA manual

  • How can I include sample code?

How best to include programming source code in LaTeX documents?

  • Can I create some kind of "blockquote" that contains an icon and I can write text next to it? Similar to the "For Dummies" books notes.

How to mark book paragraphs as note, warning, tip etc.?

How to insert code and graphic in textbox

New paragraph style

Alan Munn
  • 218,180
  • 1
    @Jasper: Allan should submit an answer for each question separately. – Display Name Jun 14 '11 at 22:08
  • 8
    @Jasper et al. :-) Thanks for the kind words, but since most of the answers are links to existing answers, I'm happy for votes to go the original answerers anyway. This answer provides a nice example of just how much good information is already on the site. – Alan Munn Jun 14 '11 at 22:55