5 votes

How to display or break a long equation properly?

I suggest loading mathtools, which is a superset of amsmath and use its \splitfrac command: \documentclass[journal]{IEEEtran} \usepackage{blindtext} \usepackage{booktabs,capt-of} \...
user avatar
  • 261k
4 votes
Accepted

Line breaks and vertical alignment in tables

Welcome to TeX.SE! With tabularray package is simple: \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{booktabs, siunitx} \usepackage[skip=0.33\baselineskip]{caption} \begin{document} \...
user avatar
  • 255k
4 votes
Accepted

How to display or break a long equation properly?

Mixing Computer Modern math with Times is really bad. If you load newtx (or mathptmx, if you want to be old-fashioned), the math will be compatible. \documentclass[journal]{IEEEtran} \usepackage{...
user avatar
  • 992k
4 votes

l3regex: Regular expression for a new line symbol \\

Spaces are not ignored after \\, so with your input \ttl{One \\ Two} you just remove \\, but the two space tokens remain. Besides, if the user types \ttl{One\\Two} you'd get no space. So you want to ...
user avatar
  • 992k
3 votes

Line breaks and vertical alignment in tables

I would take different approaches to fixing the layouts of the tables. For table 1, I'd fix the header by removing redundant material, so that the first header line just says "Sample A" and ...
user avatar
  • 439k
3 votes
Accepted

How to Automatically Break a Long Inline Term?

TeX only breaks inline formulas at binary or relational symbols and these do not occur in you chemical stuff, so the whole part (Mn$^{2+}$)$_1$(Cr$^{3+}$,Fe$^{3+}$,Mn$^{3+}$,Va)$_2$(Va)$_2$(O$^{2-}$)$...
user avatar
3 votes
Accepted

l3regex: Regular expression for a new line symbol \\

In One \\ Two, there is one space token before \\ and one after; therefore, the regexp replacement is correct (\tl_show:N \l_tmpa_tl clearly shows two consecutive space tokens remaining in \l_tmpa_tl ...
user avatar
  • 22.8k
3 votes

l3regex: Regular expression for a new line symbol \\

The following definition ignores the space after \\ because the #2 of the \ttlA is unseparated parameter: TeX ignores spaces in this case. \def\ttl#1{\ttlA#1\\\end} \def\ttlA#1\\#2{#1\ifdim\lastskip=...
user avatar
  • 53.4k
3 votes

How to display or break a long equation properly?

If you are ok with the space, another way is to use sub-expressions with their definitions \documentclass[journal]{IEEEtran} \usepackage{kantlipsum} % \usepackage{blindtext} \usepackage{booktabs,...
user avatar
  • 819
2 votes

How to display or break a long equation properly?

Just make it smaller to fit the page (taken from here, example 1.1) \documentclass[journal]{IEEEtran} \usepackage{blindtext} \usepackage{booktabs,capt-of} \usepackage{graphicx} \usepackage{amsmath,...
user avatar
1 vote
Accepted

How to automatically break lines with long string of (non-math) numbers in a custom list environment?

You could (a) load the seqsplit package and (b) encase the doi string in a \seqsplit wrapper. \documentclass[a4paper]{article} \newdimen\colsep \colsep=1em \def\topbox#1#2{\vtop{\parindent=0pt \hsize=...
user avatar
  • 439k
1 vote

Allow line break, but without inserting a dash

Use pakage seqsplit, in main text: \seqsplit{qervnjksnvdjsn}, this means it can linebreak between every singal character, without dash or hyphen sign. Sorry for bad English. :)
user avatar
  • 11
1 vote
Accepted

Prevent line breaking around "-" in some phrases

The amsmath package provides the \nobreakdash macro for just this case: $k$\nobreakdash-algebra The symbol that follows \nobreakdash need not necessarily be a - ("dash") character. It could ...
user avatar
  • 439k
1 vote

Family Group Sheet with tabularray - suggestions for improvements welcome

This answer will demonstrate how to rewrite a tabularray table from "Old Interfaces" to "New Interfaces". Remark: In tabularray, A Q column has width, while an X column only has ...
user avatar
  • 8,640
1 vote

New line in tabular does not create a new line

As already mentioned in comments below question: Text in a cell can only be broken in so-called "paragraph" cells, i.e. in cells in columns of type p{<width>}, m{<width>} or b{&...
user avatar
  • 255k
1 vote

Combining internal hyphenation of words with \discretionary

I'll post this as an answer so there's one here rather than it just being in the comments, but credit to David Carlisle for providing this solution. I've replaced the \discretionary command with this ...
user avatar
  • 21
1 vote
Accepted

Center section with number after prewitten text and in a new line the section caption

You shouldn't use formatting commands like \begin{center}...\end{center} inside \section{...} or it'll screw up the table of contents and things like that; instead use titlesec to define how you want ...
user avatar
  • 36.6k
1 vote

Line-breaking problem produced by \dotfill and long index entries

I don't think it's possible to do that. Instead I have this idea to make it looks a little better. \documentclass[12pt]{article} %%%index setting%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{imakeidx} \...
user avatar
  • 4,123

Only top scored, non community-wiki answers of a minimum length are eligible