April 8th, 2012 by Stefan Kottwitz
Velimir just published an article about LaTeX templates on LaTeX-Community.org. In this article, he explains benefits of using templates, and he introduces his site www.LaTeXTemplates.com, which collects templates and publishes it under a Creative Commons license.
Some benefits of using templates:
- Rapid document development
- Based on tried, tested and proven pre-defined layout
- Documented methods for customization
Of course, this requires templates which are of high quality and up-to-date. It might be a good idea to additional classify templates by development date and review date. A simple line “Reviewed 2012 by …” can create confidence in a template.
LaTeX3 will introduce a template concept. This is a similar idea, but it will go further and shall separate the design (template) from the author interface (document) and the underlying source (classes and packages). With LaTeX2e templates, design and interface are still mixed, though it can already be a good way for authors. And I think, when LaTeX3 comes out, good existing LaTeX2e templates will benefit and will be designed to become LaTeX3 templates.
Category: Online Ressources, Layout, LaTeX General |
3 Comments »
April 30th, 2011 by Stefan Kottwitz
Did you ever wonder why there are several (La)TeX lengths for the width of the current line of our text? In different situations, such as writing within a table, a minipage, a list or common body text in one or more columns, these lengths can stand for different values.
There are several lengths worth considering:
- \linewidth
- \textwidth
- \hsize
- \columnwidth
On TeX.SX there’s advice on choosing the command: Difference between \textwidth, \linewidth and \hsize.
Category: TeX.SX, Layout, LaTeX General |
No Comments »
Februar 24th, 2011 by Stefan Kottwitz
Why on earth should we use LaTeX to typeset a resume? Here are reasons for this:
If you know any reason for or against it, you’re welcome to write it there.
Category: TeX.SX, Layout, LaTeX General |
No Comments »
Februar 18th, 2010 by Stefan Kottwitz
Hideo Umeki has published the version 5.1 of the geometry package. 5.1 brings just a bugfix for the pass option, but the version 5, released a few days earlier on Feb 12th, provides some new and very useful features:
- The page dimensions can be changed now even in the middle of a document. This very often requested feature has been provided by the gmeometric package before. Now you could write \newgeometry{…} similar to \geometry except that all geometry options used in the preamble would be disabled and the paper-size options like paper=a4paper, landscape, portrait etc. too. Those preamble settings can be restored by \restoregeometry.
- The current page dimensions can be saved by \savegeometry and loaded by \loadgeometry.
- There’s a new set of options to specify the layout area: layout, layoutsize, layoutwidth,
layoutheight etc. They help to print the specified layout to paper of a different size. For example the geometry package would use A5 layout for calculation of margins but with the paper size A4 if you use a4paper together with layout=a5paper.
- The new driver option xetex has been added and is strongly recommended with XeLaTeX. The driver auto-detection routine has been improved, the workaround with geometry.cfg in TeX Live is no longer necessary.
- Papersize presets b0j to b6j for JIS (Japanese Industrial Standards) B-series have been added.
- If the margin would not be completely specified version 5 behaves differently now in order to determine the unspecified margin, documented in the manual.
- The option showframe will cause the page frames to be shown on every page.
- The new option showcrop would print cropmarks showing the corners of the layout on every page.
- Loading geometry.cfg precedes now the processing of the class options in contrary to the previous versions.
- The options compat2 and twosideshift have been removed because version 5 is no longer compatible with previous versions.
For more information visit
This text is available in German. Dieser Text ist auch in Deutsch verfügbar.
Category: News, Layout |
No Comments »
April 13th, 2009 by Stefan Kottwitz
Once in a while there are discussions if pdfLaTeX would be preferable to LaTeX. There are some reasons, here I will just point out the effect of the micro-typographic extensions of pdfTeX, in particular font expansion and character protrusion. Using it you could get better margin adjustment and more even interword spacing. The package microtype is providing an interface to those extensions, you could see an effect already if you would just load the package without any options. The effect will be most notable if you need to typeset text with small columns like in tables.
Let’s test this very small example:
\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{microtype}
\begin{document}
\begin{minipage}{3.7cm}
\blindtext
\end{minipage}
\end{document}
After compilation with LaTeX I’ve got 12 bad/underfull boxes. Using pdfLaTeX I’ve got 0 bad boxes. You could test it yourself. Btw. without microtype I’ve got 10 underfull boxes with both LaTeX and pdfLaTeX. Let’s bring the results of fLaTeX and pdfLaTeX face to face, just compare the first four lines or even more:
[LaTeX] 12 badboxes [PDFLaTeX] 0 badboxes
Without microtype the text will also look like the left one, the line breaks will be the same.
Microtype provides even more features that are not enabled by default, like additional kerning, spacing, tracking/letterspacing and allows you to fine-tune its capabilities. For more information have a look into its documentation.
To conclude I recommend to use pdfLaTeX if the situation allowed it, especially if you are using tables with cells or columns containing text. If you think you couldn’t use pdfLaTeX because it cannot embed eps images, consider to convert those images to pdf format.
This topic was discussed on apfeltalk.de, LaTeX Community, MatheBoard and Matheplanet.
Category: Layout |
3 Comments »
Dezember 28th, 2008 by Stefan Kottwitz
On December 26th Zdenêk Wagner has released the zwpagelayout package, dealing with page layout in general, like the well known geometry package.
It may not provide as many features as geometry but it brings additional tools, for instance it’s supporting cropmarks.
The package can be loaded by:
\usepackage[options]{zwpagelayout}
All options have to be set in the preamble, either by this line or given to the document class.
Options may be paper sizes (by name or by lengths), orientation (portrait, landscape), margins, text dimensions (also concerning head and foot), cropmark related options and options concerning the design of book covers like spine and flap.
There are even options to reflect pages horizontally or vertically, that are intended for printing but shouldn’t be used for documents providing hyperlinks.
Further the package is capable of calculating missing page layout dimensions if enough dimensions are already given.
zwpages comes well documented on 16 pages. For more information and download visit:
Category: News, Layout |
2 Comments »
Oktober 11th, 2008 by Stefan Kottwitz
A question on LaTeX-Community.org inspired me to try pgf/TikZ together with titlesec to produce fancy chapter headings. The result is this small compilable demonstration example:
\documentclass[svgnames]{report}
\usepackage{tikz}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\newcommand*\chapterlabel{}
\titleformat{\chapter}
{\gdef\chapterlabel{}
\normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{\thechapter\ }}{0pt}
{\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-3cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=LightSkyBlue] (0,0) rectangle
(\paperwidth,3cm);
\node[anchor=east,xshift=.9\paperwidth,rectangle,
rounded corners=20pt,inner sep=11pt,
fill=MidnightBlue]
{\color{white}\chapterlabel#1};
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{50pt}{-60pt}
\begin{document}
\tableofcontents
\chapter{Introduction}
Text
\chapter{Main}
\section{Section}
Text
\begin{thebibliography}{99}
\bibitem{Test} test reference
\end{thebibliography}
\end{document}
Screenshot:
See also pdf output of this test & demo file.
Later question on TeX.SX: Fancy chapter headings - perhaps you have an addition to that?
Category: pgf/TikZ, Sectioning, Layout |
77 Comments »
September 17th, 2008 by Stefan Kottwitz
When you want to include an image or a table that’s wider than the text width, you will notice that even when \centering or the center-environment is used this wide object will not be centered in relation to the surrounding text. It will be placed at the left margin but go into the right margin. Its frequently requested that wide figures or tables should overlap at both sides in equal measure.
It can easily achieved by putting the table or picture inside a box, giving the box the width of the text, by the \makebox command. Here is a compilable example, where I’m centering a table having 1.5 times the width of the text:
\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{tabularx}
\begin{document}
\blindtext
\bigskip
\noindent\makebox[\textwidth]{%
\begin{tabularx}{1.5\textwidth}{XX}
\blindtext & \blindtext
\end{tabularx}}
\bigskip
\blindtext
\end{document}
I’ve used \noindent to suppress the paragraph indentation, otherwise I would get an overfull \hbox. As you may notice there’s no \centering necessary because the width of the box equals \textwidth.
This topic was discussed in the LaTeX Community Forum, on CQF.info and on mrunix.de.
.
Category: Figures and Tables, Layout |
30 Comments »
September 12th, 2008 by Stefan Kottwitz
I’m frequently noticing questions regarding problems with paper size and pdfLaTeX, for instance Bug 215561 and Bug 244043 on Launchpad, yesterday on mrunix.de and also yesterday on matheplanet.com.
If you manually change \paperwidth or \paperheight or use the landscape option of LaTeX classes like for instance article it could happen that the paper size of the resulting pdf differs.
A solution is to adjust the \pdfpagewidth and \pdfpageheight values:
\setlength{\pdfpagewidth}{\paperwidth}
\setlength{\pdfpageheight}{\paperheight}
To use the geometry package could correct it too. But if you use it together with gmeometric, it may still be necessary to adjust the pdf page size like written above, see for instance goLaTeX.de.
Category: TeX Live, Layout |
No Comments »
Juni 23rd, 2008 by Stefan Kottwitz
Today CTAN Announcements informed that the package blowup has been released. It can be used to upscale or downscale all pages of a document. For a first test I created this short a5paper document:
\documentclass[pdftex,a5paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\section{One}
\blindtext[3]
\section{Two}
\blindtext[4]
\end{document}
It’s pdf output can be opened here. The pdfinfo tool printed:
Page size: 419.528 x 595.276 pts
Now I used the \blowUp macro to upscale the document pages to fit a4 paper size:
\documentclass[a5paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage{blowup}
\blowUp{paper=a4}
\begin{document}
\tableofcontents
\section{One}
\blindtext[3]
\section{Two}
\blindtext[4]
\end{document}
The new pdf output can be opened here. pdfinfo output:
Page size: 595.276 x 841.89 pts (A4)
Of couse you could inspect the paper sizes by using the Adobe Reader.
The blowup package includes several source code examples. During the test I’ve noticed one small mistake in the documentation, the user-level macro \blowUp is described as \blowup, that will cause an error. But I’m sure this will be corrected soon, at least I will report it to the package author.
Category: Tools for LaTeX, Layout |
1 Comment »