Hot answers tagged

7

You should not leave a blank line between \end{equation} and \begin{conditions} or the description might be detached from the equation. Nor you should have a blank line before \begin{equation} under any circumstance. On the other hand, such a long description of variables is quite likely to produce bad page breaks, be it detached or not from the equation. ...


4

\documentclass{article} \begin{document} \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}r@{}}% \hline a&b\\\hline \end{tabular*} \end{document} Of course, if the table is not in a float (a table environment) and \partindent is not 0pt (the default) as in this MWE, remember add \noindent before the tabular* environment to maintain it between ...


3

You can just add an invisible high object. \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{tikzpicture}[every text node part/.style={align=left}] \node[rounded corners=0.5ex,inner sep=0.75ex,rectangle split, rectangle split parts=2, rectangle split part align={left},rectangle split part fill={gray,yellow}] { ...


3

I have no idea what you have done but I'm guessing that you used memoir's Ruled pagestyle. memoir typesets the text according to the \textwidth but the Ruled pagestyle extends the page header into the margin. If this is what you have done then the text is the normal width but the header is wider. What do you want? If you want the text and header to be the ...


3

There is an indent on the line where the conditions environment begins. In your example, the conditions environment is defined as \newenvironment{conditions}[1][where:] {% #1\tabularx{\textwidth-\widthof{#1}}[t]{ >{$}l<{$} @{${}={}$} X@{} }% } {\endtabularx\\[\belowdisplayskip]} So when the conditions environment is called with the ...


2

The following code adaptation uses zref's savepos module to store the x-coordinate on the left side of the text you're placing (LEFT or RIGHT). This x-coordinate is used to identify whether you're in the left/right column, depending on whether it's less than or greater than (or equal to) 50% of the page width. Since you're using tikz already, you can use ...


1

This works (precision better than 0.1mm): demo with a4 paper: \documentclass[a4paper, 12pt]{article} \usepackage[showframe]{geometry} \geometry{margin=2.5cm, top=3cm, headsep=1.75cm, footskip=1.25cm} \usepackage{lipsum} \begin{document} \lipsum[1-3] \end{document}


1

See if this works: \renewcommand{\thesubsubsection}{\arabic{subsubsection}} \titleformat{\subsubsection} [block] {\vspace{0.1cm}\fontsize{14}{12} \selectfont\raggedright} % <------ Added \raggedright, here {\fontsize{10}{12} \selectfont SECTION\ \thesubsubsection} {0.3em} {\leading{18pt}\bfseries\fontsize{14}{12} \selectfont}[\vskip 0.5ex \titlerule] \...


1

It seems to me that you are using the article class and trying to fake \chapter divisions. However, to get your \section*{text} inserted into the ToC do: \section*{Section title} \addcontentsline{toc}{section}{Section title} and similarly for subsections \addcontentsline{toc}{subsection}{Subsection title} etc. Note that your divisional numbering scheme ...


1

The tcolorbox package is designed to make boxes like this one. \documentclass{article} \usepackage{tcolorbox} \begin{document} \begin{tcolorbox}[ boxrule=0pt, left=.5ex, width=.75\textwidth, colback=yellow, colframe=gray, coltitle=black, title=Energy Conversion in an IC Engine ] Chemical Energy $\rightarrow$ Heat Energy $\rightarrow$ Mechanical ...


1

\documentclass[12pt]{article} % <--- 12pt font \usepackage[margin=1in]{geometry}% <--- 1 in margin \usepackage{setspace} \doublespace % <--- double space \usepackage{lipsum} \title{Replication pdf} \author{yz} \date{April 2020} \begin{document} \maketitle \section{Introduction} \lipsum[1] \end{document}


1

If you are using OpTeX (or OPmac macros) then there is the \margins macro: \margins/1 a4 (2,2,2,2)cm % 2 cm margins in A4 paper or \margins/2 a5 (15,22,14,20)mm % 2-pages layout, outer margins 22, inner 15mm % top margins 14mm bottom 20mm You can specify arbitrary paper dimensions, you can omit some values for margins (then \...


1

It can be easily achieved with colorbox. As a reference, have a look at Highlight, textcolor, and boldface simultaneously If you always use the same color and want to save some keystrokes, I defined also a \tag command as you posted in your example: \newcommand{\tag}[1]{\colorbox{green}{#1}} Use the color you prefer of course! Using tcolorbox you can ...


1

From your sketch I assume that you only want long equations to go into the margins. You can easily widen the line at the appropriate equations using changepage's adjustwidth: \documentclass{scrbook} \usepackage[utf8]{inputenc} \usepackage[includemp, showframe, paperwidth=18.90cm, paperheight=24.58cm, top=2.170cm, ...


1

Here's a solution based on @UlrikeFischer's answer here, using \parshape instead of warpfigure. It also relies on the \replicate command defined by @JosephWright here. I defined a new command \doublewrap which takes six arguments: (mandatory) The width of the left margin note, (optional) The number of lines that the left margin note should span, (...


1

Minted uses fancyvrb under the hood. To change the text color with the formatcom option you have to define a function that redefines \FancyVerbFormatLine as in \newcommand{\shellfgcolor}{% \def\FancyVerbFormatLine##1{\textcolor{white}{##1}}% } and pass it to the formatcom option of minted as in formatcom=\shellfgcolor So your MWE becomes: \...


1

Here is an option with pgf % !Mode:: "TeX:UTF-8" \documentclass{article} \usepackage{pgf} \begin{document} \noindent \the\textwidth \\ \pgfmathparse{\textwidth} \pgfmathresult pt \\ \end{document} where \pgfmathparse returns \textwidth in points but without unit to \pgfmathresult, so you have to manually add unit to it however you know it is always in ...


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