Make a p-type multicol span to full width Announcing the arrival of Valued Associate #679:...
I'm having difficulty getting my players to do stuff in a sandbox campaign
Unexpected result with right shift after bitwise negation
Are my PIs rude or am I just being too sensitive?
What items from the Roman-age tech-level could be used to deter all creatures from entering a small area?
Why does tar appear to skip file contents when output file is /dev/null?
How should I respond to a player wanting to catch a sword between their hands?
Autumning in love
Was credit for the black hole image misattributed?
What computer would be fastest for Mathematica Home Edition?
If A makes B more likely then B makes A more likely"
How are presidential pardons supposed to be used?
How to rotate it perfectly?
How do I automatically answer y in bash script?
Is there folklore associating late breastfeeding with low intelligence and/or gullibility?
How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time
Do we know why communications with Beresheet and NASA were lost during the attempted landing of the Moon lander?
How to say that you spent the night with someone, you were only sleeping and nothing else?
Losing the Initialization Vector in Cipher Block Chaining
Working around an AWS network ACL rule limit
How do I keep my slimes from escaping their pens?
Classification of bundles, Postnikov towers, obstruction theory, local coefficients
Stop battery usage [Ubuntu 18]
Estimate capacitor parameters
Statistical model of ligand substitution
Make a p-type multicol span to full width
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Multicolumn width calculated for lX columnsVertical alignment in multicolTable (page width) in multicol?Multicol cheatsheet formatspan x columns in y multicol environmentSpan text across columns in multicolHow does multicol split?one-column multicol environmentEnumerate and multicolMulticol tables with imagesmulticol interline space problems
I'm using longtabu
in my resume to display the content in 3 rows. In the first row of type l
is the date, the second row contains the description (graduation, team member, ...) and is of the type X
(which I redefined to type L
to be left aligned) and the last row is of the type r
and contains the place (society, university, ...).
In the second row, there should be a multicol
spreading across the L
and the r
column. Here I want to print the graduation paper title or what exactly I've done as an employee. As I need the ability to put in a newline
in here, I need the p
type for the multicol
, but unfortunately this goes ahead with putting in a width for the p{}
. I don't know that width as it depends on the content of the previous line so I want to do it automatically.
How can I achieve this result? Having a multicol
spreading across the two columns as with the l
type, but also allowing the use of newline
?
MWE
documentclass{article}
usepackage[utf8]{inputenc}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
end{entrylist}
end{document}
multicol tabu
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm using longtabu
in my resume to display the content in 3 rows. In the first row of type l
is the date, the second row contains the description (graduation, team member, ...) and is of the type X
(which I redefined to type L
to be left aligned) and the last row is of the type r
and contains the place (society, university, ...).
In the second row, there should be a multicol
spreading across the L
and the r
column. Here I want to print the graduation paper title or what exactly I've done as an employee. As I need the ability to put in a newline
in here, I need the p
type for the multicol
, but unfortunately this goes ahead with putting in a width for the p{}
. I don't know that width as it depends on the content of the previous line so I want to do it automatically.
How can I achieve this result? Having a multicol
spreading across the two columns as with the l
type, but also allowing the use of newline
?
MWE
documentclass{article}
usepackage[utf8]{inputenc}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
end{entrylist}
end{document}
multicol tabu
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Does this answer help you? tex.stackexchange.com/a/76192/134144
– leandriis
Nov 20 '17 at 10:23
I copied the exact code and I'm getting the following error:Incomplete ifx; all text was ignored after line 78.
. Could you please provide an MWE showing how this should be incorporated to my existing code? Thanks in advance.
– Sam
Nov 20 '17 at 15:13
add a comment |
I'm using longtabu
in my resume to display the content in 3 rows. In the first row of type l
is the date, the second row contains the description (graduation, team member, ...) and is of the type X
(which I redefined to type L
to be left aligned) and the last row is of the type r
and contains the place (society, university, ...).
In the second row, there should be a multicol
spreading across the L
and the r
column. Here I want to print the graduation paper title or what exactly I've done as an employee. As I need the ability to put in a newline
in here, I need the p
type for the multicol
, but unfortunately this goes ahead with putting in a width for the p{}
. I don't know that width as it depends on the content of the previous line so I want to do it automatically.
How can I achieve this result? Having a multicol
spreading across the two columns as with the l
type, but also allowing the use of newline
?
MWE
documentclass{article}
usepackage[utf8]{inputenc}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
end{entrylist}
end{document}
multicol tabu
I'm using longtabu
in my resume to display the content in 3 rows. In the first row of type l
is the date, the second row contains the description (graduation, team member, ...) and is of the type X
(which I redefined to type L
to be left aligned) and the last row is of the type r
and contains the place (society, university, ...).
In the second row, there should be a multicol
spreading across the L
and the r
column. Here I want to print the graduation paper title or what exactly I've done as an employee. As I need the ability to put in a newline
in here, I need the p
type for the multicol
, but unfortunately this goes ahead with putting in a width for the p{}
. I don't know that width as it depends on the content of the previous line so I want to do it automatically.
How can I achieve this result? Having a multicol
spreading across the two columns as with the l
type, but also allowing the use of newline
?
MWE
documentclass{article}
usepackage[utf8]{inputenc}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
end{entrylist}
end{document}
multicol tabu
multicol tabu
edited Nov 20 '17 at 7:40
Sam
asked Nov 20 '17 at 7:31
SamSam
815513
815513
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Does this answer help you? tex.stackexchange.com/a/76192/134144
– leandriis
Nov 20 '17 at 10:23
I copied the exact code and I'm getting the following error:Incomplete ifx; all text was ignored after line 78.
. Could you please provide an MWE showing how this should be incorporated to my existing code? Thanks in advance.
– Sam
Nov 20 '17 at 15:13
add a comment |
Does this answer help you? tex.stackexchange.com/a/76192/134144
– leandriis
Nov 20 '17 at 10:23
I copied the exact code and I'm getting the following error:Incomplete ifx; all text was ignored after line 78.
. Could you please provide an MWE showing how this should be incorporated to my existing code? Thanks in advance.
– Sam
Nov 20 '17 at 15:13
Does this answer help you? tex.stackexchange.com/a/76192/134144
– leandriis
Nov 20 '17 at 10:23
Does this answer help you? tex.stackexchange.com/a/76192/134144
– leandriis
Nov 20 '17 at 10:23
I copied the exact code and I'm getting the following error:
Incomplete ifx; all text was ignored after line 78.
. Could you please provide an MWE showing how this should be incorporated to my existing code? Thanks in advance.– Sam
Nov 20 '17 at 15:13
I copied the exact code and I'm getting the following error:
Incomplete ifx; all text was ignored after line 78.
. Could you please provide an MWE showing how this should be incorporated to my existing code? Thanks in advance.– Sam
Nov 20 '17 at 15:13
add a comment |
1 Answer
1
active
oldest
votes
I am not completely sure, if I have adapted the code correctly, but the following example seems to work:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{calc}
usepackage{lipsum}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
makeatletter
newdimenzzz
ifxLT@i@undefined
zzz=8cm
else
globalzzzz@
begingroup
@tempcntaz@
defLT@entry#1#2{%
advance@tempcnta@ne
ifnum@tempcnta=1 globaladvancezzz#2relaxfi
ifnum@tempcnta=2 globaladvancezzz#2relaxfi
}
LT@i
endgroup
advancezzz-2tabcolsep
advancezzz-arrayrulewidth
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
& multicolumn{2}{l}{%
rlap{parbox[t]{zzz}{lipsum[2]}}}\
end{entrylist}
end{document}
Yes, this works, but it's not what I intended to do. First, it seems to be impossible to make a command out of this and call it theAtBeginDocument{}
command. Furthermore it only works if you add themulticolumn
to theentryitem
as you did. The way my code was intended to work is to replacemulticolumn{2}{p{6cm}}{itshape #4}
by yourmulticolumn{2}{l}{% rlap{parbox[t]{zzz}{itshape #4}}}
. This does not produce any errors, but it also does not span theparbox
to the full width.
– Sam
Nov 20 '17 at 15:56
In the mean time I tried to get this to work the way you intended it to but unfortunately I was unsuccessfull. Maybe @DavidCarlisle or seomeone else has a better idea.
– leandriis
Nov 21 '17 at 21:22
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%2f402193%2fmake-a-p-type-multicol-span-to-full-width%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
I am not completely sure, if I have adapted the code correctly, but the following example seems to work:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{calc}
usepackage{lipsum}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
makeatletter
newdimenzzz
ifxLT@i@undefined
zzz=8cm
else
globalzzzz@
begingroup
@tempcntaz@
defLT@entry#1#2{%
advance@tempcnta@ne
ifnum@tempcnta=1 globaladvancezzz#2relaxfi
ifnum@tempcnta=2 globaladvancezzz#2relaxfi
}
LT@i
endgroup
advancezzz-2tabcolsep
advancezzz-arrayrulewidth
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
& multicolumn{2}{l}{%
rlap{parbox[t]{zzz}{lipsum[2]}}}\
end{entrylist}
end{document}
Yes, this works, but it's not what I intended to do. First, it seems to be impossible to make a command out of this and call it theAtBeginDocument{}
command. Furthermore it only works if you add themulticolumn
to theentryitem
as you did. The way my code was intended to work is to replacemulticolumn{2}{p{6cm}}{itshape #4}
by yourmulticolumn{2}{l}{% rlap{parbox[t]{zzz}{itshape #4}}}
. This does not produce any errors, but it also does not span theparbox
to the full width.
– Sam
Nov 20 '17 at 15:56
In the mean time I tried to get this to work the way you intended it to but unfortunately I was unsuccessfull. Maybe @DavidCarlisle or seomeone else has a better idea.
– leandriis
Nov 21 '17 at 21:22
add a comment |
I am not completely sure, if I have adapted the code correctly, but the following example seems to work:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{calc}
usepackage{lipsum}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
makeatletter
newdimenzzz
ifxLT@i@undefined
zzz=8cm
else
globalzzzz@
begingroup
@tempcntaz@
defLT@entry#1#2{%
advance@tempcnta@ne
ifnum@tempcnta=1 globaladvancezzz#2relaxfi
ifnum@tempcnta=2 globaladvancezzz#2relaxfi
}
LT@i
endgroup
advancezzz-2tabcolsep
advancezzz-arrayrulewidth
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
& multicolumn{2}{l}{%
rlap{parbox[t]{zzz}{lipsum[2]}}}\
end{entrylist}
end{document}
Yes, this works, but it's not what I intended to do. First, it seems to be impossible to make a command out of this and call it theAtBeginDocument{}
command. Furthermore it only works if you add themulticolumn
to theentryitem
as you did. The way my code was intended to work is to replacemulticolumn{2}{p{6cm}}{itshape #4}
by yourmulticolumn{2}{l}{% rlap{parbox[t]{zzz}{itshape #4}}}
. This does not produce any errors, but it also does not span theparbox
to the full width.
– Sam
Nov 20 '17 at 15:56
In the mean time I tried to get this to work the way you intended it to but unfortunately I was unsuccessfull. Maybe @DavidCarlisle or seomeone else has a better idea.
– leandriis
Nov 21 '17 at 21:22
add a comment |
I am not completely sure, if I have adapted the code correctly, but the following example seems to work:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{calc}
usepackage{lipsum}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
makeatletter
newdimenzzz
ifxLT@i@undefined
zzz=8cm
else
globalzzzz@
begingroup
@tempcntaz@
defLT@entry#1#2{%
advance@tempcnta@ne
ifnum@tempcnta=1 globaladvancezzz#2relaxfi
ifnum@tempcnta=2 globaladvancezzz#2relaxfi
}
LT@i
endgroup
advancezzz-2tabcolsep
advancezzz-arrayrulewidth
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
& multicolumn{2}{l}{%
rlap{parbox[t]{zzz}{lipsum[2]}}}\
end{entrylist}
end{document}
I am not completely sure, if I have adapted the code correctly, but the following example seems to work:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage{calc}
usepackage{lipsum}
% %%%%%%%%%%%%%%%
% Packages and
% Package options
% %%%%%%%%%%%%%%%
usepackage{geometry, tabu, longtable, xparse, parskip}
geometry{%
verbose,%
a4paper,%
tmargin=25mm,%
bmargin=25mm,%
lmargin=25mm,%
rmargin=20mm,%
nomarginpar,%
nohead,%
}
newcolumntype{L}{>{raggedrightarraybackslash}X}
% %%%%%%%%%%%%%%%
% New environment
% %%%%%%%%%%%%%%%
NewDocumentEnvironment{entrylist}{m}%
{%
{LARGEbfseries #1}
par%
addvspace{.5em}%
longtabu{@{} l L r @{}}%
}%
{%
endlongtabu
paraddvspace{2em}
}
% %%%%%%%%%%%
% New Command
% %%%%%%%%%%%
newcommand{entryitem}[4]{
#1
&
{bfseries #2}
&
{smallcolor{light-gray}{#3}}\
&
multicolumn{2}{p{6cm}}{itshape #4}\[.5baselineskip]
}
% %%%%%%%%
% Document
% %%%%%%%%
begin{document}
makeatletter
newdimenzzz
ifxLT@i@undefined
zzz=8cm
else
globalzzzz@
begingroup
@tempcntaz@
defLT@entry#1#2{%
advance@tempcnta@ne
ifnum@tempcnta=1 globaladvancezzz#2relaxfi
ifnum@tempcnta=2 globaladvancezzz#2relaxfi
}
LT@i
endgroup
advancezzz-2tabcolsep
advancezzz-arrayrulewidth
begin{entrylist}{Test}
entryitem
{2014 textendash 2018}
{Member of the foo research team}
{Foo society}
{Working on a new foo}
entryitem
{2014}
{Graduation to master of bar}
{Bar school}
{The juxtaposition of foo and bar}
& multicolumn{2}{l}{%
rlap{parbox[t]{zzz}{lipsum[2]}}}\
end{entrylist}
end{document}
answered Nov 20 '17 at 15:23
leandriisleandriis
11.3k1733
11.3k1733
Yes, this works, but it's not what I intended to do. First, it seems to be impossible to make a command out of this and call it theAtBeginDocument{}
command. Furthermore it only works if you add themulticolumn
to theentryitem
as you did. The way my code was intended to work is to replacemulticolumn{2}{p{6cm}}{itshape #4}
by yourmulticolumn{2}{l}{% rlap{parbox[t]{zzz}{itshape #4}}}
. This does not produce any errors, but it also does not span theparbox
to the full width.
– Sam
Nov 20 '17 at 15:56
In the mean time I tried to get this to work the way you intended it to but unfortunately I was unsuccessfull. Maybe @DavidCarlisle or seomeone else has a better idea.
– leandriis
Nov 21 '17 at 21:22
add a comment |
Yes, this works, but it's not what I intended to do. First, it seems to be impossible to make a command out of this and call it theAtBeginDocument{}
command. Furthermore it only works if you add themulticolumn
to theentryitem
as you did. The way my code was intended to work is to replacemulticolumn{2}{p{6cm}}{itshape #4}
by yourmulticolumn{2}{l}{% rlap{parbox[t]{zzz}{itshape #4}}}
. This does not produce any errors, but it also does not span theparbox
to the full width.
– Sam
Nov 20 '17 at 15:56
In the mean time I tried to get this to work the way you intended it to but unfortunately I was unsuccessfull. Maybe @DavidCarlisle or seomeone else has a better idea.
– leandriis
Nov 21 '17 at 21:22
Yes, this works, but it's not what I intended to do. First, it seems to be impossible to make a command out of this and call it the
AtBeginDocument{}
command. Furthermore it only works if you add the multicolumn
to the entryitem
as you did. The way my code was intended to work is to replace multicolumn{2}{p{6cm}}{itshape #4}
by your multicolumn{2}{l}{% rlap{parbox[t]{zzz}{itshape #4}}}
. This does not produce any errors, but it also does not span the parbox
to the full width.– Sam
Nov 20 '17 at 15:56
Yes, this works, but it's not what I intended to do. First, it seems to be impossible to make a command out of this and call it the
AtBeginDocument{}
command. Furthermore it only works if you add the multicolumn
to the entryitem
as you did. The way my code was intended to work is to replace multicolumn{2}{p{6cm}}{itshape #4}
by your multicolumn{2}{l}{% rlap{parbox[t]{zzz}{itshape #4}}}
. This does not produce any errors, but it also does not span the parbox
to the full width.– Sam
Nov 20 '17 at 15:56
In the mean time I tried to get this to work the way you intended it to but unfortunately I was unsuccessfull. Maybe @DavidCarlisle or seomeone else has a better idea.
– leandriis
Nov 21 '17 at 21:22
In the mean time I tried to get this to work the way you intended it to but unfortunately I was unsuccessfull. Maybe @DavidCarlisle or seomeone else has a better idea.
– leandriis
Nov 21 '17 at 21:22
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%2f402193%2fmake-a-p-type-multicol-span-to-full-width%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
Does this answer help you? tex.stackexchange.com/a/76192/134144
– leandriis
Nov 20 '17 at 10:23
I copied the exact code and I'm getting the following error:
Incomplete ifx; all text was ignored after line 78.
. Could you please provide an MWE showing how this should be incorporated to my existing code? Thanks in advance.– Sam
Nov 20 '17 at 15:13