Multiple lines of text with rule?
up vote
1
down vote
favorite
I'm editing a tex file which generates a calendar. It works great, and I want to add text to a day on the calendar. The calendar looks like this currently:
Each cell of the calendar is generated with a command:
documentclass[12pt]{article}
usepackage{amsmath}
usepackage{color}
definecolor{WriteBgSec}{gray}{0.9}
definecolor{Black}{gray}{0}
begin{document}
newlength{DayColWidthMP}
setlength{DayColWidthMP}{0.25textwidth}
newcommand{vstrut}[2][0pt]{rule[#1]{0pt}{#2}}
% Cell format on Monthly Planner
% - template: #1 - color for day number and left rule, #2 - date number
newcommand{CellFormatMPTemplate}[2]{%
% gray bar at the top, ~ half row width
makebox[0pt][l]{smash[b]{color{WriteBgSec}rule[0.4baselineskip]{DayColWidthMP}{0.5baselineskip}}}%
% thin rule to the left almost full heigh
{color{#1}rule[-6baselineskip]{arrayrulewidth}{6baselineskip}}%
% right-aligned date numbers
makebox[2.7ex]{hspace{fill}{color{#1}#2}}%
% the column is centered so force the previous box to the left
hspace*{fill}%
break%
% white last row, makes the left sided line open/incomplete (does not join the one below)
vstrut{1em}}
% These calls are put in a tabular* to make a calendar
CellFormatMPTemplate{Black}{2}
end{document}
I'd like to add holidays below the day number, such as "New Year's Day", "Company Picnic" etc. I cannot for the life of me figure out how to get text to the right of that rule
. I'm not finding much documentation, but I suspect rule
doesn't support this concept of multiple lines of text inline with it?
What options do I have? Should I do something else to draw the line? Can I do something else to get multiple lines of text here?
rules
New contributor
add a comment |
up vote
1
down vote
favorite
I'm editing a tex file which generates a calendar. It works great, and I want to add text to a day on the calendar. The calendar looks like this currently:
Each cell of the calendar is generated with a command:
documentclass[12pt]{article}
usepackage{amsmath}
usepackage{color}
definecolor{WriteBgSec}{gray}{0.9}
definecolor{Black}{gray}{0}
begin{document}
newlength{DayColWidthMP}
setlength{DayColWidthMP}{0.25textwidth}
newcommand{vstrut}[2][0pt]{rule[#1]{0pt}{#2}}
% Cell format on Monthly Planner
% - template: #1 - color for day number and left rule, #2 - date number
newcommand{CellFormatMPTemplate}[2]{%
% gray bar at the top, ~ half row width
makebox[0pt][l]{smash[b]{color{WriteBgSec}rule[0.4baselineskip]{DayColWidthMP}{0.5baselineskip}}}%
% thin rule to the left almost full heigh
{color{#1}rule[-6baselineskip]{arrayrulewidth}{6baselineskip}}%
% right-aligned date numbers
makebox[2.7ex]{hspace{fill}{color{#1}#2}}%
% the column is centered so force the previous box to the left
hspace*{fill}%
break%
% white last row, makes the left sided line open/incomplete (does not join the one below)
vstrut{1em}}
% These calls are put in a tabular* to make a calendar
CellFormatMPTemplate{Black}{2}
end{document}
I'd like to add holidays below the day number, such as "New Year's Day", "Company Picnic" etc. I cannot for the life of me figure out how to get text to the right of that rule
. I'm not finding much documentation, but I suspect rule
doesn't support this concept of multiple lines of text inline with it?
What options do I have? Should I do something else to draw the line? Can I do something else to get multiple lines of text here?
rules
New contributor
Welcome to TeX.SE! Please make your code snippet compilable ...
– Kurt
2 hours ago
Thanks @Kurt, edited.
– Brad
2 hours ago
1
Can you say or indicate with a diagram exactly where you want to put the text? Or is it that you want to put the dates slightly lower so that the rules don't cut through them?
– Andrew
2 hours ago
Sorry this wasn't more clear @Andrew! I've updated the request - I want to show holidays and similar events below the day of month number. I can try to photoshop something if that would be helpful
– Brad
2 hours ago
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm editing a tex file which generates a calendar. It works great, and I want to add text to a day on the calendar. The calendar looks like this currently:
Each cell of the calendar is generated with a command:
documentclass[12pt]{article}
usepackage{amsmath}
usepackage{color}
definecolor{WriteBgSec}{gray}{0.9}
definecolor{Black}{gray}{0}
begin{document}
newlength{DayColWidthMP}
setlength{DayColWidthMP}{0.25textwidth}
newcommand{vstrut}[2][0pt]{rule[#1]{0pt}{#2}}
% Cell format on Monthly Planner
% - template: #1 - color for day number and left rule, #2 - date number
newcommand{CellFormatMPTemplate}[2]{%
% gray bar at the top, ~ half row width
makebox[0pt][l]{smash[b]{color{WriteBgSec}rule[0.4baselineskip]{DayColWidthMP}{0.5baselineskip}}}%
% thin rule to the left almost full heigh
{color{#1}rule[-6baselineskip]{arrayrulewidth}{6baselineskip}}%
% right-aligned date numbers
makebox[2.7ex]{hspace{fill}{color{#1}#2}}%
% the column is centered so force the previous box to the left
hspace*{fill}%
break%
% white last row, makes the left sided line open/incomplete (does not join the one below)
vstrut{1em}}
% These calls are put in a tabular* to make a calendar
CellFormatMPTemplate{Black}{2}
end{document}
I'd like to add holidays below the day number, such as "New Year's Day", "Company Picnic" etc. I cannot for the life of me figure out how to get text to the right of that rule
. I'm not finding much documentation, but I suspect rule
doesn't support this concept of multiple lines of text inline with it?
What options do I have? Should I do something else to draw the line? Can I do something else to get multiple lines of text here?
rules
New contributor
I'm editing a tex file which generates a calendar. It works great, and I want to add text to a day on the calendar. The calendar looks like this currently:
Each cell of the calendar is generated with a command:
documentclass[12pt]{article}
usepackage{amsmath}
usepackage{color}
definecolor{WriteBgSec}{gray}{0.9}
definecolor{Black}{gray}{0}
begin{document}
newlength{DayColWidthMP}
setlength{DayColWidthMP}{0.25textwidth}
newcommand{vstrut}[2][0pt]{rule[#1]{0pt}{#2}}
% Cell format on Monthly Planner
% - template: #1 - color for day number and left rule, #2 - date number
newcommand{CellFormatMPTemplate}[2]{%
% gray bar at the top, ~ half row width
makebox[0pt][l]{smash[b]{color{WriteBgSec}rule[0.4baselineskip]{DayColWidthMP}{0.5baselineskip}}}%
% thin rule to the left almost full heigh
{color{#1}rule[-6baselineskip]{arrayrulewidth}{6baselineskip}}%
% right-aligned date numbers
makebox[2.7ex]{hspace{fill}{color{#1}#2}}%
% the column is centered so force the previous box to the left
hspace*{fill}%
break%
% white last row, makes the left sided line open/incomplete (does not join the one below)
vstrut{1em}}
% These calls are put in a tabular* to make a calendar
CellFormatMPTemplate{Black}{2}
end{document}
I'd like to add holidays below the day number, such as "New Year's Day", "Company Picnic" etc. I cannot for the life of me figure out how to get text to the right of that rule
. I'm not finding much documentation, but I suspect rule
doesn't support this concept of multiple lines of text inline with it?
What options do I have? Should I do something else to draw the line? Can I do something else to get multiple lines of text here?
rules
rules
New contributor
New contributor
edited 2 hours ago
New contributor
asked 2 hours ago
Brad
1063
1063
New contributor
New contributor
Welcome to TeX.SE! Please make your code snippet compilable ...
– Kurt
2 hours ago
Thanks @Kurt, edited.
– Brad
2 hours ago
1
Can you say or indicate with a diagram exactly where you want to put the text? Or is it that you want to put the dates slightly lower so that the rules don't cut through them?
– Andrew
2 hours ago
Sorry this wasn't more clear @Andrew! I've updated the request - I want to show holidays and similar events below the day of month number. I can try to photoshop something if that would be helpful
– Brad
2 hours ago
add a comment |
Welcome to TeX.SE! Please make your code snippet compilable ...
– Kurt
2 hours ago
Thanks @Kurt, edited.
– Brad
2 hours ago
1
Can you say or indicate with a diagram exactly where you want to put the text? Or is it that you want to put the dates slightly lower so that the rules don't cut through them?
– Andrew
2 hours ago
Sorry this wasn't more clear @Andrew! I've updated the request - I want to show holidays and similar events below the day of month number. I can try to photoshop something if that would be helpful
– Brad
2 hours ago
Welcome to TeX.SE! Please make your code snippet compilable ...
– Kurt
2 hours ago
Welcome to TeX.SE! Please make your code snippet compilable ...
– Kurt
2 hours ago
Thanks @Kurt, edited.
– Brad
2 hours ago
Thanks @Kurt, edited.
– Brad
2 hours ago
1
1
Can you say or indicate with a diagram exactly where you want to put the text? Or is it that you want to put the dates slightly lower so that the rules don't cut through them?
– Andrew
2 hours ago
Can you say or indicate with a diagram exactly where you want to put the text? Or is it that you want to put the dates slightly lower so that the rules don't cut through them?
– Andrew
2 hours ago
Sorry this wasn't more clear @Andrew! I've updated the request - I want to show holidays and similar events below the day of month number. I can try to photoshop something if that would be helpful
– Brad
2 hours ago
Sorry this wasn't more clear @Andrew! I've updated the request - I want to show holidays and similar events below the day of month number. I can try to photoshop something if that would be helpful
– Brad
2 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Brad is a new contributor. Be nice, and check out our Code of Conduct.
Brad is a new contributor. Be nice, and check out our Code of Conduct.
Brad is a new contributor. Be nice, and check out our Code of Conduct.
Brad is a new contributor. Be nice, and check out our Code of Conduct.
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%2f463084%2fmultiple-lines-of-text-with-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
Welcome to TeX.SE! Please make your code snippet compilable ...
– Kurt
2 hours ago
Thanks @Kurt, edited.
– Brad
2 hours ago
1
Can you say or indicate with a diagram exactly where you want to put the text? Or is it that you want to put the dates slightly lower so that the rules don't cut through them?
– Andrew
2 hours ago
Sorry this wasn't more clear @Andrew! I've updated the request - I want to show holidays and similar events below the day of month number. I can try to photoshop something if that would be helpful
– Brad
2 hours ago