Tag Info

New answers tagged

3

You can define a short one that matches the longer ones and fits quite well on the i like this: \newcommand{\shortmacron}{% \makebox[0pt][l]{% \rule[1.3ex]{0.2em}{0.035em}% }% } Another way is to define a smart version that automatically adapts it’s length. I also set this one a little lower to minimize the conflict with the drop serif of the ...


2

Some juggles for keeping the ABNT class happy; the initials of the author's name must be treated specially because of how the bibliography style chops them. Here I use filecontents just to keep the example self-contained. \RequirePackage{filecontents} \begin{filecontents*}{\jobname.bib} @Article{russian2002, Title = {\textcyrillic{Эпидемиология ...


9

At first you don't need an equivalent for fontenc but for inputenc. You should (like inputenc) make the non-ascii chars active and map them to suitable commands. E.g. in an 8-bit encoded file you could do something like this: %OT1-encoded font \catcode`\ä=13 \defä{\"a} Räuber \bye When using a T1-encoded font life is a bit easier, as a lot of chars are ...


3

The LaTeX team have a regression suite for LaTeX itself which is also available to others from CTAN as l3build. This is based not on doing binary comparison of PDF files but rather on comparing results at the 'TeX end' using the .log file. This can be done by deliberately logging programming results ('Does this macro produce the correct tokens?') or by ...


0

It turns out that what I wanted to do was use latexpand to put all the sources into one file and then compare the two tex files. Exactly what I needed :)


0

Have you tried DiffPDF (http://www.qtrac.eu/diffpdf.html) ? Works on Windows and macOSX machines. It is far from perfect, but there are cases where it is really helful. Pascal


1

A more updated answer; the best shot for switching to Preview.app is, in viewPDF.py, to set: if s == "Darwin": viewercmd = ["open", "-a", "Preview"] With this, after compiling, you should be able to execute window.run_command("view_pdf") in the console and it should open the generated pdf with Preview. Then, in makePDF.py, change: if ...


1

\x takes the string length as last value: \StrLen{#1}[\mylen]; \foreach \x in {1,...,\mylen} { Then \second \pgfmathtruncatemacro{\second}{\x+1}; is larger than the string length, but \StrChar{#1}{\y}[\numB]; \y is empty now, because #1 does not provide any digits after the string end and the empty \numB is invalid in the multiplication: ...


0

Try the layouts package which will list all the page layout details including the page height and width. For instance: \documentclass[...]{...} \usepackage{layouts} ... \begin{figure} \centering \currentpage \oddpagelayouttrue \pagedesign \caption{Odd page layout for this document} \end{figure} ... will produce a scale diagram of the various aspects of ...


5

Improved version To have finer control, you can use Caramdir's answer to Drawing on an image with TikZ. The idea is to place the picture so that the lower left corner is at the origin of the TikZ coordinate system; a helper grid is added (See Jake's answer to the same question) just to easily visualize coordinates during the placement of other elements: ...


0

For this math font and combination of letters, I think you need to insert a negative thinspace, \!, i.e., write \alpha_{\!p} instead of just \alpha_!p. This applies to cases where \alpha is on the baseline or in the first subscript position. The following screenshot shows the letter combinations with this adjustment on the left, and without the adjustment ...


2

No guarantee! Might effect parts of your document which you do not want to change. % arara: pdflatex \documentclass{scrartcl} \usepackage{newtxtext} \usepackage{newtxmath} \catcode`_=\active \newcommand_[1]{\sb{\mspace{-1.5mu}#1}} \pagestyle{empty} \begin{document} $\lambda_{\alpha_p}$ $l_{\alpha_p}$ \end{document}


1

From the comments above, I managed to define a few commands that should serve as basic fallbacks for those people that resist XeTeX. LuaTex: \newcommand{\RL}[1]{\bgroup\luatextextdir TRT#1\egroup} \newcommand{\LR}[1]{\bgroup\luatextextdir TLT#1\egroup} \newenvironment{RTL}{\luatextextdir TRT\luatexpardir TRT\luatexbodydir TRT}{} ...


0

Try (compiling with XeLaTeX) the following: \usepackage{polyglossia} \setdefaultlanguage{polish} \usepackage{fontspec}


0

Based on the comments received, I've been able to answer my question. See page 27 of the current manual for microtype. ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. Automatic font expansion has been improved in pdfTeX 1.40, in that it now not only works with Type 1 fonts but also with TrueType, OpenType ...


0

Since the amount of information about the error is very limited, I am guessing a few things. I think you have saved the tex source file (name.tex) in the installation directory (C:\Program Files\ ...). Try saving the file elsewhere (e.g. Documents) and try to compile. Let me know if my guess is wrong, and provide more details in that case.


2

\title{} just tells LaTeX what the title is. It doesn't produce any output. To actually typeset the title, use \maketitle. \title{My title} \author{Me} \date{}% if you don't want a date \maketitle


2

Instead of manual spacing, one easy way to align the boxes is to use a tabular; the inter-column space can be controlled with \tabcolsep (default=6pt); another option is to use \phantom, as in the second example code below. You can use the optional argument for \\ as in \\[1cm] to increase the vertical separation between boxes. The code: ...


1

This works. You need to use the entries defined in the glossary. Otherwise there is no way to sort them! \documentclass[a4paper,12pt]{report} \usepackage[style=long,toc,acronym,xindy,sort=use]{glossaries} \makeglossaries \newglossaryentry{computer}{ name=computer, description={is a programmable machine that receives input, stores and manipulates ...


0

I found a solution. Simply add it as a keyword by adding the line otherkeywords={@param,@pre,@post,@return} to lstset. See below \documentclass[paper=a4, fontsize=11pt]{scrartcl} \usepackage{color,soul} % For text coloring and highlighting \usepackage{listings} \definecolor{dkgreen}{rgb}{0,0.6,0} %for listings ...


1

Works fine for me when I correct the syntax: the last argument is optional and should be in square - not curly - brackets. \documentclass{scrartcl} \usepackage{chronology} \begin{document} \begin{chronology}[3]{1990}{2000}{3ex}[\linewidth] \end{chronology} \bigskip \begin{chronology}*[5]{1764}{1800}{\textwidth}[12cm] \small ...


0

I do not know where to find simplemargins so I've commented that out. I still get compilation errors. However, here are some hints: \hypersetup needs to be in the preamble: right now, it complains that you are setting things up too late and it is ignoring e.g. colorlinks (if it still works, that is just because that's default); page layout needs to be done ...


5

I do not see a reason not to believe the error message, that the included PDF file is invalid. The application that has created the PDF file is buggy. Try pdfinfo Nomogram3d_v05a.pdf to get a hint, which program might be the culprit. Description of the error Pages are organized as page tree with a pages object as root, intermediate nodes and leaves, the ...


1

The LaTeX file generated by this program runs in 4.3 seconds in pdflatex and 13.1 seconds in lualatex. #include <stdio.h> #include <stdlib.h> #include <limits.h> int main() { FILE *fl=fopen("try.tex","w"); long x,y; ...


8

For comparison, in ConTeXt the penalty is similar. Test file (13 pages) \starttext \dorecurse{50}{\input knuth \par} \stoptext System details Macbook Pro with ConTeXt standalone. LuaTeX time context --noconsole --runs=1 test.tex 0.96s user 0.08s system 97% cpu 1.069 total Pdftex time texexec --noconsole --runs=1 test 0.40s user 0.13s system 83% ...


6

In my case, the speed difference was entirely attributable to the microtype package. documentclass{article} \usepackage{lipsum} \usepackage{charter} \usepackage{microtype} \begin{document} \lipsum \end{document} shows a factor 3 speed difference. some other features of my document (probably tabulars) managed to worsen this by a further factor 2 for a ...


0

Here's my preliminary solution, which incorporates everything. It doesn't fully work yet, but I'll update it when it does. \documentclass{classnofonts} \usepackage[demo]{graphicx} \usepackage{letltxmacro} \usepackage{atbegshi} \usepackage{ifthen} \usepackage{everypage} \makeatletter \newcount\caption@counter@i \caption@counter@i\z@ ...


15

I believe the question "which is slower" depends on more than just the preamble. As you noted, it may make sense to postpone speed penalties until they are actually used. This answer is just a partial answer within my scope and interest, so you may need further input regarding the "factor 6 speed penalty" for your example preamble. In the following ...


6

You can reset the url-Breaks in the bib-entry with the execute key: @Article{Zwaan2004, Title = {Moving words: Dynamic representations in language comprehension}, Author = {Zwaan, Rolf A. and Madden, Carol J. and Yaxley, Richard H. and Aveyard, Mark E.}, Date = {2004}, Journaltitle ...


1

The package author has corrected the package to provide an appropriate configuration for LaTeX and the package now supports scaling with (pdf)TeX. With the current CTAN version (v4.4.0), which is also now in TeX Live, the OP's MWE: \documentclass{article} \usepackage{fontawesome} \begin{document} {Normal \faAdjust} {\Huge Huge \faAdjust} \end{document} ...


0

The \graphicspath{} command defines the directories only for \includegraphics{}, therefore in the \input command you have to use the relative position, like \input{./fig/MK.pdf_tex}. If I remember correctly, there is the \inputx package that allows doing the same for \input; maybe you want to give it a try.


3

How fancy (and accurate) do you need? If you're not using geometry, you could do something like this: \documentclass[a4paper]{article} %\documentclass{article} % if you don't load a package like geometry or hyperref (who doesn't use hyperref?), then you could add these two lines \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight \makeatletter ...


1

Biber does not know the option --include-directory. If you use the TeX switch -output-directory or some kind of build folder option of your editor/IDE, you will need to tell Biber so using either of the --input-directory or --output-directory options. Biber's help explains the two thus --input-directory [directory] .bcf and data files will be looked ...


5

The warning Package epstopdf Warning: Drivers other than `pdftex.def' are not supported. comes from package epstopdf-base (usually automatically loaded by graphics.cfg) can be triggered, when package graphics or graphicx is loaded with the wrong driver and the file is compiled by pdflatex, for example: \documentclass{article} \usepackage[dvips]{graphicx} ...


0

There is no minibox key; and adjustbox should be inside \sidepar, not outside. \documentclass[a4paper,final,oneside]{memoir} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[british]{babel} \usepackage{adjustbox} \usepackage{lipsum} \begin{document} \mainmatter \chapter{Basic Matrix Operations} The basic matrix operations which the ...


1

Here I do a bubble sort (with diagnostics that can be commented). Then I employ the indirect addressing requested by the OP. EDITED to automate necessary initializations. \documentclass{article} \usepackage{ifthen} \expandafter\def\csname macro-1-savedposition\endcsname{12345} \expandafter\def\csname macro-2-savedposition\endcsname{1234} ...


4

No need for minipages, \raggedright or any extra stuff. Just tabulars and \hfill between any two of them. The placement option [t] also aligns the tables' headers. \documentclass{scrartcl} \begin{document} \begin{table} \footnotesize \begin{tabular}[t]{|p{3.2cm}|c|} \hline ...


1

I can't recommend making figures not to float. It's right, the caption is just for showing the reader what the figure is about. However, here's a way to cope with your problem: define an environment where you set up the format for the subfigure caption (otherwise it wouldn't be set, for some reason). \documentclass{article} % Article class of KOMA-script ...


0

Try use figure option [H] provided by package float: \documentclass{article} \usepackage[pdftex]{graphicx} \usepackage{caption} %for images \usepackage{subcaption} %for sub images \usepackage{float} %for figure option H \begin{document} \section{Doesn't float but not as pretty} \subsection{A} The below image details what results we got for subsection A ...


1

Thanks to @AkiraKakuto, the problem was that MikTex was still using old versions of the fontawesome package from the AppData/Roaming folder despite the package was updated using package manager and the "update app" within MiKTex. The problem is solved by deleting the fontawesome folder within AppData/Roaming/MiKtTex/'version'.


2

In the case of the example code you've posted, all you need to do is to add the placement specifier [h!] to each begin{table} specifier. I would also omit the \makebox and minipage wrappers, as they seem to be doing nothing (except provide code clutter). More generally, if you don't want tabular material to "float" (in the LaTeX sense of the word), don't ...


2

I think pdflatex (or, more specifically, pdftex) is the culprit. It seems pdftex doesn't use the same font as lilypond does. Here's the line from the pdflatex output: [1 <./21/lily-98650107-1-eps-converted-to.pdf{/var/lib/texmf/fonts/map/pdftex/u pdmap/pdftex.map}>] (./test.aux) )</usr/share/texlive/texmf-dist/fonts/type1/ur w/ncntrsbk/uncr8a.pfb ...


2

The command you defined is fragile and will break in moving arguments. You can either \protect it in moving arguments or, better, declare it robust from the beginning: \documentclass[]{article} \usepackage{soul} \usepackage{color} \DeclareRobustCommand{\hlcyan}[1]{{\sethlcolor{cyan}\hl{#1}}} \begin{document} An example of \hlcyan{highlighted words with ...


1

Your question is very general, so it is impossible to give specific answer. I summarize advice given by Torbjorn, and add tow examples for figures: The code for above picture: \documentclass{article} \usepackage{tabularx}% for tables \usepackage{ragged2e}% for smart right adjusting text in table \usepackage{graphicx}% for figures ...


2

As explained in this question and the answers to it, the package already supports pdfTeX but the fonts are not correctly configured for LaTeX. Add the following (or the equivalent code from another answer there) to your preamble to correct the issue: \usepackage{fontawesome} \DeclareFontFamily{U}{FontAwesomeOne}{} ...


0

If you are generating your pdf document from the tex document at the command line then any of the previous suggestions are viable. To decrease typing at the command line you can write a makefile to handle the transparency checks and then generate the pdf. If you really want to do everything from within the tex document you can try the bashful package or the ...


-1

Edit codes as follows: \theoremstyle{theorem} \newtheorem{theorem}{Theorem}[section] \newtheorem{corollary}[theorem]{Corollary} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{remark}[theorem]{Remark} \newtheorem{definition}[theorem]{Definition} ...


2

When using either the ntheorem or the amsthm package to declare theorem-like environments, it's important to make use of the following rules of syntax when using \newtheorem: If you want the counter of a theorem-like environment to be subordinate to, say, the section number, use a directive such as \newtheorem{theorem}{Theorem}[section] i.e., the ...


1

From the start menu launch MiKTeX Package Manager, select mathabx-type1, right-click on the selection and select install. base. To install cm-super, do the same from MPM. Finally run from the command-line: updmap --verbose to update the type 1 fonts database. Added: I forgot this (important) detail: for the mathabx fonts to be displayed with their ...


1

In case you meant you want blank pages for the first three even pages. \documentclass[twoside]{report} \usepackage{afterpage} \usepackage{lipsum} \newcount{\SScount} \newcommand{\SSrepeat}% {\cleardoublepage \global\advance\SScount by -1 \ifnum\SScount>0 \afterpage{\SSrepeat}% \fi} \newcommand{\singleside}[1]% #1 = number of single-side pages to ...



Top 50 recent answers are included