New answers tagged

0

I´m not totally satisfied with the solution, but I have a working code now. I thought I might as well share it so someone else can make use of it. I still want "Sannolikhet" to be centered over the four last columns but when I do that I get vertical lines where they are not supposed to be. I also want "Konsekvens" to be vertically ...


3

The problem is solved by adding back coordinate write me coord. \documentclass{article} \usepackage{forest} \useforestlibrary{linguistics} \newcommand\comment[2]{ % use node "write me coord" \node [anchor=mid west, xshift=.75cm] at (#1.mid -| write me coord) {#2}; } \begin{document} \begin{forest} for tree = {% sn edges, ...


1

A solution using tikz: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{tikz} \begin{document} \newcommand{\solidbox}[1]{% \tikz[baseline]\node[anchor=base, draw=black, outer sep=0pt, inner sep=1pt, fill=black!20] {#1};% } \newcommand{\dashedbox}[1]{% \tikz[baseline]\node[anchor=base, draw=black, dash pattern=on 2pt off 1pt, outer sep=0pt, ...


2

I would like to suggest you take the following approach: Remove the instruction \doublespacing from the preamble. Insert the instruction \setstretch{1.5} right before \begin{abstract}. Insert the instructions clearpage\doublespacing right before \section{Introduction}. \documentclass[12pt, draft]{article} \usepackage{natbib} \usepackage{setspace} \...


4

Probably the following suits your needs: \documentclass[% aip, jmp,% amsmath,amssymb, preprint,%reprint, dvipsnames% %author-year,% %author-numerical,% ]{revtex4-2} \usepackage{graphicx}% Include figure files \usepackage{dcolumn}% Align table columns on decimal point \usepackage{bm}% bold math \usepackage[mathlines]{lineno}% Enable numbering of text and ...


2

In {NiceTabular} of nicematrix, you can programmatically color the rows, columns and cells as you want. Here, I color part of the rows with a cyle of length 4. \documentclass[6pt, oneside]{article} \usepackage{geometry} \geometry{letterpaper} \usepackage{graphicx} \usepackage{amssymb} \usepackage{booktabs} \usepackage{nicematrix} \ExplSyntaxOn % The ...


5

Here is what you can do with {NiceTabular} of nicematrix. \documentclass{article} \usepackage{xcolor} \usepackage{nicematrix} \usepackage{makecell} \begin{document} \NiceMatrixOptions{cell-space-top-limit = 3pt, cell-space-bottom-limit = 3pt} \setlength{\belowcaptionskip}{2mm} \begin{table*} \caption{Confusion Matrix.} \centering \begin{NiceTabular}{c*{...


3

For the reasons explained in the booktabs manual, I am not a big fan of having vertical and horizontal rules in tables, but if this is what you want then here is one way to do this. A few remarks: you should load the hyperref package last I have switched to using a tabularx environment, of width 0.8\textwidth, as this way you can use an X-column type to ...


5

As you've noted, the iopart document class doesn't let you use the amsmath package and its multi-line display-math environments. However, it provides a re-implementation of LaTeX's venerable eqnarray environment, which seems suitable for the job at hand. \documentclass{iopart} \usepackage{esvect} % for \vv macro (alternative for \vec) \begin{document} \...


0

How do I make alignment like the one above for equation with many brackets and braces? \[ = -2 \displaystyle \left[ \frac{e^{\delta \sin (\frac{\pi}{2}-\phi)}}{\delta} +e^{\delta \sin (\frac{\pi}{2}-\phi)}\sum\limits_{n=1}^{\infty}T_n \cdot \sum \limits_{\alpha^{/}=0}^{2n-1} {2n(2n-1)(2n-2)...\times 1} \times \frac {(-\sin (\frac{\pi}{2}-\phi))^{2n-\...


-1

With plain tikz \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,calc} \begin{document} \begin{tikzpicture} \draw[line width=2pt] (0,0)node(a){}--(12,0)node[fill=white](B){B}; \node[fill=white]at ($(a)!0.50!(B)$) (A) {A}; \node[fill=white, below=of A, yshift=-4cm] (F){F}; \draw[line width=2pt] ($(a)!0.10!(B)$) |-(F); \node[fill=white, ...


0

Personally I think the set builder notation is appropriate, but stylistically, I would say this (or really anything this long) should be a displayed equation, simply because it's much easier to read that way than as an inline equation. \parbox{100pt}{ A set of comparison triplets \[ T = \{ (i,j,l) \mid \text{$z_i$ is more similar to $z_j$ ...


8

The general recommendation I give is to avoid long textual set builder notation: readers will be very tired when looking at the text and they'll have a hard time in isolating the closing brace. A set $T$ consisting of comparison triplets $(i,j,l)$ such that $z_i$ is more similar to $z_j$ than $z_l$ is given. However, if you use the set builder notation, it ...


5

You can just put text in textmode. \documentclass[12pt,a4paper]{article} \usepackage{amsmath} \begin{document} \parbox{100pt}{A set of comparison triplets $T=\{(i,j,l) | z_i$ is more similar to $z_j$ than $z_l\}$ is given.} \end{document}


1

Maybe you'll like it: \documentclass[xcolor={dvipsnames, table}]{beamer} \usepackage[T1]{fontenc} \renewcommand{\rmdefault}{ptm} \usefonttheme{structurebold} \definecolor{myblue}{RGB}{0,82,155} \mode<presentation> { \usetheme{CambridgeUS} \usecolortheme[named=myblue]{structure} \setbeamertemplate{navigation symbols}{} % To remove the navigation ...


0

Just change the first column width which you assigned at \begin{tcolorbox}[tab1,tabularx={l||Y||Y}] from X to l like that \begin{tcolorbox}[tab1,tabularx={l||Y||Y}] You get the output like this Keeping the three columns at X and Y widths will ensure that the three columns widths are equal, which you don't want. Assigning l for the first column width will ...


0

Easier to show than explain. \@captype is used by \caption. \intextsep is the same gap used by figure [h]. \documentclass{article} \usepackage{graphicx} \makeatletter \newenvironment{myfigure}{\begin{trivlist}\vskip\intextsep \item\begin{minipage}{\columnwidth}\def\@captype{figure}}% {\end{minipage}\vspace\intextsep\end{trivlist}} \makeatother \begin{...


0

You could use the adjustwidth environment from the changepage package. ... \usepackage{changepage} ... \begin{adjustwith}{}{-8em} wider text \end{adjustwidth} ... The two arguments lengths are added to the left and right margins respectively; positive value(s) decrease the local textwidth and negative value(s) increases it.


0

I'm afraid you have to come up with your own solution for your problem. The standalone style in combination with TikZ will produce a single PDF-page for each tikzpicture having the size of the (TikZ-)picture. Maybe this could be a start for you. You could include your figures using node and includegraphics. This code will generate a PDF with three pages (...


0

A good way to solve this is with the tcolorbox package, and then add a custom tcbox to your preamble with the style declarations of choice: \newtcbox{\inlinecode}{on line, boxrule=0pt, boxsep=0pt, top=2pt, left=2pt, bottom=2pt, right=2pt, colback=gray!15, colframe=white, fontupper={\ttfamily \footnotesize}} This will result in a similar look to what is ...


3

You can use BVerbatim from fancyvrb. \documentclass{article} \usepackage{fancyvrb} \usepackage{lipsum} % just to provide context \begin{document} \lipsum[1][1-6] \[ \begin{BVerbatim} [[0 0 1 ... 0 -1 1] [0 0 -1 ... 0 1 1] [0 -1 0 ... 0 1 0] ... [0 1 0 ... 1 1 0] [1 0 0 ... -1 0 1] [-1 1 1 ... 1 0 0]] \end{BVerbatim} \] \lipsum[1][1-6] \end{document}...


3

To display code, use the verbatim environment. \documentclass{article} \begin{document} \begin{center} \begin{minipage}{.6\textwidth} \begin{verbatim} [[ 0 0 1 ... 0 -1 1] [ 0 0 -1 ... 0 1 1] [ 0 -1 0 ... 0 1 0] ... [ 0 1 0 ... 1 1 0] [ 1 0 0 ... -1 0 1] [-1 1 1 ....


2

Your example doesn’t compile, and the problem was in one of the files you include but didn’t share. That unfortunately makes it impossible to test possible solutions. It would be easier to help you if you provided a MCVE (and removing extraneous lines until you’re left with the minimal set of commands that reproduces your problem is a good way to narrow it ...


0

This works for me % partpageprob.tex SE 553544 \documentclass{book} \usepackage{titlesec} \usepackage{lipsum} \begin{document} \makeatletter \renewcommand{\@endpart}{} \makeatother \part{A part} \vspace{2\baselineskip} \lipsum[1] \cleardoublepage \lipsum[2] \end{document} If you are using twocolumns, and possibly some pagestyles, the definition of \@...


0

At the editor level, in LyX: Document > Change Tracking > Track Changes (Ctrl+Shift+E) At the LaTeX level, in any plain text(LaTeX) editor, expliciting manually the type pf changes, with the package ...guess ..., yes, changes. At the plain text level, comparing differences between two versions. There a lot of options here, from control version ...


0

You can try a simple search and replace it as \textbf{A. Name} in your BibTeX file as below I have to bold the first author named Prateek Raj Gautam in BibTeX entry, it is written as Gautam, Prateek Raj or some times as P. R. Gautam and in the final output it is shown as P. R. Gautam so take this name and enclose it in \textbf{} as\textbf{P. R. Gautam} ...


0

I think Inserting \hskip-0.1pt in the first proposed code solves the problem of hatching. \newcommand\dout{ \bgroup \markoverwith{% \rule[0.2ex]{0.1pt}{0.4pt}% \hskip-0.1pt \rule[0.8ex]{0.1pt}{0.4pt}% } \ULon } \MakeRobust\dout


1

\documentclass[border=3mm]{standalone} \usepackage{hyperref} \hypersetup{hidelinks} \begin{document} \begin{Form} \begin{tabular}{|l|l|} \hline Name & \TextField[bordercolor={},backgroundcolor={},width=5cm]{}\\ \hline Surname & \TextField[bordercolor={},backgroundcolor={},width=5cm]{}\\ \hline City & \TextField[bordercolor={},backgroundcolor={},...


0

I propose this variant layout with booktabs and an \fbox: \documentclass[border=3mm]{standalone} \usepackage{hhline} \usepackage[table, svgnames]{xcolor} \usepackage{cellspace} \setlength{\cellspacebottomlimit}{4pt} \usepackage{booktabs} \usepackage{hyperref} \hypersetup{hidelinks} \begin{document} \begin{Form} \arrayrulecolor{Gainsboro!60!Lavender} \fbox{\...


2

Well the solution is simply using { } brackets like so: {a \over b} some words


2

If your bibliography is generated manually with thebibliography and \bibitems you absolutely cannot use biblatex. biblatex uses a completely different systems to produce citations and bibliography entries that is not compatible with thebibliography and \bibitems. For you this is not of much interest, but it may be nice to know that when you use BibTeX with \...


0

When writing 'math' variables like $x_1, x_2, \dots, x_n$ they appear as just text to LaTeX, so there is no way to change their typesetting without using a command on each one. However, as you might change your opinion on using bold variables later, you could define a custom command \newcommand{\var}[1]{{\bm{#1}}} and use that to define your variable x: \...


1

The frontmatter environment should only contain what's supposed to be in the header of the document. The main text of the document should go after \end{frontmatter}. \documentclass[aop,preprint]{imsart} %% Packages \usepackage{amsthm,amsmath,amsfonts,amssymb} \usepackage[numbers]{natbib} \begin{document} \begin{frontmatter} \title{sample title} \begin{...


3

The following MWE reproduces the issue \documentclass{article} \usepackage[english,basque]{babel} \usepackage[autostyle=false]{csquotes} \usepackage[style=numeric-comp, language=english, autolang=other]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} \cite{sigfridsson,worman,geer,nussbaum} \printbibliography \end{document} The problem ...


Top 50 recent answers are included