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 am learning the use of LaTeX by porting an 12-page LibreOffice Writer file to a set of pdflatex input files.

The ability to separate the source in different files and later generate a single output file is nice. Automatic chapter/section/subsection numbering and index generation is also cool.

However, here the benefits that I am seeing stop. When transferring bolded text, I do {\bfText} (which seems to be actually incorrect). When inserting pictures, I do /insertgraphics{../images/picture}. When doing italics, I do \emph{Text}.

I feel that I am missing something huge.

There is a common problem among programmers, when someone has to quickly do some development in an unknown programming language, they would learn the syntax, but not the idiomatic way to do things, and write very bad code. I feel the same is happening to me here.

Is it correct to use \emph to make whole paragraphs italics? Is it correct to use \insertgraphics to place an illustration exactly here, because it is related to a certain paragraph, and would make less sense if using \figure latex moves it wherever it decides?

EDIT:

My goals are:

  • When the text is being skimmed, the most important words and numbers should stand out. That is, if someone has read the text, by skimming it, they should be able to find concrete information rapidly. I am currently using {\bfText} for this.
  • Some paragraphs are short stories, while the rest of the text is rules and numbers. I want the stories to look different, so that the person from the previous point skips them entirely, while a new reader would know that this is just a story and he doesn't need to pay much attention and look for important information in it. I am using \emph{TheWholeParagraph} for this.
  • Figures are illustration, associated with the start of a new section. As such, they should be somewhere around the heading. Their purpose it to invoke atmosphere, related to the new content.
share|improve this question
5  
It's I think impossible to answer your question, it's just too chatty and I'm afraid that it can happen that there'll soon be dozens of answers with no really good content. Moreover, the whole post speaks about differences of LaTeX and Word, and in the end you ask "And how to get to speed?". Anyways, just as a comment: Section numbering is far from the only thing that is inconsistent in most text processors, that's the main reason why they are quite bad, and that's something which can't change; the typographic quality can change, but that's a very long long run. –  tohecz Feb 17 at 8:38
2  
The logical markup of content is a huge benefit, if you have to change some kind of formatting throughout the whole document (or in other documents),this could be done generally. Another benefit is the mathematical markup and its ready-to-print output. –  Christian Hupfer Feb 17 at 8:38
2  
As @Christian said, the logical markup helps a lot. You shouldn't use \emph{…} when you want italics. You should use \emph{…} when you want to emphasize something. Wether the emphasis is done by italizing content or putting it bold is another story. So… what do you MEAN with \textbf{…} or \textit{…}? –  Manuel Feb 17 at 8:45
7  
As nobody seemed to mention it already: The best way to start is take a few days and read some introductory material. You can save a lot of time in the long run, so please see it as an investment. –  Johannes_B Feb 17 at 9:09
4  
Ideally, \bfseries, \textit{}, \Large etc. should only ever appear before \begin{document} (i.e. in the preamble) where you define semantic macros that use them. \emph{} is such a semantic macro, predefined. –  Crissov Feb 17 at 13:08
show 14 more comments

closed as unclear what you're asking by Martin Schröder, Peter Jansson, Svend Tveskæg, tohecz, Sean Allred Feb 17 at 20:35

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers

up vote 7 down vote accepted

I agree with @tohecz that this is a bit of a scattered question, but I'll try to answer each individual part and bring it all together.

The highlight of everything that follows:

With LaTeX (and TeX systems in general), it's essential to realize that even though TeX is processing your document and LaTeX has defined a format you should try and stick to, the ultimate author of the document is you. Write your document, figure out the rest later.


However, here the benefits that I am seeing stop. When transferring bolded text, I do {\bf Text} (which seems to be actually incorrect). When inserting pictures, I do /insertgraphics{../images/picture}. When doing italics, I do \emph{Text}.

I feel that I am missing something huge.

The comments and other answers correctly state that idiomatic LaTeX uses the 'core' commands exclusively in the preamble—the portion of your document that is not typeset. Good practice would suggest creating new commands that capture the intent of the markup rather than its behavior. For example, instead of saying

...
Here is some text that I want
to {\bf stand out} while I'm
reading the document
...

you could instead say

\documentclass{...}
...
\newcommand\skimmable[1]{{\bfseries #1}}
...
\begin{document}
...
Here is some text that I want
to \skimmable{stand out} while I'm
reading the document

Is it correct to use \emph to make whole paragraphs italics?

No. Use environments for this, as noted below.


Is it correct to use \insertgraphics to place an illustration exactly here, because it is related to a certain paragraph, and would make less sense if using \figure latex moves it wherever it decides?

It's not terrible, but there are packages that provide such semantic markup to place a picture in-par depending on your use case. See texdoc wrapfig, for instance. (Type texdoc wrapfig into your terminal—texdoc is quite simply an amazing resource.) Again, I would abstract your use cases in ideas such as

\inparpicture[pos=mid right, width=5cm]{path/to/graphic}

(As a sidenote, it's generally bad practice to have a cross–edge in our directory tree from your TeX sources to your graphics. Just make images/ a subdirectory of your source files, if you can.)


When the text is being skimmed, the most important words and numbers should stand out. That is, if someone has read the text, by skimming it, they should be able to find concrete information rapidly. I am currently using {\bfText} for this.

As noted, create and use semantic markup for this. I am surely beating a dead horse by now, but you may decide later that bolding text doesn't work quite a well as, say, coloring the text… or framing the text… or…. Using semantic markup for this is not only idiomatic, but extraordinarily useful.

Some paragraphs are short stories, while the rest of the text is rules and numbers. I want the stories to look different, so that the person from the previous point skips them entirely, while a new reader would know that this is just a story and he doesn't need to pay much attention and look for important information in it. I am using \emph{TheWholeParagraph} for this.

The current approach has two problems:

  • Not using semantic markup.
  • You cannot have multi-paragraph short stories. (Try it.)

Use environments:

\newenvironment{story}{\itshape}{}

This solves both problems simultaneously.

Figures are illustration, associated with the start of a new section. As such, they should be somewhere around the heading. Their purpose it to invoke atmosphere, related to the new content.

There is a question around here that does exactly this, but I cannot find it. Perhaps you may have better luck, or someone can chime in below. In the meantime, it is perfectly reasonable to 'abstract this away' using semantic markup (oh no, not again!) to express what you want to do:

\section{Some new heading}[illustration=path/to/illustration]

As you can see, it's feasible to even have existing commands be altered/extended to fit the needs of the document. With LaTeX (and TeX systems in general), it's essential to realize that even though TeX is processing your document and LaTeX has defined a format you should try and stick to, the ultimate author of the document is you. Write your document, figure out the rest later.

share|improve this answer
add comment

There are two main differences I see between text processors and LaTeX:

  1. TeX is a typesetting system. LaTeX is about ridding you of the burden of trying to do page and paragraph layout. Layouting was done for you by people who really know this stuff. This is the main reason why Word documents look so ugly: many authors fiddle with the layout settings without knowing what they do. (And the default page layout is very bad, IMHO).

  2. The LaTeX markup is a semantic markup. You tell the system about the meaning of a part of the input, and leave it to decide how to show that meaning in the document. Examples would be emphasize, which is done with italics, except of course if the surrounding text is already emphasized. Then, normal is the typeface to use, and LaTeX will do this correctly.

If you are an expert in layout and typography and want and need full control, then a DTP system would be for you. Neither Word, nor LibreOffice nor LaTeX would be the proper tool.

share|improve this answer
1  
Regarding the last comment: ConTeXt has been developed for this use case. –  Sean Allred Feb 17 at 15:38
1  
Not true. I use LaTeX with the aim of top-level typography, and I can say that I have the full control that I need, since I can always step down to the low-level TeX layer and do something there. –  tohecz Feb 17 at 16:13
    
@tohecz: not true. ;) In fact, LaTeX was developed (more or less) to help typeset scientific papers in computer science. It is possible to do high-quality typesetting of (almost) anything using LaTeX, but you need add-ons (aka packages), and sometimes it just doesn't feel right (why would you need a package or low-level trickery to change something as trivial as enumeration style?). So you can use LaTeX for that, but this is not precisely its design goal. –  mbork Feb 17 at 21:10
    
Let's not argue over that, because it doesn't make sense. I need packages because my day doesn't have 256 hours. –  tohecz Feb 17 at 21:25
add comment

Regarding bold, the best practice is to use the \textbf{bold text} commnad. As the link you provided says, the \bf command is deprecated.

Now, for italicized text the best practice is to use \textit{italicized text}, which is the equivalent of the previous command. The \emph command you are using is intended for emphasizing, as some commenters have posted. But that emphasis can be defined as any kind of formatting, be it italicized, underlined, bold, etc.

So keeping those things in mind, I believe the best is for you to emphasize the words you need to stand out, using the \emph command. You then can redefine it so that it gives the result you want (bold text), instead of changing the command preceding every single emphasized word. You can redefine using the following code on your preamble:

\makeatletter
\DeclareRobustCommand{\em}{%
  \@nomath\em \if b\expandafter\@car\f@series\@nil
  \normalfont \else \bfseries \fi}
\makeatother

Now, regarding italicized paragraphs, you could just use:

\textit{
The whole paragraph
}

to achieve the effect. But again, its best to have an environment that differentiates the special paragraph and then define that environment to make it look whatever you want it to look like. For example, you could create a new environment that works like the quote environment but with italicized text, by using the following code in your preamble:

\newenvironment{myquote}
{\begin{quote}\itshape}
{\end{quote}}

Then, each of the paragraphs containing the short stories should be put inside the new myquote environment, like this:

\begin{myquote}
The whole paragraph.
\end{myquote}

Lastly regarding pictures, if its just to evoke a mood and not for future reference, the it may be best to just include them with the \includegraphics{}, by use of the graphicx package.

Hope it helps!

PS. I have to add that what others have commented is true: you should probably invest a few days reading the basics of writing in LaTeX. Or at least have a guide handy, so you can check there if what you are doing is right. Also, the title of your question is a bit misleading ;)

share|improve this answer
add comment

FWIW, I often recommend to new users (like myself) that they try to export their OpenOffice files to LaTeX and then process them in LaTeX just to see the difference. Many converts have thus been won.

In a way your question asks, "how I can get better at LaTeX?" and for that you should read the various manuals that are out there; as many as you can. The memoir manual in particular (both sections) have a lot to say about typesetting and book design.

Another way of emphasizing text is by increasing the font size. You can do this quickly by using one of the following commands:

\tiny
\scriptsize 
\footnotesize 
\small
\normalsize % (default)  (except this one)
\large 
\Large % (capital "L") 
\LARGE % (all caps) 
\huge 
\Huge % (capital "H") 
share|improve this answer
    
Hi! Can you please show us any example of a profesionally typeset document where text is emphasized by font size? –  tohecz Feb 17 at 17:35
    
@tohecz: let me play devil's advocate here. What do you think about displayed math (as opposed to inline math), like \dfrac and \tfrac? ;) –  mbork Feb 17 at 17:45
    
Also, look at Tschichold's New Typography and the (terrible imho) boldface emphasizing... Not exactly fontsize, but close. –  mbork Feb 17 at 17:48
    
Last but not least, smaller font size is quite often used to, say, deemphasize text (think footnotes, for instance). –  mbork Feb 17 at 17:49
add comment

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