Problem with tabularx package: Error message “Illegal pream-token (x): `c' used.”












0















I have a problem with using usepackage{tabularx}. Would you have any suggestion to overcome the error message of ! Package array Error: Illegal pream-token (x): `c' used.? Thank you in advance for your time.



documentclass[review]{elsarticle}
usepackage{lineno,hyperref}
usepackage{array}
usepackage{booktabs}
usepackage{multirow}
usepackage{rotating}
usepackage{tabularx}
usepackage[version=4]{mhchem}
modulolinenumbers[5]

begin{document}

begin{sidewaystable}[h!]
begin{center}
caption{Multirow table.Year of App. (First – Last)}
label{tab:table2}
begin{tabularx}{textwidth}{|l|l|l|x|}
hline
& textbf{Drug Name} & textbf{Year of App.} & textbf{SMILES}\
hline
1 & Clofarabine & 2004 - 2017 & [H][C@]1(F)[C@H](O)[C@@H](CO)O[C@H]1N1C=NC2=C(N)N=C(Cl)N=C12\
hline
2 & Cyclophosphamide & 1959 - 2014 & ClCCN(CCCl)P1(=O)NCCCO1\
hline
14 & Vincristine & 1963 - 2012 & [H][C@@]12N3CC[C@@]11C4=CC(=C(OC)C=C4N(C=O)[C@@]1([H])[C@](O)([C@H](OC(C)=O)[C@]2(CC)C=CC3)
C(=O)OC)[C@]1(C[C@]2([H])CN(C[C@](O)(CC)C2)CCC2=C1NC1=CC=CC=C21)C(=O)OC\
hline
end{tabularx}
end{center}
end{sidewaystable}

end{document}









share|improve this question




















  • 1





    It has to be an uppercase X: |l|l|l|X|.

    – Phelype Oleinik
    Jan 7 at 21:53













  • Actually I have already tried that. But in that case, although the table box closed, my text contents exceed the table and eventhe page.

    – Esma Eryilmaz
    Jan 7 at 21:55











  • Well, that's another problem. The error you mention says that the package doesn't know the column type x, so it replaced by c. This means that |l|l|l|x| produces exactly the same as |l|l|l|c|, plus the error message. The problem of the text overflowing is because TeX doesn't know how to break [H][C@@]12N3CC[C@@].... Perhaps an appropriate package to write chemical formulas will do that for you. I'm not a chemist though, so I can't help you there, but I advise you reformulate your question asking the actual problem of text overflowing the table cell.

    – Phelype Oleinik
    Jan 7 at 21:59











  • Thank you @PhelypeOleinik, I understand, I will try that.

    – Esma Eryilmaz
    Jan 7 at 22:02











  • Thank you @DavidCarlisle, now I get my problem!

    – Esma Eryilmaz
    Jan 7 at 22:05
















0















I have a problem with using usepackage{tabularx}. Would you have any suggestion to overcome the error message of ! Package array Error: Illegal pream-token (x): `c' used.? Thank you in advance for your time.



documentclass[review]{elsarticle}
usepackage{lineno,hyperref}
usepackage{array}
usepackage{booktabs}
usepackage{multirow}
usepackage{rotating}
usepackage{tabularx}
usepackage[version=4]{mhchem}
modulolinenumbers[5]

begin{document}

begin{sidewaystable}[h!]
begin{center}
caption{Multirow table.Year of App. (First – Last)}
label{tab:table2}
begin{tabularx}{textwidth}{|l|l|l|x|}
hline
& textbf{Drug Name} & textbf{Year of App.} & textbf{SMILES}\
hline
1 & Clofarabine & 2004 - 2017 & [H][C@]1(F)[C@H](O)[C@@H](CO)O[C@H]1N1C=NC2=C(N)N=C(Cl)N=C12\
hline
2 & Cyclophosphamide & 1959 - 2014 & ClCCN(CCCl)P1(=O)NCCCO1\
hline
14 & Vincristine & 1963 - 2012 & [H][C@@]12N3CC[C@@]11C4=CC(=C(OC)C=C4N(C=O)[C@@]1([H])[C@](O)([C@H](OC(C)=O)[C@]2(CC)C=CC3)
C(=O)OC)[C@]1(C[C@]2([H])CN(C[C@](O)(CC)C2)CCC2=C1NC1=CC=CC=C21)C(=O)OC\
hline
end{tabularx}
end{center}
end{sidewaystable}

end{document}









share|improve this question




















  • 1





    It has to be an uppercase X: |l|l|l|X|.

    – Phelype Oleinik
    Jan 7 at 21:53













  • Actually I have already tried that. But in that case, although the table box closed, my text contents exceed the table and eventhe page.

    – Esma Eryilmaz
    Jan 7 at 21:55











  • Well, that's another problem. The error you mention says that the package doesn't know the column type x, so it replaced by c. This means that |l|l|l|x| produces exactly the same as |l|l|l|c|, plus the error message. The problem of the text overflowing is because TeX doesn't know how to break [H][C@@]12N3CC[C@@].... Perhaps an appropriate package to write chemical formulas will do that for you. I'm not a chemist though, so I can't help you there, but I advise you reformulate your question asking the actual problem of text overflowing the table cell.

    – Phelype Oleinik
    Jan 7 at 21:59











  • Thank you @PhelypeOleinik, I understand, I will try that.

    – Esma Eryilmaz
    Jan 7 at 22:02











  • Thank you @DavidCarlisle, now I get my problem!

    – Esma Eryilmaz
    Jan 7 at 22:05














0












0








0


1






I have a problem with using usepackage{tabularx}. Would you have any suggestion to overcome the error message of ! Package array Error: Illegal pream-token (x): `c' used.? Thank you in advance for your time.



documentclass[review]{elsarticle}
usepackage{lineno,hyperref}
usepackage{array}
usepackage{booktabs}
usepackage{multirow}
usepackage{rotating}
usepackage{tabularx}
usepackage[version=4]{mhchem}
modulolinenumbers[5]

begin{document}

begin{sidewaystable}[h!]
begin{center}
caption{Multirow table.Year of App. (First – Last)}
label{tab:table2}
begin{tabularx}{textwidth}{|l|l|l|x|}
hline
& textbf{Drug Name} & textbf{Year of App.} & textbf{SMILES}\
hline
1 & Clofarabine & 2004 - 2017 & [H][C@]1(F)[C@H](O)[C@@H](CO)O[C@H]1N1C=NC2=C(N)N=C(Cl)N=C12\
hline
2 & Cyclophosphamide & 1959 - 2014 & ClCCN(CCCl)P1(=O)NCCCO1\
hline
14 & Vincristine & 1963 - 2012 & [H][C@@]12N3CC[C@@]11C4=CC(=C(OC)C=C4N(C=O)[C@@]1([H])[C@](O)([C@H](OC(C)=O)[C@]2(CC)C=CC3)
C(=O)OC)[C@]1(C[C@]2([H])CN(C[C@](O)(CC)C2)CCC2=C1NC1=CC=CC=C21)C(=O)OC\
hline
end{tabularx}
end{center}
end{sidewaystable}

end{document}









share|improve this question
















I have a problem with using usepackage{tabularx}. Would you have any suggestion to overcome the error message of ! Package array Error: Illegal pream-token (x): `c' used.? Thank you in advance for your time.



documentclass[review]{elsarticle}
usepackage{lineno,hyperref}
usepackage{array}
usepackage{booktabs}
usepackage{multirow}
usepackage{rotating}
usepackage{tabularx}
usepackage[version=4]{mhchem}
modulolinenumbers[5]

begin{document}

begin{sidewaystable}[h!]
begin{center}
caption{Multirow table.Year of App. (First – Last)}
label{tab:table2}
begin{tabularx}{textwidth}{|l|l|l|x|}
hline
& textbf{Drug Name} & textbf{Year of App.} & textbf{SMILES}\
hline
1 & Clofarabine & 2004 - 2017 & [H][C@]1(F)[C@H](O)[C@@H](CO)O[C@H]1N1C=NC2=C(N)N=C(Cl)N=C12\
hline
2 & Cyclophosphamide & 1959 - 2014 & ClCCN(CCCl)P1(=O)NCCCO1\
hline
14 & Vincristine & 1963 - 2012 & [H][C@@]12N3CC[C@@]11C4=CC(=C(OC)C=C4N(C=O)[C@@]1([H])[C@](O)([C@H](OC(C)=O)[C@]2(CC)C=CC3)
C(=O)OC)[C@]1(C[C@]2([H])CN(C[C@](O)(CC)C2)CCC2=C1NC1=CC=CC=C21)C(=O)OC\
hline
end{tabularx}
end{center}
end{sidewaystable}

end{document}






tabularx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 7 at 21:54









Phelype Oleinik

21.6k54381




21.6k54381










asked Jan 7 at 21:50









Esma EryilmazEsma Eryilmaz

7818




7818








  • 1





    It has to be an uppercase X: |l|l|l|X|.

    – Phelype Oleinik
    Jan 7 at 21:53













  • Actually I have already tried that. But in that case, although the table box closed, my text contents exceed the table and eventhe page.

    – Esma Eryilmaz
    Jan 7 at 21:55











  • Well, that's another problem. The error you mention says that the package doesn't know the column type x, so it replaced by c. This means that |l|l|l|x| produces exactly the same as |l|l|l|c|, plus the error message. The problem of the text overflowing is because TeX doesn't know how to break [H][C@@]12N3CC[C@@].... Perhaps an appropriate package to write chemical formulas will do that for you. I'm not a chemist though, so I can't help you there, but I advise you reformulate your question asking the actual problem of text overflowing the table cell.

    – Phelype Oleinik
    Jan 7 at 21:59











  • Thank you @PhelypeOleinik, I understand, I will try that.

    – Esma Eryilmaz
    Jan 7 at 22:02











  • Thank you @DavidCarlisle, now I get my problem!

    – Esma Eryilmaz
    Jan 7 at 22:05














  • 1





    It has to be an uppercase X: |l|l|l|X|.

    – Phelype Oleinik
    Jan 7 at 21:53













  • Actually I have already tried that. But in that case, although the table box closed, my text contents exceed the table and eventhe page.

    – Esma Eryilmaz
    Jan 7 at 21:55











  • Well, that's another problem. The error you mention says that the package doesn't know the column type x, so it replaced by c. This means that |l|l|l|x| produces exactly the same as |l|l|l|c|, plus the error message. The problem of the text overflowing is because TeX doesn't know how to break [H][C@@]12N3CC[C@@].... Perhaps an appropriate package to write chemical formulas will do that for you. I'm not a chemist though, so I can't help you there, but I advise you reformulate your question asking the actual problem of text overflowing the table cell.

    – Phelype Oleinik
    Jan 7 at 21:59











  • Thank you @PhelypeOleinik, I understand, I will try that.

    – Esma Eryilmaz
    Jan 7 at 22:02











  • Thank you @DavidCarlisle, now I get my problem!

    – Esma Eryilmaz
    Jan 7 at 22:05








1




1





It has to be an uppercase X: |l|l|l|X|.

– Phelype Oleinik
Jan 7 at 21:53







It has to be an uppercase X: |l|l|l|X|.

– Phelype Oleinik
Jan 7 at 21:53















Actually I have already tried that. But in that case, although the table box closed, my text contents exceed the table and eventhe page.

– Esma Eryilmaz
Jan 7 at 21:55





Actually I have already tried that. But in that case, although the table box closed, my text contents exceed the table and eventhe page.

– Esma Eryilmaz
Jan 7 at 21:55













Well, that's another problem. The error you mention says that the package doesn't know the column type x, so it replaced by c. This means that |l|l|l|x| produces exactly the same as |l|l|l|c|, plus the error message. The problem of the text overflowing is because TeX doesn't know how to break [H][C@@]12N3CC[C@@].... Perhaps an appropriate package to write chemical formulas will do that for you. I'm not a chemist though, so I can't help you there, but I advise you reformulate your question asking the actual problem of text overflowing the table cell.

– Phelype Oleinik
Jan 7 at 21:59





Well, that's another problem. The error you mention says that the package doesn't know the column type x, so it replaced by c. This means that |l|l|l|x| produces exactly the same as |l|l|l|c|, plus the error message. The problem of the text overflowing is because TeX doesn't know how to break [H][C@@]12N3CC[C@@].... Perhaps an appropriate package to write chemical formulas will do that for you. I'm not a chemist though, so I can't help you there, but I advise you reformulate your question asking the actual problem of text overflowing the table cell.

– Phelype Oleinik
Jan 7 at 21:59













Thank you @PhelypeOleinik, I understand, I will try that.

– Esma Eryilmaz
Jan 7 at 22:02





Thank you @PhelypeOleinik, I understand, I will try that.

– Esma Eryilmaz
Jan 7 at 22:02













Thank you @DavidCarlisle, now I get my problem!

– Esma Eryilmaz
Jan 7 at 22:05





Thank you @DavidCarlisle, now I get my problem!

– Esma Eryilmaz
Jan 7 at 22:05










0






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


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469048%2fproblem-with-tabularx-package-error-message-illegal-pream-token-x-c-used%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469048%2fproblem-with-tabularx-package-error-message-illegal-pream-token-x-c-used%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

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?