Tag Info

New answers tagged

0

In some cases, you might want to suppress the number on a footnote. I looked around the web, and a few suggestions were out there, but the simplest one I could find was the following: \let\thefootnote\relax\footnotetext{put text here}


4

Use a correct list for your numbering instead of \noindent \bf 1.: \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[font=\bfseries] \item \begin{verbatim} abc aba \end{verbatim} \item blublb \end{enumerate} \end{document}


1

The command \opening does more than printing the greeting: It sets up the first page. So if you want something to affect only "the text body" it is better to start if after \opening. So move \begin{onehalfspacing} behind \opening{...}.


2

You can provide an additional toggle (or conditional) that is used in your hook. Below I defined \ifboldPDFchapters that you can switch depending on what you need, and added the conditional to the hook: \usepackage{bookmark} \newif\ifboldPDFchapters \bookmarksetup{ open, addtohook={% \ifnum\bookmarkget{level}=0 % \ifboldPDFchapters ...


2

The idea is correct using addtohook and \bookmarksetupnext. However, bold=false of \bookmarksetupnext is overwritten by the hook. Therefore \bookmarksetupnext must also use the hook: \documentclass[listof=totoc]{scrreprt} \usepackage{bookmark} \bookmarksetup{ open, addtohook={% \ifnum\bookmarkget{level}=0 % \bookmarksetup{bold}% ...


2

It doesn't work to use tabularx with no X columns, but I wouldn't use tabularx here. This is still a bit wide but not knowing the language I can't really abbreviate any more. \documentclass[fontsize=12pt,paper=letter,headings=small,bibliography=totoc,DIV=12,headsepline=true,titlepage=on]{scrartcl} \usepackage{soul} ...


1

As far as I can understand, mainly you have a problem with floats placements. At this respect, some suggestions for a smooth layout transition: Inside the floats, always use table/image widths relatives to line width in %,never fixed sizes as 5 cm, nor sizes relatives to the text or column width. For example, for a figure use: This must produce in ...


3

You can select the baseline for the tikzpicture; for example, using baseline=(current bounding box.north) as option you get The code: \documentclass[12pt,leqno]{article} \usepackage{amsmath, amsfonts, amssymb,amsthm} \usepackage[margin=1 in]{geometry} %margins \usepackage{tikz} %Vector Drawing and Graphs \usepackage{pgfplots} \usepackage{enumitem} ...


1

You can use the longdiv "package". I put package in quotes because loading it using \usepackage{} doesn't work and for whatever reason, you have to load it using \input longdiv.tex. Then you can do long division using \longdiv{6584}{28}. After that, you can use package polynom to do polynomial long division as \polylongdiv{x^2+2x+4}{x-1}


2

The quickest fix is to \let the listing entries be formatted as figure entries using \makeatletter \let\l@listing\l@figure \makeatother I reduced the original code even further up to almost a MWE: \documentclass[a4paper,12pt]{article} \usepackage{xcolor} \usepackage{setspace} \onehalfspacing \usepackage{listings} \usepackage{minted} ...


1

You could also use the fancyhdr package for this: \usepackage{fancyhdr} \usepackage[margin=1in]{geometry} \pagestyle{fancy} \lhead{123 Main Street\\ MyTown, USA 12345} \chead{{\Huge DaimyoKirby}\\ abc1234@myUni.edu\\ 123.456.7890} \rhead{123 Campus Postoffice\\ CollegeTown, MyState 09876} \renewcommand{\headrulewidth}{0pt} %to get rid of the default rule ...


2

I think three minipages are enough: \documentclass{article} \usepackage[margin=1in]{geometry} % set margins to 1 inch \begin{document} \begin{center} {\Huge DaimyoKirby}\par\bigskip \begin{minipage}[b]{0.33333\textwidth} \raggedright 123 Main Street \par MyTown, USA 12345 \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \centering abc1234@myUni.edu ...


0

Mac Instructions only Based on James Lingard's MS Word template page. Lingard's template file (LaTeX.dot) can be used to produce documents that look a lot like they've been typeset in TeX/LaTeX but you'll need to install the Computer Modern TrueType versions of fonts used by LaTeX to make them available in MS Word. Installing the fonts: Download the ...


2

For example, you could use \hfill before the words you want on the right: \documentclass{article} \begin{document} Company X \hfill City, State \end{document}


3

Declare a “variable” format: \documentclass{article} \usepackage{amsmath} \usepackage{cleveref} \crefformat{equation}{\eqA eq.~\eqB #2#1#3)} \newcommand{\eqA}{} \newcommand{\eqB}{(} \DeclareRobustCommand{\pcref}[1]{% \begingroup \renewcommand{\eqA}{(}\renewcommand{\eqB}{}% \cref{#1}% \endgroup } \begin{document} \begin{equation} 1+1=2 ...


1

Something like this? \documentclass[article]{memoir} \usepackage{lipsum} \fboxsep2em \begin{document}\fbox{\begin{minipage}[t][.4\textheight][t]{\linewidth} \fboxrule1pt\fboxsep1em \hfil \fbox{\begin{minipage}[t][4ex][c]{\dimexpr\linewidth-2em} \chapter{The Chapter} \end{minipage}}\vspace{1em} \section{The section} \lipsum[1] \end{minipage}} ...


2

The inline verbatim is small because you specify it that way! Change the line basicstyle=\ttfamily\footnotesize, to basicstyle=\ttfamily, or whatever and you'll be fine.


0

With scrbook it would be possible to change the page style for chapter pages to fancy using \renewcommand\chapterpagestyle{fancy} But it is recommended to use scrlayer-scrpage together with a KOMA-Script class: \usepackage{scrlayer-scrpage} \clearpairofpagestyles \cfoot*{\pagemark} The argument of the starred version of \cfoot is used for both the ...


1

From the fancyhdr manual (p. 7) Some LaTeX commands, like \chapter, use the \thispagestyle command to automatically switch to the plain page style, thus ignoring the page style currently in effect. To customize even such pages you must redefine the plain pagestyle. You could therefore write (adapted from the same manual, one page later) ...


1

I will follow my answer to making citations bold latex, where we saw how to do this for alphabetic styles. For numeric the only thing that changes is the relevant field names, here they are prefixnumber and labelnumber (ordinarily, especially the latter one is important). To bold labels use \DeclareFieldFormat{prefixnumber}{\mkbibbold{#1}} ...


3

The following solution, which uses LuaLaTeX, is a simple extension of the answer given at http://tex.stackexchange.com/a/165224/5001. The solution assumes that the string "Hallo", without any subsequent letters, should be highlighted as well. If that's not the case, just change "(Hallo%a*)" to "(Hallo%a+)" in the second argument of the string.gsub ...


2

You can use enumitem for that without inserting manual actions \documentclass{scrreprt} \usepackage{enumitem,lipsum} \begin{document} \lipsum[1] \begin{itemize}[noitemsep] \item first item first lvl \item second item first lvl \begin{itemize}[nosep] \item first item second lvl \item second item second lvl \end{itemize} \end{itemize} \lipsum[2] ...


0

Here is a solution with modified output routine \documentclass{article} %%%%% just for the example \newcounter{mtctr} \newcommand{\mtlipsum}[1][100]{% \setcounter{mtctr}{0}% \loop \stepcounter{mtctr}% \noindent this is line n \textbf{\themtctr}\par \ifnum\value{mtctr}<#1 \repeat} %%%%% \makeatletter \gdef \@makecol {% for normal pages ...


1

It occurred to me that you may not really want footnotes, you just want to put commentary around the poem, commentary which may not be closely tied to the page. This is most easily done putting the poem into static frames then filling the flow frames with commentary. \documentclass[a4paper,12pt]{article} \usepackage{flowfram} \usepackage{lipsum} ...


1

The most stable way (in my eyes) is to declare the adjusted fontsize/baselineheight pair directly. As both have to stay proportional to each other you can scale down both by the same factor, which is approximately the square root of the quotient from measured and target height. (The complete example below smoothes down this factor to gain a little more ...


1

Yet, the most accurate way seems to consist in using the anyfontsize package. The algorithm for finding the target font size and baselineheight is: first shrink the baseline by the ratio of target height and actual height and the fontsize proportionally (similarly to the suggestion of @MartinScharrer) and then factor in the relative difference consecutively ...


1

The everypage package provides a hook via which you can place an image on every page. (For a usage example, see the draftwatermark package by the same author.) If the choice of image must be random, the lcg package implements random number generation. All three packages should be compatible with both songs and songbook. (I loaded them successfully using ...


1

A bullet-proof solution would be to use the standard fontsize switches. The algorithm I propose is simple brute force: if the text exceeds the borders of the box use the relatively next small font, else use the next higher one unless it would blow up the borders of the bounding box. This method is safe as its termination is guaranteed and the "complexity" ...


1

My opinion for abstracts in a thesis is that they should be typeset just like chapters; here's a possible setup: \documentclass{book} \usepackage{emptypage} % I recommend it \usepackage{lipsum} \begin{document} \frontmatter \tableofcontents \chapter{Abstract} \lipsum[1] \mainmatter \chapter{The thesis} \lipsum \appendix \chapter*{Abstract for ...


2

May I suggest you to use tcolorbox and its wonderful interaction with listings. A little example (adjust the settings according to your needs): \documentclass{article} \usepackage[many]{tcolorbox} \tcbuselibrary{listings} \newtcblisting[auto counter]{mytcblisting}[2][]{ enhanced, breakable, arc=0pt, outer arc=0pt, listing only, colback=white, ...


3

In terms of markup the nesting is quite easy to setup: \def\footnote#1{% \@ld@footnote{\let\footnote\footnoteA\indentfn#1}% } \def\footnoteA#1{% \@ld@footnoteA{\let\footnote\footnoteB\indentfn#1}% } where \footnote, \footnoteA, \footnoteB are three indipendent footnote macros and \@ld@footnote and \@ld@footnoteA are copies of those (respectively). ...


1

Her is an improvement to make the result a little coloser to the post. In particular I changed the font to fourier+erewhon: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fourier, erewhon} \usepackage{graphicx} \usepackage{caption} \captionsetup{labelfont=bf, format=hang, labelsep=period} \begin{document} ...


2

Use caption package, with labelfont=bf key for label in bold series and format=hang for indent the caption text. \documentclass{article} \usepackage{mwe} \usepackage{caption} \captionsetup{labelfont=bf,format=hang,labelsep=period} \begin{document} \begin{figure}[h] \centering \includegraphics{example-image} \caption{If $μ=0$ and $σ=1$, the distribution is ...


2

Both approaches described here are taken from Stefan Kottwitz's answer to Non-breaking space in \citet using natbib?. The \mbox approach You can redefine \cite to be wrapped in a \mbox with \let\oldcite\cite \renewcommand{\cite}[1]{\mbox{\oldcite{#1}}} Or, even better, do so with the letltxmacro package (See When to use \LetLtxMacro?) ...


0

\printglossary[type=\acronymtype,style=super]


7

There is: \num from siunitx or \numprint from the paronymous package. Both work in tables (alignment of the decimal part symbol), are language-aware and highly customisable. You can have automatic rounding of numbers to a fixed number of decimals, a convenient way of typing numbers in scientific notation (6.022141e23 will produce a correct formatting of the ...


1

Your first problem comes because you use \DeclareFieldFormat[thesis]{pages}{} To delete the pages field. This results in biblatex not printing the pages field, but thinking it did print the field, seriously messing up punctuation tracking, as you see. A better solution is to use \AtEveryBibitem{% \clearfield{note}% \ifentrytype{thesis} ...


4

The unexpandable stuff (\lowercase, \textsc, \MakeLowercase) must not appear in any counter value, which is used in anchor names. Package hyperref already uses \theH<counter> instead of \the<counter>. But it fails for \theHstnumber, because it uses \thelstlisting instead of \theHlstlisting. Fix: \documentclass[english]{report} ...


5

Changing of the sectional fonts: Change size of section, subsection, subsubsection, paragraph and subparagraph title Adjusting the counter representation (somewhat relevant): Continuous v. per-chapter/section numbering of figures, tables, and other document elements \documentclass{article} \usepackage{sectsty} \subsubsectionfont{\normalfont\itshape} ...


4

I wouldn't do things this way. Since your \subsection* levels are enumerated with letters, they are regular numbered sections, so you should use \subsubsection. (If you don't like typing \subsubsection you can change it to something else (e.g. \let\lsection\subsubsection)). Then you can format everything simply with titlesec: \documentclass{article} ...


3

Here is one option: A redefinition of \thelstlisting and \thetable (and others...) to {\scshape\alph{chapter}}.\arabic{<cntr>} when you reach \appendix: \documentclass{report} \usepackage[colorlinks=true]{hyperref} \usepackage{listings} \lstset{frame=single} \renewcommand{\thetable}{{\scshape\thechapter}.\arabic{table}} \AtBeginDocument{% ...


2

You could also simply write out the word. 1st = first, 2nd = second, and so on. Probably better in a formal setting anyway. If this is in a figure or table then any of the above answers sound great, but in a paragraph setting there's no need to get too cute.


7

The phdthesis type is an alias to the @thesis type, since biblatex uses @thesis as the entry with the type field to specify the kind of thesis. But the alias points to the actual type, and so can't be used in the DeclareFieldFormat command. So instead use: \DeclareFieldFormat[article,thesis]{title}{\mkbibemph{#1}} Also, it's better to use \emph or ...


1

I think you are better off if you load minted.sty with option newfloat and use the interface to tocloft.sty as described in newfloat.pdf. Code: \documentclass{article} \usepackage[titles]{tocloft} \newlistof{listing}{lol}{List of Listings} \usepackage[newfloat]{minted} \usepackage{caption} \newenvironment{code}{\captionsetup{type=listing}}{} ...


7

You can use enumitem package and tweak things: \documentclass{article} \usepackage{enumitem,amssymb,graphicx} \newcommand{\mysquare}{\scalebox{0.5}{\raisebox{0.65ex}{$\blacksquare$}}} \SetLabelAlign{myleft}{\strut\smash{\mbox{}\hspace{\parindent}\parbox[t]\labelwidth{\mysquare \, \raggedright#1\hfill :}}} \begin{document} Before scientists can develop ...


6

Only printing the number bibstring doesn't take the new numbers string in account. You must check if the field is either a single number or a numeral range and then print it accordingly. In a very simplified way, you can use: \DeclareFieldFormat[article]{number}{% \iffieldnum{number}{\bibstring{number}\addnbspace}% ...


3

Using the aligned environment instead of split there is no problem, especially if you add the geometry package: \documentclass[a4paper]{book} \usepackage{geometry} \usepackage{amsmath} \begin{document} \begin{align} T_4 &= \langle \underline{k}\,.\,\underline{k}^{*^T} \rangle= \left\langle \begin{bmatrix} \left|k_1\right|^2 & k_1k_2^* ...


3

\documentclass[a4paper]{book} \usepackage{amsmath} \begin{document} {\setlength{\arraycolsep}{1.5pt} $\begin{array}{rclc} T_4 &=& \langle \underline{k}\,.\,\underline{k}^{*^T} \rangle= \left\langle \begin{bmatrix} \left|k_1\right|^2 & k_1k_2^* & k_1k_3^* & k_1k_4^*\\ k_2k_1^* & \left|k_2\right|^2 & k_2k_3^* & k_2k_4^*\\ ...


2

You can use verbatim package, which provides \verbatiminput, or listings package (with \lstinputlisting). I use the latter because it allows lines breaking. The \lstdefineformat put a penalty after each * o -, allowing line breaks if there are a lot of * or -. \begin{filecontents*}{file} -- -- Office Simulation File (DATA) Data Section Version 2014.1 Jun ...


3

If you want a 1 to 1 replica of this, it would look like: % arara: pdflatex \documentclass[a4paper]{book} \usepackage{amsmath} \begin{document} \[ % or \begin{equation} if you want it numberd. \begin{split} \left[\begin{matrix} . & . &\\ . & . & \cdots\cdots\\ . & . & \cdots\cdots\\ . & . & \end{matrix}\right.\\ ...



Top 50 recent answers are included