--------------------------------
\documentclass[11pt,english]{article}
\usepackage{dashrule}
\begin{document}
\bigskip
\hdashrule[0.5ex]{20cm}{1cm}{2pt 1pt}
This is a word.\newline
\end{document}
--------------------------------
Output:
--------------------------------
ERROR: Leaders not followed by proper glue.
--- TeX said ---
<to be read again>
\hskip
l.9 \hdashrule[0.5ex]{20cm}{1cm}{2pt 1pt}
--- HELP ---
From the .log file...
You should say `\leaders <box or rule><hskip or vskip>'.
I found the <box or rule>, but there's no suitable
<hskip or vskip>, so I'm ignoring these leaders.
TeX gently says you to learn about leaders...
Sorry if this is a dense question, but are you saying that I need to
familiarize myself with TeX primitives in order to use the dashrule
package?
You're in vertical mode !
Just type \leavevmode (or \strut) before your dash line
it is named "dashrule" and only provides horizontal rules.
Ah. Thank you, I have learned something.
I don't get any errors on your file. I tried it with version 1.1 of
dashrule, then updated to the latest from CTAN,
which is version 1.2. No errors in either case.
Note: your error message says
l.9 \hdashrule[0.5ex]{20cm}{1cm}{2pt 1pt}
which indicates it is NOT from the file you posted, as the
\hdashrule command is on line 6 of that file, not line 9.
Please submit the error message from the file you post.
Also: LaTeX doesn't usually print the word ERROR, and never
in upper case (AFAIK). Please copy/paste verbatim from the
.log file
Perhaps MiKTeX's dashrule.sty is older than 1.1 (or newer than 1.2).
Or perhaps you had something else in the file that actually produced
that error.
Dan
> Sorry, not sussing dashrule (just downloaded most recent via a
> random MiKTeX (2.7) mirror). Am I syntaxifying this all wrong??
> Minimal example:
>
> --------------------------------
>
> \documentclass[11pt,english]{article}
> \usepackage{dashrule}
> \begin{document}
>
> \bigskip
> \hdashrule[0.5ex]{20cm}{1cm}{2pt 1pt}
> This is a word.\newline
>
> \end{document}
This example works fine for me on a current miktex 2.7. The version
of dashrule is
Package: dashrule 2009/08/09 v1.2 Dashed rules
The change history says that in version 1.1. it "Preceded the invo-
cation of \@testopt with an empty box so that \hdashrule can now
begin a paragraph ."
So perhaps you are using an old version. Try to update miktex and
check in the log file if you are actually using the miktex version.
--
Ulrike Fischer
It might be overkill to use a big package like 'tikz' for it but you
can draw these lines with:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz \draw [dashed] (0,0) -- (\textwidth,0);
\end{document}
See the tikz manual (pgfmanual.pdf) for details how to set the dash
parameters.
Best,
Martin
...or download and install the latest version of dashrule (v1.2) from
CTAN. The most recent bug fix runs the OP's minimal example as is.
-- Scott