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 trying to create a new environment in order to change the layout for tabularx, since the original is not looking like it should. I want the picture to be on the right side wrapped by the text. My idea was to create a new environment with new commands inside to align everything as I want, maybe someone has some tips for me how to do this, and how to structure everything? Thanks in advance...
My code is:

\documentclass[a4paper,12pt,oneside]{article}
\usepackage[dutch]{babel}  %Quotes won't work without babel
\usepackage[utf8]{inputenc}   %This is very important!
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\usepackage[pdfborder={0 0 0}, breaklinks=true, pdftex=true, raiselinks=true]{hyperref}
%\usepackage{tabularx}
\RequirePackage{mypackage}

%\newcolumntype{Y}{>{\raggedright}X}

\begin{document}
\section{Description}
\begin{tabularx}%{\linewidth}{|Y|Y|}\hline

\multicolumn{}{}{some text}
\begin{itemize}
\item  Fixing
\item  Remastering
\item  Converting
\item  Control
\end{itemize}
% & 
\begin{center} \resizebox{10cm}{!}{\includegraphics{picture.png}}\\\            \textit{picturedescription}\end{center}
%\tabularnewline \hline
\end{tabularx}
\end{document}

At the moment it is working like this, but i want to get it working without commenting anything out, or in case change some commands into my own. In addition my custom package looks like this, I want to do all the layouting there:

\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{mypackage}[2012/11/20]

\newenvironment{tabularx}{%
    \begin{center}
    \end{center}
}

    \renewcommand{\multicolumn}{}
\endinput
share|improve this question
add comment

1 Answer

use

\renewcommand\tabularxcolumn[1]{>{\raggedleft}p{#1}}

for the redefinition of the X column. if you want it flush right. And by the way: there is not need for a \resizebox. Use \includegraphics[width=10cm]{picture.png}

share|improve this answer
    
I forgot to tell that everything except for mypackage.sty is generated automatically, i have no influence on this, for this reason i want to modify it with my own package. Thanks for the fast response, but i am not really sure where exactly to put this line: \renewcommand\tabularxcolumn[1]{>{\raggedleft}p{#1}} maybe you could tell me –  dima Nov 21 '12 at 15:26
    
into your preamble after loading mypackage –  Herbert Nov 21 '12 at 15:40
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.