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.

This is a follow up from this other post.. Thanks to the aid of some people I'm almost done, this is what I have now:

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usepackage{pifont}
\usepackage{anttor}
\usepackage[utf8]{inputenc}
\begin{document}
\pgfmathsetmacro{\cardwidth}{5}
\pgfmathsetmacro{\cardheight}{8}
\pgfmathsetmacro{\stripwidth}{0.6}
\pgfmathsetmacro{\strippadding}{0.1}
\pgfmathsetmacro{\textpadding}{0.1}
\pgfmathsetmacro{\ruleheight}{0.15}
\begin{tikzpicture}
    \draw[rounded corners=0.2cm] (0,0) rectangle (\cardwidth,\cardheight);
    \fill[lime,rounded corners=0.1cm] (\strippadding,\strippadding) rectangle (\strippadding+\stripwidth,\cardheight-\strippadding) node[rotate=90,above left,black,font=\large] {INTER ARMA \rotatebox[origin=c]{-90}{\ding{52}}};
    \node[text width=(\cardwidth-\strippadding-\stripwidth-2*\textpadding-0.3)*1cm,below right] at (\strippadding+\stripwidth+\textpadding,\cardheight-\textpadding) {
        {\Large KEEPER}\\
        \vspace{0.15cm}
        {\scriptsize Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}\\
        \vspace{0.25cm}
        {\large Inter Arma}\\
        \tikz{\fill (0,0) rectangle (\cardwidth-\strippadding-\stripwidth-2*\textpadding-0.3,\ruleheight);}\\
        \vspace{0.2cm}
        {\scriptsize Lorem ipsum dolor sit amet, consectetur adipisicing elit.\\
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}
    };
\end{tikzpicture}
\end{document}

output card

The problems are:

  1. the line below "Inter Arma" should be closer to it, like an underline.
  2. if the text has multiple paragraphs, the spacing becomes bad (look the image). How can I control it?
  3. I intend to use Poker card sizes, should I change width and heigth to 6.3 and 8.8?
  4. The calculation of the main area's width in the answer to my previous question was bad, so I substracted 0.3 to it. Why is that? it seemed ok as it was. Solved.
share|improve this question
1  
I think point 4 was due to inner sep, thats why I set it to zero in the edit of bthe first answer. –  Tom Bombadil Mar 14 '12 at 21:16
2  
Thanks for taking the time to post this follow-up question. I guess I should've explained a bit more how questions here work. we like questions to focus around one precise and relatively abstract detail, not around a concrete use case. The idea is that people with the same (abstract) problem can look up solutions. A good start is including a minimal working example (MWE) that illustrates your problem. This post, however, contains four quite separate questions, so it'd actually be better if you kept these matters in the original question. –  doncherry Mar 14 '12 at 21:17
2  
The kind of follow-up question I had in mind would've been "How do I rotate a symbol in TikZ by 90°?" or the like, not just "part 2". "Part 2" should really stick within one post with "Part 1", but generally the approach of having one "project" in one post isn't quite right for tex.sx, which is kinda special in this regard. Sorry about the confusion. I'm not quite sure how to proceed. –  doncherry Mar 14 '12 at 21:19
1  
@doncherry I understand, it won't happen again. –  Diego Mar 14 '12 at 21:48
add comment

1 Answer

up vote 4 down vote accepted

For the first two queries, I have some solution. The third query... I did not understand. Is it that you can't change the paper size or you are asking whether you should change it? You can change the paper size using geometry package.

\usepackage[paperwidth=6.3cm,paperheight=8.8cm,margin=15mm]{geometry}

First two queries have been solved here.

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usepackage{pifont} 
\usepackage{anttor}
\usepackage[normalem]{ulem}
\usepackage[utf8]{inputenc}
\renewcommand\ULthickness{4pt}
\setlength \ULdepth{6pt}
\begin{document}
\pgfmathsetmacro{\cardwidth}{5}
\pgfmathsetmacro{\cardheight}{8}
\pgfmathsetmacro{\stripwidth}{0.6}
\pgfmathsetmacro{\strippadding}{0.1}
\pgfmathsetmacro{\textpadding}{0.1}
\pgfmathsetmacro{\ruleheight}{0.15}
\begin{tikzpicture}
    \draw[rounded corners=0.2cm] (0,0) rectangle (\cardwidth,\cardheight);
    \fill[lime,rounded corners=0.1cm] (\strippadding,\strippadding) rectangle (\strippadding+\stripwidth,\cardheight-\strippadding) node[rotate=90,above left,black,font=\large] {INTER ARMA \rotatebox[origin=c]{-90}{\ding{52}}};
    \node[text width=(\cardwidth-\strippadding-\stripwidth-2*\textpadding-0.3)*1cm,below right] at (\strippadding+\stripwidth+\textpadding,\cardheight-\textpadding) {
        {\Large KEEPER}\\
        \vspace{0.15cm}
        {\scriptsize Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\}%<------modified here
        \vspace{0.25cm}
       { {\large \uline{Inter Arma\hfill} }}\\ % <------modified here
%         \tikz{\fill (0,0) rectangle (\cardwidth-\strippadding-\stripwidth-2*\textpadding-0.3,\ruleheight);}\\
        \vspace{0.2cm}
        {\scriptsize Lorem ipsum dolor sit amet, consectetur adipisicing elit.\\[5pt] % <------modified here
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\} % <------Give a line break here
 \vfill   };
\end{tikzpicture}
\end{document}

enter image description here

I have used the package ulem to put an underline. You can change underline thickness and depth by appropriately changing the values in

\renewcommand\ULthickness{4pt}
\setlength \ULdepth{5pt}

Disclaimer: This solution holds good if that underline need not come at the center of the card.

Edit: As it is requested to accommodate underline for two lines Following can be used:

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usepackage{pifont} 
\usepackage{anttor}
\usepackage[utf8]{inputenc}
\begin{document}
\pgfmathsetmacro{\cardwidth}{5}
\pgfmathsetmacro{\cardheight}{8}
\pgfmathsetmacro{\stripwidth}{0.6}
\pgfmathsetmacro{\strippadding}{0.1}
\pgfmathsetmacro{\textpadding}{0.1}
\pgfmathsetmacro{\ruleheight}{0.15}
\begin{tikzpicture}
\draw[rounded corners=0.2cm] (0,0) rectangle (\cardwidth,\cardheight);
\fill[lime,rounded corners=0.1cm] (\strippadding,\strippadding) rectangle (\strippadding+\stripwidth,\cardheight-\strippadding) node[rotate=90,above left,black,font=\large] {INTER ARMA \rotatebox[origin=c]{-90}{\ding{52}}};
\node[text width=(\cardwidth-\strippadding-\stripwidth-2*\textpadding-0.3)*1cm,below right] at (\strippadding+\stripwidth+\textpadding,\cardheight-\textpadding) {
    {\Large KEEPER}\\
    \vspace{0.15cm}
    {\scriptsize Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\}%<------modified here
    \vspace{0.25cm}
   {{\large {Inter Arma going into two lines\hfill} }} \\[-9pt]% <------modified here
  \vrule width \textwidth height 3pt \\[-3pt] % <------modified here
%         \tikz{\fill (0,0) rectangle (\cardwidth-\strippadding-\stripwidth-2*\textpadding-0.3,\ruleheight);}\\
        \vspace{0.2cm}
        {\scriptsize Lorem ipsum dolor sit amet, consectetur adipisicing elit.\\[5pt] % 
<------modified here
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\\} % <------Give a line break here
 \vfill   };

\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer
    
Thank you! this is nice, but the underline looks ugly when the text needs more than one line. –  Diego Mar 14 '12 at 23:42
    
In that case you can underline only the last line manually. –  Harish Kumar Mar 14 '12 at 23:47
    
Alternative way: You can put a rectangle explicitly at the proper coordinates. For your case:- \draw[fill=black] (0.95,4.69) rectangle (4.75,4.78); and remove the underline. –  Harish Kumar Mar 14 '12 at 23:54
    
Those solutions doesn't work in my case because the number of cards is ~50: the texfile is generated by a python script which is fed with a file that has all the cards' contents. –  Diego Mar 15 '12 at 0:06
1  
@Diego Ok. Then add these. ` {{\large {Inter Arma\hfill} }}` \[-4pt]` \vrule width \textwidth height 3pt . Let me know if it is good. –  Harish Kumar Mar 15 '12 at 0:14
show 3 more comments

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.