What's the dotted line equivalent of rule?
I'm looking for the dotted line equivalent of :
rule[<height>]{<width>}{<thickness>}
Something that looks like :
.........................
line
add a comment |
I'm looking for the dotted line equivalent of :
rule[<height>]{<width>}{<thickness>}
Something that looks like :
.........................
line
2
You can have an approximation with thedashrule
package.
– Bernard
Aug 23 '18 at 13:10
add a comment |
I'm looking for the dotted line equivalent of :
rule[<height>]{<width>}{<thickness>}
Something that looks like :
.........................
line
I'm looking for the dotted line equivalent of :
rule[<height>]{<width>}{<thickness>}
Something that looks like :
.........................
line
line
edited Aug 23 '18 at 13:14
Chung Ren Khoo
asked Aug 23 '18 at 13:08
Chung Ren KhooChung Ren Khoo
1747
1747
2
You can have an approximation with thedashrule
package.
– Bernard
Aug 23 '18 at 13:10
add a comment |
2
You can have an approximation with thedashrule
package.
– Bernard
Aug 23 '18 at 13:10
2
2
You can have an approximation with the
dashrule
package.– Bernard
Aug 23 '18 at 13:10
You can have an approximation with the
dashrule
package.– Bernard
Aug 23 '18 at 13:10
add a comment |
1 Answer
1
active
oldest
votes
hdashrule
is only an approximation because the dots are little squares, but you can easily do what you need with TikZ.
I have created two commands, dhorline
(for horizontal rules) and dvertline
(for vertical ones), with the same syntax as rule
, where the dots are actual dots.
Here some examples:
documentclass{article}
usepackage{dashrule}
usepackage{tikz}
usetikzlibrary{decorations.markings}
newcommand{dhorline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#3
with {node[fill, circle, minimum width=#3, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0,#1) -- ++(#2,0);}}
newcommand{dvertline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#2
with {node[fill, circle, minimum width=#2, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0, #1) -- ++(0,#3);}}
begin{document}
With verb|rule{10em}{4pt}| rule{10em}{4pt}
With verb|hdashrule{10em}{4pt}{4pt}|
hdashrule{10em}{4pt}{4pt}
With verb|dhorline{10em}{4pt}| dhorline{10em}{4pt}
vspace{4pt}
With verb|rule[-4ex]{40pt}{1em}| rule[-4ex]{40pt}{1em}
vspace{4pt}
With verb|dhorline[-4ex]{40pt}{1em}| dhorline[-4ex]{40pt}{1em}
With verb|rule{4pt}{10em}| rule{4pt}{10em}
with verb|dvertline{4pt}{10em}|
dvertline{4pt}{10em}
vspace{4pt}
With verb|rule[3ex]{4pt}{10em}| rule[3ex]{4pt}{10em}
with verb|dvertline[3ex]{4pt}{10em}|
dvertline[3ex]{4pt}{10em}
end{document}
Inspiration from this answer.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f447326%2fwhats-the-dotted-line-equivalent-of-rule%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
hdashrule
is only an approximation because the dots are little squares, but you can easily do what you need with TikZ.
I have created two commands, dhorline
(for horizontal rules) and dvertline
(for vertical ones), with the same syntax as rule
, where the dots are actual dots.
Here some examples:
documentclass{article}
usepackage{dashrule}
usepackage{tikz}
usetikzlibrary{decorations.markings}
newcommand{dhorline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#3
with {node[fill, circle, minimum width=#3, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0,#1) -- ++(#2,0);}}
newcommand{dvertline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#2
with {node[fill, circle, minimum width=#2, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0, #1) -- ++(0,#3);}}
begin{document}
With verb|rule{10em}{4pt}| rule{10em}{4pt}
With verb|hdashrule{10em}{4pt}{4pt}|
hdashrule{10em}{4pt}{4pt}
With verb|dhorline{10em}{4pt}| dhorline{10em}{4pt}
vspace{4pt}
With verb|rule[-4ex]{40pt}{1em}| rule[-4ex]{40pt}{1em}
vspace{4pt}
With verb|dhorline[-4ex]{40pt}{1em}| dhorline[-4ex]{40pt}{1em}
With verb|rule{4pt}{10em}| rule{4pt}{10em}
with verb|dvertline{4pt}{10em}|
dvertline{4pt}{10em}
vspace{4pt}
With verb|rule[3ex]{4pt}{10em}| rule[3ex]{4pt}{10em}
with verb|dvertline[3ex]{4pt}{10em}|
dvertline[3ex]{4pt}{10em}
end{document}
Inspiration from this answer.
add a comment |
hdashrule
is only an approximation because the dots are little squares, but you can easily do what you need with TikZ.
I have created two commands, dhorline
(for horizontal rules) and dvertline
(for vertical ones), with the same syntax as rule
, where the dots are actual dots.
Here some examples:
documentclass{article}
usepackage{dashrule}
usepackage{tikz}
usetikzlibrary{decorations.markings}
newcommand{dhorline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#3
with {node[fill, circle, minimum width=#3, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0,#1) -- ++(#2,0);}}
newcommand{dvertline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#2
with {node[fill, circle, minimum width=#2, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0, #1) -- ++(0,#3);}}
begin{document}
With verb|rule{10em}{4pt}| rule{10em}{4pt}
With verb|hdashrule{10em}{4pt}{4pt}|
hdashrule{10em}{4pt}{4pt}
With verb|dhorline{10em}{4pt}| dhorline{10em}{4pt}
vspace{4pt}
With verb|rule[-4ex]{40pt}{1em}| rule[-4ex]{40pt}{1em}
vspace{4pt}
With verb|dhorline[-4ex]{40pt}{1em}| dhorline[-4ex]{40pt}{1em}
With verb|rule{4pt}{10em}| rule{4pt}{10em}
with verb|dvertline{4pt}{10em}|
dvertline{4pt}{10em}
vspace{4pt}
With verb|rule[3ex]{4pt}{10em}| rule[3ex]{4pt}{10em}
with verb|dvertline[3ex]{4pt}{10em}|
dvertline[3ex]{4pt}{10em}
end{document}
Inspiration from this answer.
add a comment |
hdashrule
is only an approximation because the dots are little squares, but you can easily do what you need with TikZ.
I have created two commands, dhorline
(for horizontal rules) and dvertline
(for vertical ones), with the same syntax as rule
, where the dots are actual dots.
Here some examples:
documentclass{article}
usepackage{dashrule}
usepackage{tikz}
usetikzlibrary{decorations.markings}
newcommand{dhorline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#3
with {node[fill, circle, minimum width=#3, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0,#1) -- ++(#2,0);}}
newcommand{dvertline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#2
with {node[fill, circle, minimum width=#2, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0, #1) -- ++(0,#3);}}
begin{document}
With verb|rule{10em}{4pt}| rule{10em}{4pt}
With verb|hdashrule{10em}{4pt}{4pt}|
hdashrule{10em}{4pt}{4pt}
With verb|dhorline{10em}{4pt}| dhorline{10em}{4pt}
vspace{4pt}
With verb|rule[-4ex]{40pt}{1em}| rule[-4ex]{40pt}{1em}
vspace{4pt}
With verb|dhorline[-4ex]{40pt}{1em}| dhorline[-4ex]{40pt}{1em}
With verb|rule{4pt}{10em}| rule{4pt}{10em}
with verb|dvertline{4pt}{10em}|
dvertline{4pt}{10em}
vspace{4pt}
With verb|rule[3ex]{4pt}{10em}| rule[3ex]{4pt}{10em}
with verb|dvertline[3ex]{4pt}{10em}|
dvertline[3ex]{4pt}{10em}
end{document}
Inspiration from this answer.
hdashrule
is only an approximation because the dots are little squares, but you can easily do what you need with TikZ.
I have created two commands, dhorline
(for horizontal rules) and dvertline
(for vertical ones), with the same syntax as rule
, where the dots are actual dots.
Here some examples:
documentclass{article}
usepackage{dashrule}
usepackage{tikz}
usetikzlibrary{decorations.markings}
newcommand{dhorline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#3
with {node[fill, circle, minimum width=#3, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0,#1) -- ++(#2,0);}}
newcommand{dvertline}[3][0]{%
tikz[baseline]{path[decoration={markings,
mark=between positions 0 and 1 step 2*#2
with {node[fill, circle, minimum width=#2, inner sep=0pt, anchor=south west] {};}},postaction={decorate}] (0, #1) -- ++(0,#3);}}
begin{document}
With verb|rule{10em}{4pt}| rule{10em}{4pt}
With verb|hdashrule{10em}{4pt}{4pt}|
hdashrule{10em}{4pt}{4pt}
With verb|dhorline{10em}{4pt}| dhorline{10em}{4pt}
vspace{4pt}
With verb|rule[-4ex]{40pt}{1em}| rule[-4ex]{40pt}{1em}
vspace{4pt}
With verb|dhorline[-4ex]{40pt}{1em}| dhorline[-4ex]{40pt}{1em}
With verb|rule{4pt}{10em}| rule{4pt}{10em}
with verb|dvertline{4pt}{10em}|
dvertline{4pt}{10em}
vspace{4pt}
With verb|rule[3ex]{4pt}{10em}| rule[3ex]{4pt}{10em}
with verb|dvertline[3ex]{4pt}{10em}|
dvertline[3ex]{4pt}{10em}
end{document}
Inspiration from this answer.
answered 24 mins ago
CarLaTeXCarLaTeX
31.3k449130
31.3k449130
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f447326%2fwhats-the-dotted-line-equivalent-of-rule%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
You can have an approximation with the
dashrule
package.– Bernard
Aug 23 '18 at 13:10