insert text in rule
up vote
2
down vote
favorite
I have difficulty writing a compact command that allows me to insert a text between two lines.
I read some links such as this and this, but each one treats the left and right line separately
documentclass{article}
usepackage{amsmath} %<<===
usepackage[normalem]{ulem}
usepackage{xcolor}
newcommandgsout{bgroupmarkoverwith{textcolor{gray}{rule[0.5ex]{2pt}{2.5pt}}}ULon}
newcommand*{sxrule}[1][3em]{textcolor{gray}{rule[0.5ex]{#1}{2.5pt}};}
begin{document}
sxrule Osservazioni gsout{hfill}
end{document}
Have any suggestions? thanks
rules text ulem
|
show 3 more comments
up vote
2
down vote
favorite
I have difficulty writing a compact command that allows me to insert a text between two lines.
I read some links such as this and this, but each one treats the left and right line separately
documentclass{article}
usepackage{amsmath} %<<===
usepackage[normalem]{ulem}
usepackage{xcolor}
newcommandgsout{bgroupmarkoverwith{textcolor{gray}{rule[0.5ex]{2pt}{2.5pt}}}ULon}
newcommand*{sxrule}[1][3em]{textcolor{gray}{rule[0.5ex]{#1}{2.5pt}};}
begin{document}
sxrule Osservazioni gsout{hfill}
end{document}
Have any suggestions? thanks
rules text ulem
Should it be on a separate line?
– Bernard
Nov 28 at 20:36
@Bernard a newcommand 'ruletext {...}rule'
– Antonio
Nov 28 at 20:42
I don't see exactly what you're trying to obtain. Could you explain more, or post a hand-made sketch?
– Bernard
Nov 28 at 20:47
1
I can't compile this code – there's an error messageright aftersxrule
.
– Bernard
Nov 29 at 0:10
1
The compilation error in the MWE is caused by;
as this is math-mode spacing so it needs to typed as$;$
.
– Andrew
Nov 29 at 9:15
|
show 3 more comments
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have difficulty writing a compact command that allows me to insert a text between two lines.
I read some links such as this and this, but each one treats the left and right line separately
documentclass{article}
usepackage{amsmath} %<<===
usepackage[normalem]{ulem}
usepackage{xcolor}
newcommandgsout{bgroupmarkoverwith{textcolor{gray}{rule[0.5ex]{2pt}{2.5pt}}}ULon}
newcommand*{sxrule}[1][3em]{textcolor{gray}{rule[0.5ex]{#1}{2.5pt}};}
begin{document}
sxrule Osservazioni gsout{hfill}
end{document}
Have any suggestions? thanks
rules text ulem
I have difficulty writing a compact command that allows me to insert a text between two lines.
I read some links such as this and this, but each one treats the left and right line separately
documentclass{article}
usepackage{amsmath} %<<===
usepackage[normalem]{ulem}
usepackage{xcolor}
newcommandgsout{bgroupmarkoverwith{textcolor{gray}{rule[0.5ex]{2pt}{2.5pt}}}ULon}
newcommand*{sxrule}[1][3em]{textcolor{gray}{rule[0.5ex]{#1}{2.5pt}};}
begin{document}
sxrule Osservazioni gsout{hfill}
end{document}
Have any suggestions? thanks
rules text ulem
rules text ulem
edited Nov 29 at 5:48
asked Nov 28 at 20:30
Antonio
14811
14811
Should it be on a separate line?
– Bernard
Nov 28 at 20:36
@Bernard a newcommand 'ruletext {...}rule'
– Antonio
Nov 28 at 20:42
I don't see exactly what you're trying to obtain. Could you explain more, or post a hand-made sketch?
– Bernard
Nov 28 at 20:47
1
I can't compile this code – there's an error messageright aftersxrule
.
– Bernard
Nov 29 at 0:10
1
The compilation error in the MWE is caused by;
as this is math-mode spacing so it needs to typed as$;$
.
– Andrew
Nov 29 at 9:15
|
show 3 more comments
Should it be on a separate line?
– Bernard
Nov 28 at 20:36
@Bernard a newcommand 'ruletext {...}rule'
– Antonio
Nov 28 at 20:42
I don't see exactly what you're trying to obtain. Could you explain more, or post a hand-made sketch?
– Bernard
Nov 28 at 20:47
1
I can't compile this code – there's an error messageright aftersxrule
.
– Bernard
Nov 29 at 0:10
1
The compilation error in the MWE is caused by;
as this is math-mode spacing so it needs to typed as$;$
.
– Andrew
Nov 29 at 9:15
Should it be on a separate line?
– Bernard
Nov 28 at 20:36
Should it be on a separate line?
– Bernard
Nov 28 at 20:36
@Bernard a newcommand 'ruletext {...}rule'
– Antonio
Nov 28 at 20:42
@Bernard a newcommand 'ruletext {...}rule'
– Antonio
Nov 28 at 20:42
I don't see exactly what you're trying to obtain. Could you explain more, or post a hand-made sketch?
– Bernard
Nov 28 at 20:47
I don't see exactly what you're trying to obtain. Could you explain more, or post a hand-made sketch?
– Bernard
Nov 28 at 20:47
1
1
I can't compile this code – there's an error messageright after
sxrule
.– Bernard
Nov 29 at 0:10
I can't compile this code – there's an error messageright after
sxrule
.– Bernard
Nov 29 at 0:10
1
1
The compilation error in the MWE is caused by
;
as this is math-mode spacing so it needs to typed as $;$
.– Andrew
Nov 29 at 9:15
The compilation error in the MWE is caused by
;
as this is math-mode spacing so it needs to typed as $;$
.– Andrew
Nov 29 at 9:15
|
show 3 more comments
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
Perhaps something like this:
Here's the code:
documentclass{article}
usepackage{xcolor}
usepackage{lipsum}
newlengthsxrulelength
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},#2,%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
begin{document}
lipsum
sxrule{Osservazioni}
lipsum
end{document}
The sxrule
macro has an optional argument that controls the length of the "left hand" line. As in the OP, this defaults to 3em
.
Judging from the comments, perhaps the definition
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},textbf{#2},%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
is better as now sxrule{Osservazioni}
puts "Osservazioni" in bold:
interesting solution, I was trying with this but I was wrong. The color of the text and lines must be independent. The line must be gray (or another color), while the text must be black
– Antonio
Nov 29 at 6:06
I found another problem. if I use this command, all the text under the command stays gray :sxruledx{textbf{Osservazioni}}\ lipsum[3]
– Antonio
Nov 29 at 6:26
1
@Antonio See my edit to the colour of the text in the midle of the lines (sorry, I thought that you wanted it gray as well:). As above, the colour after thesxrule
should be black, not, gray. Finally, use a blank line instead of\
after thesxrule
...alternatively make this part of the macro definition.
– Andrew
Nov 29 at 9:19
my alternative solution :newlengthsxrulelength newcommandsxruledx[2][2.5em]{color{black}vspace{0.25cm}% settowidthsxrulelength{$,$#2$,$}% noindent% textcolor{gray}{rule[0.5ex]{#1}{1.5pt}textcolor{blue}{$,$#2$,$}% rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{1.5pt}{}vspace{0.25cm}}% }
– Antonio
Nov 29 at 17:52
add a comment |
up vote
2
down vote
documentclass{article}
usepackage[normalem]{ulem}
usepackage{xcolor,lipsum}
newcommandfilrule{{color{gray}{leaders
hrule height .7ex depth -.4ex hfill }hskip .0em}}
defruledworld#1{bigskipnoindentfilrulequad%
#1quadfilrulebigskippar}
begin{document}
ruledworld{Osservazioni}
lipsum[2]
ruledworld{Grandi conclusioni}
lipsum[3]
end{document}
If you do not want the word centered but start at a fixed point, change the first filrule
in the definition of ruledworld
by a normal rule
. Or You can left a single filrule
on the left, but a few on the right (e.g., filrulefilrulefilrule
) to have the word centered with respect some point (at the 25% of the line, in that example).
if I enterrule
, I get this error : Undefined control sequence. ruledworld{Osservazioni} and Command rule already defined. ...ht .7ex depth -.4ex hfill }hskip .0em}}
– Antonio
Nov 29 at 5:59
1
@Antonio Sorry, I mean "rule
" with their mandatory and optional arguments, just as you used in your minimal working example (e.g .rule[0.5ex]{2pt}{2.5pt}
) but obviously changing these arguments as you need. For example:rule[.4ex]{1em}{.3ex}
– Fran
Nov 29 at 9:33
1
@Antonio And obviously you need to take care also of add a gray color for this rule, as the color was defined only inside thefilrule
definition.
– Fran
Nov 29 at 9:43
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Perhaps something like this:
Here's the code:
documentclass{article}
usepackage{xcolor}
usepackage{lipsum}
newlengthsxrulelength
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},#2,%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
begin{document}
lipsum
sxrule{Osservazioni}
lipsum
end{document}
The sxrule
macro has an optional argument that controls the length of the "left hand" line. As in the OP, this defaults to 3em
.
Judging from the comments, perhaps the definition
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},textbf{#2},%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
is better as now sxrule{Osservazioni}
puts "Osservazioni" in bold:
interesting solution, I was trying with this but I was wrong. The color of the text and lines must be independent. The line must be gray (or another color), while the text must be black
– Antonio
Nov 29 at 6:06
I found another problem. if I use this command, all the text under the command stays gray :sxruledx{textbf{Osservazioni}}\ lipsum[3]
– Antonio
Nov 29 at 6:26
1
@Antonio See my edit to the colour of the text in the midle of the lines (sorry, I thought that you wanted it gray as well:). As above, the colour after thesxrule
should be black, not, gray. Finally, use a blank line instead of\
after thesxrule
...alternatively make this part of the macro definition.
– Andrew
Nov 29 at 9:19
my alternative solution :newlengthsxrulelength newcommandsxruledx[2][2.5em]{color{black}vspace{0.25cm}% settowidthsxrulelength{$,$#2$,$}% noindent% textcolor{gray}{rule[0.5ex]{#1}{1.5pt}textcolor{blue}{$,$#2$,$}% rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{1.5pt}{}vspace{0.25cm}}% }
– Antonio
Nov 29 at 17:52
add a comment |
up vote
2
down vote
accepted
Perhaps something like this:
Here's the code:
documentclass{article}
usepackage{xcolor}
usepackage{lipsum}
newlengthsxrulelength
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},#2,%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
begin{document}
lipsum
sxrule{Osservazioni}
lipsum
end{document}
The sxrule
macro has an optional argument that controls the length of the "left hand" line. As in the OP, this defaults to 3em
.
Judging from the comments, perhaps the definition
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},textbf{#2},%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
is better as now sxrule{Osservazioni}
puts "Osservazioni" in bold:
interesting solution, I was trying with this but I was wrong. The color of the text and lines must be independent. The line must be gray (or another color), while the text must be black
– Antonio
Nov 29 at 6:06
I found another problem. if I use this command, all the text under the command stays gray :sxruledx{textbf{Osservazioni}}\ lipsum[3]
– Antonio
Nov 29 at 6:26
1
@Antonio See my edit to the colour of the text in the midle of the lines (sorry, I thought that you wanted it gray as well:). As above, the colour after thesxrule
should be black, not, gray. Finally, use a blank line instead of\
after thesxrule
...alternatively make this part of the macro definition.
– Andrew
Nov 29 at 9:19
my alternative solution :newlengthsxrulelength newcommandsxruledx[2][2.5em]{color{black}vspace{0.25cm}% settowidthsxrulelength{$,$#2$,$}% noindent% textcolor{gray}{rule[0.5ex]{#1}{1.5pt}textcolor{blue}{$,$#2$,$}% rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{1.5pt}{}vspace{0.25cm}}% }
– Antonio
Nov 29 at 17:52
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Perhaps something like this:
Here's the code:
documentclass{article}
usepackage{xcolor}
usepackage{lipsum}
newlengthsxrulelength
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},#2,%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
begin{document}
lipsum
sxrule{Osservazioni}
lipsum
end{document}
The sxrule
macro has an optional argument that controls the length of the "left hand" line. As in the OP, this defaults to 3em
.
Judging from the comments, perhaps the definition
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},textbf{#2},%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
is better as now sxrule{Osservazioni}
puts "Osservazioni" in bold:
Perhaps something like this:
Here's the code:
documentclass{article}
usepackage{xcolor}
usepackage{lipsum}
newlengthsxrulelength
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},#2,%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
begin{document}
lipsum
sxrule{Osservazioni}
lipsum
end{document}
The sxrule
macro has an optional argument that controls the length of the "left hand" line. As in the OP, this defaults to 3em
.
Judging from the comments, perhaps the definition
newcommandsxrule[2][3em]{%
settowidthsxrulelength{,#2,}%
noindent%
textcolor{gray}{rule[0.5ex]{#1}{2.5pt}},textbf{#2},%
textcolor{gray}{rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{2.5pt}}%
}
is better as now sxrule{Osservazioni}
puts "Osservazioni" in bold:
edited Nov 29 at 9:17
answered Nov 29 at 0:53
Andrew
30.1k34380
30.1k34380
interesting solution, I was trying with this but I was wrong. The color of the text and lines must be independent. The line must be gray (or another color), while the text must be black
– Antonio
Nov 29 at 6:06
I found another problem. if I use this command, all the text under the command stays gray :sxruledx{textbf{Osservazioni}}\ lipsum[3]
– Antonio
Nov 29 at 6:26
1
@Antonio See my edit to the colour of the text in the midle of the lines (sorry, I thought that you wanted it gray as well:). As above, the colour after thesxrule
should be black, not, gray. Finally, use a blank line instead of\
after thesxrule
...alternatively make this part of the macro definition.
– Andrew
Nov 29 at 9:19
my alternative solution :newlengthsxrulelength newcommandsxruledx[2][2.5em]{color{black}vspace{0.25cm}% settowidthsxrulelength{$,$#2$,$}% noindent% textcolor{gray}{rule[0.5ex]{#1}{1.5pt}textcolor{blue}{$,$#2$,$}% rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{1.5pt}{}vspace{0.25cm}}% }
– Antonio
Nov 29 at 17:52
add a comment |
interesting solution, I was trying with this but I was wrong. The color of the text and lines must be independent. The line must be gray (or another color), while the text must be black
– Antonio
Nov 29 at 6:06
I found another problem. if I use this command, all the text under the command stays gray :sxruledx{textbf{Osservazioni}}\ lipsum[3]
– Antonio
Nov 29 at 6:26
1
@Antonio See my edit to the colour of the text in the midle of the lines (sorry, I thought that you wanted it gray as well:). As above, the colour after thesxrule
should be black, not, gray. Finally, use a blank line instead of\
after thesxrule
...alternatively make this part of the macro definition.
– Andrew
Nov 29 at 9:19
my alternative solution :newlengthsxrulelength newcommandsxruledx[2][2.5em]{color{black}vspace{0.25cm}% settowidthsxrulelength{$,$#2$,$}% noindent% textcolor{gray}{rule[0.5ex]{#1}{1.5pt}textcolor{blue}{$,$#2$,$}% rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{1.5pt}{}vspace{0.25cm}}% }
– Antonio
Nov 29 at 17:52
interesting solution, I was trying with this but I was wrong. The color of the text and lines must be independent. The line must be gray (or another color), while the text must be black
– Antonio
Nov 29 at 6:06
interesting solution, I was trying with this but I was wrong. The color of the text and lines must be independent. The line must be gray (or another color), while the text must be black
– Antonio
Nov 29 at 6:06
I found another problem. if I use this command, all the text under the command stays gray :
sxruledx{textbf{Osservazioni}}\ lipsum[3]
– Antonio
Nov 29 at 6:26
I found another problem. if I use this command, all the text under the command stays gray :
sxruledx{textbf{Osservazioni}}\ lipsum[3]
– Antonio
Nov 29 at 6:26
1
1
@Antonio See my edit to the colour of the text in the midle of the lines (sorry, I thought that you wanted it gray as well:). As above, the colour after the
sxrule
should be black, not, gray. Finally, use a blank line instead of \
after the sxrule
...alternatively make this part of the macro definition.– Andrew
Nov 29 at 9:19
@Antonio See my edit to the colour of the text in the midle of the lines (sorry, I thought that you wanted it gray as well:). As above, the colour after the
sxrule
should be black, not, gray. Finally, use a blank line instead of \
after the sxrule
...alternatively make this part of the macro definition.– Andrew
Nov 29 at 9:19
my alternative solution :
newlengthsxrulelength newcommandsxruledx[2][2.5em]{color{black}vspace{0.25cm}% settowidthsxrulelength{$,$#2$,$}% noindent% textcolor{gray}{rule[0.5ex]{#1}{1.5pt}textcolor{blue}{$,$#2$,$}% rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{1.5pt}{}vspace{0.25cm}}% }
– Antonio
Nov 29 at 17:52
my alternative solution :
newlengthsxrulelength newcommandsxruledx[2][2.5em]{color{black}vspace{0.25cm}% settowidthsxrulelength{$,$#2$,$}% noindent% textcolor{gray}{rule[0.5ex]{#1}{1.5pt}textcolor{blue}{$,$#2$,$}% rule[0.5ex]{dimexprlinewidth-sxrulelength-#1relax}{1.5pt}{}vspace{0.25cm}}% }
– Antonio
Nov 29 at 17:52
add a comment |
up vote
2
down vote
documentclass{article}
usepackage[normalem]{ulem}
usepackage{xcolor,lipsum}
newcommandfilrule{{color{gray}{leaders
hrule height .7ex depth -.4ex hfill }hskip .0em}}
defruledworld#1{bigskipnoindentfilrulequad%
#1quadfilrulebigskippar}
begin{document}
ruledworld{Osservazioni}
lipsum[2]
ruledworld{Grandi conclusioni}
lipsum[3]
end{document}
If you do not want the word centered but start at a fixed point, change the first filrule
in the definition of ruledworld
by a normal rule
. Or You can left a single filrule
on the left, but a few on the right (e.g., filrulefilrulefilrule
) to have the word centered with respect some point (at the 25% of the line, in that example).
if I enterrule
, I get this error : Undefined control sequence. ruledworld{Osservazioni} and Command rule already defined. ...ht .7ex depth -.4ex hfill }hskip .0em}}
– Antonio
Nov 29 at 5:59
1
@Antonio Sorry, I mean "rule
" with their mandatory and optional arguments, just as you used in your minimal working example (e.g .rule[0.5ex]{2pt}{2.5pt}
) but obviously changing these arguments as you need. For example:rule[.4ex]{1em}{.3ex}
– Fran
Nov 29 at 9:33
1
@Antonio And obviously you need to take care also of add a gray color for this rule, as the color was defined only inside thefilrule
definition.
– Fran
Nov 29 at 9:43
add a comment |
up vote
2
down vote
documentclass{article}
usepackage[normalem]{ulem}
usepackage{xcolor,lipsum}
newcommandfilrule{{color{gray}{leaders
hrule height .7ex depth -.4ex hfill }hskip .0em}}
defruledworld#1{bigskipnoindentfilrulequad%
#1quadfilrulebigskippar}
begin{document}
ruledworld{Osservazioni}
lipsum[2]
ruledworld{Grandi conclusioni}
lipsum[3]
end{document}
If you do not want the word centered but start at a fixed point, change the first filrule
in the definition of ruledworld
by a normal rule
. Or You can left a single filrule
on the left, but a few on the right (e.g., filrulefilrulefilrule
) to have the word centered with respect some point (at the 25% of the line, in that example).
if I enterrule
, I get this error : Undefined control sequence. ruledworld{Osservazioni} and Command rule already defined. ...ht .7ex depth -.4ex hfill }hskip .0em}}
– Antonio
Nov 29 at 5:59
1
@Antonio Sorry, I mean "rule
" with their mandatory and optional arguments, just as you used in your minimal working example (e.g .rule[0.5ex]{2pt}{2.5pt}
) but obviously changing these arguments as you need. For example:rule[.4ex]{1em}{.3ex}
– Fran
Nov 29 at 9:33
1
@Antonio And obviously you need to take care also of add a gray color for this rule, as the color was defined only inside thefilrule
definition.
– Fran
Nov 29 at 9:43
add a comment |
up vote
2
down vote
up vote
2
down vote
documentclass{article}
usepackage[normalem]{ulem}
usepackage{xcolor,lipsum}
newcommandfilrule{{color{gray}{leaders
hrule height .7ex depth -.4ex hfill }hskip .0em}}
defruledworld#1{bigskipnoindentfilrulequad%
#1quadfilrulebigskippar}
begin{document}
ruledworld{Osservazioni}
lipsum[2]
ruledworld{Grandi conclusioni}
lipsum[3]
end{document}
If you do not want the word centered but start at a fixed point, change the first filrule
in the definition of ruledworld
by a normal rule
. Or You can left a single filrule
on the left, but a few on the right (e.g., filrulefilrulefilrule
) to have the word centered with respect some point (at the 25% of the line, in that example).
documentclass{article}
usepackage[normalem]{ulem}
usepackage{xcolor,lipsum}
newcommandfilrule{{color{gray}{leaders
hrule height .7ex depth -.4ex hfill }hskip .0em}}
defruledworld#1{bigskipnoindentfilrulequad%
#1quadfilrulebigskippar}
begin{document}
ruledworld{Osservazioni}
lipsum[2]
ruledworld{Grandi conclusioni}
lipsum[3]
end{document}
If you do not want the word centered but start at a fixed point, change the first filrule
in the definition of ruledworld
by a normal rule
. Or You can left a single filrule
on the left, but a few on the right (e.g., filrulefilrulefilrule
) to have the word centered with respect some point (at the 25% of the line, in that example).
edited Nov 29 at 1:16
answered Nov 29 at 0:46
Fran
50.2k6111174
50.2k6111174
if I enterrule
, I get this error : Undefined control sequence. ruledworld{Osservazioni} and Command rule already defined. ...ht .7ex depth -.4ex hfill }hskip .0em}}
– Antonio
Nov 29 at 5:59
1
@Antonio Sorry, I mean "rule
" with their mandatory and optional arguments, just as you used in your minimal working example (e.g .rule[0.5ex]{2pt}{2.5pt}
) but obviously changing these arguments as you need. For example:rule[.4ex]{1em}{.3ex}
– Fran
Nov 29 at 9:33
1
@Antonio And obviously you need to take care also of add a gray color for this rule, as the color was defined only inside thefilrule
definition.
– Fran
Nov 29 at 9:43
add a comment |
if I enterrule
, I get this error : Undefined control sequence. ruledworld{Osservazioni} and Command rule already defined. ...ht .7ex depth -.4ex hfill }hskip .0em}}
– Antonio
Nov 29 at 5:59
1
@Antonio Sorry, I mean "rule
" with their mandatory and optional arguments, just as you used in your minimal working example (e.g .rule[0.5ex]{2pt}{2.5pt}
) but obviously changing these arguments as you need. For example:rule[.4ex]{1em}{.3ex}
– Fran
Nov 29 at 9:33
1
@Antonio And obviously you need to take care also of add a gray color for this rule, as the color was defined only inside thefilrule
definition.
– Fran
Nov 29 at 9:43
if I enter
rule
, I get this error : Undefined control sequence. ruledworld{Osservazioni} and Command rule already defined. ...ht .7ex depth -.4ex hfill }hskip .0em}}– Antonio
Nov 29 at 5:59
if I enter
rule
, I get this error : Undefined control sequence. ruledworld{Osservazioni} and Command rule already defined. ...ht .7ex depth -.4ex hfill }hskip .0em}}– Antonio
Nov 29 at 5:59
1
1
@Antonio Sorry, I mean "
rule
" with their mandatory and optional arguments, just as you used in your minimal working example (e.g . rule[0.5ex]{2pt}{2.5pt}
) but obviously changing these arguments as you need. For example: rule[.4ex]{1em}{.3ex}
– Fran
Nov 29 at 9:33
@Antonio Sorry, I mean "
rule
" with their mandatory and optional arguments, just as you used in your minimal working example (e.g . rule[0.5ex]{2pt}{2.5pt}
) but obviously changing these arguments as you need. For example: rule[.4ex]{1em}{.3ex}
– Fran
Nov 29 at 9:33
1
1
@Antonio And obviously you need to take care also of add a gray color for this rule, as the color was defined only inside the
filrule
definition.– Fran
Nov 29 at 9:43
@Antonio And obviously you need to take care also of add a gray color for this rule, as the color was defined only inside the
filrule
definition.– Fran
Nov 29 at 9:43
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f462245%2finsert-text-in-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
Should it be on a separate line?
– Bernard
Nov 28 at 20:36
@Bernard a newcommand 'ruletext {...}rule'
– Antonio
Nov 28 at 20:42
I don't see exactly what you're trying to obtain. Could you explain more, or post a hand-made sketch?
– Bernard
Nov 28 at 20:47
1
I can't compile this code – there's an error messageright after
sxrule
.– Bernard
Nov 29 at 0:10
1
The compilation error in the MWE is caused by
;
as this is math-mode spacing so it needs to typed as$;$
.– Andrew
Nov 29 at 9:15