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:



Calendar screenshot



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?










share|improve this question









New contributor




Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • 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















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:



Calendar screenshot



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?










share|improve this question









New contributor




Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • 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













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:



Calendar screenshot



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?










share|improve this question









New contributor




Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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:



Calendar screenshot



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






share|improve this question









New contributor




Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 hours ago





















New contributor




Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









Brad

1063




1063




New contributor




Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Brad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • 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










  • 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















active

oldest

votes











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',
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
});


}
});






Brad is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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






























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.










draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt