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'm trying to make the paper edition of the face-book of my university. I got some constraints; for example, I have to do very small margins.

\documentclass[a5paper,twoside]{book}

\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[inner=7mm,outer=5mm,vmargin=5mm]{geometry}

\pagestyle{empty}

\setlength{\parindent}{0em}

\usepackage{forloop}

\begin{document}
\newcounter{ct}

\forloop{ct}{1}{\value{ct} < 20}{%
\framebox{ \parbox{0.15\linewidth}{photo}%
\parbox{0.25\linewidth}{John \bsc{Doe}}%
\parbox{0.60\linewidth}{\tiny Développé sur Internet par des milliers d’informaticiens bénévoles et salariés, Linux fonctionne maintenant sur du matériel allant du téléphone mobile au superordinateur. Il existe de nombreuses distributions Linux indépendantes, destinées aux ordinateurs personnels et aux serveurs informatiques, pour lesquels Linux est très populaire. Elles incluent des milliers de logiciels issus de la communauté du logiciel libre et fréquemment quelques logiciels propriétaires. Linux est également populaire sur système embarqué[1]. La mascotte de Linux est le manchot Tux. \thepage}
\vspace{1em}
}
}

\end{document}

I would like a tree-column layout.

How could I do? Why the margin don't work?

share|improve this question

migrated from stackoverflow.com Feb 16 '11 at 19:21

This question came from our site for professional and enthusiast programmers.

    
Do you mean "three" column? Maybe the multicol package might help? –  Bruno Le Floch Feb 16 '11 at 19:39
add comment

1 Answer 1

This doesn't answer the question as minimally as I might like, but it does ensure the margins are exactly 7mm and 5mm as needed. I've also added a second version of the facebook entry command that centers the photo and name in their cells.

enter image description here

\documentclass[10pt,a5paper,twoside]{memoir}

% Setting page and margin sizes
\setstocksize{210mm}{148mm}
\settrims{0pt}{0pt}
\settypeblocksize{200mm}{136mm}{*}
\setlrmarginsandblock{7mm}{5mm}{*}
\setulmarginsandblock{5mm}{5mm}{*}
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
\setlength{\footskip}{0pt}
\checkandfixthelayout

\usepackage{lipsum}
\usepackage{forloop}
\usepackage{array}

\newcommand{\facebookentry}[3]{%
\centering
\begin{tabular}{|p{0.15\linewidth}p{0.25\linewidth}p{0.50\linewidth}|} \hline
#1 & #2 & \tiny #3 \\ \hline
\end{tabular} \\ \vspace{1em}
}

% From http://ask.metafilter.com/60851/How-to-center-vertically-in-a-LaTeX-table
\newcolumntype{S}{>{\centering\arraybackslash} m{.15\linewidth} }
\newcolumntype{T}{>{\centering\arraybackslash} m{.25\linewidth} }
\newcolumntype{U}{m{.50\linewidth} }
\newcommand{\facebookentryalt}[3]{%
\centering
\begin{tabular}{|S T U|} \hline
#1 & #2 & \tiny #3 \\ \hline
\end{tabular} \\ \vspace{1em}
}

\begin{document}
\pagestyle{empty}
\newcounter{ct}
\forloop{ct}{1}{\value{ct} < 3}{
\facebookentry{photo}{Name}{\lipsum*[1]}
}
\forloop{ct}{1}{\value{ct} < 3}{
\facebookentryalt{photo}{Name}{\lipsum*[1]}
}

\end{document}
share|improve this answer
add comment

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.