New answers tagged

1

I suggest setting the tabular using booktabs rules and nested tabular instead of multirow. Also, I use \parbox inside the cells to break the lines. If you have an updated array package, you can use fixed width columns to easily line up complicated multispanning rows: \documentclass{article} \usepackage{longtable, booktabs, array} \title{Test} \begin{...


1

You use wrong syntax for multirow cells. Missed are * or width of cells. For example: correct syntax is \multirow{2}{*}{B1}, not \multirow{2}{}{B1} etc. Complete MWE: \documentclass{article} \usepackage{longtable, makecell, multirow} \renewcommand\theadfont{\small\bfseries} \renewcommand\theadgape{} \title{Test} \begin{document} \begin{longtable}{|l|l|...


1

Setting \parindent to 0pt would take away the documentclass indentation, but assuming you don't want to use the standard heading commands (like \section etc) with all their associated spacings etc needing adjustment, the alltt package could help. By way of intro, the verbatim environment prints things exactly as it sees them: MWE \documentclass[a4paper,...


0

Add to the preamble: \usepackage{dhucs} \disablehangullinebreak But there will be lots of overfull lines.


2

While in LaTeX2e \newcommand by default creates \long macros (while the starred version creates short ones), \DeclareDocumentCommand makes the opposite. In order to allow paragraphs in a macro argument you must prefix the specifier by a +, in your case: \DeclareDocumentCommand{\iSol}{+m G{}}{% <-- don't forget this \iftoggle{isLF}{% <-- don't forget ...


2

As I said in a comment, IMO the only sensible way to avoid a page break at all costs is to put the content in a minipage or \parbox. The spacing before and after the minipage can be added with an explicit \bigskip (or \medskip, or whatever you find pleasant). A little care is needed for the spacing after the environment, but here the kernel macro \@endparenv ...


6

Linebreaks in inline math are only possible around a relation or a binary operator. Setting the corresponding linebreak penalties to a high value (10000 and larger is considered infinite) will suppress the linebreak. \documentclass{article} \begin{document} \fbox{\parbox{45pt}{math $a < b$}} \fbox{\parbox{40pt}{math $a + b$}} \binoppenalty=10000 \...


1

The problem you see is because you use \obeycr. The effect of \obeycr is (roughtly) the same as adding \\ at the end of every line of input, so inside your aside environment it is like if you had typed: \section{foo}\\ bar\\ ~\\ \section{foo}\\ \subsection{bar}\\ In the body of the text, under usual circumstances, the command \\ means a line break. However ...


4

You can simplify the example: \documentclass[a4paper,twoside]{report} \begin{document} \begin{table} \caption[]{aaaaaaaaaaa aaaaaa ccccccccccccccc bbbbbbbbbbbbbbb \\ dddddddddddddd} \end{table} % \begin{table} \caption[]{aaaaa\\bbb} \end{table} \end{document} Most classes set captions in two styles, first essentially in an \mbox on a single line that is ...


1

Just locally redefine \par. \documentclass{article} \newenvironment{quicklist}{\begin{itemize}\let\oldpar\par \item\def\par{\oldpar\item}}{\end{itemize}} \begin{document} Normal text \begin{quicklist} foo bar quaz quiz zoom \end{quicklist} More normal text Even more normal text \end{document}


2

I like environments, so I am going to embellish Ian Thomson's answer. I liked this idea so much, I wrote my own class in my user texmf directory that makes this code easily accessible to all of my documents: % This code block makes it possible to process each line as #1 by defining \doline#1{#1} \newenvironment{dolines}{\begingroup\obeylines\getlines}% {\...


0

I have the same problem I just solve that by: \renewcommand\footnote{\nolinebreak \kern-1mm \LTRfootnote} here: \nolinebreak allows me to prevent footnote break at the end of lines \kern-1mm removes the white space which is produced by the new-line. here I just used \LTRfootnote for my own purpose. you can use your own command


Top 50 recent answers are included