So I want to have a small line of squares which relate to a line in a picture I've done in TpX. My rather lengthy and rubbish code to do this is (note I'm not LaTeX savy, but I do use it a lot)
\newcommand{\dottedline}{\protect{\tiny{\raisebox{0.03in}{$\centerdot$} \hspace*{-0.061in} \raisebox{0.03in}{$\centerdot$} \hspace*{-0.061in} \raisebox{0.03in}{$\centerdot$} \hspace*{-0.061in} \raisebox{0.03in}{$\centerdot$} \hspace*{-0.061in} \raisebox{0.03in}{$\centerdot$}}}}
However, when I use this in two different locations the spacing between the dots is different, no doubt due to LaTeX spacing on a line with more or less words. Is there anything I can do about this? Can I force latex to treat this as an object that it cannot alter?
edit: Sorry about not putting everything...
Below is a fragment of my latex code which you can copy/paste, as you can see I want them all to appear in the captions how it appears on the first line.
\documentclass[11pt,a4paper,twoside]{article}
\usepackage{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{amsfonts}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{rotating,graphics,psfrag}
\usepackage[dvips]{epsfig}
\usepackage{pifont}
\usepackage{subfigure}
% Margins are set
\setlength{\textheight}{24cm} \setlength{\textwidth}{15cm}
\setlength{\topmargin}{-1cm} \setlength{\oddsidemargin}{0cm}
\evensidemargin = \oddsidemargin
\newcommand{\smallcircleslines}{\textbf{-}\hspace*{-0.06in}{\tiny{\protect\raisebox{0.009in}{
\ding{108}}}}\hspace*{-0.02in}\textbf{-}\hspace*{-0.02in}{\tiny{\protect\raisebox{0.009in}{\ding{108}}}}\hspace*{-0.07in} \textbf{-}}
\newcommand{\bdashline}{{\textbf{{-\hspace*{-0.045in} -\hspace*{-0.045in} -}}}}
\newcommand{\dashline}{-\hspace*{-0.03in} -\hspace*{-0.03in} -}
\newcommand{\dottedline}{\protect{\tiny{\protect\raisebox{0.03in}{$\centerdot$} \hspace*{-0.05in} \protect\raisebox{0.03in}{$\centerdot$} \hspace*{-0.05in} \protect\raisebox{0.03in}{$\centerdot$} \hspace*{-0.05in} \protect\raisebox{0.03in}{$\centerdot$} \hspace*{-0.05in} \protect\raisebox{0.03in}{$\centerdot$}}}}
\begin{document}
(\dottedline) \newline
Figure 1: General representation of the domain $D$ and boundary $\Gamma=\Gamma_U\cup\Gamma_S$, with \newline unspecified boundary condition (\dottedline) on $\Gamma_U$, and source points (\textcolor{red}{\bdashline}) placed on $\Gamma_E=\Gamma_{E}^{(1)}\cup\Gamma_{E}^{(2)}$ external to the domain $D$. \newline
Figure 2: General representation of the domain $D$ and boundary $\Gamma$, with unknown boundary condition (\dottedline), collocation points (\smallcircleslines) and source points (\textcolor{red}{\bdashline}) placed external to the domain and symmetrically.
\end{document}
Page Layout ⇒ Fixing space between objects?
-
- Posts: 2
- Joined: Thu Apr 08, 2010 8:56 pm
Fixing space between objects?
Last edited by kroneckerdelta on Thu Apr 08, 2010 9:47 pm, edited 2 times in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Fixing space between objects?
Hi,
please post minimal, complete and compilable code and not just code snippets.
please post minimal, complete and compilable code and not just code snippets.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Fixing space between objects?
Lots of ways to do this, but the least change would just be to remove the space between the dots, and adjust the hspace* command accordingly.
Here's a first stab:
Change the value of \dottedlinegap until you're pleased.
Here's a first stab:
Code: Select all
\newlength{\dottedlinegap}
\setlength{\dottedlinegap}{0.13em}
\newcommand{\dottedline}{\protect{\tiny{\protect\raisebox{0.03in}{$\centerdot$}\hspace*{\dottedlinegap}\protect\raisebox{0.03in}{$\centerdot$}\hspace*{\dottedlinegap}\protect\raisebox{0.03in}{$\centerdot$}\hspace*{\dottedlinegap}\protect\raisebox{0.03in}{$\centerdot$}\hspace*{\dottedlinegap}\protect\raisebox{0.03in}{$\centerdot$}}}}
-
- Posts: 2
- Joined: Thu Apr 08, 2010 8:56 pm
Re: Fixing space between objects?
Thanks frabjous, that's perfect.
Statement: There's so many options in latex and I find it hard to find things useful most of the time for latex using google.
Statement: There's so many options in latex and I find it hard to find things useful most of the time for latex using google.