Text Formattingindenting text on certain value from the border of paper ...

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
koudis_2
Posts: 3
Joined: Tue Oct 12, 2010 5:02 pm

indenting text on certain value from the border of paper ...

Post by koudis_2 »

Hello :),
i'm trying to write CV(Curiculum Vitae). so I said to myself - that on the left side I will have a "name, date of birth, sex etc ..." and on the right "John, 28.3.1992, male ...". Unfortunately, I do not know how set "hard space" from the left border (i was trying \hspace{number} and \hspace{\strecht} but nothing to not help). Please :). How I set "Hard space" from the left border ??
thanks for help.
Last edited by koudis_2 on Sat Oct 23, 2010 10:56 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

indenting text on certain value from the border of paper ...

Post by frabjous »

First, consider using one of the many specialized document classes for creating CVs available for LaTeX such as moderncv.

Beyond that, your description of the problem isn't as clear as it could be. I don't understand the phrase "hard space" in this context. You could mean one of several things. Do you want the text to start a certain amount of room from the right margin, or do you want it the end of the text to be a certain amount of space from the right margin, or do you want the text aligned against the right margin? I didn't follow. It might be only that you need to use the starred version of \hspace*. Or perhaps \hfill would be useful? Or a tabbing environment?

Code: Select all

\documentclass{article}
\newlength{\mymargin}
\setlength{\mymargin}{\textwidth}
\addtolength{\mymargin}{-1in}
\begin{document}
    % This will start 1 inch from the right side
    \noindent\hspace*{\mymargin}Hello world.

    % another way of doing the same
    \begin{flushright}
        \parbox{1in}{Hello world.}
    \end{flushright}

    % This will be all the way against the right
    \begin{flushright}
        Hello world.
    \end{flushright}

    % This will end with one inch left
    \begin{flushright}
        Hello world.\hspace*{1in}
    \end{flushright}

    % A tabbling environment; \= sets a tab stop; \> jumps to it
    \begin{tabbing}
    My name \hspace{1in} \= My ID \\
    My address           \> My phone number
    \end{tabbing}

    % This will push the two elements as far apart as possible
    \noindent My name \hfill My ID

    \noindent My address \hfill My phone number
\end{document}
koudis_2
Posts: 3
Joined: Tue Oct 12, 2010 5:02 pm

Re: indenting text on certain value from the border of paper

Post by koudis_2 »

veryyyyyyyyyy, thank you ...
when i was writing inaccurate description my problem, i thought \hspace{lin} \=


:)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

indenting text on certain value from the border of paper ...

Post by localghost »

Now that the problem seems to be solved, please be so kind and mark the topic accordingly as clearly written in the Board Rules. Otherwise tell us what is missing. Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome to the board
Thorsten
koudis_2
Posts: 3
Joined: Tue Oct 12, 2010 5:02 pm

Re: indenting text on certain value from the border of paper

Post by koudis_2 »

ok. sorry
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

indenting text on certain value from the border of paper ...

Post by localghost »

koudis_2 wrote:ok. sorry
So, please take action as you have been directed.
Post Reply