# LCARS, LaTeX and tikz

So I have created the following:

\documentclass[17pt]{extarticle}
\usepackage{extsizes}
\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{fancyhdr}
\usepackage{fontspec}
\usepackage{tikz}

% To set the font and formatting:

\setmainfont{[lcars.ttf]} %To load the font named lcars
%\setmainfont[AutoFakeBold=1.5, AutoFakeSlant=0.4]{lcars.ttf} % To set bold or italics if I wanted to.

% LCARS Colours begin:

% Sources for colours:
% http://lcarsmania.com/designguide/Okudagrams_Color.png
% http://www.lcarscom.net/lcars_colors.gif

\definecolor{LCARSBG}{HTML}{000000} % Pure black
\definecolor{LCARSTCMain}{HTML}{FF9900} %Dark yellow
\definecolor{LCARSTC1}{HTML}{CC99CC} % Light purple
\definecolor{LCARSTC2}{HTML}{9999CC} % Light blue
\definecolor{LCARSTC3}{HTML}{CC6666} % Light red
\definecolor{LCARSTC4}{HTML}{FFCC99} % Light peach
\definecolor{LCARSTC5}{HTML}{9999FF} % Light blue, a different variant
\definecolor{LCARSTC6}{HTML}{FF9966} % Light orange
\definecolor{LCARSTC7}{HTML}{CC6699} % Pink
\definecolor{LCARSTC8}{HTML}{F5173C} % Light red
% LCARS Colours end.

% To set page numbers to the right colour and style.

\makeatletter
\fancypagestyle{mypagestyle}{%
\fancyfoot[C]{\textcolor{LCARSTCMain}{\thepage}}% Page # in middle/centre of footer
\renewcommand{\footrulewidth}{0pt}% No footer rule
\def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi
\vskip-\footruleskip\vskip-\footrulewidth
}
\makeatother
\pagestyle{mypagestyle}

\begin{document}
\begin{flushleft}

\pagecolor{LCARSBG} % Page background colour.
\color{LCARSTCMain} % Main body text colour.

\section*{\textcolor{LCARSTC5}{Section Title:}}

\lipsum[1]
\begin{tikzpicture}
\draw[rounded corners] (0, 0) rectangle (4, 1) {};
\end{tikzpicture}

\end{flushleft}

\end{document}


However I want to do the actual shapes I believe tikz package is best for this?

I want to add the shapes like in this image to the margins and header of the document, what is the best way to achieve this? I am beginner in LaTeX.

• Just to let you know that I cannot compile your document on my machine. It is very possible that this is my fault because I may not have some necessary ingredient like a font installed. However, it seems that your question is not centered around these fonts, but is about some shapes that you wish to create. So in order to have more users looking at your question, you may want to provide instead a document that is easy to compile, and illustrates what you have tried. – user121799 Jan 21 at 4:00
• Apologies I thought it was obvious which font parts to delete, additionally I presumed I would get an answer like the one below anyway. The document was not really that relevant more the attempt at drawing the shape. Apologies... – SomeT Jan 21 at 20:05
• No worries! I was just trying to explain how you can attract more attention to your question. – user121799 Jan 21 at 23:27

This is to give you a start.

\documentclass[tikz,border=3.14mm]{standalone}
\definecolor{LCARSTC2}{HTML}{9999CC} % Light blue
\begin{document}
\begin{tikzpicture}[LCAR/.style={rounded corners,path picture={
\fill[LCARSTC2,even odd rule,rounded corners] (path picture bounding box.south west)
rectangle (path picture bounding box.north east)
([xshift=1mm,yshift=2mm]path picture bounding box.south west)
rectangle ([xshift=-1mm,yshift=-2mm]path picture bounding box.north east);
},inner ysep=4mm,inner xsep=2mm,font=\sffamily}]
\node [LCAR] {Hello world};
\end{tikzpicture}
\end{document}


As for your comment (note that I only load geometry to use showframe to mark the boundaries of the page):

\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{lipsum}
\usepackage{tikz}
\definecolor{LCARSTC2}{HTML}{9999CC} % Light blue
\begin{document}
\lipsum[1]

\noindent\begin{tikzpicture}[LCAR/.style={rounded corners,path picture={
\fill[LCARSTC2,even odd rule,rounded corners] (path picture bounding box.south west)
rectangle (path picture bounding box.north east)
([xshift=1mm,yshift=2mm]path picture bounding box.south west)
rectangle ([xshift=-1mm,yshift=-2mm]path picture bounding box.north east);
},inner ysep=4mm,inner xsep=2mm,font=\sffamily}]
\node [LCAR,text width=\linewidth-6mm,minimum width=\linewidth] {\lipsum[2]};
\end{tikzpicture}

\lipsum[3]
\end{document}


Notice that there are many more options and keys, and even possibilities (you may use e.g. the tikzmark library), but I have the same problem as Fermat: I do not have enough space to spell out the details. ;-)

• How do I set this box to the page width? – SomeT Jan 22 at 19:08
• Can you please elaborate, I tried to add in the code as follows but it did not work: \begin{tikzpicture}[minimum width=\linewidth,LCAR/.style={rounded corners,path picture={ \fill[LCARSTC2,even odd rule,rounded corners] (path picture bounding box.south west) rectangle (path picture bounding box.north east) ([xshift=1mm,yshift=2mm]path picture bounding box.south west) rectangle ([xshift=-1mm,yshift=-2mm]path picture bounding box.north east); },inner ysep=4mm,inner xsep=2mm}] \node [LCAR] {\lipsum[1]}; \end{tikzpicture} – SomeT Jan 22 at 19:45
• This still does not work for me. – SomeT Jan 22 at 20:04
• Yeah it compiles, no errors. When I use lipsum it still goes off page with your code rather than hello world. – SomeT Jan 22 at 20:09
• @SomeT If that is your main application, you may post another question of how to achieve this with tcolorbox. You might take my lower example as a basis for an MWE. tcolorbox takes care of all these things like \noindent, text width and so on. If Christian Hupfer is around, I am pretty sure you will get an excellent answer. – user121799 Jan 22 at 20:20