New answers tagged

1

Here's a better reimplementation; \mathrm will always choose upright medium, whereas \textrm will retain the settings of the font current outside the formula. Note some further refinements. See Better automatic spacing of differential d? for more information. \documentclass{article} \usepackage{amsthm} \usepackage{amsmath} \usepackage{amssymb} ...


0

\tilde serves to put a tilde on top of something else. For your purpose, \sim does the job.


1

For example you can use the wasysym package, and with quick command to automate some proper spacing, here it goes. Output Code \documentclass{article} \usepackage{wasysym} \newcommand\insq[1]{% \Square\ #1\quad% } \begin{document} \textbf{Gab es irgendwelche technischen Probleme?} \insq{Allgemein} \insq{Personalisiert} \insq{Keine Probleme} ...


2

Just for fun (pdf only): \documentclass{article} \usepackage{hyperref} \begin{document} \CheckBox[name=check1]{} Allgemein \hfil \CheckBox[name=check2]{} Personalisiert \hfil \CheckBox[name=check3]{} Keine Probleme \end{document}


1

\makebox[2cm][l]{$\square$ TextA} \makebox[2cm][l]{$\square$ TextB} \makebox[2cm][l]{$\square$ TextC} Change [2cm] to whatever you need


0

Using multicol: \documentclass{article} \usepackage{enumitem,amssymb} \usepackage{multicol} \newlist{todolist}{itemize}{2} \setlist[todolist]{label=$\square$} \begin{document} \begin{multicols}{3} \begin{itemize} \begin{todolist} \item List item 1 \item List item 2 \item List item 3 \item List item 4 ...


2

Note, you will always need to use the optional short section name (toc) with this approach. You can always define a \mysection to take care of both. \documentclass[oneside]{article} \usepackage{showframe} \usepackage{mwe} \makeatletter \newcommand{\linetitle}[1]% #1 = section title text {\settowidth{\@tempdimb}{\@svsec}% section number is variable width ...


1

use multicolumn \documentclass{article} \begin{document} \begin{tabular}{|c|c|c|c|}\hline \multicolumn{2}{|c|}{A} & \multicolumn{2}{|c|}{B}\\\hline C&D&E&F\\\hline 1&2&3&4\\\hline 5&6&7&8\\\hline \end{tabular} \end{document}


1

\documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \resizebox{\textwidth}{!}{ \begin{tikzpicture} \draw [->,>=stealth',ultra thick] (0,0)--(2,0)node[pos=1,right] { \begin{tabular}{l} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam aliquet lorem nec \\turpis auctor placerat. In at nisi ...


3

Since you're using the command \tikz, I suppose this is going to appear inside of the regular document, along with other text. In that case, I don't think you need Tikz for everything. You can use a simple list and change the bullet with the arrow you created. Output Code \documentclass{article} \usepackage{tikz} \newcommand\mrarrow{% ...


3

I did the same thing when I went to Uni but I used plain \TeX. In places I would use tables, elsewhere I would use a combination of \hboxs and \vboxs to arrange them in a suitable way. Another important thing is to minimize spaces that happen automatically. Use negative glue or \keen if for example you want to overlap 2 boxes that have white areas. An ...


0

You did not show us a MWE or a bib file, so I can only guess. As I understand you, you wants the Lastname of one or more Authors be highlighted, for example printed bold. The Names should be defined in the tex code and you use program BibTeX to create the bibliography. Because you gave no style I used plain. With a little searching here you can find ...


4

It's simpler to do it with pst-node: consider variables you want to link as \rnodes, and connect them with the \ncbar command: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{mathtools} \usepackage{pst-node, auto-pst-pdf} \begin{document} \begin{postscript} \begin{equation} \begin{gathered} \phi (\rnode{n1}{x_1}) \quad \phi ...


3

Inspired by Bernard answer, just for exercise, below is solution based on TikZ picture: \documentclass[tikz, border=3mm, preview ]{standalone} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m) [matrix of math nodes,inner ysep=0pt,row sep=2ex] { \phi(x_1) & \phi(x_2) & ...


5

The magyar option seizes the initiative and changes the code for \@chapter to reflect the original code in the class and ignores the settings by sectsty. It does nothing to \@schapter, which is the reason you see sans serif in unnumbered chapters. Use titlesec, instead: \documentclass[a4paper]{report} \usepackage[sf,bf]{titlesec} \usepackage[T1]{fontenc} ...


3

Use \def\magyarOptions{chapterhead=unchanged} before \usepackage[magyar]{babel} Code: \documentclass[a4paper]{report} \def\magyarOptions{chapterhead=unchanged} \usepackage[magyar]{babel} \usepackage[utf8]{inputenc} \usepackage{t1enc} \usepackage{blindtext} \usepackage{sectsty} \chapterfont{\usefont{T1}{qhv}{b}{n}\selectfont\huge} ...


1

Here is a solution \documentclass[a4paper]{report} \usepackage[utf8]{inputenc} \usepackage{t1enc} \usepackage[magyar]{babel} \usepackage{blindtext} \usepackage{sectsty} \chapterfont{\usefont{T1}{qhv}{b}{n}\selectfont\huge} \sectionfont{\usefont{T1}{qhv}{b}{n}\selectfont\LARGE} \subsectionfont{\usefont{T1}{qhv}{b}{n}\selectfont\Large} \makeatletter ...


0

This may be misunderstanding your issue but amsart uses multiple \author commands to add each author, the relevant packages called by the document class then combine these as is set by the AMS preferences. The instructions to authors on CTAN (https://www.ctan.org/pkg/amsart) provide a concise but relatively straightforward guide. Inserting the following ...


2

Here's a much shorter example that illustrates the problem: \documentclass{beamer} \usepackage{glossaries} \makeglossaries \newglossaryentry{sample}{name=sample,first={\textit{sample}}, description={an example}} \begin{document} \begin{frame} \gls{sample} \end{frame} \begin{frame} \printglossary \end{frame} \end{document} The problem is that ...


2

The package xgreek explicitly redefines \@alph and \@Alph to use greek numbers. If those specific greek numbering style is not needed in the rest of the document, it's possible to switch back to the Latin style by catching the original definition and return to them after xgreek has been loaded. \documentclass[a4paper,12pt]{article} \makeatletter ...


1

You have \textwidth=6.0in. Setting \textheight=10in (say) \paperheight30cm (say) changes the height of the text (without spaces for headers and footers). The total height must be less than maximal TeX dimension, but that is about 5 meters. In your case an alternative way is to set `\renewcommand{\baselinestretch}{0.98} % some value slightly less than 1 ...


1

There is no incompatibility, only errors in the syntax for \titlecontents. The first argument is for code preceding the section label. Furthermore, there an optional-mandatory argument, which is the distance form the left margin. Also, don't use \underline here: you might have long titles, and \underline does not break across lines. Use \ul from soul(utf8) ...


1

Part of the problem is that the picture is too big to fit into the text area, and part of the problem is that the starting node is not at the center of the image. (Standalone and geometry are incompatible, but since you wanted it on A4 paper, it doesn't matter.) My solution was to put the mindmap into a savebox, then run tikz a second time to center the ...


0

Here was my solution, modified slightly from the previous answer and the tcolorbox manual: \usepackage[most]{tcolorbox} \newtcolorbox{myquote}{colback=yellow!20!white,colframe=yellow!75!black,grow to right by=-10mm,grow to left by=-10mm, boxrule=0pt,boxsep=0pt,breakable} \makeatletter \newcommand{\blockquote}[1]{ \begin{myquote} #1 ...


5

You can't use an enumitem-like interface. You need to set the beamer theme for itemizeed items: \documentclass{beamer} \usetheme{warsaw} \usepackage{pifont} \setbeamertemplate{itemize item}{\ding{118}} \begin{document} \begin{frame}{Frame title} \begin{itemize} \item first item. \item second item. \end{itemize} \end{frame} ...


2

A simple tabular and 3 pstricks nodes. The text is written first, and a triangle is added around it: \documentclass[x11names]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{ebgaramond} \usepackage{array} \usepackage{pstricks-add} \usepackage{auto-pst-pdf} \psset{unit = 2,dotsize = 2.5pt} \begin{document} \begin{postscript} ...


1

If you use ~ instead of spaces the whole expression will stay together!


2

The explanation is the image is laid on the base line, so you have to use `\raisebox{ a minimal vertical padding between the above and below rules: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{geometry} \usepackage{graphicx} % \usepackage{array, booktabs, longtable, cellspace} \renewcommand\cellspacetoplimit{5pt} ...


8

Quick demonstration with TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} \begin{tikzpicture} \node[ draw, align=center, regular polygon, regular polygon sides=3, inner sep=-10pt] { Join \\ Graham \\ as he sets sail\\ \ldots}; \end{tikzpicture} \end{document}


14

It is always appreciated if you show a bit of compilable code that shows the effort you already put into finding a solution. If you have nothing, maybe put at least a bit like: \documentclass{article} \begin{document} \end{document} The following might give you some ideas of how you could solve your problem: shapepar solution: As pointed out in the ...


2

You'll want to throw \ChNameAsIs \ChTitleAsIs into your preamble. See also Section 2.1 (page 3) of the fancychap documentation.


2

Here is a solution. Use \ChTitleAsIs or \ChNameAsIs as you need \documentclass[hidelinks,12pt]{report} \renewcommand{\baselinestretch}{1.5} \usepackage[T1]{fontenc} \usepackage{charter} \usepackage[Conny]{fncychap} \ChTitleAsIs %\ChNameAsIs \begin{document} \chapter{High performance} \end{document}


0

If one did not need horizontal rules between rows of the data, then a grouped TABstack could suffice, in particular, an \alignCenterstack. \documentclass{article} \usepackage{tabstackengine} \setstackEOL{\cr} \setstackgap{L}{\normalbaselineskip} \begin{document} \begin{tabular}{c|ccc} & A & B& C\\ \hline \Centerstack{D\cr C\cr B} & ...


1

The siunitx package is primarily used for typesetting physical quantities with SI units, but can also be used for this purpose. The package provides the S column type, which is used to typeset numbers with uncertainties in tables. By using the column specification S[table-align-uncertainty] will align the numbers at the plus-or-minus sign.


2

Here's the listings way, without no further configuration, and a tcolorbox listings box, which is configurable for the listing options and other other options for the pure display \documentclass{article} \usepackage{listings} \usepackage[most]{tcolorbox} \begin{document} \begin{lstlisting}[language=C] #include<stdio.h> int main(int argc,char ...


1

The default \chapter command issues three different spaces to set the chapter heading: Space from the top of the text block to the word Chapter; default is 50pt. Space between Chapter and the chapter title; default is 20pt. Space between the chapter title and the chapter body text; default is 40pt. All of this is made by the macro \@makechapterhead (from ...


4

The vertical skip between text page top margin and the chapter title is controlled by \vspace*{50\p@} in \@makechapterhead. (\p@ is an internal representation for pt) Either redefine this command completely or use a \xpatchcmd replacing \vspace*{50\p@} with some other length, that's easier to change, in a special length register, say \chaptertopskip. ...


1

The first answer to the question you linked in your question (http://tex.stackexchange.com/a/4816/36296) seems to work just fine. If only the first entry was coloured, did you remember to adjust the alignment options to $c^c^c^r^c^c? \documentclass{article} \usepackage{tabularx} \usepackage{adjustbox} \usepackage{booktabs} \usepackage{array} ...


4

Maybe this? I introduce a \setrow{...} macro invoked on the first element of a row, which applies to each cell of that row (and is then reset). It employs the >{} and <{} feature of tabularx. \documentclass{article} \usepackage{tabularx} \newcommand\setrow[1]{\gdef\rowmac{#1}#1\ignorespaces} \newcommand\clearrow{\global\let\rowmac\relax} \clearrow ...


2

With a KOMA-Script class you can use \addsec to get an unnumbered section with entry in the header and the TOC. The scrlayer-scrpage option automark defines \sectionmark to set the right mark for a twosided report or book. So there is no need to redefine \sectionmark manually. \documentclass[12pt,british,twoside,openany,headings=small]{scrbook} ...


1

Add this line to your preamble (if not already done): \usepackage{amsmath} %% or, better, the mathtools extension) and this line in the body of your document: We want to study $\begin{aligned}[t]f\colon X & \longrightarrow Y\\ x&\longmapsto f(x) \end{aligned} $


3

You can use etoolbox to insert commands at the begin of the document. It will not work for arbitrary font commands, as floats resets the fonts at the begin, but a change of familydefault will work: \documentclass{article} \usepackage{rotating,lipsum} \usepackage{etoolbox} \AtBeginEnvironment{sidewaystable}{\renewcommand\familydefault{mdput}} ...


8

Not really a trick, but I usually put long equations over several lines and indent layers of code systematically with 2 spaces for readability. Just ensure that there are no blank lines in align environments, otherwise you will get the error ! Paragraph ended before \align* was complete.. For instance, I match the indentation for \left \right pairs and ...


5

One thing that complicates your code is a lot of expressions of the form ^{(…)}. I define a shortcut for them using the following code: \catcode`\"=13 \newcommand*{"}[1]{^{(#1)}} This means a"1 becomes a(1) and a"{10} becomes a(10). I would also define macros for sections of code you use frequently (e.g. you already have \ket, which is great). For ...


2

\author is an special command which could not accept all kind of contents. In you particular case I'd suggest to define a customized title page template where you can insert what you want. I've taken \defbeamertemplate*{title page}... from beamerinnerthemedefault.sty (change it according your theme) and copied it into your preamble. \defbeamertemplate has ...


0

This is readily achievable using sectsty and some manual adjustments for the \chapter setting: \documentclass{report} \usepackage{sectsty} % http://tex.stackexchange.com/q/59726/5764 \allsectionsfont{\centering\normalsize\bfseries}% All sections are centred/normal size/bold \subsectionfont{\normalsize\bfseries}% Correct \subsection formatting ...


4

Quite simple: \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[align=right, font=\bfseries] \item[25-1] Compute $1 + 1$ \item[25-8] Compute $1 \times 1$ \end{enumerate} \end{document} B.t.w., note align=right is the default.


1

\documentclass{scrartcl} \usepackage[shortlabels]{enumitem} \newcommand*\makeboldlabel[1]{\textbf{#1}} \begin{document} \begin{enumerate}[align=right,before=\let\makelabel\makeboldlabel] \item[25-1] Compute $1 + 1$ \item[25-8] Compute $1 \times 1$ \end{enumerate} \end{document}


4

Try \setlength\textheight{15cm}, or some length that works for you. You can then push the footer down with, for example, \setlength{\footskip}{8.5cm} \documentclass[addpoints,answers,10pt]{exam} \setlength\textheight{15cm} \setlength{\footskip}{8.5cm} \providecommand{\myquestion}{% \question Question text \begin{choices} \choice First choice \choice ...


2

You can define your own command that calls \paragraph only when not immediately \subsubsection. \documentclass[oneside,openany,openbib,11pt]{memoir} \usepackage{titlesec} \titleformat{\subsubsection}[runin]{\bfseries}{}{}{}[] \titleformat{\paragraph}[runin]{\normalsize\itshape}{}{}{}[] \makeatletter \newcommand{\prg}[1]{% ...



Top 50 recent answers are included