Consider the following:  \documentclass{article}  \setlength\parindent{0pt}  \begin{document} content \hfill content  \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}   one   &amp; two \\   three &amp; four \end{tabular*}  content \hfill content \end{document}         How can I remove the whitespace at either side of the tabular?
9934
How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 &amp; column 2 \\      \hline     I really would like this less &amp; crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.
83881
I got the following problem: Right now I am checking my equations, which are usually written in align. This looks great in most of the cases, but sometimes the pagebreaks are weird, ie there is a lot of vertical whitespace left (like 2.5cm) at the end of a page. I made the following MWE to illustrate this.  \documentclass[a4paper, 12pt, headsepline]{scrreprt} \usepackage[onehalfspacing]{setspace} \usepackage{amsmath, amssymb, mathtools} \usepackage{mathptmx} \usepackage[a4paper]{geometry} \geometry{left=2cm,right=5cm,top=2cm,bottom=2cm} % \usepackage{lipsum} %\lipsum \usepackage[pangram]{blindtext}  \begin{document} \Blindtext[1][3]%1 paragraph, 3 pangrams \begin{align} X_{t+1} &amp;=  \frac{X_{t+1}+X_{t+1}}{Y_t}  \label{eq:1}  \intertext{Solving...:} \notag  X_{t}  &amp;=  \frac{X_{t+1}+X_{t+1}}{Y_{t+1}} \notag \\ \intertext{Solving further...:} \notag  % ===PAGEBREAK HERE: 2nd page begins=== &amp;= \frac{X_{t+1}+X_{t+1}}{Y_t} +  \frac{X_{t+1}+X_{t+1}}{Y_t}  \notag \\ &amp;= \frac{X_{t+1}+X_{t+1}}{Y_t}...  \notag \\ \intertext{Solving further...:} &amp; = \frac{X_{t+1}+X_{t+1}}{Y_t}  \notag \end{align}  \end{document}   In the MWE, the first 'Solving further' should be on the first page instead (to save space and it would also look better I guess?). The position where I would like the pagebreak to be is also marked as a comment in the MWE.  My question is first on a general basis: Which is the best environment to achieve multiple line equations, which can be aligned as in align, and to save space at the same time? Or to be more precise: If possible, I'd like to stick with align and adapt the pagebreaks only if necessary.  Thanks!
113050
how to remove the spaces which i think from automatic justification in table  \documentclass{article} \usepackage{array} \usepackage{longtable} \begin{document} \begin{longtable}{|m{33.19mm}|m{43.51mm}|m{39.54mm}|m{10.96mm}|m{9.11mm}|} \caption{Main entries in data extraction form}\\ \hline Title &amp; Methodology &amp; Conclusion &amp; Q ID &amp; Key\\\hline Carving contiguous fragmented files with fast object validation \cite{Garfinkel2007c} &amp; Developing algorithm that validate carved data  for JPEG and Microsoft documents &amp; Internal File Structure is very important in the process of carving data and the process of validating results &amp; Q1  &amp; K0 \newline K8 \newline K9 \\\hline Reconstructing corrupt DEFLATED Files \cite{Brown2011} &amp; Bit-stream pattern search and try /error &amp; Recovering data from corrupted archive file by examining the file structure and trying to reconstruct lost or damaged parts  &amp; Q2  &amp; K9 \\\hline Forensic Data Carving \cite{Povar2011a} &amp; Multiple Methods for contiguous data carving based on file header/footer and also file structure, with validation proposal &amp; Discussed different methods for file carving and representing results related to these methods and limitations &amp; Q1 \newline Q2  &amp; K2 \newline K3 \newline K8 \\\hline \end{longtable} \end{document}
85577
I work with documentclass report and use fancyhdr package for chapters in this way:  \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \fancyhf{} \fancyhead[LO]{\bfseries\nouppercase\rightmark} \fancyhead[RE]{\bfseries\nouppercase\leftmark} \fancyhead[RO]{\bfseries\nouppercase\thepage}  \renewcommand{\headrulewidth}{0.5pt} \renewcommand{\footrulewidth}{0pt} \addtolength{\headheight}{0.5pt} \fancypagestyle{plain}{ \fancyhead{}  \renewcommand{\headrulewidth}{0pt}  }   I would like to change space between the line and the following text. Can anyone help me?
121808
\documentclass{article} \usepackage{tabularx} \usepackage{multirow} \begin{document}  \begin{table}[h!] \setlength\extrarowheight{2pt} % for a ever so slightly more open "look"     \begin{tabularx}{\textwidth}{c X | c | c | c |}     \cline{3-5}     &amp;  &amp; \multicolumn{3}{c|}{Paired Differences} \\     \cline{3-5}      &amp; &amp; Mean &amp;  Std. Deviation &amp; Std. Error Mean \\          \hline     Pair 1 &amp; Testing 1 and Testing 2 and Testing 3 &amp; 4.20\% &amp; 44.6\% &amp; 4.54\%  \\     \hline       \end{tabularx} \caption{Testing 123} \end{table}  \end{document}   Outcome:    I cannot figure out. If I added \begin{tabularx}{\textwidth}{|c X | c | c | c |} It will not be working
69185
Inserting an \hphantom to indent a table row works in tabular, but in tabulary it produces extra vertical space instead.   Since these are left-aligned L columns I would expect the space at the left edge to be preserved, while the space on the right is variable. Why does this happen and how could I fix it?  \documentclass{article} \usepackage{tabulary}  \newcommand{\sator}{Sator arepo tenet opera rotas} \newcommand{\tabindent}{\hphantom{em}}  \begin{document}  \section{Tabular}  \begin{tabular}{ll} \sator  &amp; \sator\\ \tabindent\sator &amp; \tabindent\sator\\ \end{tabular}  \section{Tabulary}  \begin{tabulary}{\textwidth}{LL} \sator  &amp; \sator\\ \tabindent\sator &amp; \tabindent\sator\\ \end{tabulary}  \end{document}
80243
My code is this:  \setlength{\parindent}{0ex} \texttt{ x\hspace{1ex}\hspace{1ex}\hspace{1ex}y \newline \hspace{1ex}\hspace{1ex}\hspace{1ex}\hspace{1ex}y }   What I'd like to see is:  x   y     y   What I actually see is:  x   y y   I've tried various other ways of inserting a space. So far, they've all resulted in leading whitespace being ignored.  I've also tried using \verbatim and \alltt but they eat too many of the other commands that I need preserved (not shown in the example above).  I suppose I could (in the script that emits the LaTeX) count the leading spaces in each line and use different \parindent values. I'm looking for something more elegant first.
114416
Whenever I use the colortbl package to format tables, a thin white space between the cells sometimes shows up on screen (not in print for as far as I can tell). For example in this table:    Is there an easy way to enlarge each rectangle by a tiny amount so that the white space is not visible anymore?  (My guess is that the white space appears due to rounding in my pdf viewer, evince. I don't know if other pdf viewers have the same issue. Regardless, I would like to have my pdf file look good in common pdf readers)
92082
How to break VERY long word in latex? For example:  \begin{center} \begin{longtable}{|p{8cm}|p{3cm}|p{3cm}|p{3cm}|} \hline 1 &amp; 2 &amp; 3 \\ \hline 11111111111111111111111111111111111111111111111111111111111 &amp; 2  &amp; 3 \\ \hline \end{longtable} \end{center}   11111111111111111111111111111111111111111111111111111111111 overlaps next table cells in it's row. Thanks in advance.  UPDATE: Turns out that seqsplit doesn't work for me, as it removes existing spaces between words. I forgot to mention that text may contain space and I didn't notice that it eliminates spaces :(
93040
Input  testing on Linux [Remove white space] testing on Linux   Output  testing on Linux [Removewhitespace] testing on Linux   So, how can we just remove all the white space between the brackets and achieve output as given?
63401
Without 2k rep, code formatting is impossible, because it just adds spaces, which don't count for the 6-character-ritual-threshold.  This question is related to impossible title-improvements for a similar reason, brought up here:   A more or less  crossed my way today, which wasn't readable because of missing code-indentation. (Many regex-tools like grep, sed, awk work on a line-by-line basis, so it is essential to see, where a line starts and ends.    I put the indentation in, but got an error: at least 6 changes, not counting: white space. Uhm.    I looked for something obvious, which could be changed too - nothing.  I looked for something not so obvious, which could be changed too - nothing.  I got angry and left the page, because I didn't want to write some foobar, or a disclaimer why this disclaimer, which would be much longer than 6 characters.  I had the idea to comment my edit in the question itself - this wouldn't be foobar, but have a bit of sense.  When I finished my comment, I was informed, that meanwhile somebody else did edit that question. I left the question, angry. Lost much time in doing 6-character-gymnastics.    Conclusion: The quality of an improvement isn't much related on the quantity of changed characters, especially not, if whitespace doesn't count.   P.S.: I suggest the new "6-character-rule"-tag.
72669
I try to adapt this solution  to my needs.  But I have a width problem 1\tabcolsep is too short, but anything longer is too long, should be 2\tabcolsep.    \documentclass[10pt]{article} \usepackage[T1]{fontenc}  \usepackage{array} \usepackage{tabularx} \usepackage{ragged2e}  \newcolumntype{C}[1]{&gt;{\Centering}p{#1}} \usepackage{tikz}  \newcommand\Tdiag[4]{%     \multicolumn{1}{|p{#2}|}{\hskip-\tabcolsep     \begin{tikzpicture}[%                 baseline={(0,-.25\baselineskip)},                 every node/.style={outer sep=0pt,inner sep=#1}]     \node[minimum width={#2+1\tabcolsep-\pgflinewidth},         minimum height=2\baselineskip-\pgflinewidth+\extrarowheight,         use as bounding box] (box) {};     \draw[line cap=round] (box.north west) -- (box.south east);     \node[anchor=south west,text width=.75*#2,align=left] at (box.south west) {#3};     \node[anchor=north east,text width=.75*#2,align=right] at (box.north east) {#4}; \end{tikzpicture}\hskip-\tabcolsep}}  \begin{document}  \begin{tabular}{|C{1.2cm}*{3}{|c}|}\hline \Tdiag{.2em}{1.2cm}{\^Age}{Sexe}&amp; Féminin &amp; Masculin &amp; Totaux  \\\hline 15 ans&amp;&amp;1&amp;\\\hline 16 ans &amp; 16 &amp; &amp;  \\\hline 17 ans &amp; 3 &amp; &amp;  \\\hline Totaux &amp; &amp; &amp; 36  \\\hline \end{tabular}   \end{document}
107252
I'm trying to remove the indention of the entries within the list of figures and list of tables. Thus that the entries (here the entry 0.1 Test) are left aligned with the header.  However, I can't find an option for this. Someone an idea?  MWE:  \documentclass [] {scrbook}  \begin{document}  \listoftables   \cleardoubleemptypage  \begin{table}[tbp]     \centering     \caption[Test]{Test}     \label{tab:t}         \begin{tabular}{cccc}         \end{tabular} \end{table}  \end{document}
119513
I need to display fractions within a table and it requires to set  \renewcommand{\arraystretch}{2.3}   The problem is that not all rows contain fractions, and in this cases the white space below and above is too big. I can tweak it manually with something like \\[-2ex]. This works for the middle cases, though its a little inconvenient, but I have no idea how to reduce the absolute top space.   Something like   \vspace{-2ex}   has no effect.  The best would be to be able to change the arraystretch for a single table row, but the command has no effect after \begin{tabular}. How can I solve this issue?    MWE  \documentclass{article}  \usepackage{amsmath} \usepackage{booktabs}  \begin{document}  \begin{table}     \renewcommand{\arraystretch}{2.3}      \begin{tabular}{@{}c|l@{}}             \bfseries $R_x$ &amp; Symbol\\             \hline\hline             $\dfrac{a}{b}$ &amp; $ \dfrac{A}{B} $\\             $\dfrac{a}{b}$ &amp; $ \dfrac{A}{B} $\\             $\dfrac{a}{b}$ &amp; $ \dfrac{A}{B} $\\             \hline     \end{tabular} \end{table}  \end{document}   MWE with siunitx  \documentclass{article}  \usepackage{amsmath} \usepackage{booktabs} %\usepackage{siunitx} \usepackage{wrapfig}  \usepackage{cellspace} \setlength\cellspacetoplimit{4pt} \setlength\cellspacebottomlimit{4pt}  \begin{document}  \begin{wrapfigure}[14]{R}{8.5cm}     \renewcommand{\arraystretch}{2.3}      \begin{tabular}{@{}Sc|Sl@{}}             \bfseries $R_x$ &amp; Symbol\\             \hline\hline             $\dfrac{a}{b}$ &amp; $ \dfrac{A}{B} $\\             some text &amp; some other text \\             $\dfrac{a}{b}$ &amp; $ \dfrac{A}{B} $\\             $\dfrac{a}{b}$ &amp; $ \dfrac{A}{B} $\\             \hline     \end{tabular} \end{wrapfigure}  \end{document}
101166
A hopefully very simple question. Why does the multicolumn in my example below screw up the spacing between the columns below? Obviously I would want columns A, B, and C to be spaced evenly (as they are if I comment the multicolumn-row). How to achieve this?  \documentclass{scrbook} \usepackage{booktabs} \usepackage{multirow}  \newcommand{\crule}[1]{\multispan{#1}{\hspace*{\tabcolsep}\hrulefill\hspace*{\tabcolsep}}}  \begin{document}  \begin{table}[!t]     \caption{bla.}      \begin{tabular*}{\textwidth}{@{}l@{\extracolsep\fill}c@{\extracolsep\fill}c@{\extracolsep\fill}c@{}}     \toprule         &amp; \multicolumn{3}{c}{sample number}\\         &amp; \crule{3}\\ % definition should still include some neg. vspace after that         &amp; 1 &amp; 2 &amp; 3\\     \midrule     some longer text here  &amp; A    &amp; B   &amp; C\\     \bottomrule     \end{tabular*}     \end{table} \end{document}   results in
4928
This code  \documentclass{article} \usepackage{amsmath} \begin{document}     \[ J(\sqrt[n]{x}) \] \end{document}   compiles into this:    The spacing after the opening parentheses is ugly. What's the proper way to fix this?
7688
How do I trim a string in JavaScript? That is, how do I remove all whitespace from the beginning and the end of the string in JavaScript?