New answers tagged

1

You can experiment with different bars (this one is from the slashed L \L) \documentclass[12pt,a4paper,titlepage,oneside]{book} % il faudra ajouter [final] à la fin \usepackage[utf8]{inputenc} \usepackage[ibycus,frenchb]{babel} \usepackage[T1]{fontenc} \usepackage{lmodern} \makeatletter \DeclareTextCommandDefault{\KK} ...


2

Hyperlinks should work just fine in a PDF/A document, using pdfx --- but please send me any example that you find where this is not the case. However active actions are forbidden in a PDF/X, which standard is intended only for accurate high-quality printing. One of the new features in pdfx (v.1.5.8) is to enforce this in PDF/X documents, by patching ...


1

With pdfx.sty (v1.5.8) the following order of packages works also, provided you change the \usepackage[..options..]{hyperref} into \hypersetup{..options..}. \documentclass[twoside,a4paper,DIV15,parskip=off,9pt]{scrbook} \usepackage[a-1b]{pdfx} % Fonts and typesetting settings \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} ...


2

It seems that exam has poor compatibility with hyperref. You just need to add a definition for \theHchoice, so hyperref will pick up this instead of \thechoice. Using \arabic{question}.\arabic{choice} will ensure a unique tag. \documentclass{exam} \usepackage{hyperref} %% keep hyperref happy \newcommand{\theHchoice}{\arabic{question}.\arabic{choice}} ...


3

Run on the command line initexmf --edit-config-file pdflatex This will open a local pdflatex.ini in which you can put your save-size setting


1

If you (a) reduce the values of the length parameters \arraycolsep, \thickmuskip, and \medmuskip and (b) use the bmatrix environment of the amsmath package instead of array environments, the equation and the equation number fit on a single line. \documentclass[12pt]{report} \usepackage{amsmath} \usepackage[vmargin=25mm]{geometry} ...


1

I propose to use the medsize environment (about 80 % of \displaystyle), from nccmath. Also I simplified your code, using the bmatrix environment: \documentclass[12pt]{report} \usepackage{geometry} \usepackage{mathtools, nccmath} \geometry{ top=25mm, bottom=25mm, showframe } \newcommand{\sss}[2]{_{_{#1_{#2}}}} \begin{document} Some text some text some ...


2

I think this is what you want: \documentclass{article} \usepackage{xparse} \usepackage{hyperref} \DeclareExpandableDocumentCommand{\foo}{smm}{% \texorpdfstring {\IfBooleanTF{#1}{\textsf}{\textit}{#2}--#3} {#2-#3}% } \begin{document} \section{This is \foo{A}{B}} \section{This is \foo*{A}{B}} \end{document}


0

All you needed was \string. \documentclass{article} \usepackage[english]{babel} \usepackage{xr-hyper} \usepackage[destlabel=true]{hyperref} \makeatletter \newcommand{\foo@star}[2]{\textsf{#1}-{#2}} \newcommand{\foo@plain}[2]{\textit{#1}-{#2}} \DeclareRobustCommand{\foo}{\@ifstar\foo@star\foo@plain} \makeatother \newcommand{\mysection}[1]{\section[\string ...


1

TeX engines (the binaries which actually compile your document) recognise certain special comments in the very first line of the file. This works as several apparently different processes all resolve to the same underlying binary. In particular, both pdflatex and latex use the same binary, pdfTeX, but with different settings. If you have a first line that ...


1

The simplest solution for the problem is to use the tocbibind package: \usepackage[nottoc]{tocbibind} The option removes the table of contents entry from the table of contents itself, which is the most common usage. If you need it there, just do \usepackage{tocbibind} No \addcontentsline is necessary: the package will take care of adding also the lists ...


2

PDF/A is a standard for long-time archiving. It requires that all resources are embedded like fonts and color profiles. Also it restricts the language features. Advanced features like transparency or interactive features (JavaScript, some annotations, ...) are forbidden, which might be displayed differently in different viewers. A reasonable algorithm would ...


2

You need to add the [transform shape] option when creating the node. \documentclass{standalone} \usepackage{graphicx,tikz} \begin{document} \begin{tikzpicture} \begin{scope} [rotate=30] \node [transform shape](scope6) at (0,0) {\includegraphics{example-image}}; \node at (0,0) [rotate=0,color=black] {Text}; \end{scope} \end{tikzpicture} ...


1

Something like this: For this scope doesn't work. You can simply do the following: \documentclass[border=3mm, multi, tikz]{standalone} \usepackage{graphicx} \begin{document} \begin{tikzpicture} \node[rotate=30,draw=red,very thick] (scope6) {\includegraphics{example-image}}; \node ...


2

You can do that with the makecell package, which allows for line breaks in cells and a common formatting, through the\thead and \makecell commands. I propose another, looking better, solution, with only horozontal rules of different thickness, with the booktabs package. Finally I added some improvements to your table (unbreakable thin space between number ...


0

Forgot to add option explicit to \usepackage[explicit]{titlesec}


2

Well, I'm not sure but I think package lmodern should be part of the basic installation of MiKTeX. Please see the following image. I called the MiKTeX Package manager and filtered for lm (Latin Modern). Then you can see if Latin Modern is instaled, if you see an date in column installed. BTW: Do not forget to call package lmodern to activate Latin Modern ...


0

I will answer this question of my own for documentation purpose: MikTeX by default doesn't come with any scalable fonts that pdfTeX is happy with - who knows exactly what makes pdfTeX happy except cm-super... When using MikTeX, if encounter auto expansion is only possible with scalable fonts error, install cm-super fonts family, execute initexmf --mkmaps ...


5

You have a big error: you're missing the mandatory argument to array. However, there are better methods to accomplish what you want. \documentclass{article} \usepackage{amsmath,mathtools} \begin{document} \begin{equation*} M = \begin{dcases} \sqrt{1+0.6275 \frac{l^2}{Dt} -0.003375 \frac{l^4}{D^2 t^2}} & \text{if } \frac{l^2}{Dt} \leq 50 \\ 0.032 ...


0

I was hitting exactly the same problem, and solved it by uninstalling the x64 version of MiKTeX and installing the x32 version instead. I'm now prompted to download the missing packages. Hopefully this answer doesn't come too late!


2

Stealing Adapting liberally from Jake's answer to Plotting bell shaped curve in TikZ-PGF, and not knowing what sort of curve you had: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \pgfmathdeclarefunction{gauss}{2}{% \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}% } \begin{tikzpicture} \begin{axis}[ no markers, ...


0

Turns out that there was still residue from my previous texlive installation that I made via apt repositories. There were texlive directories in /usr/share/texlive/ (from repositories) and /usr/local/texlive/2015/texmf-dist/tex/latex (user installed). The shutdown script apparently called the wrong compiler, which was the one /usr/share. When I uninstalled ...


0

I solved it myself by providing the graphicspath arguments with both the paths relative to the subfile and from the mainfile as so: \graphicspath{{chap/chapter1/fig/}{fig/}} This way, both the subfile and the mainfile is able to find the correct folder for the figures.


1

Probably someone will suggest using forest for this kind of graph. It will be a good suggestion. But while waiting for it, you can start using positioning library and its =of (instead of of=) syntax. \documentclass[a4paper,12pt]{article} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{ treenode/.style = {align=center, inner sep=0pt, text ...


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 ...


1

it's often possible to isolate or "quarantine" special settings by hiding them in a group. braces {...} will do this, but i find it much easier to read \begingroup .... \endgroup this will not work for changes that are made globally. fortunately, in this case, font resettings are local.


2

Let a space in the \def or use \space in \psbarcode \documentclass[border=4,pstricks]{standalone} \usepackage{pst-barcode} \usepackage{auto-pst-pdf} % pdflatex require -shell-escape option!!! \begin{document} \begin{pspicture}(0,-0.2)(1.6in,0.5in) \def\h{0.33 } \def\w{1.6 } \psbarcode{NODATA}{height=\h width=\w includecheck includetext}{code128} ...


3

The problem is that the key-value pairs are separated by spaces and in \psbarcode{NODATA}{height=\h width=\w includecheck includetext}{code128} there is no space after \h and \w, because they're ignored at tokenization time. I tried with height={\h} or {height=\h} but neither works. A workaround is to define the macros with a parameter text: ...


2

kpsexpand '$TEXINPUTS' produces .:{/home/cen5848//texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/local/share/texmf,‌​!!/usr/share/texmf}/tex/{kpsewhich,generic,}// The problem is /home/cen5848//texmf which causes a recursive (//) search for texmf below /home/cen5848 using the file system rather than a mktexlsr file list. Apparently $HOME unexpectedly had ...


1

The package Libertine (as of the version published on february 11, 2014) provides the \useosf command, which, if used after loading the math font, sets old-style figures only for text (including headers). \documentclass[12pt]{memoir} \usepackage{textcomp} \usepackage[T1]{fontenc} \usepackage{libertine} \usepackage[libertine]{newtxmath} \useosf ...


1

This style already uses the sorting function. You can edit sort function bib.sort.order in your .bst file. It is very good described on Bibtex .bst file modification to include alphabetical ordering. I hope it will help you.


2

Package subscript defines \textsubscript. This is not needed with the recent LaTeX version, where the definition for \textsubscript is already part of the LaTeX kernel. For older LaTeX versions, \textsubscript is defined in package fixltx2e, from its documentation: 4 Fixes added for 2005/12/01 4.1 \textsubscript not defined in latex.ltx (pr/3492)


0

Been a few months since I asked this question, so I figured would be good to give it closure, for anyone facing the same problem. The best solution I found is to install SumatraPDF. It is very lightweight and brings back the long lost user experience of opening a PDF almost instantly (I can't recall when Adobe's PDF Viewer last was so fast... maybe in ...


3

Care needs to be taken when identifying the source/cause of the difference in output. For sure, \documentclass{standalone} \begin{document} $v_{\mathrm{eff}}$ \end{document} can be compiled with both pdfLaTeX and LuaLaTeX. Importantly, it produces identical results with respect of the relative position of the subscript term, irrespective of whether ...


1

I found a satisfying solution. The gist of the idea is to compile the tex-file with a temporary jobname like "temp" using latexMk. After completion, copy or rename the produced temp.pdf and temp.synctex.gz file to match the original document name. LatexTools enables this by customizing the build settings in LaTeXTools.sublime-settings (Preferences -> ...


2

Not a direct answer but rather a pointer to a possible route to a solution. Last year I developed a BibTeX style for a book catalogue bookdb.bst which involved extending one of the regular BibTeX files. Run texdoc bookdb to view the User Manual and possibly read bookdb.bst if you want the gory internal details. The User Manual doesn't describe the internal ...


2

The name of the fd-file is T1DejaVuSans-TLF.fd (see e.g. http://www.ctan.org/tex-archive/fonts/dejavu/tex). This means that the name of the family is DejaVuSans-TLF \documentclass{article} \usepackage[T1]{fontenc} \begin{document} \fontfamily{DejaVuSans-TLF} \selectfont Some text... \end{document}


0

The easiest way to deal with this is just to turn off Okular's automatic reloading, which can be done by going to Settings -> Configure Okular and unchecking Reload document on file change. With that setting unchecked, LaTeXTools will build your document and only update Okular once the compilation is complete.


1

I had this problem and none of the sites I visited helped. This is for linux. I was installing on a semi-incomplete backed-up image of a previous computer. My problem turned out to be the pre-existing config files in /etc/texmf/updmap.d This is what I did: Remove all tex packages: sudo apt-get remove texlive etc PURGE all tex packages: sudo apt-get ...


1

If you want to use csquotes you should make the quotes active, and input them (also the colon) without spaces as spaces can insert unwanted break points: \documentclass[12pt]{article} \usepackage[paperwidth=14cm,paperheight=20.5cm]{geometry} \usepackage{libertine}% use this font and geometry width to reproduce bad break \usepackage{ifxetex} \ifxetex ...


4

For babel, you have to use \frenchbsetup{og=«, fg=»}. For polyglossia, you have nothing to do, except the package inserts a breakable space (bug?), so in case the space does break, you have to insert an unbreakable thin space by hand (\,`). % !TeX TXS-program:compile = txs:///xelatex/[--shell-escape] \documentclass[12pt]{article} ...


0

What do you think of this? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{enumitem} \begin{document} \begin{description} [font=\normalfont, labelwidth=2cm, leftmargin=\dimexpr\labelwidth + \labelsep, nosep]% \item[A] Hallo. Hallo. Hallo. Hallo. Hallo. Hallo. Hallo. Hallo. Hallo. Hallo. Hallo. Hallo. \item[AB] Hallo \item[ABC] Hallo ...


1

This combines sidwaysfigure and pdflscape into one environment. Nore: The everypage hook runs after the page is laid out, whereas \afterpage runs before the next page starts. The result appears to be compatible with pdflscape. \documentclass{article} \usepackage{blindtext} \usepackage{graphicx} \usepackage{everypage} \usepackage{afterpage} ...


2

Seems, that pdflatex doesn't accept files that have 2 adjacent spaces. To reproduce the problem create a file: a a.tex. Then: $ pdflatex ./a\ \ a.tex This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9) entering extended mode ! I can't find file `"./a a.tex"'. For some reason it converted 2 spaces in the file name into 1 space.


1

Based on this answer to another question (suggested by @UlrikeFischer), I hit upon the atbegshi package, which lets you run things when a page is being typeset (in this case, adding the /Rotate 90 command to the PDF page). I originally tried to make do like this (simplified some things that seemed unnecessary from the original answer, as well as changing it ...


3

If I compile the example with TeX Live 2013, I get slanted type; with TeX Live 2014 (freezed after 2015-02-01) there's no slanted type any more. The reason is that the NewTX distribution underwent a major change on February 1, 2015. Here's the relevant part of the README file. Changes in version 1.4 1. All text fonts are now based on TeXGyre Termes, ...


1

To appear/disappear together with the image, the \checkmark must be placed on the same layer as the image. For this purpose, the example defines \layerCheckBox{<layer name>}{<layer internal name>}{on | off} For convenience, a command for creating radio buttons is also provided. From layers belonging to the same radio button group, only one ...


1

Considered suggestions in above comments I draw using TikZ (for exercise) the following graph: \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{arrows.meta,positioning,quotes} \begin{document} \begin{tikzpicture}[auto, node distance = 22mm and 66mm, MN/.style = {draw, text width=22mm, minimum height=16mm, align=flush ...


1

As others have already answered, I like to use hyperref. However, as my documents often have \author and \title commands I do not want to repeat myself in the package parameters. Luckily, hyperref also has a parameter for that. If you want it to read the information from your \author and similar tags, simply include it like this: ...


1

The problem is that you've hard-coded absolute positions for the nodes. This isn't a good way to go about drawing this kind of diagram. However, if you just want a quick fix, you can pass scale=<factor> to the picture. For example: \documentclass[border=10pt,tikz,multi]{standalone} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} ...



Top 50 recent answers are included