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 have a little problematic in LaTeX, and I have not found any solution.

I have a minipage like this :

\begin{minipage}[t]{\textwidth}
    \raggedleft
    {\bfseries Some text}\\[.35ex]
    \small
    Text again\\
    And again\\\[.35ex]
\end{minipage}

This code permit me to put my minipage in the right of my page, but the text in the minipage have a right alignment, and I need it left center (no center in the page but center in the minipage).

So, if someone had a solution... Maybe use a minipage is not the right solution ?

Thanks !

share|improve this question
    
Welcome to TeX.SX! Sorry, but it's not clear what you want; can you help more? –  egreg Sep 5 '13 at 17:27
    
Since your minipage as width \textwidth, any alignment will be relative to that. Do you want a minipage that has centred content but is flush right with the page? –  Werner Sep 5 '13 at 17:31
    
I want a minipage, in the right of my document. And the text in my minipage with a left alignment. –  Notme Sep 5 '13 at 17:44
    
in the absence of a minimal example, i suggest this as one possibility: \begingroup \noindent\hfil<the minipage>\parfillskip0pt\par\endgroup. forget about the \raggedleft. –  barbara beeton Sep 5 '13 at 18:07

1 Answer 1

This can be done in several ways; below I include two options; the first one, using a minipage and the second one, a tabular with one l column (in case that the contents is required to wrap, a p{<length>} column should be used instead); showframe was only used to draw a frame as visual guideline for the alignment:

\documentclass{article}
\usepackage{showframe}

\begin{document}

%Using a minipage:
\hfill\begin{minipage}[t]{2.6cm}
    {\bfseries Some test text} \\[.35ex]
    \small
    Text again \\
    And again
\end{minipage}

%Using a tabular:
\hfill\begin{tabular}{@{}l@{}}
    {\bfseries Some test text} \\[.35ex]
    \small
    Text again \\
    And again
\end{tabular}

\end{document}

enter image description here

share|improve this answer

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.