parent_url
stringlengths
41
46
parent_score
stringlengths
1
4
parent_body
stringlengths
25
35.5k
parent_user
stringlengths
37
42
parent_title
stringlengths
12
150
accepted
bool
2 classes
body
stringlengths
4
36.7k
score
stringlengths
1
4
user
stringlengths
37
42
answer_id
stringlengths
1
6
__index_level_0__
int64
0
322k
https://tex.stackexchange.com/questions/685414
1
I want to be able to add more space between the z and w in their node. I tried bigskip and other things (including redefining baselineskip), and the two words (in the original document) still seem very tight. It seems like the medskip/bigskip commands get ignored inside a node? MWE: ``` \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[cc/.style={minimum height=1.21cm,align=center,fill=green!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},cred/.style={minimum height=1.21cm,align=center,fill=green!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},cgreen/.style={minimum height=1.21cm,align=center,fill=green!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm},corange/.style={minimum height=1.21cm,align=center,fill=green!20,rounded corners=2pt,thick,inner sep=4,outer sep=0,minimum width=18mm}] \path (0,0) node[cc] (A) {x} (2.3,0) node[cc] (B) {z \bigskip \\ w} (4.6,0) node[cc] (C) {t\\v} (6.8,0) node[cc] (D) {CC \\ CC}; \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/1970
how do I space things in a node in tikz?
true
Like this? ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{chains, positioning} \begin{document} \begin{tikzpicture}[ node distance = 0mm and 4mm, start chain = going right, cc/.style = {fill=#1, rounded corners=2pt, minimum height=1.21cm, minimum width=18mm, align=center, inner sep=4, outer sep=0, on chain}, cc/.default = green!20 ] \node[cc] (A) {x}; \node[cc] (B) {z\\[2ex] w}; % <--- \node[cc] (C) {t\\v}; \node[cc] (D) {CC\\ CC}; \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/18189
685419
317,974
https://tex.stackexchange.com/questions/685418
0
Sometime ago I just started writing into doc format some Abstract Algebra notes but unfortunately I have needed frequently to put a lemma, a proposition or a theorem in the middle of document so that I had more times manually change the tag of many propositions: so today I decided to rewrite the notes into LateX hoping I could create an enumeration for tag automatically only what I need and so I started to search on net but I did not find anything and so I thought to ask help here. So, could someone explain how tag automatically only some particular objects so that it is possibile to modify always the document into the middle without adjusting manually the tag numbers? For exemplify let's we consider the following text: Prop ``` \documentclass{article} \usepackage{titlesec} \usepackage{mathrsfs} \usepackage{calrsfs} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{bbold} \usepackage{dsfont} \usepackage{eufrak} \usepackage{yfonts} \begin{document} \begin{titlepage} \vspace*{\stretch{1.0}} \begin{center} \Large\textbf{Note di Algebra}\\ \end{center} \vspace*{\stretch{2.0}} \end{titlepage} Un’applicazione $\bot$ del prodotto $Y\times X$ di due insiemi non vuoti $Y$ e $X$ nel secondo fattore $X$ si dice operazione binaria esterna a $X$ con dominio di operatori $Y$ mentre se $X$ e $Y$ sono eguali si dice ch’è un’operazione binaria in $X$ o semplicemente un’operazione in $X$ e in particolare per ogni coppia $(x_1,x_2)$ di elementi di $X$ si suole porre \begin{equation} x_1\bot x_2:=\bot(x_1,x_2) \end{equation} sicché con tal convenzione si suole dire che l’operazione ⊥ è associativa allorché per qualsisia terna $(x_1,x_2,x_3)$ di elementi di $X$ sussista l’eguaglianza \begin{equation} (x_1\bot x_2)\bot x_3=x_1\bot (x_2\bot x_3) \end{equation} mentre si dice commutativa allorché per ogni coppia $(x_1,x_2)$ di elementi di $X$ sussista l’eguaglianza \begin{equation} x_1\bot x_2=x_2\bot x_1 \end{equation} inoltre, se $\bot$ non è commutativa ma $x_1$ e $x_2$ sono tali da verificare la precedente eguaglianza indi si dice ch’essi sono commutabili o permutabili rispetto $\bot$. Dunque, a scopo esemplificativo, osserviamo che per ogni funzione $\Phi$ di $\mathscr P(X)$ in X la posizione $$ x_1\bot_\Phi x_2:=\Phi\big(\{x_1,x_2\}\big) $$ con $x_1$ e $x_2$ in X definisce un’operazione in $X$ la quale è chiaramente commutativa ma in generale non associativa mentre una qualsiasi proiezione di $X\times X$ definisce un’operazione associativa ma non commutativa e infine una qualsiasi funzione costante di $X\times X$ in $X$ definisce un’operazione associativa e commutativa. Ora stante gli assiomi di \boldsymbol{ZF} osserviamo che $\bot$ è un elemento di $X^(X\times X)$ sicché se i medesimi garantiscono che l’insieme $\mathscr P(X)\times X^(X\times X)$ esista allora diciamo che la coppia $(X,\bot)$ di $\mathscr P(X)\times X^(X\times X)$ è un gruppoide (o magma) con sostegno X e in particolare diciamo ch’essa è un semigruppo allorché l’operazione $\bot$ sia associativa nonché diciamo ch’è un semigruppo abeliano allorché l’operazione $\bot$ sia pure commutativa: precisiamo che più in generale alcuni autori sogliono chiamare struttura algebrica un qualsiasi elemento di $\mathscr P(X)\times\prod_{i\in n}X^(X_i^* )$ con $n$ in $\omega_+$ laddove $X_i^*$ con $i$ in $n$ è un prodotto cartesiano di due fattori uno dei quali sia $X$. Ad ogni modo, per pura praticità poniamo \begin{equation} \mathcal F(X^n,X):=X^{X^n} \end{equation} con $n$ in $\omega$ sicché dimostriamo il seguente fondamentale risultato.\\ Teorema 0 – di caratterizzazione dell’associatività \end{document} ``` I would like to put $0$ automatically so that if one day I have to put a theorem before that I call "Teorema 0" then this last would labell as "Teorema 1" automatically:so how do it? could someone help me, please?
https://tex.stackexchange.com/users/296807
How tag automatically only some particular objects?
true
You can declare a theorem with ``` \newtheorem{thm}{Teorema} \setcounter{thm}{-1}% if you really?? want to start from 0 ``` I also fixed: ``` Package eufrak Warning: The eufrak package is redundant if the amsfonts package is used on input line 36. ! LaTeX Error: Unicode character ⊥ (U+22A5) not set up for use with LaTeX Underfull \hbox (badness 10000) in paragraph at lines 53--55 ``` ``` \documentclass{article} \usepackage{titlesec} \usepackage{mathrsfs} %\usepackage{calrsfs} \usepackage{amsfonts} \usepackage{amssymb} %\usepackage{bbold} %\usepackage{dsfont} % \usepackage{eufrak} %\usepackage{yfonts} \usepackage{mathtools} \usepackage{amsthm} \newtheorem{thm}{Teorema} \setcounter{thm}{-1}% if you really?? want to start from 0 \begin{document} \begin{titlepage} \vspace*{\stretch{1.0}} \begin{center} \Large\textbf{Note di Algebra}%\\ \end{center} \vspace*{\stretch{2.0}} \end{titlepage} Un’applicazione $\bot$ del prodotto $Y\times X$ di due insiemi non vuoti $Y$ e $X$ nel secondo fattore $X$ si dice operazione binaria esterna a $X$ con dominio di operatori $Y$ mentre se $X$ e $Y$ sono eguali si dice ch’è un’operazione binaria in $X$ o semplicemente un’operazione in $X$ e in particolare per ogni coppia $(x_1,x_2)$ di elementi di $X$ si suole porre \begin{equation} % \coloneq x_1\bot x_2\coloneq\bot(x_1,x_2) \end{equation} % \bot sicché con tal convenzione si suole dire che l’operazione $\bot$ è associativa allorché per qualsisia terna $(x_1,x_2,x_3)$ di elementi di $X$ sussista l’eguaglianza \begin{equation} (x_1\bot x_2)\bot x_3=x_1\bot (x_2\bot x_3) \end{equation} mentre si dice commutativa allorché per ogni coppia $(x_1,x_2)$ di elementi di $X$ sussista l’eguaglianza \begin{equation} x_1\bot x_2=x_2\bot x_1 \end{equation} inoltre, se $\bot$ non è commutativa ma $x_1$ e $x_2$ sono tali da verificare la precedente eguaglianza indi si dice ch’essi sono commutabili o permutabili rispetto $\bot$. Dunque, a scopo esemplificativo, osserviamo che per ogni funzione $\Phi$ di $\mathscr P(X)$ in X la posizione % never $$ \[ %\coloneq \bigl x_1\bot_\Phi x_2 \coloneq\Phi\bigl(\{x_1,x_2\}\bigr) \] con $x_1$ e $x_2$ in X definisce un’operazione in $X$ la quale è chiaramente commutativa ma in generale non associativa mentre una qualsiasi proiezione di $X\times X$ definisce un’operazione associativa ma non commutativa e infine una qualsiasi funzione costante di $X\times X$ in $X$ definisce un’operazione associativa e commutativa. % math Ora stante gli assiomi di $\boldsymbol{ZF}$ osserviamo che $\bot$ è un elemento di $X^(X\times X)$ sicché se i medesimi garantiscono che l’insieme $\mathscr P(X)\times X^(X\times X)$ esista allora diciamo che la coppia $(X,\bot)$ di $\mathscr P(X)\times X^(X\times X)$ è un gruppoide (o magma) con sostegno X e in particolare diciamo ch’essa è un semigruppo allorché l’operazione $\bot$ sia associativa nonché diciamo ch’è un semigruppo abeliano allorché l’operazione $\bot$ sia pure commutativa: precisiamo che più in generale alcuni autori sogliono chiamare struttura algebrica un qualsiasi elemento di $\mathscr P(X)\times\prod_{i\in n}X^(X_i^* )$ con $n$ in $\omega_+$ laddove $X_i^*$ con $i$ in $n$ è un prodotto cartesiano di due fattori uno dei quali sia $X$. Ad ogni modo, per pura praticità poniamo \begin{equation} \mathcal F(X^n,X):=X^{X^n} \end{equation} con $n$ in $\omega$ sicché dimostriamo il seguente fondamentale risultato.%\\ \begin{thm} di caratterizzazione dell’associatività \end{thm} \end{document} ```
2
https://tex.stackexchange.com/users/1090
685432
317,981
https://tex.stackexchange.com/questions/685420
3
I am using the `quantikz` package to draw a quantum circuit and I am failing to insert my "own" gate (BS) as a quantum gate. The gate noisy is a working example of what I want to insert in the second gate. Can anyone help me? ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{quantikz} \tikzset{pics/.cd, splitter/.style={code={\draw[ultra thick] (#1:{sqrt(1/2)}) -- (#1+180:{sqrt(1/2)});}},splitter/.default=45} \tikzset{pics/.cd, BS/.style={code={ \draw[->](-1,0)--(1,0); \draw[->](0,-1)--(0,1); \path (0,0) pic{splitter}; }}} \begin{tikzpicture} \draw (0,0) pic{BS}; \end{tikzpicture} \tikzset{ noisy/.style={starburst,fill=yellow,draw=red,line width=2pt,inner xsep=-4pt,inner ysep=-5pt} } \begin{quantikz} \lstick{$\ket{0}$} &\gate[2]{D} &\gate[1, style={noisy}]{L_{1,1}}\\ % noisy is working \lstick{$\ket{0}$} & &\gate[1, style={BS}]{L_{1,2}} % BS is not working \end{quantikz} \end{document} ```
https://tex.stackexchange.com/users/296811
How to use your own styles in Quantikz?
true
You wonder why adding the style `noise` to the `\gate` command works, but your custom style `BS` does not. Let me try to come up with an explanation to this that is hopefully easy to understand. Ti*k*Z knows shapes which can be used to style a node. The default shape is `rectangle` and this is what you see, for example, for the node that contais the *D*. Another, much more complicated shape is `starburst` which you use to style the upper right node. So, the style `noise` is a style that changes the *shape* of the node which is added to the diagram using the `\gate` command. Now, there are also `pic`s, which are so to say small fractions of a larger Ti*k*Z picture. A `pic` can be used in cases where pieces of code are to be reused often. A `pic` can contain nodes and paths, but a `pic` is itself not a node and it is also not a shape. Therefore, if you define your style `BS` as being the defintion of a `pic` (which you do with `pics/.cd, BS/.style`), this style won't do anything sensible to a node. A node doesn't know what to do with a `pic` and you will get an error. But what you actually could do is to place the `pic` (alone or together with some other paths) as `path picture` to the node, which means that the path you give as value to the `path picture` option is added to the background of the relevant node. You only need to make sure that the `path picture` is scaled properly and sits at the right position and that the node is large enough to show the whole picture: ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{quantikz} \tikzset{ pics/.cd, splitter/.style={ code={ \draw[ultra thick] (#1:{sqrt(1/2)}) -- (#1+180:{sqrt(1/2)}); } }, splitter/.default=45 } \tikzset{BS/.style={ draw=none, minimum width=1cm, minimum height=1cm, path picture={ \begin{scope}[x=0.5cm, y=0.5cm] \draw[->] (path picture bounding box.center) +(-1,0) -- +(1,0); \draw[->] (path picture bounding box.center) +(0,-1) -- +(0,1); \path (path picture bounding box.center) pic {splitter}; \end{scope} } }} \begin{document} \tikzset{ noisy/.style={ starburst, fill=yellow, draw=red, line width=2pt, inner xsep=-4pt, inner ysep=-5pt} } \begin{quantikz} \lstick{$\ket{0}$} & \gate[2]{D} & \gate[1, style={noisy}]{L_{1,1}} \\ \lstick{$\ket{0}$} & & \gate[1, style={BS}]{L_{1,2}} \end{quantikz} \end{document} ```
3
https://tex.stackexchange.com/users/47927
685437
317,985
https://tex.stackexchange.com/questions/685416
0
I'm creating a template for a project. In it, I've created a command to create a summary page, but I need to change the geometry to be wider than the rest of the document. I've used the `geometry` package with the commands `\newgeometry` and `\restoregeometry`. This part works well. Now I'm looking for a way to create the same header and footer across pages (this includes the same margin for all the different geometries). To do this, I've tried calculating the left and right margins to add the margin value with the command `\fancyhfoffset` like this: ``` \newcommand{\leftMargin}{% \dimexpr% 1in + % \ifoddpage% \oddsidemargin% \else% \evensidemargin% \fi% \relax% } \newcommand{\rightMargin}{% \dimexpr% \paperwidth - \textwidth - \leftMargin% \relax% } \fancypagestyle{main}{% % Reset \fancyhf{}% \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% % Compute header and footer margins \fancyhfoffset[L]{\leftMargin - 2cm}% \fancyhfoffset[R]{\rightMargin - 2cm}% % Header \fancyhead[R]{\myTitle}% % Footer \fancyfoot[R]{\myLogo}% \fancyfoot[L]{\thepage}% } ``` But this solution doesn't work : The margins are the same than these of the previous geometry... And if I use the same solution for the style `plain` (`\fancypagestyle{plain}`), when the style change (for example, the next page after a chapter start), the margins are reset and now they follow the text width. I think it's not possible to use the `fancyhfoffset` inside a `fancypagestyle` declaration but I don't know how else to do it. Thanks in advance for your help !
https://tex.stackexchange.com/users/296799
Fixed margin in header and footer
true
Geometry uses odd page margins as input, then computes the even page margins. `\fancyhfoffset` is relative to the current margins, which obviously change with `\newgeometry`. ``` \documentclass[twoside]{article} \usepackage[showframe]{geometry} \usepackage{fancyhdr} \usepackage{lipsum}% MWE onlu \edef\leftMargin{% odd page \dimexpr 1in + \oddsidemargin \relax } \edef\rightMargin{% \dimexpr% \paperwidth - \textwidth - \leftMargin% or \evensidemargin - 1in \relax% } \fancyhf{}% \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% % Header \fancyhead[R]{myTitle}% % Footer \fancyfoot[R]{myLogo}% \fancyfoot[L]{\thepage}% \pagestyle{fancy} \fancypagestyle{main}{% % Reset \fancyhf{}% \renewcommand{\headrulewidth}{0pt}% \renewcommand{\footrulewidth}{0pt}% % Compute header and footer margins \fancyhfoffset[L]{-1cm}% \fancyhfoffset[R]{-1cm}% % Header \fancyhead[R]{myTitle}% % Footer \fancyfoot[R]{myLogo}% \fancyfoot[L]{\thepage}% } \begin{document} \lipsum[1-8] \newgeometry{left={\dimexpr \leftMargin-1cm},right={\dimexpr \rightMargin-1cm}} \pagestyle{main} \lipsum[1-12] \clearpage% print header/footer for last page \restoregeometry \end{document} ```
0
https://tex.stackexchange.com/users/34505
685443
317,987
https://tex.stackexchange.com/questions/685442
2
I am trying to draw a probability tree, but I am overlapping two nodes, on the right, I should end up with 4 nodes, all at the same distance from the empty node, one above the other. But as I mentioned before, I am overlapping 2 of these, leaving only 3 visible. If anyone knows how I can solve it, I appreciate the help, thank you very much in advance! ``` \begin{tikzpicture}[grow=right,sibling distance=8em, level distance=3cm, every node/.style = {shape=rectangle, rounded corners, draw, align=center, top color=white, bottom color=blue!20}]] \node {} child { node {$A^c$} child { node {$B^c$} edge from parent node[below] { $P(B^c|A^c)$ } } child { node {$B$} edge from parent node[above] { $P(B|A^c)$ } } edge from parent node[above] { $P(A^c)$ } } child { node {$A$} child { node {$B^c$} edge from parent node[below] { $P(B^c|A)$ } } child { node {$B$} edge from parent node[above] { $P(A)$ } } edge from parent node[above] { $P(B|A)$ } }; \end{tikzpicture} ```
https://tex.stackexchange.com/users/262545
Drawing a probability tree
true
You need to define different sibling distance for each level of tree. For example: ``` \documentclass[margin=3mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ grow=right, level distance=3cm, level 1/.style = {sibling distance=12em}, level 2/.style = {sibling distance=8em}, % every node/.style = {shape=rectangle, rounded corners, draw, align=center, top color=white, bottom color=blue!20} ] \node {} child { node {$A^c$} child { node {$B^c$} edge from parent node[below] { $P(B^c|A^c)$ } } child { node {$B$} edge from parent node[above] { $P(B|A^c)$ } } edge from parent node[above] { $P(A^c)$ } } child { node {$A$} child { node {$B^c$} edge from parent node[below] { $P(B^c|A)$ } } child { node {$B$} edge from parent node[above] { $P(A)$ } } edge from parent node[above] { $P(B|A)$ } }; \end{tikzpicture} \end{document} ``` **Addendum:** A version of decision tree drawn by help of the `forest` package and with less fency edge labels. However they are aligned with them and automatically positioned above/below edges: ``` \documentclass[margin=3mm]{standalone} \usepackage{forest} \begin{document} \begin{forest} for tree={ % nodes draw, rounded corners=2pt, where level=0{circle}{minimum width=2em}, top color=white, bottom color=blue!20, math content, % tree grow'=east, edge=semithick, child anchor=west, l sep=22mm, s sep=6mm, where level=1{s sep=2mm}{},% insert different `s sep` tier/.option = level, /tikz/ELS/.style = {% Edge Label Style pos=0.5, sloped, node font=\footnotesize, inner sep=2pt, anchor=#1}, EL/.style = {if n=1{% Edge Label, automatic positioned edge label={node[ELS=south]{$#1$}}} {edge label={node[ELS=north]{$#1$}}}} }, [ [A, EL=P(B|A) [B, EL=P(A)] [B^c, EL=P(B^c|A)] ] [A^c, EL=P(A^c) [B, EL=P(B|A^c)] [B^c, EL=P(B^c|A^c)] ] ] \end{forest} \end{document} ```
1
https://tex.stackexchange.com/users/18189
685446
317,988
https://tex.stackexchange.com/questions/685444
3
I'm working with `ascelike-new` journal template ([located here](https://www.overleaf.com/latex/templates/template-for-preparing-your-submission-to-the-american-society-of-civil-engineers-asce/pbwcqsvndpty)). The editor asked me to remove figures from the submitted pdf. Since the journal uses an online system to compile the uploaded tex files, and I cannot manually delete the pages with the figures. I tried many existing solutions (examples [here](https://tex.stackexchange.com/questions/448521/how-can-i-hide-a-figure-but-keep-its-numbering) and [here](https://tex.stackexchange.com/questions/452887/remove-figures-but-keep-references-to-image)) and was unsuccessful (the tried solutions either put a frame or hide the figure and its text references). Is there any way I can remove the figures and list of figures and keep references in the text?
https://tex.stackexchange.com/users/213062
How to remove figures and tables from a document but keep references to them in the text?
true
> > Is there any way I can remove the figures and [the] list of figures and keep [cross-]references in the text? > > > Let's assume that a representative `figure` environment looks like this: ``` \begin{figure}[ht] \centering \caption{Stuff} \label{fig:stuff} \includegraphics[...]{...} \end{figure} ``` and that it is cross-referenced elsewhere in the document via commands such as `\ref{fig:stuff}`. If you comment out (or delete) this `figure` code block and insert something like ``` \refstepcounter{figure} \label{fig:stuff} ``` in its place, you can keep using `\ref{fig:stuff}` to create correctly-numbered cross-references, even though no `figure` environment is created and no entry will be placed in the List of Figures (since no `\caption` directive was run). And, since you no longer want to create a List of Figures (which would be empty anyway, as all `\caption` commands are gone), be sure to also comment out (or delete) the `\listoffigures` command.
3
https://tex.stackexchange.com/users/5001
685447
317,989
https://tex.stackexchange.com/questions/685257
0
My latex file looks roughly like this: ``` ... \usepackage{listings} ... \lstinputlisting{F4_01fig2dev.ptx} ... ``` and the file `F4_01fig2dev.ptx` is to be created. In fact I want to build with `latexmk`. Normally the technique is, to make `latexmk` run a latex processor in `scrollmode` finding out the missing files, create the missing files with additional rules and then rerun the latex processor. If I embed the file with `\input{F4_01fig2dev.ptx}` or with `\includegraphics` (using the graphicx package) or with `\import` (using the import package), the usual technique with `latexmk` works. It does not work with `\lstinputlisting`. Originally, I told here that the reason is that for some reason `\lstinputlisting` does not respect `scrollmode`, but this is not the difference. I don't want to make another wrong suspicion, but i observed that the FLS files don't include the file to be included in any case, so no difference. But the log file is a bit different: ``` ! Package Listings Error: File `F4_01fig2dev(.ptx)' not found. ``` for the `listings` package versus ``` ! LaTeX Error: File `F4_01fig2dev.ptx' not found. ``` for the other kinds of inclusions. Maybe `latexmk` does not recognize the ending that way. I must say, I find `listings` package more precise. Ok, now either `latexmk` changes or `listings` package changes or I do some workaround. I thought of conditional code, bypassing if the file does not exist. Any other thoughts? As cabohah suggested, I shall add my `.latexmkrc` file. I will post in full length, ``` #!/usr/bin/env perl # to create pdf via lualatex #$pdflatex = 'lualatex -file-line-error %O %S'; # PDF-generating modes are: # 1: pdflatex, as specified by $pdflatex variable (still largely in use) # 2: postscript conversion, as specified by the $ps2pdf variable (useless) # 3: dvi conversion, as specified by the $dvipdf variable (useless) # 4: lualatex, as specified by the $lualatex variable (best) # 5: xelatex, as specified by the $xelatex variable (second best) $pdf_mode = 4;# specifies creation of pdf via lualatex # If additional parameters must be passed to lualatex #'svg' package. # It converts raw SVG files to the PDF+PDF_TEX combo using InkScape. # $lualatex = "lualatex --shell-escape"; # note that -recorder is implicitly added $latex2pdfOptions = "-interaction=nonstopmode -synctex=1 -shell-escape"; $lualatex = "lualatex $latex2pdfOptions %O %S"; #$postscript_mode = $dvi_mode = 0; # to configure bibtex $bibtex_use=2; # this cannot be done according to the according latex maven plugin, # because the according parameter maxNumReRunsLatex may be set to -1 # which signifies an infinite number of runs. $max_repeat=30; # default are tex and eps, but could also be pdf and ptx and mps # Currently, all those files are given with explicit endings, # so no extensions to be added. #add_input_ext(''); # It is what it seems to be: clean inludes what was generated by cus $cleanup_includes_cusdep_generated = 1; $cleanup_includes_generated = 1; #$makeindex = 'makeindex %O -o %D %S'; # the default # TBD: clarify: xdv and dvi seem to be internal. # maybe missing other extensions in conjunction with synctex $clean_ext .= " %R.synctex.gz"; # bbl does not work #@generated_exts = (@generated_exts, 'lol', 'bbl', 'glo', 'ist') #print "Hello!" #foreach (@generated_exts) { #print "Generated exts: $_\n"; #} #print "clean_ext\n"; # Here @generated_exts is ('aux', 'fls', 'log', # generated by latex already # 'toc', 'lof', 'lot', 'out', # generated by latex conditionally # 'idx', 'ind', 'blg', 'ilg', # concerning indices # # strange enough: nothing for bibtex # 'xdv', 'bcf' # extensions ext to be deleted by latexmk -c # Note that the file names are %R.ext. # this may cause problems with extensions containing a dot. # Also this is not general enough # if the generated file deviates from %R by more than an extension. # In this case, use $clean_ext$ # Here, $clean_ext is empty. # list of listings, whereas lof and lot are already present. push @generated_exts, "lol"; push @generated_exts, "dvi", "xdv"; # for beamer class push @generated_exts, "nav", "snm", "vrb"; # why are .ist and xdy not under generated_exts? # note that currently, either %R or what is present is the extension only! # this does not make sense very much. # $clean_ext .= " stateMachine.log"; does not work, because stateMachine.log is the extension! # should be under indexing $clean_ext .= " %R.ist %R.xdy %R-*.ind %R-*.idx %R-*.ilg %R-*.ind"; add_cus_dep('fig', 'ptx', 0, 'fig2dev'); sub fig2dev { $file = $_[0]; print("$file"); rdb_add_generated("$file.eps", "$file.pdf", "$file.ptx"); my $GenOptions = ""; my $PtxOptions = ""; my $PdfEpsOptions = ""; print("create from $file.fig"); rdb_add_generated("$file.ptx", "$file.pdf", "$file.eps"); #fig2dev -L pstex <fig2devGenOptions> <fig2devPdfEpsOptions> xxx.fig xxx.eps #fig2dev -L pdftex <fig2devGenOptions> <fig2devPdfEpsOptions> xxx.fig xxx.pdf #fig2dev -L pdftex_t <fig2devGenOptions> <fig2devPtxOptions> -p xxx xxx.fig xxx.ptx my $ret1 = system("fig2dev -L pstex $GenOptions $PdfEpsOptions $file.fig $file.eps"); my $ret2 = system("fig2dev -L pdftex $GenOptions $PdfEpsOptions $file.fig $file.pdf"); my $ret3 = system("fig2dev -L pdftex_t $GenOptions $PtxOptions -p $file $file.fig $file.ptx"); return ($ret1 or $ret2 or $ret3); } add_cus_dep('gp', 'ptx', 0, 'gnuplot'); sub gnuplot { $file = $_[0]; print("create from $file.gp"); rdb_add_generated("$file.ptx", "$file.pdf", "$file.eps"); my $nuplotOptions = ""; my $ret1 = system("gnuplot -e \"set terminal cairolatex pdf $gnuplotOptions;\ set output '$file.ptx';\ load '$file.gp'\""); # my $ret2 = system("gnuplot -e \"set terminal cairolatex eps $gnuplotOptions;\ # set output '$file.ptx';\ # load '$file.gp'\""); return $ret; } # metapost rule from http://tex.stackexchange.com/questions/37134 #add_cus_dep('mp', 'mps', 0, 'mpost'); add_cus_dep('mp', 'mps', 0, 'mpost'); sub mpost { my $file = $_[0]; print("create from $file.mp"); rdb_add_generated("$file.mps", "$file.fls", "$file.log"); my ($name, $path) = fileparse($file); pushd($path); my $return = system("mpost -interaction=nonstopmode -recorder -s prologues=2 -s 'outputtemplate=\"%j.mps\"' $name"); popd(); return $return; } add_cus_dep('svg', 'ptx', 0, 'inkscape'); sub inkscape { my $file = $_[0]; print("create from $file.svg"); rdb_add_generated("$file.ptx", "$file.pdf"); my $ret1 = system("inkscape -D --export-filename=$file.pdf --export-latex $file.svg "); #my $ret2 = system("inkscape -D --export-filename=$file.eps --export-latex $file.svg "); #use File::Copy; # This works only for pdf, not for eps. #unlink($file.pdf_tex) or die "cannot unlink $file.pdf_tex"; rename("$file.pdf_tex", "$file.ptx");# or die "cannot move $file.pdf_tex"; return $ret1;# or $ret2; } # graphics for xfig (not appropriate for mixed tex/pdf) # add_cus_dep('fig', 'pdf', 0, 'fig2pdf'); # sub fig2pdf { # system( "fig2dev -Lpdf \"$_[0].fig\" \"$_[0].pdf\"" ); # } # use splitindex $makeindex = 'internal splitindex'; sub splitindex { # Use splitindex instead of makeindex. # The splitindex programe starts from an .idx file, makes a set of # other .idx files for separate indexes, and then runs makeindex to # make corresponding .ind files. # However, it is possible that the document uses the splitindex # package, but in a way compatible with the standard methods # compatible with makeindex, i.e., with a single index and with the # use of the \printindex command. # Then we need to invoke makeindex. # In addition, latexmk assumes that makeindex or its replacement makes # an .ind file from an .idx file, and latexmk gives an error if it # doesn't exist, we need to make an .ind file. # Both problems are solved by running makeindex and then splitindex. # Note: errors are returned by makeindex and splitindex for things # like a missing input file. No error is returned for lines in an # input file that are in an incorrect format; they are simply # ignored. So no problem is caused by lines in the .idx file # that are generated by splitindex in a format incompatible with # makeindex. my $ret1 = system( "makeindex", $$Psource ); my $ret2 = system( "splitindex", $$Psource ); return $ret1 || $ret2; } add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' ); add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' ); push @generated_exts, 'glo', 'gls', 'glg'; push @generated_exts, 'acn', 'acr', 'alg'; push @generated_exts, "ist"; # index stylefile created by the glossaries package #$clean_ext .= " acr acn alg glo gls glg";# TBD: clarify: better in @generated_exts? sub makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); my @args = ( "-q", "-d", $path, $base_name ); if ($silent) { unshift @args, "-q"; } return system "makeglossaries", "-d", $path, $base_name; } sub run_makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); #handle -outdir param by splitting path and file, ... pushd $path; # ... cd-ing into folder first, then running makeglossaries ... if ( $silent ) { # system "makeglossaries -q '$base_name'"; #unix system "makeglossaries", "-q", "$base_name"; #windows } else { # system "makeglossaries '$base_name'"; #unix system "makeglossaries", "$base_name"; #windows }; popd; # ... and cd-ing back again } # !!! ONLY WORKS WITH VERSION 4.54 or higher of latexmk #TBD: take into account: modified: # '$_[0]'-> # ############# # # makeindex # # ############# # @ist = glob("*.ist"); # if (scalar(@ist) > 0) { # $makeindex = "makeindex -s $ist[0] %O -o %D %S"; # } # glossaries new with bib2gls # push @generated_exts, 'glstex', 'glg'; # add_cus_dep('aux', 'glstex', 0, 'run_bib2gls'); # sub run_bib2gls { # if ( $silent ) { # my $ret = system "bib2gls --silent --group $_[0]"; # } else { # my $ret = system "bib2gls --group $_[0]"; # }; # my ($base, $path) = fileparse( $_[0] ); # if ($path && -e "$base.glstex") { # rename "$base.glstex", "$path$base.glstex"; # } # # Analyze log file. # local *LOG; # $LOG = "$_[0].glg"; # if (!$ret && -e $LOG) { # open LOG, "<$LOG"; # while (<LOG>) { # if (/^Reading (.*\.bib)\s$/) { # rdb_ensure_file( $rule, $1 ); # } # } # close LOG; # } # return $ret; # } $pythontex = 'pythontexW %R';#'pythontexW %O %R'; push @generated_exts, "pytxcode", "plg"; push @generated_exts, "depytx", "dplg"; $clean_ext .= " pythontex-files-%R/* pythontex-files-%R"; #$extra_rule_spec{'pythontex'} = [ 'internal', '', 'mypythontex', "%Y%R.pytxcode", "%Ypythontex-files-%R/%R.pytxmcr", "%R", 1 ]; $extra_rule_spec{'pythontex'} = [ 'internal', '', 'mypythontex', "%R.pytxcode", "pythontex-files-%R/%R.pytxmcr", "%R", 1 ]; sub mypythontex { my $result_dir = $aux_dir1."pythontex-files-$$Pbase"; my $ret = Run_subst( $pythontex, 2 ); rdb_add_generated( glob "$result_dir/*" ); #my $fh = new FileHandle $$Pdest, "r"; open( my $fh, "<", $$Pdest ); if ($fh) { print "path: $ENV{PATH}"; while (<$fh>) { if ( /^%PythonTeX dependency:\s+'([^']+)';/ ) { print "Found pythontex dependency '$1'\n"; rdb_ensure_file( $rule, $aux_dir1.$1 ); } } undef $fh; } else { warn "mypythontex: I could not read '$$Pdest'\n", " to check dependencies\n"; } return $ret; } # for htlatex push @generated_exts, "4tc", "4ct", "tmp", "xref", "css", "idv", "lg"; # TBD: for -C remove also html and xhtml # TBD: check that this plugin also removes all these extensions.. think of lg. # biblatex # push @generated_exts, "run.xml";# does run.xml work? # $clean_ext .= " %R-blx.bib"; ```
https://tex.stackexchange.com/users/60463
`latexmk`can include files created during the `latexmk` run, except with `lstinputlistings`
false
The answer is very close to what Clara suggested. The line of code is ``` \fileIfExistTF{F4_01fig2dev.ptx}{\lstinputlisting{F4_01fig2dev.ptx}}{\input{F4_01fig2dev.ptx}} ``` In the first `lualatex` run `F4_01fig2dev.ptx` does not exist, but `latexmk` detects the missing file through `\input{F4_01fig2dev.ptx}` and creates it by an according rule. In all following runs, `F4_01fig2dev.ptx` and so `\lstinputlisting{F4_01fig2dev.ptx}` is used. It is not really satisfactory, because of course, the change from `\input{F4_01fig2dev.ptx}` to `\lstinputlisting{F4_01fig2dev.ptx}` changes the decomposition into pages causing additional `lualatex` runs. Also it polutes the code a bit (lstinputlisting comes with a lot of parameters in my case. ) So I would maybe prefer a better solution.
0
https://tex.stackexchange.com/users/60463
685451
317,990
https://tex.stackexchange.com/questions/685440
1
This question follows-on from a previous one [...similar but different Arara...](https://tex.stackexchange.com/questions/683024/new-2023-texlive-similar-but-different-arara-problem/683853?noredirect=1#comment1700235_683853) I've created a configuration file according to what I understand from the Arara Reference Manual, and I have appended it below. The configuration file itself does not (after some tweaking...!) flag any error messages about itself during run-time. Arara appears to recognize and accept my newly created file-extension `*.mkiv` . However, at runtime, Arara tells me `It looks like no directives were found in the provided file. Make sure to include at least one directive and try again.` That is not true, the file does have a directive. As a test, I added a default preamble to my configuration file `defaultPreamble: onecontext`. This did not help, and has since been removed from the configuration file (as it interferes with non-ConTeXt executions) In fact, Arara runs without error on this file (which has an arara directive) if I don't have the configuration file in place, or if I append the file name with `*.tex`, such as `myfilename.mkiv.tex` The arara logs don't provide any useful information. So, what am I missing here? ``` 1 !config 2 filetypes: 3 - extension: ins 4 - extension: drv 5 - extension: ltx 6 - extension: dtx 7 - extension: tex 8 - extension: mkiv 9 pattern: ^\s*//\s* 10 paths: 11 - '/usr/local/texlive/2023/texmf-dist/scripts/arara/rules' 12 loops: 5 13 verbose: true 14 logging: true 15 header: true 16 logname: my_arara_log 17 preambles: 18 onecontext: | 19 % arara: context 20 defaultPreamble: onecontext [<-- added for testing, then deleted] ```
https://tex.stackexchange.com/users/287274
Arara configuration file, create new file extension (file type); ConteXt
false
We cannot know what you are missing if you only provide half of the truth. In this case, you did not provide your ConText file. When I read your config file and file patterns, I assume your average ConTeXt file looks like ``` // arara: context \starttext Hello world \stoptext ``` Well, assuming that you have not reinvented ConTeXt and its syntax, this is a syntax error. But please note that with `^\s*//\s*` you will not get anywhere with valid ConTeXt syntax. Obviously, you have copied and pasted the pattern from the documentation without understanding the regular expression. And you did not look up two lines to try the default pattern which works in basically all TeX files (and is used by default): `^\s*%\s*`. Hence, assuming you want to feed a valid ConTeXt document like ``` % arara: context \starttext Hello world \stoptext ``` into arara, you can use a configuration file with an appropriate pattern. If you use your original pattern, it is quite self-explanatory that arara would not find directives in the document because there is no `// arara` line anywhere in that file. ``` !config filetypes: - extension: ins - extension: drv - extension: ltx - extension: dtx - extension: tex - extension: mkiv pattern: ^\s*%\s* ```
4
https://tex.stackexchange.com/users/124577
685453
317,992
https://tex.stackexchange.com/questions/685450
1
MWE is as follows: ``` \documentclass[12pt,a4paper,oneside]{book} \usepackage[a4paper,width=150mm,top=30mm,bottom=30mm,bindingoffset=6mm]{geometry} \usepackage[nottoc]{tocbibind} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{bm} \usepackage{nccmath} \usepackage{amsfonts, graphicx, verbatim, mathtools,amssymb, amsthm, mathrsfs,amsmath} \usepackage{color} \usepackage{array} \usepackage{setspace} \usepackage{fancyhdr} \usepackage{rsfso} \usepackage{enumitem} \usepackage{tikz} \usetikzlibrary{babel, arrows.meta, positioning, quotes} \usepackage{lipsum} \usepackage{geometry} \usepackage{tabularray} \UseTblrLibrary{booktabs, siunitx} \usepackage[thinc]{esdiff} \usepackage{ae} \usepackage [english]{babel} \usepackage [autostyle, english = american]{csquotes} \usepackage[style=numeric,maxbibnames=200,sortcites=true,backend=bibtex]{biblatex} \allowdisplaybreaks \usepackage{mwe} \usepackage{undertilde} \usepackage{dsfont} \usepackage{xcolor} \usepackage{tocloft} \pagenumbering{roman} \setlength\bibitemsep{0.5\baselineskip} \addbibresource{biblio.bib} \begin{document} \frontmatter \newpage \pagestyle{fancy} \fancyhf{} \fancyhead[EL]{\nouppercase\leftmark} \fancyhead[OR]{\nouppercase\rightmark} \fancyhead[ER,OL]{\thepage} \begin{titlepage} \begin{center} \begin{figure} \centering \includegraphics[width=9cm]{example-image-a} \end{figure} \rule[0.5cm]{15cm}{0.1cm} \Huge {aaaaa} \rule{15cm}{0.1cm} \\ {\normalsize \it{aaaa}} \\ {\normalsize \it{aaaaa}} \\ {\normalsize \it{aaaa}} \\ {\normalsize \it{aaaa}}\\ \vfill \vspace{5cm} {\normalsize by} \\ {\normalsize aaa}\\ {\normalsize aaaa}\\ {\normalsize aaaa}\\ {\normalsize aaaa}\\ \rule{15cm}{0.1cm} \end{center} \end{titlepage} \mainmatter \chapter{Introduction} \chapter{main1} \chapter{main2} \printbibliography \addcontentsline{toc}{chapter}{Bibliography} \end{document} ``` Well it wont show in this MWE since there inst any citations but for example, if I were to have three pages in the bibliography starting from page 10 and ending on page 12, in the table of contents, instead of showing "bibliography....... 10" it shows "bibliography....... 12". Any reason why and how can I fix this?
https://tex.stackexchange.com/users/181561
Why is the last page number of the bibliography showing in the table of contents instead of the first page of the bibliography?
true
> > ... how can I fix this? > > > I suggest you replace ``` \printbibliography \addcontentsline{toc}{chapter}{Bibliography} ``` with ``` \clearpage \addcontentsline{toc}{chapter}{Bibliography} \printbibliography ``` That way, the `\addcontentsline` directive is issued at the start rather than at the end of the bibliography.
2
https://tex.stackexchange.com/users/5001
685467
317,998
https://tex.stackexchange.com/questions/13172
40
How can I detect inside a TeX file which engine (`pdftex`/`xetex`/`luatex`) is used to compile the file? Is there a LaTeX package that provides this functionality?
https://tex.stackexchange.com/users/83
Detect which TeX engine is used
false
In a sufficiently new version, expl3 is built into the LaTeX format, so commands such as `\sys_if_engine_pdftex:TF` etc. are available by default: There's no equivalent of `\ifTUTeX` for checking if the engine supports Unicode tokens as far as I can see, however.
3
https://tex.stackexchange.com/users/250119
685470
318,000
https://tex.stackexchange.com/questions/13172
40
How can I detect inside a TeX file which engine (`pdftex`/`xetex`/`luatex`) is used to compile the file? Is there a LaTeX package that provides this functionality?
https://tex.stackexchange.com/users/83
Detect which TeX engine is used
false
We can ask directly to primitives used in engines. We needn't any LaTeX package. ``` \ifx\numexpr\undefined\else eTeX is activated\fi \ifx\mubyte\undefined\else encTeX is activated\fi \ifx\pdftexversion\undefined\else pdfTeX is working\fi \ifx\XeTeXrevision\undefined\else XeTeX is working\fi \ifx\directlua\undefined\else LuaTeX is working\fi \newif\ifpdftex \newif\ifxetex \newif\ifluatex \ifx\pdftexversion\undefined\else \pdftextrue \fi \ifx\XeTeXrevision\undefined\else \xetextrue \fi \ifx\directlua\udefined\else \luatextrue \fi \ifluatex \else \chardef\outputmode=0 \fi \ifpdftex \let\outputmode=\pdfoutput \fi \ifxetex \chardef\outputmode=1 \fi \ifnum\outputmode>0 PDF is created\else DVI is created\fi ```
3
https://tex.stackexchange.com/users/51799
685472
318,002
https://tex.stackexchange.com/questions/685257
0
My latex file looks roughly like this: ``` ... \usepackage{listings} ... \lstinputlisting{F4_01fig2dev.ptx} ... ``` and the file `F4_01fig2dev.ptx` is to be created. In fact I want to build with `latexmk`. Normally the technique is, to make `latexmk` run a latex processor in `scrollmode` finding out the missing files, create the missing files with additional rules and then rerun the latex processor. If I embed the file with `\input{F4_01fig2dev.ptx}` or with `\includegraphics` (using the graphicx package) or with `\import` (using the import package), the usual technique with `latexmk` works. It does not work with `\lstinputlisting`. Originally, I told here that the reason is that for some reason `\lstinputlisting` does not respect `scrollmode`, but this is not the difference. I don't want to make another wrong suspicion, but i observed that the FLS files don't include the file to be included in any case, so no difference. But the log file is a bit different: ``` ! Package Listings Error: File `F4_01fig2dev(.ptx)' not found. ``` for the `listings` package versus ``` ! LaTeX Error: File `F4_01fig2dev.ptx' not found. ``` for the other kinds of inclusions. Maybe `latexmk` does not recognize the ending that way. I must say, I find `listings` package more precise. Ok, now either `latexmk` changes or `listings` package changes or I do some workaround. I thought of conditional code, bypassing if the file does not exist. Any other thoughts? As cabohah suggested, I shall add my `.latexmkrc` file. I will post in full length, ``` #!/usr/bin/env perl # to create pdf via lualatex #$pdflatex = 'lualatex -file-line-error %O %S'; # PDF-generating modes are: # 1: pdflatex, as specified by $pdflatex variable (still largely in use) # 2: postscript conversion, as specified by the $ps2pdf variable (useless) # 3: dvi conversion, as specified by the $dvipdf variable (useless) # 4: lualatex, as specified by the $lualatex variable (best) # 5: xelatex, as specified by the $xelatex variable (second best) $pdf_mode = 4;# specifies creation of pdf via lualatex # If additional parameters must be passed to lualatex #'svg' package. # It converts raw SVG files to the PDF+PDF_TEX combo using InkScape. # $lualatex = "lualatex --shell-escape"; # note that -recorder is implicitly added $latex2pdfOptions = "-interaction=nonstopmode -synctex=1 -shell-escape"; $lualatex = "lualatex $latex2pdfOptions %O %S"; #$postscript_mode = $dvi_mode = 0; # to configure bibtex $bibtex_use=2; # this cannot be done according to the according latex maven plugin, # because the according parameter maxNumReRunsLatex may be set to -1 # which signifies an infinite number of runs. $max_repeat=30; # default are tex and eps, but could also be pdf and ptx and mps # Currently, all those files are given with explicit endings, # so no extensions to be added. #add_input_ext(''); # It is what it seems to be: clean inludes what was generated by cus $cleanup_includes_cusdep_generated = 1; $cleanup_includes_generated = 1; #$makeindex = 'makeindex %O -o %D %S'; # the default # TBD: clarify: xdv and dvi seem to be internal. # maybe missing other extensions in conjunction with synctex $clean_ext .= " %R.synctex.gz"; # bbl does not work #@generated_exts = (@generated_exts, 'lol', 'bbl', 'glo', 'ist') #print "Hello!" #foreach (@generated_exts) { #print "Generated exts: $_\n"; #} #print "clean_ext\n"; # Here @generated_exts is ('aux', 'fls', 'log', # generated by latex already # 'toc', 'lof', 'lot', 'out', # generated by latex conditionally # 'idx', 'ind', 'blg', 'ilg', # concerning indices # # strange enough: nothing for bibtex # 'xdv', 'bcf' # extensions ext to be deleted by latexmk -c # Note that the file names are %R.ext. # this may cause problems with extensions containing a dot. # Also this is not general enough # if the generated file deviates from %R by more than an extension. # In this case, use $clean_ext$ # Here, $clean_ext is empty. # list of listings, whereas lof and lot are already present. push @generated_exts, "lol"; push @generated_exts, "dvi", "xdv"; # for beamer class push @generated_exts, "nav", "snm", "vrb"; # why are .ist and xdy not under generated_exts? # note that currently, either %R or what is present is the extension only! # this does not make sense very much. # $clean_ext .= " stateMachine.log"; does not work, because stateMachine.log is the extension! # should be under indexing $clean_ext .= " %R.ist %R.xdy %R-*.ind %R-*.idx %R-*.ilg %R-*.ind"; add_cus_dep('fig', 'ptx', 0, 'fig2dev'); sub fig2dev { $file = $_[0]; print("$file"); rdb_add_generated("$file.eps", "$file.pdf", "$file.ptx"); my $GenOptions = ""; my $PtxOptions = ""; my $PdfEpsOptions = ""; print("create from $file.fig"); rdb_add_generated("$file.ptx", "$file.pdf", "$file.eps"); #fig2dev -L pstex <fig2devGenOptions> <fig2devPdfEpsOptions> xxx.fig xxx.eps #fig2dev -L pdftex <fig2devGenOptions> <fig2devPdfEpsOptions> xxx.fig xxx.pdf #fig2dev -L pdftex_t <fig2devGenOptions> <fig2devPtxOptions> -p xxx xxx.fig xxx.ptx my $ret1 = system("fig2dev -L pstex $GenOptions $PdfEpsOptions $file.fig $file.eps"); my $ret2 = system("fig2dev -L pdftex $GenOptions $PdfEpsOptions $file.fig $file.pdf"); my $ret3 = system("fig2dev -L pdftex_t $GenOptions $PtxOptions -p $file $file.fig $file.ptx"); return ($ret1 or $ret2 or $ret3); } add_cus_dep('gp', 'ptx', 0, 'gnuplot'); sub gnuplot { $file = $_[0]; print("create from $file.gp"); rdb_add_generated("$file.ptx", "$file.pdf", "$file.eps"); my $nuplotOptions = ""; my $ret1 = system("gnuplot -e \"set terminal cairolatex pdf $gnuplotOptions;\ set output '$file.ptx';\ load '$file.gp'\""); # my $ret2 = system("gnuplot -e \"set terminal cairolatex eps $gnuplotOptions;\ # set output '$file.ptx';\ # load '$file.gp'\""); return $ret; } # metapost rule from http://tex.stackexchange.com/questions/37134 #add_cus_dep('mp', 'mps', 0, 'mpost'); add_cus_dep('mp', 'mps', 0, 'mpost'); sub mpost { my $file = $_[0]; print("create from $file.mp"); rdb_add_generated("$file.mps", "$file.fls", "$file.log"); my ($name, $path) = fileparse($file); pushd($path); my $return = system("mpost -interaction=nonstopmode -recorder -s prologues=2 -s 'outputtemplate=\"%j.mps\"' $name"); popd(); return $return; } add_cus_dep('svg', 'ptx', 0, 'inkscape'); sub inkscape { my $file = $_[0]; print("create from $file.svg"); rdb_add_generated("$file.ptx", "$file.pdf"); my $ret1 = system("inkscape -D --export-filename=$file.pdf --export-latex $file.svg "); #my $ret2 = system("inkscape -D --export-filename=$file.eps --export-latex $file.svg "); #use File::Copy; # This works only for pdf, not for eps. #unlink($file.pdf_tex) or die "cannot unlink $file.pdf_tex"; rename("$file.pdf_tex", "$file.ptx");# or die "cannot move $file.pdf_tex"; return $ret1;# or $ret2; } # graphics for xfig (not appropriate for mixed tex/pdf) # add_cus_dep('fig', 'pdf', 0, 'fig2pdf'); # sub fig2pdf { # system( "fig2dev -Lpdf \"$_[0].fig\" \"$_[0].pdf\"" ); # } # use splitindex $makeindex = 'internal splitindex'; sub splitindex { # Use splitindex instead of makeindex. # The splitindex programe starts from an .idx file, makes a set of # other .idx files for separate indexes, and then runs makeindex to # make corresponding .ind files. # However, it is possible that the document uses the splitindex # package, but in a way compatible with the standard methods # compatible with makeindex, i.e., with a single index and with the # use of the \printindex command. # Then we need to invoke makeindex. # In addition, latexmk assumes that makeindex or its replacement makes # an .ind file from an .idx file, and latexmk gives an error if it # doesn't exist, we need to make an .ind file. # Both problems are solved by running makeindex and then splitindex. # Note: errors are returned by makeindex and splitindex for things # like a missing input file. No error is returned for lines in an # input file that are in an incorrect format; they are simply # ignored. So no problem is caused by lines in the .idx file # that are generated by splitindex in a format incompatible with # makeindex. my $ret1 = system( "makeindex", $$Psource ); my $ret2 = system( "splitindex", $$Psource ); return $ret1 || $ret2; } add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' ); add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' ); push @generated_exts, 'glo', 'gls', 'glg'; push @generated_exts, 'acn', 'acr', 'alg'; push @generated_exts, "ist"; # index stylefile created by the glossaries package #$clean_ext .= " acr acn alg glo gls glg";# TBD: clarify: better in @generated_exts? sub makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); my @args = ( "-q", "-d", $path, $base_name ); if ($silent) { unshift @args, "-q"; } return system "makeglossaries", "-d", $path, $base_name; } sub run_makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); #handle -outdir param by splitting path and file, ... pushd $path; # ... cd-ing into folder first, then running makeglossaries ... if ( $silent ) { # system "makeglossaries -q '$base_name'"; #unix system "makeglossaries", "-q", "$base_name"; #windows } else { # system "makeglossaries '$base_name'"; #unix system "makeglossaries", "$base_name"; #windows }; popd; # ... and cd-ing back again } # !!! ONLY WORKS WITH VERSION 4.54 or higher of latexmk #TBD: take into account: modified: # '$_[0]'-> # ############# # # makeindex # # ############# # @ist = glob("*.ist"); # if (scalar(@ist) > 0) { # $makeindex = "makeindex -s $ist[0] %O -o %D %S"; # } # glossaries new with bib2gls # push @generated_exts, 'glstex', 'glg'; # add_cus_dep('aux', 'glstex', 0, 'run_bib2gls'); # sub run_bib2gls { # if ( $silent ) { # my $ret = system "bib2gls --silent --group $_[0]"; # } else { # my $ret = system "bib2gls --group $_[0]"; # }; # my ($base, $path) = fileparse( $_[0] ); # if ($path && -e "$base.glstex") { # rename "$base.glstex", "$path$base.glstex"; # } # # Analyze log file. # local *LOG; # $LOG = "$_[0].glg"; # if (!$ret && -e $LOG) { # open LOG, "<$LOG"; # while (<LOG>) { # if (/^Reading (.*\.bib)\s$/) { # rdb_ensure_file( $rule, $1 ); # } # } # close LOG; # } # return $ret; # } $pythontex = 'pythontexW %R';#'pythontexW %O %R'; push @generated_exts, "pytxcode", "plg"; push @generated_exts, "depytx", "dplg"; $clean_ext .= " pythontex-files-%R/* pythontex-files-%R"; #$extra_rule_spec{'pythontex'} = [ 'internal', '', 'mypythontex', "%Y%R.pytxcode", "%Ypythontex-files-%R/%R.pytxmcr", "%R", 1 ]; $extra_rule_spec{'pythontex'} = [ 'internal', '', 'mypythontex', "%R.pytxcode", "pythontex-files-%R/%R.pytxmcr", "%R", 1 ]; sub mypythontex { my $result_dir = $aux_dir1."pythontex-files-$$Pbase"; my $ret = Run_subst( $pythontex, 2 ); rdb_add_generated( glob "$result_dir/*" ); #my $fh = new FileHandle $$Pdest, "r"; open( my $fh, "<", $$Pdest ); if ($fh) { print "path: $ENV{PATH}"; while (<$fh>) { if ( /^%PythonTeX dependency:\s+'([^']+)';/ ) { print "Found pythontex dependency '$1'\n"; rdb_ensure_file( $rule, $aux_dir1.$1 ); } } undef $fh; } else { warn "mypythontex: I could not read '$$Pdest'\n", " to check dependencies\n"; } return $ret; } # for htlatex push @generated_exts, "4tc", "4ct", "tmp", "xref", "css", "idv", "lg"; # TBD: for -C remove also html and xhtml # TBD: check that this plugin also removes all these extensions.. think of lg. # biblatex # push @generated_exts, "run.xml";# does run.xml work? # $clean_ext .= " %R-blx.bib"; ```
https://tex.stackexchange.com/users/60463
`latexmk`can include files created during the `latexmk` run, except with `lstinputlistings`
false
If you just need to change the `F4_01fig2dev(.ptx)` in the error message to `F4_01fig2dev.ptx`,you can do this using: ``` \documentclass{article} \usepackage{listings} \usepackage{xpatch} \makeatletter \newcommand*{\NewLine}{^^J}% \xpatchcmd{\lst@MissingFileError} {`#1(.#2)' not found.} {`#1.#2' not found.\NewLine} {% \typeout{File ending patch for \string\lst@MissingFileError\space done.}% }{% \typeout{File ending patch for \string\lst@MissingFileError\space failed.}% } \makeatother \begin{document} Test \lstinputlisting{F4_01fig2dev.ptx} \end{document} ``` Here this results in the error message: > > > ``` > ! Package Listings Error: File `F4_01fig2dev.ptx' not found. > Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: ptx) > > ``` > > If needed you could also replace "Package Listings" by "LaTeX": ``` \documentclass{article} \usepackage{listings} \usepackage{xpatch} \makeatletter \newcommand*{\NewLine}{^^J}% \xpatchcmd{\lst@MissingFileError} {Package Listings Error: File `#1(.#2)' not found.} {LaTeX Error: File `#1.#2' not found.\NewLine}{% \typeout{File ending patch for \string\lst@MissingFileError\space done.}% }{% \typeout{File ending patch for \string\lst@MissingFileError\space failed.}% } \makeatother \begin{document} Test \lstinputlisting{F4_01fig2dev.ptx} \end{document} ``` Which results in: > > > ``` > ! LaTeX Error: File `F4_01fig2dev.ptx' not found. > Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: ptx) > > ``` > > In both cases, the default extension is still shown in the error message. But because of the patch, the space token before `or` is missing. If this is important, you would have to replace the whole message, not only the first line. Disclaimer: I don't know if an how `latexmk` triggers to one of these messages, because the corresponding parts of your `latexmk` configuration are missing in your question, so I cannot test it.
2
https://tex.stackexchange.com/users/277964
685477
318,005
https://tex.stackexchange.com/questions/685450
1
MWE is as follows: ``` \documentclass[12pt,a4paper,oneside]{book} \usepackage[a4paper,width=150mm,top=30mm,bottom=30mm,bindingoffset=6mm]{geometry} \usepackage[nottoc]{tocbibind} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{bm} \usepackage{nccmath} \usepackage{amsfonts, graphicx, verbatim, mathtools,amssymb, amsthm, mathrsfs,amsmath} \usepackage{color} \usepackage{array} \usepackage{setspace} \usepackage{fancyhdr} \usepackage{rsfso} \usepackage{enumitem} \usepackage{tikz} \usetikzlibrary{babel, arrows.meta, positioning, quotes} \usepackage{lipsum} \usepackage{geometry} \usepackage{tabularray} \UseTblrLibrary{booktabs, siunitx} \usepackage[thinc]{esdiff} \usepackage{ae} \usepackage [english]{babel} \usepackage [autostyle, english = american]{csquotes} \usepackage[style=numeric,maxbibnames=200,sortcites=true,backend=bibtex]{biblatex} \allowdisplaybreaks \usepackage{mwe} \usepackage{undertilde} \usepackage{dsfont} \usepackage{xcolor} \usepackage{tocloft} \pagenumbering{roman} \setlength\bibitemsep{0.5\baselineskip} \addbibresource{biblio.bib} \begin{document} \frontmatter \newpage \pagestyle{fancy} \fancyhf{} \fancyhead[EL]{\nouppercase\leftmark} \fancyhead[OR]{\nouppercase\rightmark} \fancyhead[ER,OL]{\thepage} \begin{titlepage} \begin{center} \begin{figure} \centering \includegraphics[width=9cm]{example-image-a} \end{figure} \rule[0.5cm]{15cm}{0.1cm} \Huge {aaaaa} \rule{15cm}{0.1cm} \\ {\normalsize \it{aaaa}} \\ {\normalsize \it{aaaaa}} \\ {\normalsize \it{aaaa}} \\ {\normalsize \it{aaaa}}\\ \vfill \vspace{5cm} {\normalsize by} \\ {\normalsize aaa}\\ {\normalsize aaaa}\\ {\normalsize aaaa}\\ {\normalsize aaaa}\\ \rule{15cm}{0.1cm} \end{center} \end{titlepage} \mainmatter \chapter{Introduction} \chapter{main1} \chapter{main2} \printbibliography \addcontentsline{toc}{chapter}{Bibliography} \end{document} ``` Well it wont show in this MWE since there inst any citations but for example, if I were to have three pages in the bibliography starting from page 10 and ending on page 12, in the table of contents, instead of showing "bibliography....... 10" it shows "bibliography....... 12". Any reason why and how can I fix this?
https://tex.stackexchange.com/users/181561
Why is the last page number of the bibliography showing in the table of contents instead of the first page of the bibliography?
false
Use `\printbibliography`'s optional argument to supply a `heading` value that adds the entry to the ToC. You probably want `bibintoc`, but there are other possible values (see pp. 99-100 of [the `biblatex` documentation](http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf)). You can and should then get rid of the `\addcontentsline`. ``` \documentclass[12pt,a4paper,oneside]{book} \usepackage[nottoc]{tocbibind} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage[autostyle, english=american]{csquotes} \usepackage[backend=bibtex, style=numeric, sortcites=true, maxbibnames=200,]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} \tableofcontents \chapter{Foo} Lorem \autocite{sigfridsson} \nocite{*} \printbibliography[heading=bibintoc] \end{document} ```
2
https://tex.stackexchange.com/users/35864
685478
318,006
https://tex.stackexchange.com/questions/685474
2
When I use imakeidx package together with the amsbook document class I get an incorrect header "INDEX" instead of the designated title (in the example below "SUBJECT INDEX") on the last page of the index. Is there a way to fix this so that the header of each page in the index is the same "SUBJECT INDEX" ? MWE: ``` \documentclass{amsbook} \usepackage{imakeidx} \makeindex[title=Subject Index,columns=1] \begin{document} \mainmatter The issue occurs when the index has multiple pages. The last page of the index has a header INDEX which is incorrect/different from the header of all other index pages. \index{a1} \index{a2} \index{a3} \index{a4} \index{a5} \index{a6} \index{a6} \index{a7}\index{a8} \index{a9} \index{a0} \index{b1} \index{b2} \index{b3} \index{b4} \index{b5} \index{b6} \index{b6} \index{b7}\index{b8} \index{b9} \index{b0} \index{c1} \index{c2} \index{c3} \index{c4} \index{c5} \index{c6} \index{c6} \index{c7}\index{c8} \index{c9} \index{c0} \index{d1} \index{d2} \index{d3} \index{d4} \index{d5} \index{d6} \index{d6} \index{d7}\index{d8} \index{d9} \index{d0} \index{e1} \index{e2} \index{e3} \index{e4} \index{e5} \index{e6} \index{e6} \index{e7}\index{e8} \index{e9} \index{e0} \index{f1} \index{f2} \index{f3} \index{f4} \index{f5} \index{f6} \index{f6} \index{f7}\index{f8} \index{f9} \index{f0} \index{g1} \index{g2} \index{g3} \index{g4} \index{g5} \index{g6} \index{g6} \index{g7}\index{g8} \index{g9} \index{g0} \index{h1} \index{h2} \index{h3} \index{h4} \index{h5} \index{h6} \index{h6} \index{h7}\index{h8} \index{h9} \index{h0} \index{k1} \index{k2} \index{k3} \index{k4} \index{k5} \index{k6} \index{k6} \index{k7}\index{k8} \index{k9} \index{k0} \backmatter \printindex \end{document} ```
https://tex.stackexchange.com/users/296852
imakeidx in the amsbook class makes incorrect header
false
Caveat: The following is only a workaround not a real solution! A not very nice but working solution is, to rename `\indexname` before `\printindex`. If you have only one index, you can do this in the document preamble: ``` \documentclass{amsbook} \usepackage{imakeidx} \makeindex[title=Subject Index,columns=1] \renewcommand*{\indexname}{Subject Index} \begin{document} \mainmatter The issue occurs when the index has multiple pages. The last page of the index has a header INDEX which is incorrect/different from the header of all other index pages. \index{a1} \index{a2} \index{a3} \index{a4} \index{a5} \index{a6} \index{a6} \index{a7}\index{a8} \index{a9} \index{a0} \index{b1} \index{b2} \index{b3} \index{b4} \index{b5} \index{b6} \index{b6} \index{b7}\index{b8} \index{b9} \index{b0} \index{c1} \index{c2} \index{c3} \index{c4} \index{c5} \index{c6} \index{c6} \index{c7}\index{c8} \index{c9} \index{c0} \index{d1} \index{d2} \index{d3} \index{d4} \index{d5} \index{d6} \index{d6} \index{d7}\index{d8} \index{d9} \index{d0} \index{e1} \index{e2} \index{e3} \index{e4} \index{e5} \index{e6} \index{e6} \index{e7}\index{e8} \index{e9} \index{e0} \index{f1} \index{f2} \index{f3} \index{f4} \index{f5} \index{f6} \index{f6} \index{f7}\index{f8} \index{f9} \index{f0} \index{g1} \index{g2} \index{g3} \index{g4} \index{g5} \index{g6} \index{g6} \index{g7}\index{g8} \index{g9} \index{g0} \index{h1} \index{h2} \index{h3} \index{h4} \index{h5} \index{h6} \index{h6} \index{h7}\index{h8} \index{h9} \index{h0} \index{k1} \index{k2} \index{k3} \index{k4} \index{k5} \index{k6} \index{k6} \index{k7}\index{k8} \index{k9} \index{k0} \backmatter \printindex \end{document} ``` Note: If you are using `babel` you have to do it, using `babel`'s user interface to change language dependent terms. If you have more than one index, you would need to move the `\renewcommand` before each index (and change it corresponding to the individual index).
1
https://tex.stackexchange.com/users/277964
685481
318,007
https://tex.stackexchange.com/questions/685442
2
I am trying to draw a probability tree, but I am overlapping two nodes, on the right, I should end up with 4 nodes, all at the same distance from the empty node, one above the other. But as I mentioned before, I am overlapping 2 of these, leaving only 3 visible. If anyone knows how I can solve it, I appreciate the help, thank you very much in advance! ``` \begin{tikzpicture}[grow=right,sibling distance=8em, level distance=3cm, every node/.style = {shape=rectangle, rounded corners, draw, align=center, top color=white, bottom color=blue!20}]] \node {} child { node {$A^c$} child { node {$B^c$} edge from parent node[below] { $P(B^c|A^c)$ } } child { node {$B$} edge from parent node[above] { $P(B|A^c)$ } } edge from parent node[above] { $P(A^c)$ } } child { node {$A$} child { node {$B^c$} edge from parent node[below] { $P(B^c|A)$ } } child { node {$B$} edge from parent node[above] { $P(A)$ } } edge from parent node[above] { $P(B|A)$ } }; \end{tikzpicture} ```
https://tex.stackexchange.com/users/262545
Drawing a probability tree
false
The `child` syntax is rather old and not very advances. In this simple case you can get away with setting different `sibling distance`s but usually you want to go with more advanced solutions like the `forest` package. Another option would be the `graphsdrawing` library (and its `trees` module) which requires LuaLaTeX. With the `graphs` library and its syntax, specifying the elements of the tree also reduces the typing. Code ---- ``` % !TeX TS-program = lualatex \documentclass[tikz]{standalone} \usetikzlibrary{graphs, graphdrawing, quotes} \usegdlibrary{trees} \tikzset{math node/.style={execute at begin node=$, execute at end node=$}} \begin{document} \tikz\graph[ tree layout, grow' = 0, level distance = 2cm, fresh nodes, math nodes, nodes = { shape = rectangle, rounded corners, draw, align = center, top color = white, bottom color = blue!20}, edge quotes = {sloped, auto, node font = \footnotesize, math node}, ]{ root[as =, rounded corners = +.3333em] -- { A [> "P(B|A)"] -- { B [> "P( A)" ], B^c [> "P(B^c | A)"'] }, A^c [> "P(A^c)"'] -- { B [> "P(B |A^c)" ], B^c [> "P(B^c|A^c)"'] } } }; \end{document} ``` Output ------
1
https://tex.stackexchange.com/users/16595
685484
318,008
https://tex.stackexchange.com/questions/685494
2
I write my documents using Overleaf. Now I want to switch to VS code. My document contains many tables (longtable) with a large number of references. Furthermore the document contains a glossary, many \*.svg files. In Overleaf this document is compiled without errors with lualatex. Overleaf is using latexmk. How do I have to rewrite the settings.json that Overleaf and vs-code produces the same results for Lualatex, biber and the glossaries? ``` $biber main.tex INFO - This is Biber 2.19 INFO - Logfile is 'main.tex.blg' ERROR - Cannot find 'main.tex.bcf'! INFO - ERRORS: 1 ``` I don't know how to make the beaver work. Here my settings.json ``` { "latex-workshop.latex.autoClean.run": "onBuilt", "latex-workshop.view.pdf.viewer": "tab", "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click", "latex-workshop.latex.autoBuild.run": "onSave", "files.autoSave": "afterDelay", "files.autoSaveDelay": 30000, "latex-workshop.latex.recipes": [ { "name": "lualatex -> biber -> makeglossaries -> lualatex 2x", "tools": [ "lualatex", "biber", "makeglossaries", "lualatex", "lualatex" ] } ], "latex-workshop.latex.tools": [ { "name": "lualatex", "command": "lualatex", "args": [ "-shell-escape", "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "-pdf", "%DOC%" ] }, { "name": "biber", "command": "biber", "args": [ "%DOCFILE%" ] }, { "name": "makeglossaries", "command": "makeglossaries", "args": [ "%DOCFILE%" ] } ], "files.exclude": { "**/.git": true, "**/*.aux": true, "**/*.bbl": true, "**/*.bcf": true, "**/*.blg": true, "**/*.fdb_latexmk": true, "**/*.fls": true, "**/*.glg": true, "**/*.glo": true, "**/*.gls": true, "**/*.glsdefs": true, "**/*.idx": true, "**/*.ilg": true, "**/*.ind": true, "**/*.lof": true, "**/*.log": true, "**/*.lot": true, "**/*.mw": true, "**/*.nlo": true, "**/*.nls": true, "**/*.out": true, "**/*.run.xml": true, "**/*.synctex.gz": true, "**/*.thm": true, "**/*.toc": true, "**/*.xdy": true }, "editor.minimap.enabled": false, } %% Bibliography \usepackage[backend=biber,style=alphabetic]{biblatex} \addbibresource{bibliography/bibliography.bib} \nocite{*} \printbibliography[heading=bibintoc,type=book,title={Literatur}] \cleardoublepage \printbibliography[heading=bibintoc,type=misc,title={Normen}] \cleardoublepage \printbibliography[heading=bibintoc,type=online,title={Internet}] \cleardoublepage ``` OS: Alma Luinux 9 Code-server: v4.12.0 Extension Version: v9.10.0 Tex distribution: TeX Live 2023 ``` Error Message: Package longtable Warning: Table widths have changed. Rerun LaTeX. [273] (./main.aux) LaTeX Warning: There were undefined references. LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. Package biblatex Warning: Please (re)run Biber on the file: (biblatex) main (biblatex) and rerun LaTeX afterwards. ```
https://tex.stackexchange.com/users/279691
Switch from Overleaf to VS-Code
false
I use VS Code when I am finishing documents as the errors/duplicate labels functionality is really good plus source control. I believe your issue is being caused by the fact that the LaTeX extension for VS Code uses `bibtex` as the bibliography backend by default so you need to specify `biblatex` like so in your settings: ``` "latex-workshop.intellisense.citation.backend": "biblatex", ``` I cannot see in your provided `settings.json` that you have specified that so I think that is the issue (could be wrong though). For example, my document (using the `diff2` recipe with `lualatex`, `biber`, `makeglossaries`) compiles well with these options: ``` "latex-workshop.latex.autoBuild.run": "never", "latex-workshop.intellisense.citation.backend": "biblatex", "latex-workshop.latex.tools": [ { "name": "biber", "command": "biber", "args": [ "%DOCFILE%" ], "env": {} }, { "name": "makeglossaries", "command": "makeglossaries", "args": [ "%DOCFILE%" ] }, { "name": "lualatex", "command": "lualatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ] }, ], "latex-workshop.latex.recipes": [ { "name": "diff2", "tools": [ "lualatex", "biber", "lualatex", "makeglossaries", "lualatex", "lualatex", ] }, { "name": "lualatex", "tools": [ "lualatex", ] }, { "name": "lualatex3", "tools": [ "lualatex", "lualatex", "lualatex", ] }, { "name": "latexmk", "tools": [ "latexmk" ] }, { "name": "latexmk (latexmkrc)", "tools": [ "latexmk_rconly" ] }, { "name": "latexmk (lualatex)", "tools": [ "lualatexmk" ] }, { "name": "latexmk (xelatex)", "tools": [ "xelatexmk" ] }, { "name": "pdflatex -> bibtex -> pdflatex * 2", "tools": [ "pdflatex", "bibtex", "pdflatex", "pdflatex" ] }, { "name": "Compile Rnw files", "tools": [ "rnw2tex", "latexmk" ] }, { "name": "Compile Jnw files", "tools": [ "jnw2tex", "latexmk" ] }, { "name": "Compile Pnw files", "tools": [ "pnw2tex", "latexmk" ] }, { "name": "tectonic", "tools": [ "tectonic" ] }, ], "output.smartScroll.enabled": false, "latex-workshop.latex.clean.method": "glob", "latex-workshop.latex.autoClean.run":"onBuilt", "latex-workshop.latex.clean.fileTypes": [ "%DOCFILE%.aux", "%DOCFILE%.bbl", "%DOCFILE%.blg", "%DOCFILE%.idx", "%DOCFILE%.ind", "%DOCFILE%.lof", "%DOCFILE%.lot", "%DOCFILE%.out", "%DOCFILE%.toc", "%DOCFILE%.acn", "%DOCFILE%.acr", "%DOCFILE%.alg", "%DOCFILE%.glg", "%DOCFILE%.glo", "%DOCFILE%.gls", "%DOCFILE%.fls", "%DOCFILE%.log", "%DOCFILE%.fdb_latexmk", "%DOCFILE%.snm", "%DOCFILE%.synctex(busy)", "%DOCFILE%.synctex.gz(busy)", "%DOCFILE%.nav", "%DOCFILE%.vrb", "%DOCFILE%.abb", "%DOCFILE%.abrn", "%DOCFILE%.bcf", "%DOCFILE%.dvi", "%DOCFILE%.ist", "%DOCFILE%.nom", "%DOCFILE%.ntn", "%DOCFILE%.run.xml", "%DOCFILE%.synctex.gz" ], ``` The options here: ``` "latex-workshop.latex.clean.method": "glob", "latex-workshop.latex.autoClean.run":"onBuilt", "latex-workshop.latex.clean.fileTypes": ["%DOCFILE%".abb, ...] ``` Automatically cleans `aux` files and whatever extensions you have, you can add or delete that section if you like. --- The FAQ for VSCode `biblatex`/`biber` found on [TeX.SE at this link](https://tex.stackexchange.com/a/502183/273733) has been updated and includes further links and guides to `intellisense` for future readers.
3
https://tex.stackexchange.com/users/273733
685497
318,013
https://tex.stackexchange.com/questions/685504
0
I am trying to make a beamer presentation with the Metropolis theme. I adapted the colors like this: ``` output: beamer_presentation: latex_engine: xelatex theme: "metropolis" slide_level: 3 navigation: horizontal classoption: "aspectratio=169" header-includes: - \metroset{block=fill} - \useoutertheme{infolines} - \usepackage{xcolor} - \definecolor{GreenM}{RGB}{107, 169, 36} - \definecolor{BlueM}{RGB}{6, 48, 96} - \setbeamercolor{title}{fg=BlueM} - \setbeamercolor{title separator}{fg = GreenM} - \setbeamercolor{author}{fg=BlueM} - \setbeamercolor{date}{fg=BlueM} - \setbeamercolor{progress bar in section page}{fg = GreenM,bg = gray} - \setbeamercolor{frametitle}{bg=GreenM, fg = white} - \setbeamercolor{normal text}{fg=BlueM} - \setbeamercolor{structure}{fg=BlueM} - \setbeamercolor{item}{fg=GreenM} - \setbeamercolor{block title alerted}{fg=red} - \setbeamercolor{section in head/foot}{fg=BlueM, bg=white} - \setbeamercolor{subsection in head/foot}{fg=white,bg=BlueM} - \setbeamercolor{author in head/foot}{fg=BlueM} - \setbeamercolor{date in head/foot}{fg=white, bg=BlueM} - \setbeamertemplate{page number in head/foot}{} ``` Now the date is displayed as 2022/2023. I want to set this to "May 27, 2023" (which is not the date of today) on the title slide and in the footer. I am making this presentation using Rmarkdown. Does someone knows how I can do this?
https://tex.stackexchange.com/users/296750
date beamer metropolis using rmarkdown
true
Try with `\AtBeginDocument{\date{May 27, 2023}}` in your header includes: ``` --- output: beamer_presentation: latex_engine: xelatex theme: "metropolis" slide_level: 3 navigation: horizontal classoption: "aspectratio=169" header-includes: - \metroset{block=fill} - \useoutertheme{infolines} - \usepackage{xcolor} - \definecolor{GreenM}{RGB}{107, 169, 36} - \definecolor{BlueM}{RGB}{6, 48, 96} - \setbeamercolor{title}{fg=BlueM} - \setbeamercolor{title separator}{fg = GreenM} - \setbeamercolor{author}{fg=BlueM} - \setbeamercolor{date}{fg=BlueM} - \setbeamercolor{progress bar in section page}{fg = GreenM,bg = gray} - \setbeamercolor{frametitle}{bg=GreenM, fg = white} - \setbeamercolor{normal text}{fg=BlueM} - \setbeamercolor{structure}{fg=BlueM} - \setbeamercolor{item}{fg=GreenM} - \setbeamercolor{block title alerted}{fg=red} - \setbeamercolor{section in head/foot}{fg=BlueM, bg=white} - \setbeamercolor{subsection in head/foot}{fg=white,bg=BlueM} - \setbeamercolor{author in head/foot}{fg=BlueM} - \setbeamercolor{date in head/foot}{fg=white, bg=BlueM} - \setbeamertemplate{page number in head/foot}{} - \AtBeginDocument{\date{May 27, 2023}} --- test ```
1
https://tex.stackexchange.com/users/36296
685505
318,015
https://tex.stackexchange.com/questions/685516
0
I want to use the less than symbol < and greater than > in and equation and capital letters from Greek alphabet in particular \Phi. Now, I need the \usepackage{breqn} to put the less than greater than in an equation, but this package prevents capital Greek letters by giving a black square. I know I can take the <, > out of equations, but I've wrote pages of equations with them in. Removal of the \usepackage{breqn} enables use of capital Greek letters, but removes the <,> from inside equations MWE ``` % !TeX program = xelatex % !TeX spellcheck = en_GB \documentclass[12pt]{exam} %\documentclass[14pt,hidelinks]{article} \usepackage{fouriernc} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{amssymb} \usepackage{parskip}% this stops indent of first line in paragraph \usepackage[fleqn]{amsmath} \setlength{\mathindent}{0pt} \usepackage{xcolor} \usepackage{mathpazo} %and mathptmx package for extra large fonts \usepackage{graphicx} \usepackage[margin=0.5in]{geometry} \usepackage[% colorlinks=true,% urlcolor=blue% ]{hyperref}% http://ctan.org/pkg/hyperref \usepackage{enumitem} \usepackage{textcomp} \usepackage{breqn} % this is needed for less than greater than in formulas but prevents capital greek letters \usepackage{mathtools}% need for floor \DeclarePairedDelimiter\ceil{\lceil}{\rceil} %needed for ceiling \DeclarePairedDelimiter\floor{\lfloor}{\rfloor} % need for floor \usepackage{bigints} % larger integral signs \usepackage{bm} \begin{document} \begin{eqnarray*} P(-1.5\leq Z\leq 0.5) &=& \Phi(0.5) - \Phi(-1.5)\\ &=& \Phi(0.5) - (1 - \Phi(1.5)) \\ &=& 0.6915 - (1-0.9332) = 0.6247,\end{eqnarray*} The probability that $X$ is less than 4 is $ P(X < 4) $ Now, because \textbf{X} only takes integer values \begin{equation} P(X \textless 4) = P(X \le 3) = F(3) = 0.85. \end{equation} \end{document} ```
https://tex.stackexchange.com/users/149116
I want to use capital Greek letters and less < and greater than in same equation
false
You can't use packages for multiple fonts. Packages `amssymb`, `mathpazo`, and `breqn` removed. Less than `<` and greater `>` can now be put into maths equations along with capital Greek letters.
0
https://tex.stackexchange.com/users/149116
685522
318,020
https://tex.stackexchange.com/questions/685474
2
When I use imakeidx package together with the amsbook document class I get an incorrect header "INDEX" instead of the designated title (in the example below "SUBJECT INDEX") on the last page of the index. Is there a way to fix this so that the header of each page in the index is the same "SUBJECT INDEX" ? MWE: ``` \documentclass{amsbook} \usepackage{imakeidx} \makeindex[title=Subject Index,columns=1] \begin{document} \mainmatter The issue occurs when the index has multiple pages. The last page of the index has a header INDEX which is incorrect/different from the header of all other index pages. \index{a1} \index{a2} \index{a3} \index{a4} \index{a5} \index{a6} \index{a6} \index{a7}\index{a8} \index{a9} \index{a0} \index{b1} \index{b2} \index{b3} \index{b4} \index{b5} \index{b6} \index{b6} \index{b7}\index{b8} \index{b9} \index{b0} \index{c1} \index{c2} \index{c3} \index{c4} \index{c5} \index{c6} \index{c6} \index{c7}\index{c8} \index{c9} \index{c0} \index{d1} \index{d2} \index{d3} \index{d4} \index{d5} \index{d6} \index{d6} \index{d7}\index{d8} \index{d9} \index{d0} \index{e1} \index{e2} \index{e3} \index{e4} \index{e5} \index{e6} \index{e6} \index{e7}\index{e8} \index{e9} \index{e0} \index{f1} \index{f2} \index{f3} \index{f4} \index{f5} \index{f6} \index{f6} \index{f7}\index{f8} \index{f9} \index{f0} \index{g1} \index{g2} \index{g3} \index{g4} \index{g5} \index{g6} \index{g6} \index{g7}\index{g8} \index{g9} \index{g0} \index{h1} \index{h2} \index{h3} \index{h4} \index{h5} \index{h6} \index{h6} \index{h7}\index{h8} \index{h9} \index{h0} \index{k1} \index{k2} \index{k3} \index{k4} \index{k5} \index{k6} \index{k6} \index{k7}\index{k8} \index{k9} \index{k0} \backmatter \printindex \end{document} ```
https://tex.stackexchange.com/users/296852
imakeidx in the amsbook class makes incorrect header
true
It's a timing issue that seems to happen only with `amsbook` (that has a nonstandard management of headers). Workaround in the code below. ``` \documentclass{amsbook} \usepackage{imakeidx} \makeindex[ title=Subject Index, columns=1 ] \makeatletter \def\imki@indexheaders{% \begingroup\edef\x{\endgroup \noexpand\@mkboth{\MakeUppercase{\indexname}}{\MakeUppercase{\indexname}}% }\x } \makeatother \begin{document} \frontmatter \tableofcontents \mainmatter The issue occurs when the index has multiple pages. The last page of the index has a header INDEX which is incorrect/different from the header of all other index pages. \index{a1} \index{a2} \index{a3} \index{a4} \index{a5} \index{a6} \index{a6} \index{a7}\index{a8} \index{a9} \index{a0} \index{b1} \index{b2} \index{b3} \index{b4} \index{b5} \index{b6} \index{b6} \index{b7}\index{b8} \index{b9} \index{b0} \index{c1} \index{c2} \index{c3} \index{c4} \index{c5} \index{c6} \index{c6} \index{c7}\index{c8} \index{c9} \index{c0} \index{d1} \index{d2} \index{d3} \index{d4} \index{d5} \index{d6} \index{d6} \index{d7}\index{d8} \index{d9} \index{d0} \index{e1} \index{e2} \index{e3} \index{e4} \index{e5} \index{e6} \index{e6} \index{e7}\index{e8} \index{e9} \index{e0} \index{f1} \index{f2} \index{f3} \index{f4} \index{f5} \index{f6} \index{f6} \index{f7}\index{f8} \index{f9} \index{f0} \index{g1} \index{g2} \index{g3} \index{g4} \index{g5} \index{g6} \index{g6} \index{g7}\index{g8} \index{g9} \index{g0} \index{h1} \index{h2} \index{h3} \index{h4} \index{h5} \index{h6} \index{h6} \index{h7}\index{h8} \index{h9} \index{h0} \index{k1} \index{k2} \index{k3} \index{k4} \index{k5} \index{k6} \index{k6} \index{k7}\index{k8} \index{k9} \index{k0} \index{l1} \index{l2} \index{l3} \index{l4} \index{l5} \index{l6} \index{l6} \index{l7}\index{l8} \index{l9} \index{l0} \index{m1} \index{m2} \index{m3} \index{m4} \index{m5} \index{m6} \index{m6} \index{m7}\index{m8} \index{m9} \index{m0} \index{n1} \index{n2} \index{n3} \index{n4} \index{n5} \index{n6} \index{n6} \index{n7}\index{n8} \index{n9} \index{n0} \index{o1} \index{o2} \index{o3} \index{o4} \index{o5} \index{o6} \index{o6} \index{o7}\index{o8} \index{o9} \index{o0} \backmatter \printindex \chapter{xxx} \end{document} ``` For an older TeX distribution (before TL 2022), the code should be ``` \makeatletter \def\imki@indexheaders{% \begingroup\edef\x{\endgroup \noexpand\@mkboth{\noexpand\MakeUppercase{\indexname}}{\noexpand\MakeUppercase{\indexname}}% }\x } \makeatother ```
2
https://tex.stackexchange.com/users/4427
685527
318,023
https://tex.stackexchange.com/questions/685526
1
Coders, i was playing with the hyperref package today and i noticed something odd. Here is the MWE (not that minimal, but it shows the goal): ``` \documentclass[12pt]{article} \usepackage{hyperref} \newsavebox\TBox \title{Anamnesebogen} \date{05.2023} \author{Dr. N.N.} \hypersetup{ pdftitle={Anamnesebogen}, pdfsubject={Anamnese}, pdfauthor={Dr. med. N.N.}, pdftoolbar=false, pdfmenubar=false } \def\DefaultTF{ print, bordercolor={.04 .40 .44}, %backgroundcolor={.55 .85 .83}, backgroundcolor={}, borderstyle=U, height=2.5ex, width=15em, format={app.runtimeHighlight = false;} } \def\DefaultCB{ print, width=1em, height=0.9em, bordercolor={.04 .40 .44}, backgroundcolor={}, borderstyle=S, format={app.runtimeHighlight = false;} } \def\DatumTF{ format={AFDate_FormatEx("dd.mm.yyyy");}, keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");} } \xdef\DefaultOptionsofText{\DefaultTF} \xdef\DefaultOptionsofCheckBox{\DefaultCB} \newcommand{\specialline}{\vskip\medskipamount % or other desired dimension %\leaders\vrule width \textwidth\vskip0.4pt % or other desired thickness \vskip\medskipamount % ditto \nointerlineskip } \newcommand{\FormField}[1]{\sbox\Tbox{#1:\ }\TextField[width=\dimexpr\linewidth-\wd\Tbox]{#1:\ }} \setlength\parindent{0pt} \begin{document} \begin{Form} \TextField[width=6em, format={event.value=(new Date()).toString(); AFDate_FormatEx("dd.mm.yyyy");}, keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");}]{Datum}\\[.7ex] \sbox\TBox{Name }\TextField[width=\dimexpr\linewidth-\wd\TBox]{Name}\\[.7ex] \TextField[width=6em, format={AFDate_FormatEx("dd.mm.yyyy");}, keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");}]{Geburtsdatum}\\[.7ex] \sbox\TBox{Adresse }\TextField[width=\dimexpr\linewidth-\wd\TBox]{Adresse}\\[.7ex] \sbox\TBox{Mobilnr }\TextField[width=\dimexpr\linewidth-\wd\TBox]{Mobilnr}\\[.7ex] \sbox\TBox{E-Mail }\TextField[width=\dimexpr\linewidth-\wd\TBox]{E-Mail}\\[.7ex] \sbox\TBox{Beruf }\TextField[width=\dimexpr\linewidth-\wd\TBox]{Beruf}\\[.7ex] \textbf{Beziehungsstatus} \quad{} \mbox{\CheckBox{Single}} \quad{} \mbox{\CheckBox{Fester Partner}} \quad{} \mbox{\CheckBox{Feste Partnerin}} Hatten Sie Komplikationen während der Schwangerschaft/Geburt? \quad{} \mbox{\CheckBox[name=pregcomplno]{Nein}} \quad{} \mbox{\CheckBox[name=pregcomplyes]{Ja}} \sbox\TBox{Wenn ja, welche? }\TextField[name=prefcompl,width=\dimexpr\linewidth-\wd\TBox]{Wenn ja, welche?} \TextField[name=aborts, width=2em]{Wie viele Fehlgeburten hatten Sie?} \TextField[name=aussch, width=2em]{Wie viele Ausschabungen hatten Sie?} \specialline{} \textbf{Familienplanung} Haben Sie einen Kinderwunsch? \quad{} \mbox{\CheckBox[name=kinderwunschno]{Nein}} \quad{} \mbox{\CheckBox[name=kinderwunschnow]{Jetzt}} \quad{} \mbox{\CheckBox[name=kinderwunschlater]{Später}} Verhüten Sie? \quad{} \mbox{\CheckBox[name=vno]{Nein}} \quad{} \mbox{\CheckBox[name=vpill]{Pille}} \quad{} \mbox{\CheckBox[name=vcondom]{Kondom}} \quad{} \mbox{\CheckBox[name=vcopper]{Kupferspirale}} \quad{} \mbox{\CheckBox[name=vhormone]{Hormonspirale}} \specialline{} \textbf{Operationen}\\ \mbox{\CheckBox[name=geb]{Gebärmutter}} \quad{} \mbox{\CheckBox{Gebärmutterhals}} \quad{} \mbox{\CheckBox{Brust}} \quad{} \mbox{\CheckBox{Eierstock}}\\ \sbox\TBox{andere OP }\TextField[width=\dimexpr\linewidth-\wd\TBox]{andere OP} \specialline{} \textbf{Krankheiten}\\ \mbox{\CheckBox{Diabetes}} \quad{} \mbox{\CheckBox{Hoher Blutdruck}} \quad{} \mbox{\CheckBox{Herzinfarkt/Schlaganfall}} \quad{} \mbox{\CheckBox{Thrombose/Embolie}}\\ \mbox{\CheckBox{Depression/Erschöpfungssyndrom}} \quad{} \mbox{\CheckBox{Migräne}} \quad{} \mbox{\CheckBox{Autoimmunkrankheiten}}\\ \sbox\TBox{Wenn Autoimmunkrankheiten, welche? }\TextField[width=\dimexpr\linewidth-\wd\TBox]{Wenn Autoimmunkrankheiten, welche?} \specialline{} \sbox\TBox{\textbf{Medikamente/'Anti-Baby-Pille'} }\TextField[name=meds,width=\dimexpr\linewidth-\wd\TBox]{\textbf{Medikamente/'Anti-Baby-Pille'}}\\ \mbox{\CheckBox[name=allergiemedsyes]{\textbf{Medikamente-Allergien} Ja}} \quad{} \TextField[name=allergiemedstxt,width=10cm]{Welche?} \specialline{} \textbf{Familie} - Haben Geschwister/Eltern folgende Krankheiten:\\ \mbox{\CheckBox{Diabetes}} \quad{} \mbox{\CheckBox{Herz-Kreislauf}} \quad{} \mbox{\CheckBox{Brustkrebs}} \quad{} \mbox{\CheckBox{Thrombose/Embolie}} \quad{} \mbox{\CheckBox{Sonstige}}\\ \sbox\TBox{Wenn Sonstige, welche? }\TextField[name=illothertxt,width=\dimexpr\linewidth-\wd\TBox]{Wenn Sonstige, welche?} \specialline{} \textbf{Mein Corona-Status} \quad{} \mbox{\CheckBox{Geimpft}} \mbox{\CheckBox{Genesen}} \textbf{HPV/Gebärmutterhals-Impfung} \quad{} \mbox{\CheckBox[name=hpvyes]{Ja}} \mbox{\CheckBox[name=hpvno]{Nein}} \mbox{\CheckBox[name=hpvmaybe]{Vielleicht}} \specialline{} \small \TextField[name=recipes]{Meine Rezepte/Überweisungen etc. darf folgende Person abholen} Hiermit willige ich ein, dass meine Daten DSGVO-konform gespeichert und weitergeleitet verschickt werden an: Krankenkasse, KV Nordrhein, Labor/Pathologie:(Amedes), Philips Bildspeicherung, Doctolib Praxismanagement \normalsize \vspace*{3ex} \TextField{Ort, Datum} \TextField[height=10mm]{Unterschrift} \end{Form} \end{document} ``` So the checkboxes differ in their size. Of course all of them have fixed height. All Checkboxes who have text with "underlength" (?) like p,g are higher than the others with not so high characters. Can I fix the behaviour? Of course, the checkboxes should be of the same height. Best Wishes, Peter
https://tex.stackexchange.com/users/199944
Behaviour of CheckBox in hyperref package (heights differ)
true
I don't fully understand how the height of checkboxes is calculated, but it seems that is is affected by the height and depth of the characters in the label and the surrounding text in general. Compare: ``` \documentclass[12pt]{article} \usepackage{hyperref} \begin{document} \begin{Form} \CheckBox[height=0.8em]{ooo} \CheckBox[height=0.8em]{boo} \CheckBox[height=0.8em]{oog} \CheckBox[height=0.8em]{bog} \end{Form} \end{document} ``` Which outputs: It has been noted that [all checkboxes in the same paragraph will get the same (maximum) height and depth](https://tex.stackexchange.com/a/9387/47927). This behaviour can be overridden by [placing each checkbox in its own `\makebox` for example. The [`hyperref` manual](http://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf) tells us (in Chapter 9 "PDF and HTML forms") that the command `\LayoutCheckField` is used to typeset label and checkbox. It is defined as ``` \def\LayoutCheckField#1#2{% label, field \def\Hy@temp{#1}% \ifx\Hy@temp\@empty #2% \else #1 #2% \fi } ``` Knowing that the height of the checkbox is affected by what is typed before it, we could put the checkbox into a `\makebox` to avoid that the surrounding text influences its height: ``` \documentclass[12pt]{article} \usepackage{hyperref} \makeatletter \def\LayoutCheckField#1#2{% label, field \def\Hy@temp{#1}% \ifx\Hy@temp\@empty \makebox{#2}% \else #1 \makebox{#2}% \fi } \makeatother \begin{document} \begin{Form} \CheckBox[height=0.8em]{ooo} \CheckBox[height=0.8em]{boo} \CheckBox[height=0.8em]{oog} \CheckBox[height=0.8em]{bog} \end{Form} \end{document} ```
1
https://tex.stackexchange.com/users/47927
685533
318,027
https://tex.stackexchange.com/questions/685547
0
I am trying to make a plot that would ideally have 3 rows and 2 columns such that the layout is ``` Row Description(A) |fig(a) |fig(b)| Row Description(B) |fig(a) |fig(b)| Row Description(C) |fig(a) |fig(b)| Fig. 1: [Caption] ``` "Row Description" will include a mini description of each row.I want to have a hyperlink to each plots For example \ref{1Aa} should link to figure in row 1 and column 1. The closest post that I came across is [How to put 2 sets of 3 figures on 2 columns?](https://tex.stackexchange.com/questions/198193/how-to-put-2-sets-of-3-figures-on-2-columns). But I still can't make it work.
https://tex.stackexchange.com/users/296905
How to make a plot with 6 subfigures ( 2 figures in each row*3 rows)?
true
It's quite rough, please forgive me. I used `tabularray` to layout. ``` \documentclass{article} \usepackage[export]{adjustbox} \usepackage{tabularray} \UseTblrLibrary{counter} \begin{document} \newcounter{cussublabel} \makeatletter \newcommand{\cuslabel}{% \stepcounter{cussublabel}% \def\@currentlabel{(\alph{cussublabel})}% \@currentlabel% } \makeatother \begin{figure} \begin{tblr} { colspec={Q[co=-1,c,m]Q[co=-1,c,m]Q[co=-1,c,m]}, columns={colsep=5pt}, rows={rowsep=5pt}, column{1}={preto={\cuslabel}}, } \label{aaa}Row Description a& \includegraphics[width=.3\textwidth,valign=c]{example-image}& \includegraphics[width=.3\textwidth,valign=c]{example-image}\\ \label{bbb} Row Description b& \includegraphics[width=.3\textwidth,valign=c]{example-image}& \includegraphics[width=.3\textwidth,valign=c]{example-image}\\ \label{ccc} Row Description c& \includegraphics[width=.3\textwidth,valign=c]{example-image}& \includegraphics[width=.3\textwidth,valign=c]{example-image}\\ \end{tblr} \caption{title} \label{key} \end{figure} \figurename~\ref{aaa}\par \figurename~\ref{bbb}\par \figurename~\ref{ccc}\par \figurename~\ref{key} \end{document} ```
0
https://tex.stackexchange.com/users/238422
685548
318,032
https://tex.stackexchange.com/questions/421724
2
The compilation works fine if I use LaTeX, Python, and then LaTeX, with the command for Python : ``` python "C:\Program Files (x86)\MiKTeX 2.9\scripts\pythontex\pythontex.py" ``` But I can't use `latexmk` to make the same thing : If I try: ``` latexmk -r C:\latexmk\LatexMk.txt essai.tex ``` with in the file `LatexMk.txt`: ``` add_cus_dep('pytxcode', 'tex', 0, 'pythontex'); sub pythontex { return system("pythontex \"$_[0]\""); } $aux_dir = 'auxiliaire2'; $pdflatex = 'pdflatex-synctex=1 --shell-escape %O %S'; $latex = 'latex -synctex=1 --shell-escape %O %S'; ``` then LaTeX compiles fine, but when PythonTeX runs, an arror occurs: ``` Package PythonTeX Warning: Non-existent Pygments content on input line 11. ``` and I obtain as result ``` ??PythonTex?? ``` I don't understand why. I'm using Windows 10. More precisely, essai.tex is: ``` \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{pythontex} \begin{document} Here's the code in the document \begin{pyverbatim} return '\\SI{' + str(var) + '}{' + unit + '}' \end{pyverbatim} \end{document} ``` and the console's ouput is : ``` 'Custom dependency list: pytxcode tex 0 pythontex Latexmk: This is Latexmk, John Collins, 17 Jan. 2018, version: 4.55. Rule 'latex': File changes, etc: Changed files, or newly in use since previous run(s): 'E:\professionnel\_BTS_SIO_1_U_22_algo\TD_6\essai.tex' 'essai.tex' ------------ Run number 1 of rule 'latex' ------------ ------------ Running 'latex -synctex=1 --shell-escape -recorder -aux- directory="auxiliaire2" "E:\professionnel\_BTS_SIO_1_U_22_algo\TD_6\essai.tex"' ------------ Latexmk: applying rule 'latex'... This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6630 64-bit) entering extended mode (E:/professionnel/_BTS_SIO_1_U_22_algo/TD_6/essai.tex LaTeX2e <2017-04-15> Babel <3.18> and hyphenation patterns for 75 language(s) loaded. ``` Comment from me : I cut lines where Miktex works... ``` No file pythontex-files-essai/essai.pytxmcr. Run PythonTeX to create it. Package PythonTeX Warning: Non-existent Pygments content on input line 11. [1] (E:\professionnel\_BTS_SIO_1_U_22_algo\TD_6\auxiliaire2\essai.aux) ) Output written on essai.dvi (1 page, 480 bytes). SyncTeX written on essai.synctex.gz. Transcript written on E:\professionnel\_BTS_SIO_1_U_22_algo\TD_6\auxiliaire2\es sai.log. ===========Latexmk: Missing input file: 'pythontex-files- ``` essai/essai.pytxmcr' from line 'No file pythontex-files-essai/essai.pytxmcr.' Latexmk: Missing input file: 'pythontex-files-essai/essai.pytxmcr' from line 'No file pythontex-files-essai/essai.pytxmcr.' Latexmk: Log file says output to 'essai.dvi' === TeX engine is 'pdfTeX' Latexmk: All targets (essai.dvi) are up-to-date'
https://tex.stackexchange.com/users/154793
Pythontex and latexmk
false
The problem is discussed in <https://github.com/gpoore/pythontex/issues/132#issuecomment-492531792> . With your configuration, after the first time where you manually run `pythontex`, subsequent runs with `latexmk` should work automatically. That having said, if you want to make it work in the first run as well, the linked GitHub issue above has a solution -- put the following in `latexmkrc`: ``` # Support for pythontex in v. 0.16 or higher, with latexmk 4.62 or higher # # What these definitions provide/do: # 1. Variable specifying command string for invoking pythontex # 2. Addition to %extra_rule_spec of template for pythontex rule. This # tells latexmkrc to create the rule when it is initializing for # processing a TeX file. # 3. A subroutine mypythontex that the pythontex rule is defined to # call. This runs pythontex and then sets dependency information. # 4. Settings for the files generated by the pythontex package and the # pythontex program so that the files are deleted in a clean-up # operation. $clean_ext .= " pythontex-files-%R/* pythontex-files-%R"; push @generated_exts, 'pytxcode'; $pythontex = 'pythontex %O %S'; $extra_rule_spec{'pythontex'} = [ 'internal', '', 'mypythontex', "%Y%R.pytxcode", "%Ypythontex-files-%R/%R.pytxmcr", "%R", 1 ]; sub mypythontex { my $result_dir = $aux_dir1."pythontex-files-$$Pbase"; my $ret = Run_subst( $pythontex, 2 ); rdb_add_generated( glob "$result_dir/*" ); open( my $fh, "<", $$Pdest ); if ($fh) { while (<$fh>) { if ( /^%PythonTeX dependency:\s+'([^']+)';/ ) { print "Found pythontex dependency '$1'\n"; rdb_ensure_file( $rule, $aux_dir1.$1 ); } } undef $fh; } else { warn "mypythontex: I could not read '$$Pdest'\n", " to check dependencies\n"; } return $ret; } ``` As far as I can see, the normal `add_cus_dep` cannot be used to "properly" handle this because the location of the source file `a.pytxcode` is different from that of the target file `pythontex-files-a/a.pytxmcr`. I unfortunately can't find documentation of `%extra_rule_spec`. ([latexmk with pythontex, lualatex and long name not working](https://tex.stackexchange.com/questions/683374/latexmk-with-pythontex-lualatex-and-long-name-not-working) may have some explanation.) --- An alternative method is to use the other method explained in pythontex manual: The method was originally made for the case where `--output-directory` is not the normal one, however it doesn't really matter -- it allows `add_cus_dep` to work properly by moving the `a.pytxmcr` to the **current directory**, however the disadvantage, as mentioned, is **the other auxiliary files (`a.pytxpyg`, `pythontex_data.pkl`) is also moved to the current directory**.
0
https://tex.stackexchange.com/users/250119
685550
318,033
https://tex.stackexchange.com/questions/685552
3
The effect I'd like to achieve is: ``` Header: Here's some more text that's just here to illustrate what I mean. It needs to be a bit longer to show it properly. That should do it. ``` My first thought was to do this with a minipage, but since the width of the page is variable I couldn't get very far. What I'm trying to construct is an environment of two parameters, where #1 is a sort of header that sits off to the left, and a main body of text, #2, next to it, that fills the rest of the width, but then after the line-break "stays in its lane", i.e. is left aligned with the start of #2. I'm almost certain something like this must exist, but I've searched around for some time and I can't find anything.
https://tex.stackexchange.com/users/245533
How do I align this header and body properly?
false
For example, you can define the macro `\head` and the text is finalized by `\ehead`. The macro reads the first parameter separated by column, sets it to the box 0, measures the width of the box and uses it as `\leftskip` for given paragraph. ``` \def\head#1:#2\ehead{\par {\setbox0=\hbox{#1: } \leftskip=\wd0 \rightskip=0pt plus1fil \noindent\llap{\box0}\ignorespaces #2 \par }} \head Header: Here's some more text that's just here to illustrate what I mean. It needs to be a bit longer to show it properly. That should do it. \ehead ``` If you want to justify the paragraph, i.e. no ragged right (like in egreg's answer), simply don't set `\rightskip` register. Note, that you can use more paragraph in the `\head`...`\ehead` environment.
5
https://tex.stackexchange.com/users/51799
685555
318,034
https://tex.stackexchange.com/questions/685552
3
The effect I'd like to achieve is: ``` Header: Here's some more text that's just here to illustrate what I mean. It needs to be a bit longer to show it properly. That should do it. ``` My first thought was to do this with a minipage, but since the width of the page is variable I couldn't get very far. What I'm trying to construct is an environment of two parameters, where #1 is a sort of header that sits off to the left, and a main body of text, #2, next to it, that fills the rest of the width, but then after the line-break "stays in its lane", i.e. is left aligned with the start of #2. I'm almost certain something like this must exist, but I've searched around for some time and I can't find anything.
https://tex.stackexchange.com/users/245533
How do I align this header and body properly?
false
Something like this? Note that "Header" starts at the left-hand edge of the text block. If you don't want this behavior, simply remove the instructions `\par\noindent` that are currently before `#1`. ``` \documentclass{article} \newcommand\twoparts[2]{% \par\noindent #1:\space% \parbox[t]{4cm}{\raggedright #2}\par} \begin{document} \twoparts{Header}{Here's some more text that's just here to illustrate what I mean. It needs to be a bit longer to show it properly. That should do it.} \end{document} ```
2
https://tex.stackexchange.com/users/5001
685556
318,035
https://tex.stackexchange.com/questions/144840
17
I am using the `algorithmicx` package to write an algorithm. However I am using the `noend` option: ``` \usepackage[noend]{algpseudocode} ``` Is there anyway to get vertical lines for each block of code? This question has been answered here: <https://tex.stackexchange.com/a/52778/37056> However, it does not work when using the `noend` option. EDIT: I'm looking for something like the algorithms here: <http://www.isg.rhul.ac.uk/~kp/dtls.pdf>
https://tex.stackexchange.com/users/37056
Vertical loop/block lines in algorithmicx with 'noend' option
false
Based on cyberSingularity's answer, I tried to make a shorter version ``` \usepackage{tikz} \usepackage[noend]{algpseudocode} \makeatletter \providetoggle{ALG@Ruler@empty} \newcounter{ALG@Ruler@Id} \apptocmd{\ALG@beginblock}{% \stepcounter{ALG@Ruler@Id}% \def\ALG@Ruler{ALG@Ruler@BeginPoint-\arabic{ALG@Ruler@Id}}% \expandafter\edef\csname ALG@Ruler@AtLevel@\theALG@nested\endcsname{\ALG@Ruler}% \tikz[remember picture, overlay] \coordinate (\ALG@Ruler);% \toggletrue{ALG@Ruler@empty}% }{}{} \pretocmd{\ALG@endblock}{% \iftoggle{ALG@Ruler@empty}{}{% \def\ALG@Ruler{\csname ALG@Ruler@AtLevel@\theALG@nested\endcsname}% \unskip\tikz[remember picture, overlay] \draw[black!25] ([xshift=0.5em, yshift=-0.5ex]\ALG@Ruler) |- ([xshift=1em]\ALG@Ruler|-0,0);% }% \togglefalse{ALG@Ruler@empty}% }{}{} \makeatother ```
0
https://tex.stackexchange.com/users/229470
685558
318,036
https://tex.stackexchange.com/questions/685552
3
The effect I'd like to achieve is: ``` Header: Here's some more text that's just here to illustrate what I mean. It needs to be a bit longer to show it properly. That should do it. ``` My first thought was to do this with a minipage, but since the width of the page is variable I couldn't get very far. What I'm trying to construct is an environment of two parameters, where #1 is a sort of header that sits off to the left, and a main body of text, #2, next to it, that fills the rest of the width, but then after the line-break "stays in its lane", i.e. is left aligned with the start of #2. I'm almost certain something like this must exist, but I've searched around for some time and I can't find anything.
https://tex.stackexchange.com/users/245533
How do I align this header and body properly?
true
You can use hanging indentation. If you need “go to a new line” inside `headedpar`, use `\\`. ``` \documentclass{article} \usepackage{lipsum} % for mock text \newenvironment{headedpar}[1]{% \par \settowidth{\dimen0}{#1: } \hangindent=\dimen0 \hangafter=1 \noindent #1: \ignorespaces }{\par} \begin{document} \lipsum[1][1-4] \begin{headedpar}{Header} \lipsum[2][1-5] \end{headedpar} \begin{headedpar}{Longer header} \lipsum[3][1-5] \end{headedpar} \lipsum[4][1-4] \end{document} ``` Maybe you want to add vertical space around such paragraphs. Changing the definition into ``` \newenvironment{headedpar}[1]{% \par\addvspace{\topsep} \settowidth{\dimen0}{#1: } \hangindent=\dimen0 \hangafter=1 \noindent #1: \ignorespaces }{\par\addvspace{\topsep}} ``` will produce the following.
4
https://tex.stackexchange.com/users/4427
685565
318,040
https://tex.stackexchange.com/questions/685562
1
I am using the template of the Proceedings of the Royal Society A. In this template, I cannot produce upright Greek lowercase letters. For example, I use the command "\deltaup" to produce an upright delta, but the result is still the italic delta rather than the upright one. For the uppercase Greek characters, I used the command "\let\Deltaup\Delta" before \begin{document}, and it worked, however, it did not work for the lowercase delta. Could you please let me know how I can resolve this problem? (I copied the packages used in my document down below). Thank you! ``` \documentclass[openacc]{rsproca_new} \usepackage{upgreek} \newcommand{\upDeltaup}{\upDelta} \newcommand{\updeltaup}{\updelta} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{dblfloatfix} \usepackage{fixltx2e} \usepackage{float} \usepackage{wrapfig} \usepackage{rotating} \usepackage{graphicx} \usepackage{subcaption} \usepackage[normalem]{ulem} \usepackage[font=small,labelfont=bf,labelsep=endash,margin=20pt]{caption} \usepackage[title,header]{appendix} \usepackage{relsize} \usepackage{amsmath} \usepackage{marvosym} \usepackage{wasysym} \usepackage{amssymb} \usepackage{latexsym} \usepackage{physics} \newcommand\bmmax{0} \usepackage{bm} \usepackage{mathtools} %%%%%%%%%%% Defining Enunciations %%%%%%%%%%% \newtheorem{theorem}{\bf Theorem}[section] \newtheorem{condition}{\bf Condition}[section] \newtheorem{corollary}{\bf Corollary}[section] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \titlehead{Research} \let\Deltaup\Delta \let\deltaup\delta \begin{document} ```
https://tex.stackexchange.com/users/295889
Fonts & Character Sets ⇒ How to create upright Greek lowercase letters
true
> > In this template, I cannot produce upright Greek lowercase letters. > > > That's not right. As @user202729 has already pointed out in a comment, you should just use `\upalpha`, `\upbeta`, ... , `\upomega`. FWIW, with a definition such as `\let\deltaup\delta`, `\deltaup` is *guaranteed* to produce the same, viz. slanted, output as `\delta`. You should also think about removing quite a bit of cruft and code debris from your preamble. By doing so, it'll become much easier to spot inconsistencies and misunderstandings. ``` \documentclass[openacc,a4paper]{rsproca_new} % see https://royalsocietypublishing.org/rspa/for-authors \jname{rspa} % or whatever is appropriate %\usepackage[utf8]{inputenc} % that's the default nowadays \usepackage[T1]{fontenc} % \usepackage{dblfloatfix} % why? %%\usepackage{fixltx2e} % not needed \usepackage{float} % you sure? \usepackage{wrapfig} % ditto \usepackage{rotating} % \usepackage{graphicx} % loaded automatically by 'rotating' \usepackage{subcaption} \usepackage[normalem]{ulem} \usepackage[font=small,labelfont=bf,labelsep=endash, margin=20pt]{caption} \usepackage[title,header]{appendix} %\usepackage{amsmath} % loaded automatically by 'mathtools' \usepackage{amssymb} \usepackage{bm} \usepackage{mathtools} \usepackage{upgreek} % for '\upalpha', '\upbeta', etc \usepackage{relsize} \usepackage{marvosym} \usepackage{wasysym} %%%%%\usepackage{latexsym} % why?? \usepackage{physics} %\newcommand\bmmax{0} \newtheorem{theorem}{\bf Theorem}[section] \newtheorem{condition}{\bf Condition}[section] \newtheorem{corollary}{\bf Corollary}[section] \titlehead{Research} %%\let\Deltaup\Delta % <-- huh? %%\let\deltaup\delta % <-- huh? \begin{document} $\alpha\beta\gamma \chi\psi\omega$ $\upalpha\upbeta\upgamma \upchi\uppsi\upomega$ \end{document} ```
1
https://tex.stackexchange.com/users/5001
685572
318,043
https://tex.stackexchange.com/questions/685554
2
I want to add the document part details to the table of contents and make them shadowed while navigating frames. ``` \documentclass{beamer} \newcommand{\mypart}{ \begin{frame}[noframenumbering, plain] \partpage \end{frame} } \newcommand{\mymaintoc}{ \begin{frame}[noframenumbering, plain] \frametitle{Outline} \tableofcontents \end{frame} } \newcommand{\mytoc}{ \begin{frame}[noframenumbering, plain] \frametitle{Outline} \tableofcontents[ sectionstyle=show/shaded, subsectionstyle=show/shaded, subsubsectionstyle=show/shaded ] \end{frame} } \begin{document} \mymaintoc \section{Introduction} \begin{frame}{Intro} \end{frame} \part{Harry Potter and the Sorcerer's Stone} \mypart \section{Section 1} \mytoc \frame{} \part{Harry Potter and the Chamber of Secrets} \mypart \section{Section 2} \mytoc \frame{} \section{Section 3} \mytoc \frame{} \end{document} ``` I am trying to trying to obtain the following: * Introduction * Part I: Harry Potter and the Sorcerer's Stone + Section 1 * Part II: Harry Potter and the Chamber of Secrets + Section 2 + Section 3 Moreover, I would like to shade the parts and sections in `\mytoc`.
https://tex.stackexchange.com/users/277830
How to add part to table of contents in beamer?
false
``` \documentclass{beamer} \AtBeginPart{ \begin{frame}[noframenumbering, plain] \partpage \end{frame} } \usepackage{pgffor} \usepackage{totcount} \regtotcounter{part} \newcommand{\mymaintoc}{ \begin{frame}[noframenumbering, plain] \frametitle{Outline} \tableofcontents \addtobeamertemplate{section in toc}{\hspace{0.5cm}}{} \foreach\x in {1,...,\totvalue{part}}{% \vfill \vskip-0.4cm Part \x: \nameref{part:\x} \vfill \tableofcontents[part=\x]% }% \end{frame} } \newcommand{\mytoc}{ \begin{frame}[noframenumbering, plain] \frametitle{Outline} \tableofcontents[ sectionstyle=show/shaded, subsectionstyle=show/shaded, subsubsectionstyle=show/shaded ] \end{frame} } \begin{document} \mymaintoc \section{Introduction} \begin{frame}{Intro} \end{frame} \part{Foo} \makeatletter \expandafter\NR@gettitle\expandafter{\beamer@partname} \makeatother \label{part:1} \section{Section 1} \mytoc \frame{} \part{Bar} \makeatletter \expandafter\NR@gettitle\expandafter{\beamer@partname} \makeatother \label{part:2} \section{Section 2} \mytoc \frame{} \section{Section 3} \mytoc \frame{} \end{document} ``` With beamer v3.70 or newer, the above code can be simplified to ``` \documentclass{beamer} \AtBeginPart{ \begin{frame}[noframenumbering, plain] \partpage \end{frame} \label{part:\thepart} } \usepackage{pgffor} \usepackage{totcount} \regtotcounter{part} \newcommand{\mymaintoc}{ \begin{frame}[noframenumbering, plain] \frametitle{Outline} \tableofcontents \addtobeamertemplate{section in toc}{\hspace{0.5cm}}{} \foreach\x in {1,...,\totvalue{part}}{% \vfill \vskip-0.4cm Part \x: \nameref{part:\x} \vfill \tableofcontents[part=\x]% }% \end{frame} } \newcommand{\mytoc}{ \begin{frame}[noframenumbering, plain] \frametitle{Outline} \tableofcontents[ sectionstyle=show/shaded, subsectionstyle=show/shaded, subsubsectionstyle=show/shaded ] \end{frame} } \begin{document} \mymaintoc \section{Introduction} \begin{frame}{Intro} \end{frame} \part{Foo} \section{Section 1} \mytoc \frame{} \part{Bar} \section{Section 2} \mytoc \frame{} \section{Section 3} \mytoc \frame{} \end{document} ```
2
https://tex.stackexchange.com/users/36296
685580
318,048
https://tex.stackexchange.com/questions/685583
0
I generated the following tikzcd diagram: ``` \documentclass[a4paper,12pt, twoside]{report} \usepackage{tikz-cd} \usepackage{tipa} \begin{document} \begin{tikzcd} & & & {} \arrow[d] \arrow[llld] \arrow[rrrd] & & & & & \\ \text{A} \arrow[d] \arrow[rd] & & & \text{E} \arrow[d] \arrow[rd] & & & \text{I} \arrow[d] \arrow[rd] & & \\ \text{a} \arrow[d] & \emptyset \arrow[d] & & \textlengthmark \arrow[d] & \emptyset \arrow[d] \arrow[d] \arrow[d] \arrow[d] \arrow[rd] & & \text{i\textesh} \arrow[d] & \emptyset \arrow[d] \arrow[rd] & \\ a-\text{verbs} & \text{suppletion} \arrow[d] & & \text{long}~e\text{-verbs} & e\text{-verbs} & \text{suppletion} \arrow[ld] \arrow[d] & i{\textesh}\text{-verbs} & i\text{-verbs} & \text{suppletion} \arrow[d] \\ & \text{missing~ suffixes} \arrow[d] & & & L-pattern & \text{missing ~suffixes} \arrow[d] & & & L-pattern \\ & l\hat{a}\text{-like verbs} & & & & sav\hat{e}\text{-like~verbs} & & & \end{tikzcd} \end{document} ``` I want to add two words - T-pattern and muri- below the L-pattern (the one in the leftmost part of the diagram). However I do not manage to split the cell into three by simply using \. I want to do the same below save-like verbs. There I want to add the words "vole" and "essi" How could I do that?
https://tex.stackexchange.com/users/266867
How to customize a tikzcd figure
true
I think `forest` may be a better tool here than `tikz-cd`. Here is a start. You can make many many adjustments using tools from the `forest` package. ``` \documentclass{article} \usepackage{forest, tipa} \begin{document} \begin{forest} for tree={edge={->}, parent anchor=children, align=center} [ [A [a[a-verbs]] [$\emptyset$[suppletion[missing suffixes[l\^{a}-like verbs]]]] ] [E [:[long e-verbs]] [$\emptyset$ [e-verbs] [suppletion[L-pattern\\T-pattern\\muri][missing suffixes[sav\^{e}-like verbs\\vole\\essi]]] ] ] [I [i\textesh[iS-verbs]] [$\emptyset$[i-verbs][suppletion[L-pattern]]] ] ] \end{forest} \end{document} ```
2
https://tex.stackexchange.com/users/125871
685585
318,049
https://tex.stackexchange.com/questions/637220
0
I'm wondering if I can buy MathTimePro 2 from the PCTeX store as for 2022. If I purchase the license will it arrive to me? Even Chrome says that the store is not secure. If it is not working, where can I buy a spare copy? Thanks in advance.
https://tex.stackexchange.com/users/265451
Is PCTeX store still working?
false
I placed on order on May 13th 2023 and received a download link via email.
2
https://tex.stackexchange.com/users/296937
685590
318,052
https://tex.stackexchange.com/questions/685599
3
Why is this code not working and how can I get it to work? I would like to multiply one row vector with a column vector. Here is what I've tried: ``` \begin{equation} {\begin{bmatrix} 1 & x & y \end{bmatrix}} {\begin{bmatrix} \alpha_1 \\ \alpha_2 \\ \alpha_3 \end{bmatrix}} \end{equation} ``` Appreciate the help!
https://tex.stackexchange.com/users/296940
How to get two matrices/vectors in the same equation?
false
No blank lines are allowed inside the code for a math display. The outer braces are redundant. ``` \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{bmatrix} 1 & x & y \end{bmatrix} \begin{bmatrix} \alpha_{1} \\ \alpha_{2} \\ \alpha_{3} \end{bmatrix} \end{equation} \end{document} ```
8
https://tex.stackexchange.com/users/4427
685600
318,056
https://tex.stackexchange.com/questions/685586
2
What are the ways to center headers only without using the titlesec and sectsty packages? If we take the titlesec package, then the question is how to prevent this package from automatically changing header styles?
https://tex.stackexchange.com/users/260692
Centering headers
true
The `ncc` class has its own method. ``` \documentclass[11pt]{ncc} \usepackage{lipsum} % for mock text \TitleBeforeAuthor \sectionstyle{center} \indentaftersection \begin{document} \title{Test} \author{Pavel} \maketitle \section{Centered title} \lipsum[1][1-3] \subsection{Centered title} \lipsum[2][1-3] \end{document} ``` Remove `\indentaftersection` if you don't want the first paragraph after a title to be indented.
4
https://tex.stackexchange.com/users/4427
685601
318,057
https://tex.stackexchange.com/questions/685598
1
I am trying to color the caption label and their numbering (e.g., Figure 2 and Table 1, etc.). As a side note, I also use other names for such labels (Gambar 2 instead of Figure 2, for example). I tried using the defined color `\definecolor[notsoblue][c=0.756, m=0.378, y=0, k=0.388]` directly at `\setuplabeltext` such as `\setuplabeltext[en][figure=\notsoblue{Gambar~}]`, which quite works but makes the entry on the List of Figures blue as well. I need to change the color of labels under the figures only and keep their color on LoF black. Where should I fiddle with the color setting to color my caption labels? Thanks.
https://tex.stackexchange.com/users/283822
Coloring caption label in ConTeXt
true
OK, now I am just guessing, since you do not provide an example. You might look for `\setupcaption`. Below is a complete example: ``` \definecolor [notsoblue] [c=0.756, m=0.378, y=0, k=0.388] \setuplabeltext [en] [figure=Gambar~] \setupcaption [figure] [headcolor=notsoblue] \setupinteraction [state=start, style=, color=, contrastcolor=] \starttext \completelist [figure] \section[title=A section] \samplefile{ward} \startplacefloat [figure] [title={Bla bla bla}, reference=fig:foo] \blackrule[width=\textwidth,height=3cm] \stopplacefloat \samplefile{ward} See \in{Gambar}[fig:foo]. \stoptext ```
1
https://tex.stackexchange.com/users/52406
685605
318,059
https://tex.stackexchange.com/questions/685611
0
I'm looking for a way to define a couple of well-known word pairs that should never be split between pages, even if that means leaving a slightly awkward blank space at the end of the paragraph. I know I can manually hunt those instances and add `Hello\nopagebreak World`, however, I'd like to define those instances once and not worry about it. In similar fashion hyphenation does with `\hyphenation{iOS macOS SwiftUI UIKit}` in the preamble.
https://tex.stackexchange.com/users/296951
Is there a way to use \nopagebreak globally, between two or more known words?
false
You could create a new command: ``` \newcommand{\helloworld}{Hello\nopagebreak\ World} ```
0
https://tex.stackexchange.com/users/281557
685614
318,063
https://tex.stackexchange.com/questions/685599
3
Why is this code not working and how can I get it to work? I would like to multiply one row vector with a column vector. Here is what I've tried: ``` \begin{equation} {\begin{bmatrix} 1 & x & y \end{bmatrix}} {\begin{bmatrix} \alpha_1 \\ \alpha_2 \\ \alpha_3 \end{bmatrix}} \end{equation} ``` Appreciate the help!
https://tex.stackexchange.com/users/296940
How to get two matrices/vectors in the same equation?
false
This MWE to have the same thickness between the two matrices using the package `mtpro2` version `lite`. ``` \documentclass{article} \usepackage{amsmath} \usepackage[lite]{mtpro2} \begin{document} \[ \begin{bmatrix} 1 & x & y \end{bmatrix} \begin{bmatrix} \alpha_{1} \\ \alpha_{2} \\ \alpha_{3} \end{bmatrix} = 0. \] \end{document} ```
3
https://tex.stackexchange.com/users/117876
685619
318,065
https://tex.stackexchange.com/questions/685615
2
I am trying use kerkis font in latex using `\usepackage{kmath,kerkis}`. The following is my preamble: ``` \documentclass[12pt]{article} \usepackage{kmath,kerkis} \usepackage[T1]{fontenc} \usepackage[margin=1in]{geometry} \usepackage{multicol} \usepackage{mathrsfs} \usepackage{scrextend} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage[export]{adjustbox} \usepackage{caption} \usepackage{float} \usepackage{subcaption} \captionsetup[figure]{font=small} \usepackage{setspace} \graphicspath{{img/Ch1/}} \DeclareCaptionLabelFormat{nocaption}{} \usepackage{hyperref} \hypersetup{ colorlinks, citecolor=blue, linkcolor=blue, urlcolor=blue} \usepackage{cite} \usepackage{filecontents} \begin{document} Some texts here. A math equation example \begin{align} \Omega &= [\nabla \times {\cal A}]_z \nonumber\\ &= \frac{\partial {\cal A}_y}{\partial k_x} - \frac{\partial {\cal A}_x}{\partial k_y} \end{align} \end{document} ``` However I am getting an error: "Command \iint already defined. ...d{\iint}{\DOTSI\protect\MultiIntegral{2}}" Can anyone suggest me what went wrong in the preamble?
https://tex.stackexchange.com/users/231308
Kerkis font activation error in latex
true
I have restricted your MWE and it works. ``` \documentclass[12pt]{article} \usepackage[margin=1in]{geometry} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{kmath,kerkis} \usepackage{mathrsfs} \usepackage{scrextend} \usepackage{graphicx} \begin{document} Some texts here. A math equation example \begin{align} \Omega &= [\nabla \times {\cal A}]_z \nonumber\\ &= \frac{\partial {\cal A}_y}{\partial k_x} - \frac{\partial {\cal A}_x}{\partial k_y} \end{align} \end{document} ```
3
https://tex.stackexchange.com/users/117876
685620
318,066
https://tex.stackexchange.com/questions/685592
1
I'm a student writing my master thesis and would like to be able to plot eye diagrams in LaTeX using pgfplots. I have a csv file that contains the data on the eye diagram in a "time, voltage" format. The main problem is that I can't figure out how to shift the starting time value of the used data fragment to zero for plotting. If that problem would be solved, I could plot the diagram with a simple for loop. The code I use now, is shown here: ``` \usepackage{pgfplots} % <-- in preamble \pgfplotsset{compat=newest} % <-- in preamble \newenvironment{ploteye}[2]{ \begin{tikzpicture} \begin{axis}[ xlabel=Time (s), % \hertz requires SIunits ylabel= Voltage (V), grid=both, minor grid style={gray!25}, major grid style={gray!25}, width=1\linewidth, height=0.5\linewidth, xmin = 0.00000001, xmax = 0.0000000108, ymin = #1, ymax = #2, no marks] } { \end{axis} \end{tikzpicture} } \begin{ploteye}{0.6}{0.75} \addplot[red, thick, restrict x to domain=0.00000001:0.0000000108] table [x=t, y=V, col sep=comma] {TESTEYE.csv}; \addplot[red, thick, restrict x to domain=0.0000000108:0.0000000116] table [x=t, y=V, col sep=comma] {TESTEYE.csv}; \end{ploteye} ``` I can't include the csv file but here is a usable piece: ``` t, V 1e-08,0.6500000722331679 1.002452634375094e-08,0.6499999958233296 1.00625e-08,0.6499999912358824 1.00626953125e-08,0.6500047575887287 1.006282814489668e-08,0.6500121844537493 1.006309380969004e-08,0.6500528875863556 1.006347930480852e-08,0.6502085112216316 1.006374086198343e-08,0.6503937297065666 1.006400241915833e-08,0.6506520760620437 1.006426397633324e-08,0.650985362121427 1.006452553350815e-08,0.6513891057552539 1.006478709068305e-08,0.6518531194287154 1.006502327096671e-08,0.6523119086676303 1.00653802589026e-08,0.6530406605701877 1.0065625e-08,0.6535437338061559 1.006583223139339e-08,0.6539574304240079 1.006603946278677e-08,0.6543623402774402 1.006645392557355e-08,0.6551366428577461 1.006728285114709e-08,0.6565466793843177 1.006857854800003e-08,0.6584237160945655 1.00700921003431e-08,0.6601917985954187 1.007185056385094e-08,0.6617866035734329 1.007388259042024e-08,0.6631586857342271 1.007649946114467e-08,0.6643930539114974 1.007979785681905e-08,0.6653785017324654 1.008344419030418e-08,0.6660028627801139 1.00877010448323e-08,0.6663818165353163 1.00921775348153e-08,0.6665644005687609 1.009773915101379e-08,0.6666529727244381 1.010529485169153e-08,0.6666839421121482 1.011434048924543e-08,0.6666824774542839 1.012606215812048e-08,0.6666736150815411 1.014266598163788e-08,0.6666675399539991 1.016508299081894e-08,0.6666660117876735 1.01875e-08,0.6666663188578821 1.018762960034949e-08,0.6666691439955266 1.018772848761153e-08,0.6666744562869468 1.018792626213563e-08,0.6667060611055985 1.018832181118382e-08,0.6669220744589041 1.018850987993465e-08,0.6671131012270634 1.018868733901928e-08,0.6673566296244772 1.018890431161891e-08,0.6677469542394384 1.018912128421854e-08,0.6682423049028735 1.018933825681816e-08,0.6688403487542123 1.018955522941779e-08,0.6695332418029275 1.018977220201742e-08,0.6703079796832427 1.018998917461705e-08,0.6711470219670443 1.019019975966486e-08,0.6720029839433203 1.019041237983243e-08,0.6728862700488316 1.0190625e-08,0.6737648215647379 1.01907441215075e-08,0.6742466918937616 1.019085470206585e-08,0.6746888283475538 1.019107586318256e-08,0.6755521127859687 1.019151818541598e-08,0.6771934682983884 1.019240282988281e-08,0.6801606268846836 1.019349442070751e-08,0.6833071415502705 1.019469021054045e-08,0.686193453294221 1.019609240345154e-08,0.6889591693907363 1.019768548313013e-08,0.691447259043128 1.019965344884793e-08,0.693779675305413 1.020212104388831e-08,0.6958569143339742 1.020486677829983e-08,0.6973912663730806 1.020792500627005e-08,0.6984641826003524 1.021127941251529e-08,0.699159211943794 1.021507519119812e-08,0.6995911695793631 1.021974073477045e-08,0.6998504964047059 1.022536618356916e-08,0.6999751860414681 1.023202674490596e-08,0.7000161376049646 1.024008467135149e-08,0.7000185185477866 1.025053351379031e-08,0.700009581607285 1.026590420999543e-08,0.7000018603333817 1.028732314802325e-08,0.6999993286721216 1.029991157401163e-08,0.6999995606840415 1.03125e-08,0.699999843855673 1.031258640023299e-08,0.6999985840432952 1.031267280046598e-08,0.6999948067772965 1.031284560093196e-08,0.699967979647703 1.031319120186392e-08,0.6997653593973039 1.031338588735062e-08,0.699537006295142 1.031358057283733e-08,0.6992048114238394 1.031377525832403e-08,0.6987549325223097 1.031396994381074e-08,0.6981797676604087 1.031416462929744e-08,0.6974775645551261 1.031435931478415e-08,0.6966522436084132 1.031455400027085e-08,0.6957131522844335 1.031474868575756e-08,0.6946746621797698 1.031494337124426e-08,0.6935555918150093 1.031510946231107e-08,0.6925530911337157 1.031538178972333e-08,0.6908646518784144 1.0315625e-08,0.689359651329586 1.031569450754104e-08,0.6889345678208892 1.031579874681361e-08,0.6883035351115261 1.031600722535875e-08,0.6870703486156625 1.031642418244903e-08,0.6847194595437999 1.031725809662959e-08,0.680445934330324 1.0318240016407e-08,0.6760701503664516 1.031929932447337e-08,0.6720427032518517 1.032050190829878e-08,0.6682098565658324 1.032186646373158e-08,0.6646501734416389 1.032341944722803e-08,0.6614241630533985 1.032533809923788e-08,0.6583791137459585 1.032759040993972e-08,0.6557945210482424 1.033006177148313e-08,0.6538414219645429 1.033279558306741e-08,0.6524169630240926 1.033585615283528e-08,0.6514192942990241 1.033927756277114e-08,0.650764921777618 1.034308922764164e-08,0.6503687479401004 1.034774516333845e-08,0.6501338855132307 1.035298145228184e-08,0.6500276120591205 1.03595464114872e-08,0.6499879621101737 1.036793023630332e-08,0.64998360258687 1.037828089710437e-08,0.6499910548672885 1.039236515282815e-08,0.6499978208308729 1.04160496985847e-08,0.6500006712244841 1.044900501855603e-08,0.6500004985588889 1.047450250927802e-08,0.6500001208839777 1.05e-08,0.6499999986349044 1.05001953125e-08,0.6500047647675191 1.050032848405193e-08,0.6500122218661574 1.05005948271558e-08,0.6500531516775719 1.050097781947048e-08,0.6502076048967206 1.050124240599491e-08,0.650395011923099 1.050150699251933e-08,0.6506572804433117 1.050177157904376e-08,0.6509961645670926 1.050203616556819e-08,0.6514068707812164 1.050230075209262e-08,0.6518786646967054 1.050253401449755e-08,0.6523333543399065 1.050282950724877e-08,0.6529377570096392 1.0503125e-08,0.6535452409301372 1.05032970361486e-08,0.6538904861850742 1.05034528791152e-08,0.6541981300973537 1.050376456504841e-08,0.6547930313037411 1.050438793691484e-08,0.6559014077113055 1.050563468064769e-08,0.6578267887679247 1.050708395971423e-08,0.6596483928768593 1.050872073790417e-08,0.661268280715016 1.051063575438415e-08,0.6627061863992952 1.051298045768238e-08,0.6639714432244002 1.051609236236426e-08,0.6650763479330226 1.051969231002052e-08,0.6658303755508674 1.05235558292636e-08,0.6662664362589795 1.052806901662538e-08,0.6665147684748246 1.05331043295004e-08,0.6666296154294742 1.053962271011861e-08,0.6666766833846982 1.054866358082256e-08,0.6666845831173326 1.055558179041128e-08,0.6666778974994755 1.05625e-08,0.6666718870463273 1.05626953125e-08,0.6666764977508406 1.05628312575734e-08,0.6666840991603932 1.056310314772021e-08,0.6667267078049727 1.05634664918278e-08,0.6668718982214739 1.056375662434502e-08,0.6670779617286883 1.056404675686223e-08,0.6673743231888313 1.056433688937945e-08,0.6677619701538786 1.056462702189667e-08,0.6682328773452464 1.056491715441389e-08,0.6687708363819429 1.056520728693111e-08,0.6693529078543766 1.0565625e-08,0.6702055963278597 1.056574759813018e-08,0.6704536221741172 1.05659277018632e-08,0.6708116364834549 1.056628790932925e-08,0.671499770726108 1.056700832426134e-08,0.6727676410365271 1.056824326407751e-08,0.6746422350808972 1.056971819713764e-08,0.6764621557889731 1.057143499611756e-08,0.678117633124954 1.057345228798868e-08,0.679573431367468 1.057598953094026e-08,0.6808612548140437 1.05792296159186e-08,0.6819147311140299 1.058290293862199e-08,0.6826039560597068 1.058712327602963e-08,0.6830166317230287 1.059168649373846e-08,0.6832217988099598 1.059737497437887e-08,0.6833204651816197 1.060483674663828e-08,0.6833527780561742 1.061428727061526e-08,0.6833508078629338 1.0625e-08,0.6833412898216118 1.06251953125e-08,0.6833362869006027 1.062532990908652e-08,0.683328540676466 1.062559910225955e-08,0.683286336132834 1.062597182057554e-08,0.6831362174842661 1.062624936113818e-08,0.6829390467388454 1.062652690170081e-08,0.682659383711656 1.062680444226345e-08,0.6822957960108467 1.062708198282609e-08,0.6818545738616184 1.062735952338873e-08,0.6813490276416533 1.062763706395137e-08,0.6807983596551578 1.062788103197569e-08,0.6802947953978417 1.0628125e-08,0.6797916304700777 1.062833288143597e-08,0.679376612977692 1.062854076287194e-08,0.6789704373723936 1.062895652574389e-08,0.6781938218326756 1.062978805148777e-08,0.6767799781700553 1.063103727081605e-08,0.6749656196049811 1.063260332035242e-08,0.6731308736797589 1.063445734730555e-08,0.6714617561673183 1.063661617735587e-08,0.670038490423766 1.063937025245974e-08,0.6687960103973148 1.064271788698746e-08,0.6678568496940168 1.064652171597871e-08,0.6672563341498713 1.065092376812138e-08,0.6669059878349359 1.065580206385434e-08,0.6667369291967196 1.066181236081566e-08,0.6666642928486523 1.066979686850314e-08,0.666645856677911 1.067968470247435e-08,0.6666521950808599 1.06875e-08,0.6666596796898628 1.06876953125e-08,0.6666646537529667 1.068783082051742e-08,0.6666724640267985 1.068810183655225e-08,0.6667152551198322 1.068846818281592e-08,0.6668624186623475 1.068875419878329e-08,0.6670658587733636 1.068904021475066e-08,0.6673569932591519 1.068932623071802e-08,0.6677369709832869 1.068961224668539e-08,0.6681983664677054 1.068989826265276e-08,0.6687259637236834 1.069018427862013e-08,0.6692980940809793 1.0690625e-08,0.6701969853011962 1.069074139182345e-08,0.6704328353215986 1.069092709622456e-08,0.6708024593934067 1.069129850502677e-08,0.6715119475508455 1.06920413226312e-08,0.6728158348609014 1.069329343093371e-08,0.6747058561361483 1.069477274736879e-08,0.6765176707250976 1.069649895972009e-08,0.6781680141777903 1.06985286657248e-08,0.6796177827554638 1.070109569316779e-08,0.6809034861596744 1.070434887613812e-08,0.6819433060350577 1.070803768831198e-08,0.6826216920570914 1.071227916251479e-08,0.6830266340974589 1.071686721442718e-08,0.6832268937088587 1.07226000338065e-08,0.6833225138856931 1.073013178049491e-08,0.6833530974884662 1.07395489317179e-08,0.6833504652157455 1.075e-08,0.6833411016052887 1.075012960034949e-08,0.683338128423328 1.075022914405005e-08,0.6833326452835751 1.075042823145119e-08,0.6833003442011277 1.075082640625346e-08,0.6830802899571783 1.075101218266377e-08,0.6828902261560615 1.07511923808801e-08,0.6826413459025704 1.075140380600204e-08,0.6822597821082438 1.075161523112398e-08,0.6817784720035991 1.075182665624593e-08,0.6811994420652846 1.075203808136787e-08,0.6805297338581593 1.075224950648981e-08,0.6797810833219812 1.075242590129433e-08,0.6791066919404748 1.07527080351756e-08,0.6779680881141738 1.07529165175878e-08,0.6771026976464846 1.0753125e-08,0.6762413441988926 1.075324646787511e-08,0.6757500446186286 1.075335645130421e-08,0.6753103452538942 1.075357641816242e-08,0.6744516834462682 1.075401635187883e-08,0.6728186571973284 1.075484797296098e-08,0.6700171702615975 1.075597502444522e-08,0.6667483954798307 1.07571937037999e-08,0.6638013049792476 1.075860038069942e-08,0.661027954568399 1.076019500782807e-08,0.6585402102447868 1.076207870914757e-08,0.6562988403195839 1.07645498604563e-08,0.6541954310839553 1.076729154798188e-08,0.652644697558202 1.077034260343415e-08,0.6515597256767732 1.077379350884895e-08,0.6508376276265244 1.077753110224607e-08,0.6504112462285748 1.078201743543089e-08,0.6501583821708679 1.078707669493375e-08,0.6500392270132055 1.079344940140827e-08,0.6499911771322432 1.080181965947184e-08,0.6499827708140274 1.081210625726193e-08,0.6499897621171157 1.082573845227939e-08,0.6499970919803482 1.084681100757508e-08,0.6500004486404752 1.088161830069315e-08,0.6500005897844574 1.090955915034658e-08,0.6500001547548466 1.09375e-08,0.6500000024816158 1.09376953125e-08,0.6500047684997255 1.093782839377782e-08,0.6500122174283894 1.093809455633347e-08,0.6500530866009594 1.093847821262779e-08,0.6502078494877607 1.093874199079926e-08,0.6503946713531064 1.093900576897074e-08,0.6506558901195213 1.093926954714222e-08,0.6509932759177451 1.093953332531369e-08,0.6514021197003449 1.093979710348517e-08,0.6518718350196123 1.094003112794669e-08,0.6523275925499579 1.094032806397335e-08,0.6529347343069372 1.0940625e-08,0.6535451181809818 1.094079621230367e-08,0.6538887566433019 1.094095226174711e-08,0.6541968484008386 1.094126436063399e-08,0.6547925831743083 1.094188855840774e-08,0.6559024056667586 1.094313695395525e-08,0.6578299480404948 1.094458601207854e-08,0.6596506785139362 1.09462219152785e-08,0.6612692733750274 1.094813734455808e-08,0.6627071758404512 1.095048264976068e-08,0.663972397779332 1.095359456571388e-08,0.6650769294622221 1.095719489140268e-08,0.6658307534696949 1.09610586862703e-08,0.666266653021531 1.096557225422777e-08,0.6665148777433615 1.097060840603676e-08,0.6666296688586008 1.097712817317254e-08,0.6666767010119783 1.098617108597916e-08,0.6666845811023666 1.099308554298958e-08,0.6666778946455202 1.1e-08,0.6666718864186062 1.10001953125e-08,0.6666669649578979 1.100033125963996e-08,0.6666591502857871 1.100060315391987e-08,0.6666161262641549 1.100096648391324e-08,0.6664704150686103 1.100125663597536e-08,0.666263936788092 1.100154678803749e-08,0.6659671659908516 1.100183694009961e-08,0.6655791151753262 1.100212709216174e-08,0.6651078117577978 1.100241724422386e-08,0.6645694682507132 1.100270739628599e-08,0.663987029478214 1.1003125e-08,0.6631341247707682 1.100324762928787e-08,0.6628859163555223 1.100342770695516e-08,0.6625277808764092 1.100378786228975e-08,0.6618394093850297 1.100450817295892e-08,0.6605710868847996 1.100591079558681e-08,0.6584654467722362 1.100740505842032e-08,0.656669404377718 1.100912306689754e-08,0.6550601554435121 1.101113226327731e-08,0.6536520920797309 1.101360757037356e-08,0.652427079963806 1.101686239463174e-08,0.6513902704089471 1.102056576580394e-08,0.650710686110178 1.102482499976313e-08,0.6503052558694551 1.102933512019529e-08,0.6501086290898725 1.103474685722709e-08,0.6500163608753999 1.104159823939344e-08,0.6499849093948941 1.105096610076029e-08,0.649984045966712 1.105673305038015e-08,0.6499902768614443 1.10625e-08,0.6499952327488842 1.106262960034949e-08,0.6499981460581552 1.106273014305716e-08,0.6500036738611608 1.106293122847251e-08,0.6500366204558741 1.10633333993032e-08,0.6502620874632548 1.106351576223386e-08,0.6504503640194009 1.106370014419008e-08,0.6507071895006649 1.106390347297514e-08,0.6510756757496964 1.10641068017602e-08,0.6515364542059982 1.106431013054526e-08,0.6520878886320285 1.106451345933032e-08,0.6527239904479648 1.106471678811537e-08,0.6534347033741265 1.106490320101892e-08,0.6541405815277573 1.10651570730095e-08,0.6551589844101776 1.106538794363333e-08,0.6561148117614799 1.1065625e-08,0.6570933450086224 1.106573194125442e-08,0.6575268372058518 1.106584660712812e-08,0.6579861892871161 1.106607593887552e-08,0.6588821434824937 1.106653460237031e-08,0.6605823572249395 1.106740036239055e-08,0.6634833005545375 1.106846496735485e-08,0.6665592495910055 1.106962054083482e-08,0.6693691727444536 1.107096818712967e-08,0.6720663366933139 1.10724864908265e-08,0.6744963339024166 1.107433448573729e-08,0.676773799421023 1.1076677904167e-08,0.6788645139779604 1.107938453177593e-08,0.6804932416057671 1.108228458041692e-08,0.6816065949758153 1.108543101797489e-08,0.6823422162649008 1.108892089567022e-08,0.6828110450611103 1.109333462758803e-08,0.6831189056270055 1.109840424244498e-08,0.6832732600853691 1.110501544416297e-08,0.6833409566064704 1.111274121947184e-08,0.6833530837372656 1.111887060973592e-08,0.6833469474368784 1.1125e-08,0.6833403794551861 1.112512960034949e-08,0.6833374206807057 1.112523001124561e-08,0.6833318699765289 1.112543083303787e-08,0.6832989527176433 1.112583247662237e-08,0.6830740970145913 1.112601528478583e-08,0.6828855408864138 1.11261991138008e-08,0.6826297272936939 1.11264034874082e-08,0.6822595100450943 1.11266078610156e-08,0.6817960561685276 1.1126812234623e-08,0.6812410486451531 1.11270166082304e-08,0.680600604371427 1.11272209818378e-08,0.6798849853537541 1.112740601968286e-08,0.6791834018425482 1.112766347160563e-08,0.6781497564976869 1.112789766049437e-08,0.6771799563435885 1.1128125e-08,0.6762414488185154 1.112823646968807e-08,0.6757898911043601 1.112834940608597e-08,0.6753377276272335 1.112857527888177e-08,0.6744554053722803 1.112902702447336e-08,0.6727797070939958 1.11298745018264e-08,0.6699327767482682 1.113099979128688e-08,0.6666820986054105 1.113222149248199e-08,0.6637398875836088 1.113363202200497e-08,0.6609719093168651 1.113523025029573e-08,0.6584916560702713 1.113712279295668e-08,0.6562536589564725 1.113959876280431e-08,0.6541615041127898 1.114234592824861e-08,0.6526204073468932 1.114540401132817e-08,0.6515430440204548 1.11488637630713e-08,0.6508268608984532 1.115260908791317e-08,0.650404942071976 1.115711334554403e-08,0.650154866550091 1.11621903214135e-08,0.6500376253828939 1.116858791273615e-08,0.6499907247775824 1.11770021250897e-08,0.6499828407945905 1.118225106254485e-08,0.6499883907907356 1.11875e-08,0.6499937023184228 1.118758640023299e-08,0.6499950485451901 1.118767280046598e-08,0.6499989114511414 1.118784560093196e-08,0.650025906659343 1.118819120186392e-08,0.6502288499824777 1.118838588712455e-08,0.6504573772094481 1.118858057238518e-08,0.6507897406838209 1.118877525764582e-08,0.651239782793628 1.118896994290645e-08,0.6518151056093701 1.118916462816708e-08,0.6525174615951834 1.118935931342772e-08,0.6533429305168401 1.118955399868835e-08,0.6542821651334451 1.118974868394898e-08,0.6553207940511782 1.118994336920962e-08,0.6564399990033373 1.11901094602931e-08,0.6574426126056556 1.119038178690364e-08,0.6591312260571652 1.1190625e-08,0.6606363978831021 1.119069450674324e-08,0.6610615192229916 1.119079874668978e-08,0.6616926193871223 1.119100722658284e-08,0.6629259375142647 1.119142418636898e-08,0.6652770767936574 1.119225810594125e-08,0.6695510542995188 1.119316273690086e-08,0.6736048276864686 1.119413635440741e-08,0.6773732921744675 1.119525065027107e-08,0.6810380845389763 1.11965028432888e-08,0.6844618031945215 1.119796266324331e-08,0.6876930107436581 1.119986993435433e-08,0.6909503511307945 1.120200392114278e-08,0.6936112473288805 1.120438171723281e-08,0.6956889574463484 1.120692494977578e-08,0.6971869874986816 1.12096743639185e-08,0.6982406836888738 1.121279794462483e-08,0.6989822762585958 1.121645624044381e-08,0.6994805253229127 1.122095105632557e-08,0.6997925127844254 1.122624487842047e-08,0.6999490043788879 1.123226014717076e-08,0.7000066462284827 1.123957682716557e-08,0.7000180766465828 1.124478841358278e-08,0.7000129701919456 1.125e-08,0.7000072897391321 1.125008640023299e-08,0.7000059302293291 1.125017280046598e-08,0.7000020541598359 1.125034560093196e-08,0.6999750331175915 1.125069120186392e-08,0.6997720401375905 1.12508858870898e-08,0.6995434861459884 1.125108057231568e-08,0.6992110967533575 1.125127525754156e-08,0.6987610295512655 1.125146994276744e-08,0.6981856824420449 1.125166462799332e-08,0.6974833029479459 1.12518593132192e-08,0.69665781125687 1.125205399844508e-08,0.6957185545954767 1.125224868367096e-08,0.6946799043049646 1.125244336889684e-08,0.6935606786377533 1.125260945998289e-08,0.6925580476538442 1.125288178647017e-08,0.6908694073675506 1.1253125e-08,0.6893642091789155 1.12531945066206e-08,0.6889390820144158 1.125329874667074e-08,0.6883079714612145 1.125350722677103e-08,0.6870746330751368 1.12539241869716e-08,0.6847234552950378 1.125475810737275e-08,0.6804494082418701 1.125574052551818e-08,0.676071057057046 1.125679938780547e-08,0.6720450283898716 1.125800173799867e-08,0.6682124681498454 1.125936627429392e-08,0.6646523295977297 1.126091932796485e-08,0.6614257181204273 1.126283823756918e-08,0.6583798947817193 1.126509049821363e-08,0.655795100985368 1.126756176157648e-08,0.6538418703235878 1.127029545477687e-08,0.6524172991817945 1.127335587692569e-08,0.651419535804001 1.127677717063527e-08,0.6507650752987417 1.128058866792687e-08,0.6503688406851192 1.128524432283751e-08,0.6501339355685191 1.129048012950597e-08,0.6500276371155812 1.129704423628946e-08,0.6499879712385864 1.130540810134901e-08,0.6499836168595345 1.131573042927827e-08,0.6499910511026044 1.132975877727265e-08,0.6499978082821678 1.135340060757631e-08,0.6500006702224278 1.1375e-08,0.6500004596427038 1.13751953125e-08,0.6500052120531754 1.137532867036541e-08,0.6500126766372959 1.137559538609622e-08,0.6500537135226178 1.137597701306407e-08,0.650207506297357 1.137624327254994e-08,0.6503961101188579 1.137650953203581e-08,0.6506605422470179 1.137677579152168e-08,0.6510025221498345 1.137704205100755e-08,0.6514170782341754 1.137730831049342e-08,0.6518931652750053 1.137754003342583e-08,0.6523456921599887 1.137783251671292e-08,0.6529443561363841 1.1378125e-08,0.6535457756859211 1.137829878035165e-08,0.6538944140213739 1.137845420156455e-08,0.6542011337655437 1.137876504399037e-08,0.6547943141512297 1.137938672884201e-08,0.6558997022262925 1.138063009854529e-08,0.657820606153019 1.138207917287402e-08,0.6596431941739008 1.138371543279125e-08,0.6612637955864548 1.138562975347431e-08,0.6627024148412042 1.138797291547197e-08,0.6639681383410297 1.139108390067378e-08,0.6650740806615156 1.139468267705016e-08,0.6658289396201506 1.139854504435969e-08,0.6662656002996975 1.140305680087456e-08,0.6665143460855389 1.140808937420975e-08,0.6666294168896905 1.141460328013701e-08,0.6666766232606638 1.14236374300047e-08,0.6666845939311657 1.143056871500235e-08,0.6666779098730194 1.14375e-08,0.666671890375569 1.143762960034949e-08,0.6666746043567713 1.143772976861125e-08,0.6666799458828317 1.143793010513478e-08,0.6667123176267833 1.143833077818183e-08,0.6669351121096196 1.143851441078572e-08,0.6671237757576491 1.143869722131964e-08,0.6673773338798343 1.143890353914369e-08,0.6677503427710687 1.143910985696773e-08,0.6682183720963555 1.143931617479178e-08,0.6687796486985292 1.143952249261583e-08,0.6694278105782262 1.143972881043988e-08,0.6701522039728861 1.143991135661152e-08,0.670845685896916 1.144017552425187e-08,0.6719074994411229 1.144041613420925e-08,0.6729038166172767 1.1440625e-08,0.6737658261935419 1.144074624655274e-08,0.6742561133206829 1.144085628400057e-08,0.6746959229346278 1.144107635889623e-08,0.675554787677471 1.144151650868755e-08,0.6771881582497936 1.144235546998082e-08,0.6800120289643155 1.144344911527077e-08,0.6831868050345623 1.144464068625933e-08,0.6860842175551429 1.14460349579391e-08,0.6888573147657691 1.144762086133054e-08,0.6913579301358019 1.144956875783063e-08,0.6936932877252173 1.145202658941736e-08,0.6957914480899031 1.14547621773723e-08,0.6973445119303185 1.145780728799443e-08,0.6984321605882099 1.146115021906227e-08,0.6991391038189569 1.146492300277968e-08,0.6995787075522566 1.146955808129468e-08,0.6998438980776468 1.147513528648551e-08,0.6999723024955284 1.148176296554065e-08,0.7000155271064722 1.148976578579353e-08,0.700018747868603 1.150010165643553e-08,0.7000099333675287 1.151526152375217e-08,0.700002050507781 1.153644305328899e-08,0.6999993535855592 1.156008747124551e-08,0.6999995086575537 1.159021283198702e-08,0.6999998957564819 1.1625e-08,0.7000000113500349 1.16251953125e-08,0.6999952449204899 1.162532820838454e-08,0.6999878123220376 1.162559400015363e-08,0.6999470666637146 1.162597902504456e-08,0.6997916631274896 1.162624114772136e-08,0.6996060367088593 1.162650327039816e-08,0.6993469603528829 1.162676539307496e-08,0.6990126325243623 1.162702751575176e-08,0.6986075924149262 1.162728963842857e-08,0.698142128087444 1.16275252611015e-08,0.6976841242350191 1.162788433266591e-08,0.6969509948375536 1.1628125e-08,0.6964562585300383 1.16283357040596e-08,0.6960358517409544 1.16285464081192e-08,0.6956245206333594 1.162896781623839e-08,0.6948385203336737 1.162981063247677e-08,0.6934093684400622 1.163122175234752e-08,0.6913898867336936 1.163281628834325e-08,0.6895771301285391 1.163476162316625e-08,0.6878935451986726 1.163705030708184e-08,0.6864672326187022 1.164005915080927e-08,0.6852194837707563 1.164348786174481e-08,0.684363392706363 1.164738597706356e-08,0.6838277818962948 1.165192194302527e-08,0.6835222750660163 1.16571640997443e-08,0.6833761176959143 1.166381588714934e-08,0.6833191218695726 1.167254967669728e-08,0.6833113025638593 1.168002483834864e-08,0.6833199471071154 1.16875e-08,0.6833274409932009 1.168762960034949e-08,0.6833247403518834 1.168772963367833e-08,0.6833194209907076 1.168792970033602e-08,0.683287168091962 1.16883298336514e-08,0.6830651657304758 1.16885139266624e-08,0.6828762886322007 1.168869617185014e-08,0.6826238301306511 1.168890358015116e-08,0.6822490908322418 1.168911098845218e-08,0.6817783285179958 1.16893183967532e-08,0.6812133683608407 1.168952580505422e-08,0.6805607130239452 1.168973321335523e-08,0.6798312407518817 1.168991439901252e-08,0.6791420556875988 1.169018236371745e-08,0.6780641305406221 1.16904267192257e-08,0.6770522642033355 1.1690625e-08,0.6762339659582564 1.169075267279486e-08,0.6757182078639762 1.169086132398458e-08,0.6752843632920954 1.169107862636402e-08,0.6744368296831099 1.16915132311229e-08,0.6728239493766238 1.169238244064065e-08,0.6699032018752757 1.169350730678923e-08,0.6666582015646849 1.169473031135395e-08,0.6637172329697577 1.169614127426242e-08,0.660952977050012 1.16977385276327e-08,0.6584783160343289 1.169963179015853e-08,0.6562430936256366 1.170210893416512e-08,0.6541536108092301 1.17048576273956e-08,0.6526146709877568 1.170791766245147e-08,0.6515390321355435 1.171137978242574e-08,0.6508242343857182 1.17151282779918e-08,0.650403285375609 1.171963333702979e-08,0.6501541047894083 1.172471396877178e-08,0.6500373009120822 1.173112040493207e-08,0.6499906249234646 1.173955070777793e-08,0.6499828508899534 1.174991682401338e-08,0.6499899745133035 1.176373531320798e-08,0.649997239925482 1.178531753455355e-08,0.6500004950757895 1.18125e-08,0.6500005245070695 1.18126953125e-08,0.6500052749868057 1.181282842006051e-08,0.6500127158368963 1.181309463518153e-08,0.65005358233049 1.181347809799854e-08,0.6502082270725826 1.181374211136523e-08,0.6503952008762526 1.181400612473193e-08,0.6506567073476135 1.181427013809862e-08,0.6509945119734134 1.181453415146532e-08,0.6514038812108892 1.181479816483201e-08,0.6518741856752901 1.181503196633603e-08,0.652329617404237 1.181532848316801e-08,0.6529359480172362 1.1815625e-08,0.6535454744556827 1.181579645075402e-08,0.6538895696133965 1.181595243994936e-08,0.6541975232567914 1.181626441834003e-08,0.654793000429965 1.181688837512138e-08,0.6559023742102782 1.181813628868408e-08,0.6578292395352277 1.181958565568593e-08,0.6596504583580906 1.182122315447177e-08,0.661270516480235 1.182313851527072e-08,0.6627080707157419 1.182548397700302e-08,0.6639730913529092 1.182859611413117e-08,0.665077413537848 1.183219657583595e-08,0.6658310410267415 1.183606046649673e-08,0.6662668067521659 1.18405741232187e-08,0.6665149456806914 1.184561058760293e-08,0.6666296960330262 1.185213100431545e-08,0.6666767071142707 1.186117518159536e-08,0.6666845781676564 1.187213280995063e-08,0.6666767456737888 1.188679735327449e-08,0.6666692076447838 1.19103081883828e-08,0.6666660380867765 1.19375e-08,0.6666661618577877 1.19376953125e-08,0.6666709429756528 1.193782841972769e-08,0.666678404370009 1.193809463418306e-08,0.6667193106362815 1.193847809944928e-08,0.6668740113606112 1.193874210983685e-08,0.667061018907716 1.193900612022441e-08,0.6673225559518835 1.193927013061198e-08,0.6676603881140506 1.193953414099954e-08,0.6680697821847255 1.193979815138711e-08,0.6685401094040652 1.194003195570891e-08,0.6689955709941754 1.194032847785445e-08,0.6696019431900232 1.1940625e-08,0.6702115103912292 1.194079644772726e-08,0.6705556161785777 1.194095243768486e-08,0.6708635862627834 1.194126441760007e-08,0.671459095131398 1.194188837743048e-08,0.6725685275467681 1.194304520638351e-08,0.6743662733772329 1.194451126077768e-08,0.6762320971606434 1.194619230104019e-08,0.6779103638093885 ``` In short my question is, how do I plot a piece of the csvfile with a shift on the value of the time? If there is a better way to plot them I would be interested to hear. Thanks a lot Siebe
https://tex.stackexchange.com/users/270591
Plotting eye diagram with pgfplots
true
So --- please notice my comment above, and next time try to reduce your problem to the minimum expression so that you help us to help you. What I have done in the following example is: 1. Create an 8-lines `csv` file for the sake of the example; 2. Add it to the example code using the `filecontent` environment to have a single compact code; it will create (and overwrite, be careful!) the file `TEST.csv` and use it; 3. Remove the definition of the new environment and the nesting given that it's not relevant to the question; 4. Now somebody who wants to add a thing or solve my problem can just copy, paste, and compile. If you had done the above, you would have had an answer *much* earlier... The solution is using the `x expr` option to the table parameters that let you apply mathematical operation to the table values. ``` \begin{filecontents}[overwrite]{TEST.csv} t, V 0, 1 1, 2 2, 3 3, 4 4, 3 5, 2 6, 1 \end{filecontents} \documentclass[border=10pt]{standalone} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{pgfplots}\pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture}[] \begin{axis}[ xlabel=Time (s), % \hertz requires SIunits ylabel= Voltage (V), grid=both, minor grid style={gray!25}, major grid style={gray!25}, width=1\linewidth, height=0.5\linewidth, no marks] \addplot[red, thick, ] table [x=t, y=V, col sep=comma] {TEST.csv}; \addplot[black, thick, ] table [x expr=\thisrow{t}+1, y=V, col sep=comma] {TEST.csv}; \end{axis} \end{tikzpicture} \end{document} ```
4
https://tex.stackexchange.com/users/38080
685623
318,067
https://tex.stackexchange.com/questions/685616
1
I found a macro, counting the number of occurrences of a substring, as [an answer to a different question](https://tex.stackexchange.com/a/336295/). This does exactly what I want, at least, when just printing its output to the document. I want to use the output, and pass it on to a different command -- specifically, to the `\bookmark[level=]` value. I cannot figure out how to get it to expand, or how to capture its output. I am sure this is very trivial, and maybe I am simply missing the vocabulary to search for this -- but I would appreciate any help. The code in question: ``` \ExplSyntaxOn % \CountSubStr{<substring>}{<string>} \NewDocumentCommand{\CountSubStr}{ m m }{ \seq_set_split:Nnn \l_tmpa_seq { #1 } { #2 } \int_eval:n {(\seq_count:N \l_tmpa_seq) - 1 } } \ExplSyntaxOff ```
https://tex.stackexchange.com/users/161480
Store evaluated output of expl3 macro
false
Not sure how you want `\bookmark` to work with `\CountSubStr` but this should work: ``` \documentclass{article} \usepackage{bookmark} \newcounter{substringcount} \ExplSyntaxOn % \CountSubStr{<substring>}{<string>} \NewDocumentCommand{\CountSubStr}{ m m } { \seq_set_split:Nnn \l_tmpa_seq { #1 } { #2 } \setcounter{substringcount}{ \int_eval:n {(\seq_count:N \l_tmpa_seq) - 1 } } } \ExplSyntaxOff \bookmark[level=\thesubstringcount]{Last page} \begin{document} Hello \CountSubStr{ab}{abcdeab} \end{document} ```
1
https://tex.stackexchange.com/users/281557
685624
318,068
https://tex.stackexchange.com/questions/685186
0
How could I add a folder to the search path of tikz? More precisely, I have a structure like this (see below for exact content): ``` mycachedfiles/a.tex myinput.tex tikzlibrarymy.test.code.tex ``` I’d like to compile it using: ``` cd mycachedfiles pdflatex a.tex ``` However, if `myinput.tex` contains `\usetikzlibrary{my.test}`, then I will get an error like: ``` ! Package tikz Error: I did not find the tikz library 'my.test'. I looked for f iles named tikzlibrarymy.test.code.tex and pgflibrarymy.test.code.tex, but neit her could be found in the current texmf trees.. ``` I tried to play with `\subimport`, `\input@path`… without success. Any idea? **MWE** ``` % a.tex: \documentclass[]{article} \makeatletter % Works for \input{} but not for \usetikzlibrary \def\input@path{{..}} \makeatother % Not working: % \input{../myinput.tex} % Not better: \usepackage{import}% \subimport{../}{myinput.tex}% \begin{document} \begin{tikzpicture} \node[my test style]{A}; \end{tikzpicture} \end{document} ``` ``` % myinput.tex \usepackage{tikz} \usetikzlibrary{my.test} ``` ``` % tikzlibrarymy.test.code.tex: \tikzset{ my test style/.style={ draw, circle, fill=red, } } ```
https://tex.stackexchange.com/users/116348
Add search path for \usetikzlibrary
true
One brute workaround: insert ``` \makeatletter \let\pgfutil@IfFileExists =\IfFileExists \let\pgfutil@InputIfFileExists=\InputIfFileExists \makeatother ``` just before ``` \usetikzlibrary{my.test} ``` in `myinput.tex`. Or if its OK to make `tikzlibrarymy.test.code.tex` seen by all your local LaTeX runs, you can create symlink(s) for path to `tikzlibrarymy.test.code.tex` (or the directory it lives in) in proper subdirectory of TDS tree `TEXMFHOME` or `TEXMFLOCAL`, for example ``` $(kpsewhich --var-value TEXMFHOME)/tex/generic/pgf/frontendlayer/tikz/libraries # or just $(kpsewhich --var-value TEXMFHOME)/tex/generic/pgf ```
2
https://tex.stackexchange.com/users/79060
685631
318,071
https://tex.stackexchange.com/questions/685634
2
I'm reworking some slides so that the text is \Huge. In reformatting the aligned equations, I only have space for 2 rows and I'd like a line or two or text underneath the aligns that explain what's the manipulation was. As of now, I have the equations moving down but I'd want a "scrolling" effect where the 2 rows stay in place. So far, I have this but it seems that the aligns always take up the same space, even though they're only shown on their particular slides. (Ideally, it would also be great if the old equation row was gray text, so the current slide's text is focused upon.) ``` \documentclass{beamer} \begin{document} \begin{frame} { \Huge \begin{align*} \only<1-2>{1} \\ \only<2-3>{2} \\ \only<3-4>{3} \\ \only<4-5>{4} \end{align*}} \only<1>{Text1} \only<2>{Text2} \only<3>{Text3} \only<4>{Text4} \only<5>{Text5} \end{frame} \end{document} ```
https://tex.stackexchange.com/users/261119
"Scrolling" aligned equations of two rows
true
If you use `\only<1-2>{1} \\` you will only remove the number from the slide, but it will still add a line to the `align` as the `\\` is still there: ``` \documentclass{beamer} \setbeamercovered{dynamic} \begin{document} \begin{frame} { \Huge \begin{align*} \only<1>{\invisible{0}\\} \only<1-2>{\uncover<1>{1}\\} \only<2-3>{\uncover<2>{2}\\} \only<3-4>{\uncover<3>{3}\\} \only<4-5>{4\\} \only<5>{\invisible{5}\\} \end{align*} } \only<1>{Text1} \only<2>{Text2} \only<3>{Text3} \only<4>{Text4} \only<5>{Text5} \end{frame} \end{document} ```
3
https://tex.stackexchange.com/users/36296
685635
318,072
https://tex.stackexchange.com/questions/685629
1
I want to use the `paracol` package to have two-column layouts. Everything works great with the exception of footnote hyperlinks. Those seem to be not working from inside paracol environments. See this minimal example: ``` \documentclass{article} \usepackage{paracol} \usepackage{hyperref} \footnotelayout{m} \begin{document} \begin{paracol}{2} This is a text with a footnote on the first page.\footnote{My first footnote.} \switchcolumn Another column without footnote. \end{paracol} \pagebreak \begin{paracol}{2} Next page with columns. \switchcolumn Just another column. \end{paracol} \pagebreak Now I have a text outside of paracol with a footnote.\footnote{Outside of paracol.} \begin{paracol}{2} Back in paracol another column. \switchcolumn This time the second column has the footnote.\footnote{Footnote in paracol.} \end{paracol} \end{document} ``` The hyperlink for the footnote outside of the paracol environment is working, but the others are not. In the log I get the messages: ``` pdfTeX warning (dest): name{Hfootnote.3} has been referenced but does not exi st, replaced by a fixed one pdfTeX warning (dest): name{Hfootnote.1} has been referenced but does not exist , replaced by a fixed one ``` Is this unsupported or am I missing something? Edit: the paracol version is 2018/12/31 v1.35.
https://tex.stackexchange.com/users/296957
Paracol package with footnotes and hyperref leads to invalid links
true
I suspect this combination has never been tested/debugged. It appears the anchors were never added to the footnotes. You can add them manually using the following. This would have generated a \*duplicate anchor" message if the anchors had existed previously. It might be possible to make a full fix, but it would require digging into the interstices of both paracol and hyperref. ``` \documentclass{article} \usepackage{hyperref} \usepackage{paracol} \footnotelayout{m} \newcommand{\PcolFoot}{\raisebox{\ht\strutbox}{\hypertarget{Hfootnote.\theHfootnote}{}}} \begin{document} \begin{paracol}{2} This is a text with a footnote on the first page.\footnote{\PcolFoot My first footnote.} \switchcolumn Another column without footnote. \end{paracol} \pagebreak \begin{paracol}{2} Next page with columns. \switchcolumn Just another column. \end{paracol} \pagebreak Now I have a text outside of paracol with a footnote.\footnote{Outside of paracol.} \begin{paracol}{2} Back in paracol another column. \switchcolumn This time the second column has the footnote.\footnote{\PcolFoot Footnote in paracol.} \end{paracol} \end{document} ```
2
https://tex.stackexchange.com/users/34505
685640
318,074
https://tex.stackexchange.com/questions/685632
0
My problem is almost the same as this one: [Normal footnote in epigraph command](https://tex.stackexchange.com/questions/154202/normal-footnote-in-epigraph-command) In my case, I don't want the basic display of citation. When I use `\footcitetext{REF}`, the REF being a reference in my bibliography, for the moment it shows `NAME_OF_THE_AUTHOR YEAR`. I'd like to have `NAME_OF_THE_AUTHOR, FIRST_NAME_OF_THE_AUTHOR: TITLE (YEAR)` Actually I'd like to use my `\citehyperref` command, defined like this and working when used outside of an epigraph: ``` \DeclareCiteCommand{\citehyperref} {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \bibhyperref{\usebibmacro{title}\printtext[parens]{\printfield{year}}}} {\multicitedelim} {\usebibmacro{postnote}} \DeclareFieldFormat[article,book,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{\printnames{author}\addcolon\space\textit{#1}\isdot} ``` Here is an example of my problem: <https://www.latex4technics.com/?note=3NJ4>
https://tex.stackexchange.com/users/181342
Footnote in epigraph with special format
true
To place the footnotes outside the epigraph environment, you can directly use the footnote mark and then raise the data as you see fit, this is one possible way ``` \epigraph{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut}{Author\footnotemark} ``` \footnotetext{\cite{author00:\_title}.}
3
https://tex.stackexchange.com/users/5477
685644
318,077
https://tex.stackexchange.com/questions/12663
17
I'm using the tabular features of siunitx (for what it is worth: v1.3 since I'm on TexLive 2009) to align numbers in tables, eg. ``` \begin{tabular}{ p{1.5cm} S S S } bla & 1.23 & 4.5 & 67.89 \tabularnewline \end{tabular} ``` and that works perfectly fine. Now I would like to have this table span a specific width, or rather to have several tables to have the same width. For this I would normally use tabularx ``` \begin{tabularx}{\textwidth}{ p{1.5cm} X X X } bla & 1.23 & 4.5 & 67.89 \tabularnewline \end{tabular} ``` Now, is there a way to combine the two? To have the number formatting and alignment features of siunitx inside an automatically resizing table?
https://tex.stackexchange.com/users/2304
How to use siunitx and tabularx together?
false
No more need to complex hacking, use `tabularray` package! With `tabularry` you can have columns that are at the same time `X` type (option `co=<n>`, `n` is the coefficient for the extendable column, usually 1, but you can use 2 to have a column with double width, etc.) and `S` type (option `si=<settings>`). You don't even have to worry about having non-numeric fields in the `S` columns, using option `guard` where needed. In the following example, I created a new column type `A` that is both `X` and `S` and has the `table-format` as a parameter. Still, you can also use a `Q` column directly, specifying all the parameters. ``` \documentclass[draft]{article} \usepackage{tabularray} \UseTblrLibrary{siunitx} \sisetup{group-digits=false} \NewColumnType{A}[1][2.2]{Q[si={table-format=#1},c,co=1]} \usepackage{caption} \begin{document} With \texttt{tabularry} you can have columns that are at the same time \texttt{X} type (option \texttt{co=<n>}, where \texttt{n} is the coefficient for the extendable column, usually 1, but you can use 2 to have a column with double width, etc.) and \texttt{S} type (option \texttt{si=<settings>}). You don't even have to worry about having non-numeric fields in the \texttt{S} columns, using option \texttt{guard} where needed. \begin{table}[h] \caption{A table with columns that are X and \texttt {siunitx} at the same time} \begin{tblr}{ colspec={Q[1.5cm]Q[si={table-format=1.2},c,co=1]A[1.1]A}, row{1}={guard} } Head 1 & Head 2 & Head 3 & Head 4\\ bla & 1.23 & 4.5 & 67.89\\ bla & 1.23 & 4.5 & 67.89\\ bla & 1.23 & 4.5 & 67.89\\ \end{tblr} \end{table} \begin{table}[h] \caption{A table with vertical lines to show the dimension of the columns} \begin{tblr}{ colspec={Q[1.5cm]*2{A[1.2]}A}, row{1}={guard}, vlines } Head 1 & Head 2 & Head 3 & Head 4\\ bla & 1.23 & 4.5 & 67.89 \\ bla & 1.2 & 4.50 & 7.89 \\ bla & .2 & .50 & 67.8 \\ \end{tblr} \end{table} \end{document} ```
0
https://tex.stackexchange.com/users/101651
685649
318,079
https://tex.stackexchange.com/questions/685625
1
I have some issues with the APA Biblatex reference style the current output is: > > This is the in text reference (Badenhorst, Plug, Pelser, & Van Vollenhoven 2002: 10) > > > Second reference display et al only. (Badenhorst *et al*. 2002: 10) > > > **References** > > > Badenhorst, S., Plug, I., Pelser, A., & Van Vollenhoven, A. (2002). Faunal analysis from steinaecker’s horse, the northernmost british military outpost in the kruger national park during the south african war. *Annals of the Transvaal Museum*, 39(10): 57–63. > > > The in text cite is correct, however there are a few issues with my Reference list and should look like the reference List image below. 1. The year must not be inside parentheses. 2. The Article name should display the proper format in the current output only the first word is Capitalized “Faunal” however in the bib file the name have more than one capital letter. 3. There should not be a (,) comma after the Journal name **My MWE is :** ``` \documentclass{article} \usepackage[a4paper,total={160mm,240mm},left=25mm,top=20mm]{geometry} \usepackage{filecontents} \begin{filecontents*}{refs.bib} @article{A01, title = {Faunal analysis from Steinaecker’s Horse, the northernmost British military outpost in the Kruger National Park during the South African War}, volume = {39}, number= {10}, pages = {57--63}, journaltitle = {Annals of the Transvaal Museum}, author = {Badenhorst, Shaw and Plug, Ina and Pelser, A.J. and Van Vollenhoven, A.C.}, date = {2002}, } \end{filecontents*} \usepackage[english]{babel} \usepackage[style=apa,backend=biber]{biblatex} % 2nd author in bibliography also display Surname, name \DeclareNameAlias{sortname}{last-first} % preceed last author with & \DeclareDelimFormat{finalnamedelim}{\addspace\&\space} % Change Journal Volume to normal from italics. \DeclareFieldFormat[article,periodical]{volume}{\apanum{#1}} \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1} % Impliment et al option for more than 2 authors \newcommand*{\mkandothers}{\mkbibemph} \renewbibmacro*{name:andothers}{% \ifboolexpr{ test {\ifnumequal{\value{listcount}}{\value{liststop}}} and test \ifmorenames } {\ifnumgreater{\value{liststop}}{1} {\finalandcomma} {}% \andothersdelim\bibstring[\mkandothers]{andothers}} {}} % Display In text reference as (Autor Year:Page) \renewcommand*{\nameyeardelim}{\space} \renewcommand*{\postnotedelim}{\addcolon\addspace} \DeclareFieldFormat{postnote}{#1} \DeclareFieldFormat{multipostnote}{#1} % Add colon (:) after Journal edition in stead of comma (,) \renewcommand*{\bibpagespunct}{\addcolon\space} \usepackage{xpatch} \xpretobibmacro{date+extrayear}{\addperiod\space}{}{} \xapptobibmacro{date+extrayear}{\nopunct}{}{} % Change the first occurence of 3 or more authors to display their surnames in text and from the 2nd occurence et al. \makeatletter \AtEveryCitekey{% \ifciteseen {} {\defcounter{maxnames}{6}}% } \makeatother \addbibresource{refs.bib} \begin{document} This is the in text reference \autocite[10]{A01}\\ Second reference display et al only. \autocite[10]{A01}\\ \xpatchbibmacro{date+extradate}{% \printtext[parens]% }{% \setunit{\addperiod\space}% \printtext% }{}{} \begingroup \setlength{\bibhang}{0pt} % remove indentation \setlength\bibitemsep{0.5\baselineskip} % Space between each reference entry \printbibliography \endgroup \end{document} ``` **The desired output should be** > > Badenhorst, S., Plug, I., Pelser, A., & Van Vollenhoven, A. 2002. > Faunal analysis from Steinaecker’s Horse, the northernmost British > military outpost in the Kruger national park during the South African > War. *Annals of the Transvaal Museum* 39(10): 57–63. > > > Thank you
https://tex.stackexchange.com/users/295238
APA Biblatex reference style issue
true
I am unsure about all the modifications you are trying to make in apa-style for `biblatex` but I have change a bit your MWE to implement both of your desired changes. Be aware that `biblatex-apa` is not meant to be heavily customized. ``` \documentclass{article} \usepackage[a4paper,total={160mm,240mm},left=25mm,top=20mm]{geometry} \usepackage{filecontents} \begin{filecontents*}{refs.bib} @article{A01, title = {Faunal analysis from Steinaecker’s Horse, the northernmost British military outpost in the Kruger National Park during the South African War}, volume = {39}, number= {10}, pages = {57--63}, journaltitle = {Annals of the Transvaal Museum}, author = {Badenhorst, Shaw and Plug, Ina and Pelser, A.J. and Van Vollenhoven, A.C.}, date = {2002}, } \end{filecontents*} \usepackage[english]{babel} \usepackage[style=apa,backend=biber]{biblatex} % 2nd author in bibliography also display Surname, name \DeclareNameAlias{sortname}{last-first} % preceed last author with & \DeclareDelimFormat{finalnamedelim}{\addspace\&\space} % Change Journal Volume to normal from italics. \DeclareFieldFormat[article,periodical]{volume}{\apanum{#1}} \DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1} % Impliment et al option for more than 2 authors \newcommand*{\mkandothers}{\mkbibemph} \renewbibmacro*{name:andothers}{% \ifboolexpr{ test {\ifnumequal{\value{listcount}}{\value{liststop}}} and test \ifmorenames } {\ifnumgreater{\value{liststop}}{1} {\finalandcomma} {}% \andothersdelim\bibstring[\mkandothers]{andothers}} {}} % Display In text reference as (Autor Year:Page) \renewcommand*{\nameyeardelim}{\space} \renewcommand*{\postnotedelim}{\addcolon\addspace} \DeclareFieldFormat{postnote}{#1} \DeclareFieldFormat{multipostnote}{#1} % Add colon (:) after Journal edition in stead of comma (,) \renewcommand*{\bibpagespunct}{\addcolon\space} \usepackage{xpatch} \xpretobibmacro{date+extrayear}{\addperiod\space}{}{} \xapptobibmacro{date+extrayear}{\nopunct}{}{} % Change the first occurence of 3 or more authors to display their surnames in text and from the 2nd occurence et al. \makeatletter \AtEveryCitekey{% \ifciteseen {} {\defcounter{maxnames}{6}}% } \makeatother % Disable year parentheses. \DeclareFieldFormat{apadate}{% \ifboolexpr{ test {\ifdatecirca} or test {\ifdateuncertain} } {\mkbibbrackets{#1}} {#1}} % Remove colon after journal name. \renewbibmacro*{journal+issuetitle}{% \usebibmacro{journal}% \setunit*{\addspace}% \printfield{volume}% \printfield{number}% \setunit{\addcomma\addspace}% \printfield{eid}% \newunit\newblock \usebibmacro{issuename}% \newunit} \addbibresource{refs.bib} \begin{document} This is the in text reference \autocite[10]{A01}\\ Second reference display et al only. \autocite[10]{A01}\\ \begingroup \setlength{\bibhang}{0pt} % remove indentation \setlength\bibitemsep{0.5\baselineskip} % Space between each reference entry \printbibliography \endgroup \end{document} ```
1
https://tex.stackexchange.com/users/284587
685652
318,082
https://tex.stackexchange.com/questions/685603
0
I’m writing a book. I have created separate files for all chapters and have compiled them individually. I did so because when I keep all the chapters in a single file, it takes lot of time to compile. So after perfecting each chapter, I make a file that has the code of all the chapters and then I compile to get the book. This seems inefficient. Is there a way to load all the precompiled chapters in a single file and generate the pdf quickly? Or is there any other more efficient method I can use?
https://tex.stackexchange.com/users/212866
How to add precompiled chapters in a book?
true
The easiest way to get a coherent combination with combined table of contents, index, etc is to comment out the preamble of each chapter and `\include` them in to your main document. When working on a specific chapter you can use `\includeonly{chapter-name}` in the preamble and latex will just process that chapter. As long as the `.aux` files from a full run are available all references and counters from non-included chapters will still work.
2
https://tex.stackexchange.com/users/1090
685656
318,085
https://tex.stackexchange.com/questions/29905
76
I feel really stupid for asking this, but how do you form more complex if conditionals in TeX? I'm looking for something like: ``` \ifnum\x=1 OR \ifnum\x=14 {do this} \else {do that} \fi ``` I don't want to have to resort to copy-pasting the entire condition just to change the expression when the body is the same.
https://tex.stackexchange.com/users/2634
How to form "if ... or ... then" conditionals in TeX?
false
With `pgfmath` (`TikZ`): ``` \documentclass{article} \usepackage{pgfmath} \begin{document} \newcommand\OrTest[1]{% \pgfmathparse{#1==14 || #1==1 ? "#1 is equal to 1 or 14." : "#1 is not equal to 1 or 14."}% \pgfmathresult} \OrTest{14} \OrTest{123} \end{document} ``` If you want more than a text-output you can use it as a true/false-tester like this: ``` \documentclass{article} \usepackage{tikz} \begin{document} \foreach \No in {-3,0,1,2,3,7,11,14,123,1,7,999}{%% \pgfmathparse{\No==1 || \No==14 ? 1 : 0} \ifnum\pgfmathresult=1 \colorbox{blue!33}{\No}~% \else% \colorbox{red!33}{\No}~% \fi}%% \end{document} ```
3
https://tex.stackexchange.com/users/46023
685657
318,086
https://tex.stackexchange.com/questions/685455
1
I have a latex file including a lot of files which are initially not present but which are created in the course of the `latexmk` run. ``` \documentclass{article} \usepackage{functional} \usepackage{import} \usepackage{graphicx} \usepackage{xcolor} \usepackage{transparent} \usepackage{listings} ... \begin{document} % \lstinputlisting[language=tex, basicstyle=\tiny, % breaklines, lastline=25, % float, captionpos=b, label={lst:ptx}, % caption={The ptx-file for a fig-file}]{F4_01fig2dev.ptx} \fileIfExistTF{F4_01fig2dev.ptx}{x\lstinputlisting{F4_01fig2dev.ptx}}{\input{F4_01fig2dev.ptx}} %\lstinputlisting{F4_01fig2dev.ptx} \import{}{F4_01fig2dev.ptx} %\import{}{F4_04mp2mps.ptx} \import{}{F4_03someGnuplot.ptx} \includegraphics{F4_05someMetapost.mps} %\import{}{F4_06svg2pdf.ptx}% \def\svgwidth{0.5\textwidth}% \import{}{F4_07someSvg.ptx} \end{document} ``` Seemingly, `latexmk` runs `lualatex` until the first file to be included is not present. It ends with a fatal error but goes on creating the first included file. Then it runs `lualatex` second ending up in the second fatal error because of the second missing file. Again in some rule this is created and that way it goes on. This causes one run more than there are files to be included. Additional runs may be needed to stabilize. I think this is not satisfying. How to solve this? I wonder whether it is possible to proceed completely different? Or to make lualatex not stop for each missing file? So the number of lualatex runs does not depend on the number of included files. Based on suggestions below, I modified my solution: In front of `\begin{document}` I added ``` \usepackage{functional} \usepackage{letltxmacro} \LetLtxMacro\latexlstinputlisting\lstinputlisting \renewcommand{\lstinputlisting}[2][]{\fileIfExistTF{#2}{\latexlstinputlisting[#1]{#2}}{\typeout{No file #2.}}} \LetLtxMacro\lateximport\import \renewcommand{\import}[2]{\fileIfExistTF{#2}{\lateximport{#1}{#2}}{\typeout{No file #1#2.}}} \LetLtxMacro\latexincludegraphics\includegraphics \renewcommand{\includegraphics}[2][]{\fileIfExistTF{#2}{\latexincludegraphics[#1]{#2}}{\typeout{No file #2.}}} ``` For this special file, the number of runs of `lualatex` is really reduced. But I am not content. Redefine seems quite dangerous. For example, redefining `\input` naively seems to affect `\includegraphics`. Even worse, `\input` can be used with a file `xxx.tex` without ending. Accordingly for `\includegrapics`. With this normal usage, the current solution does not work. Any suggestions? Maybe my `.latexmkrc` file is helpful ``` #!/usr/bin/env perl # to create pdf via lualatex #$pdflatex = 'lualatex -file-line-error %O %S'; # PDF-generating modes are: # 1: pdflatex, as specified by $pdflatex variable (still largely in use) # 2: postscript conversion, as specified by the $ps2pdf variable (useless) # 3: dvi conversion, as specified by the $dvipdf variable (useless) # 4: lualatex, as specified by the $lualatex variable (best) # 5: xelatex, as specified by the $xelatex variable (second best) $pdf_mode = 4;# specifies creation of pdf via lualatex # If additional parameters must be passed to lualatex #'svg' package. # It converts raw SVG files to the PDF+PDF_TEX combo using InkScape. # $lualatex = "lualatex --shell-escape"; # note that -recorder is implicitly added $latex2pdfOptions = "-interaction=nonstopmode -synctex=1 -shell-escape"; $lualatex = "lualatex $latex2pdfOptions %O %S"; #$postscript_mode = $dvi_mode = 0; # to configure bibtex $bibtex_use=2; # this cannot be done according to the according latex maven plugin, # because the according parameter maxNumReRunsLatex may be set to -1 # which signifies an infinite number of runs. $max_repeat=30; # default are tex and eps, but could also be pdf and ptx and mps # Currently, all those files are given with explicit endings, # so no extensions to be added. #add_input_ext(''); # It is what it seems to be: clean inludes what was generated by cus $cleanup_includes_cusdep_generated = 1; $cleanup_includes_generated = 1; #$makeindex = 'makeindex %O -o %D %S'; # the default # TBD: clarify: xdv and dvi seem to be internal. # maybe missing other extensions in conjunction with synctex $clean_ext .= " %R.synctex.gz"; # bbl does not work #@generated_exts = (@generated_exts, 'lol', 'bbl', 'glo', 'ist') #print "Hello!" #foreach (@generated_exts) { #print "Generated exts: $_\n"; #} #print "clean_ext\n"; # Here @generated_exts is ('aux', 'fls', 'log', # generated by latex already # 'toc', 'lof', 'lot', 'out', # generated by latex conditionally # 'idx', 'ind', 'blg', 'ilg', # concerning indices # # strange enough: nothing for bibtex # 'xdv', 'bcf' # extensions ext to be deleted by latexmk -c # Note that the file names are %R.ext. # this may cause problems with extensions containing a dot. # Also this is not general enough # if the generated file deviates from %R by more than an extension. # In this case, use $clean_ext$ # Here, $clean_ext is empty. # list of listings, whereas lof and lot are already present. push @generated_exts, "lol"; push @generated_exts, "dvi", "xdv"; # for beamer class push @generated_exts, "nav", "snm", "vrb"; # why are .ist and xdy not under generated_exts? # note that currently, either %R or what is present is the extension only! # this does not make sense very much. # $clean_ext .= " stateMachine.log"; does not work, because stateMachine.log is the extension! # should be under indexing $clean_ext .= " %R.ist %R.xdy %R-*.ind %R-*.idx %R-*.ilg %R-*.ind"; add_cus_dep('fig', 'ptx', 0, 'fig2dev'); sub fig2dev { $file = $_[0]; print("$file"); rdb_add_generated("$file.eps", "$file.pdf", "$file.ptx"); my $GenOptions = ""; my $PtxOptions = ""; my $PdfEpsOptions = ""; print("create from $file.fig"); rdb_add_generated("$file.ptx", "$file.pdf", "$file.eps"); #fig2dev -L pstex <fig2devGenOptions> <fig2devPdfEpsOptions> xxx.fig xxx.eps #fig2dev -L pdftex <fig2devGenOptions> <fig2devPdfEpsOptions> xxx.fig xxx.pdf #fig2dev -L pdftex_t <fig2devGenOptions> <fig2devPtxOptions> -p xxx xxx.fig xxx.ptx my $ret1 = system("fig2dev -L pstex $GenOptions $PdfEpsOptions $file.fig $file.eps"); my $ret2 = system("fig2dev -L pdftex $GenOptions $PdfEpsOptions $file.fig $file.pdf"); my $ret3 = system("fig2dev -L pdftex_t $GenOptions $PtxOptions -p $file $file.fig $file.ptx"); return ($ret1 or $ret2 or $ret3); } add_cus_dep('gp', 'ptx', 0, 'gnuplot'); sub gnuplot { $file = $_[0]; print("create from $file.gp"); rdb_add_generated("$file.ptx", "$file.pdf", "$file.eps"); my $nuplotOptions = ""; my $ret1 = system("gnuplot -e \"set terminal cairolatex pdf $gnuplotOptions;\ set output '$file.ptx';\ load '$file.gp'\""); # my $ret2 = system("gnuplot -e \"set terminal cairolatex eps $gnuplotOptions;\ # set output '$file.ptx';\ # load '$file.gp'\""); return $ret; } # metapost rule from http://tex.stackexchange.com/questions/37134 #add_cus_dep('mp', 'mps', 0, 'mpost'); add_cus_dep('mp', 'mps', 0, 'mpost'); sub mpost { my $file = $_[0]; print("create from $file.mp"); rdb_add_generated("$file.mps", "$file.fls", "$file.log"); my ($name, $path) = fileparse($file); pushd($path); my $return = system("mpost -interaction=nonstopmode -recorder -s prologues=2 -s 'outputtemplate=\"%j.mps\"' $name"); popd(); return $return; } add_cus_dep('svg', 'ptx', 0, 'inkscape'); sub inkscape { my $file = $_[0]; print("create from $file.svg"); rdb_add_generated("$file.ptx", "$file.pdf"); my $ret1 = system("inkscape -D --export-filename=$file.pdf --export-latex $file.svg "); #my $ret2 = system("inkscape -D --export-filename=$file.eps --export-latex $file.svg "); #use File::Copy; # This works only for pdf, not for eps. #unlink($file.pdf_tex) or die "cannot unlink $file.pdf_tex"; rename("$file.pdf_tex", "$file.ptx");# or die "cannot move $file.pdf_tex"; return $ret1;# or $ret2; } # graphics for xfig (not appropriate for mixed tex/pdf) # add_cus_dep('fig', 'pdf', 0, 'fig2pdf'); # sub fig2pdf { # system( "fig2dev -Lpdf \"$_[0].fig\" \"$_[0].pdf\"" ); # } # use splitindex $makeindex = 'internal splitindex'; sub splitindex { # Use splitindex instead of makeindex. # The splitindex programe starts from an .idx file, makes a set of # other .idx files for separate indexes, and then runs makeindex to # make corresponding .ind files. # However, it is possible that the document uses the splitindex # package, but in a way compatible with the standard methods # compatible with makeindex, i.e., with a single index and with the # use of the \printindex command. # Then we need to invoke makeindex. # In addition, latexmk assumes that makeindex or its replacement makes # an .ind file from an .idx file, and latexmk gives an error if it # doesn't exist, we need to make an .ind file. # Both problems are solved by running makeindex and then splitindex. # Note: errors are returned by makeindex and splitindex for things # like a missing input file. No error is returned for lines in an # input file that are in an incorrect format; they are simply # ignored. So no problem is caused by lines in the .idx file # that are generated by splitindex in a format incompatible with # makeindex. my $ret1 = system( "makeindex", $$Psource ); my $ret2 = system( "splitindex", $$Psource ); return $ret1 || $ret2; } add_cus_dep( 'acn', 'acr', 0, 'makeglossaries' ); add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' ); push @generated_exts, 'glo', 'gls', 'glg'; push @generated_exts, 'acn', 'acr', 'alg'; push @generated_exts, "ist"; # index stylefile created by the glossaries package #$clean_ext .= " acr acn alg glo gls glg";# TBD: clarify: better in @generated_exts? sub makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); my @args = ( "-q", "-d", $path, $base_name ); if ($silent) { unshift @args, "-q"; } return system "makeglossaries", "-d", $path, $base_name; } sub run_makeglossaries { my ($base_name, $path) = fileparse( $_[0] ); #handle -outdir param by splitting path and file, ... pushd $path; # ... cd-ing into folder first, then running makeglossaries ... if ( $silent ) { # system "makeglossaries -q '$base_name'"; #unix system "makeglossaries", "-q", "$base_name"; #windows } else { # system "makeglossaries '$base_name'"; #unix system "makeglossaries", "$base_name"; #windows }; popd; # ... and cd-ing back again } # !!! ONLY WORKS WITH VERSION 4.54 or higher of latexmk #TBD: take into account: modified: # '$_[0]'-> # ############# # # makeindex # # ############# # @ist = glob("*.ist"); # if (scalar(@ist) > 0) { # $makeindex = "makeindex -s $ist[0] %O -o %D %S"; # } # glossaries new with bib2gls # push @generated_exts, 'glstex', 'glg'; # add_cus_dep('aux', 'glstex', 0, 'run_bib2gls'); # sub run_bib2gls { # if ( $silent ) { # my $ret = system "bib2gls --silent --group $_[0]"; # } else { # my $ret = system "bib2gls --group $_[0]"; # }; # my ($base, $path) = fileparse( $_[0] ); # if ($path && -e "$base.glstex") { # rename "$base.glstex", "$path$base.glstex"; # } # # Analyze log file. # local *LOG; # $LOG = "$_[0].glg"; # if (!$ret && -e $LOG) { # open LOG, "<$LOG"; # while (<LOG>) { # if (/^Reading (.*\.bib)\s$/) { # rdb_ensure_file( $rule, $1 ); # } # } # close LOG; # } # return $ret; # } $pythontex = 'pythontexW %R';#'pythontexW %O %R'; push @generated_exts, "pytxcode", "plg"; push @generated_exts, "depytx", "dplg"; $clean_ext .= " pythontex-files-%R/* pythontex-files-%R"; #$extra_rule_spec{'pythontex'} = [ 'internal', '', 'mypythontex', "%Y%R.pytxcode", "%Ypythontex-files-%R/%R.pytxmcr", "%R", 1 ]; $extra_rule_spec{'pythontex'} = [ 'internal', '', 'mypythontex', "%R.pytxcode", "pythontex-files-%R/%R.pytxmcr", "%R", 1 ]; sub mypythontex { my $result_dir = $aux_dir1."pythontex-files-$$Pbase"; my $ret = Run_subst( $pythontex, 2 ); rdb_add_generated( glob "$result_dir/*" ); #my $fh = new FileHandle $$Pdest, "r"; open( my $fh, "<", $$Pdest ); if ($fh) { print "path: $ENV{PATH}"; while (<$fh>) { if ( /^%PythonTeX dependency:\s+'([^']+)';/ ) { print "Found pythontex dependency '$1'\n"; rdb_ensure_file( $rule, $aux_dir1.$1 ); } } undef $fh; } else { warn "mypythontex: I could not read '$$Pdest'\n", " to check dependencies\n"; } return $ret; } # for htlatex push @generated_exts, "4tc", "4ct", "tmp", "xref", "css", "idv", "lg"; # TBD: for -C remove also html and xhtml # TBD: check that this plugin also removes all these extensions.. think of lg. # biblatex # push @generated_exts, "run.xml";# does run.xml work? # $clean_ext .= " %R-blx.bib"; ```
https://tex.stackexchange.com/users/60463
latexmk: lots of runs caused by files to be created after first latex run
false
There's a simple solution: replace ``` \input{F4_01fig2dev.ptx} ``` with ``` \wlog{No file F4_01fig2dev.ptx.} ``` It does exactly what it reads -- write that string in the log file, which will be processed by latexmk. An alternative is `\typeout` which will usually type in both log file and the terminal. (as hinted by Ulrike in the comment, but it does take some effort to figure out what "latexmk needs" exactly other than by reading through the source code...) Another possible magic string is `! LaTeX Error: File F4_01fig2dev.ptx not found.}` as normally printed by `\input`, however there isn't really a "built-in" function to print out this string. --- Admittedly this trick is not very satisfying as in it hard codes the magic string "No file", but it's what many packages do... * there's a similar trick suggested by latexmk documentation * pythontex source code: * LaTeX source code: * A handful of answers suggesting the trick: [1](https://tex.stackexchange.com/q/40850) [2](https://tex.stackexchange.com/q/40738) [3](https://tex.stackexchange.com/q/14364) [4](https://tex.stackexchange.com/q/62142) [5](https://tex.stackexchange.com/q/85982) [6](https://tex.stackexchange.com/q/444974)
1
https://tex.stackexchange.com/users/250119
685662
318,087
https://tex.stackexchange.com/questions/29905
76
I feel really stupid for asking this, but how do you form more complex if conditionals in TeX? I'm looking for something like: ``` \ifnum\x=1 OR \ifnum\x=14 {do this} \else {do that} \fi ``` I don't want to have to resort to copy-pasting the entire condition just to change the expression when the body is the same.
https://tex.stackexchange.com/users/2634
How to form "if ... or ... then" conditionals in TeX?
false
Another way with only TeX primitives & simple macros. If you don't restrict yourself to only expandable commands then the code *can* be readable... well, as readable as assembly since that's presumably how Knuth designed TeX. ``` \newif\iftmp % can also use LaTeX's \if@tempswa but making your own temporary avoids clashes \ifnum\x=1 \tmptrue \else \ifnum\x=14 \tmptrue \else \tmpfalse \fi \fi \iftmp <do this> \else <do that> \fi ``` (\*) if you are used to reading `\expandafter` etc. then the other way isn't that bad. (\*\*) input-stream-parsing codes is still quite unreadable regardless.
0
https://tex.stackexchange.com/users/250119
685668
318,090
https://tex.stackexchange.com/questions/685679
2
Playing around with expl3 I came to the strange effect that `\hspace` does not work sometimes when used in a `\ExplSyntaxOn` "environment": ``` \documentclass{article} \ExplSyntaxOn % <= removing this will make the code work correctly \newlength{\numberedlistitemspacing} \settowidth{\numberedlistitemspacing}{s.} \NewDocumentCommand{\invoiceitem}{mmm} { #1 \hspace{\numberedlistitemspacing} & #2 & #3 \\ } \ExplSyntaxOff % <= removing this will make the code work correctly \begin{document} \begin{tabular}{rcl} right & center & left \\ \invoiceitem{1}{2}{3} \\ \end{tabular} \end{document} ``` This code behaves just as if the `\hspace` was not there. Removing the `\ExplSyntaxOn` and `\ExplSyntaxOff` makes the code work perfectly. However this is not possible all the time. Especially when expl3 syntax variables or functions are used...
https://tex.stackexchange.com/users/281557
\hspace with variable input does not work correctly with \ExplSyntaxOn
true
When a table cell ends, LaTeX does `\unskip` in order to remove spaces that may have been input. With `\ExplSyntaxOn` your code is equivalent to ``` #1\hspace{\numberedlistitemspacing}& ``` and LaTeX duly removes the horizontal spacing. Without `\ExplSyntaxOn` your code is ``` #1 \hspace{\numberedlistitemspacing} & ``` and just the standard space is removed, but you get a normal space more because of the one after `#1`. Leaving spaces in the input when typing in a `tabular` is good. In the code for commands it may be bad. You should use ``` #1\hspace*{\numberedlistitemspacing}& ``` if not under `\ExplSyntaxOn`, which can be ``` #1 \hspace*{\numberedlistitemspacing} & ``` if `\ExplSyntaxOn` is in force. The rule of thumb is * use `\hspace*` for a space that's never removed; * never leave spaces before `\hspace{...}` or `\hspace*{...}`; * never leave spaces after `\hspace{...}` or `\hspace*{...}`.
4
https://tex.stackexchange.com/users/4427
685681
318,097
https://tex.stackexchange.com/questions/639922
2
I'm trying [quarto](/questions/tagged/quarto "show questions tagged 'quarto'") for my slides and wondering how to use `\pause` in [tkiz](/questions/tagged/tkiz "show questions tagged 'tkiz'") code. Minimum working example (`Test.qmd`) is below for reference. ``` --- title: "Test Slides" format: revealjs: chalkboard: buttons: false preview-links: auto css: styles.css --- ## Intro Here is a TikZ picture ```{r, engine = 'tikz'} \begin{tikzpicture} \draw (0,0) circle (1cm); %\pause \draw (0,0) circle (2cm); \end{tikzpicture} ``` ```
https://tex.stackexchange.com/users/4821
Using tikz with \pause command in rmarkdown or quarto presentation
false
``` --- title: "Test Slides" format: beamer --- ### Intro Here is a TikZ picture ```{=latex} \begin{tikzpicture} \draw (0,0) circle (1cm); \pause \draw (0,0) circle (2cm); \end{tikzpicture} ``` ```
0
https://tex.stackexchange.com/users/11604
685702
318,108
https://tex.stackexchange.com/questions/685068
0
I'd like to scale a Ti*k*Z picture based on font size surrounding the environment. For example... ``` \documentclass{standalone} \usepackage{tikz} \begin{document} { \begin{tikzpicture} \draw (-1,-1) rectangle (1,1); \node at (0,0) {Hello world}; \end{tikzpicture} } { \Huge \begin{tikzpicture} \draw (-1,-1) rectangle (1,1); \node at (0,0) {Hello world}; \end{tikzpicture} } { \tiny \begin{tikzpicture} \draw (-1,-1) rectangle (1,1); \node at (0,0) {Hello world}; \end{tikzpicture} } \end{document} ``` I expect the second and third of these images to look like the first one, but scaled. Is it possible to use the `x=` and `y=` keys on the Ti*k*Z picture environment to allow for scaling of the image relative to the current font size? --- EDIT ==== After a little more work I came up with the following... ``` \documentclass{standalone} \usepackage{tikz} \usepackage{printlen} \newlength{\textsizenow} \makeatletter \newcommand{\refreshtextsizenow}{% \setlength{\textsizenow}{\f@size pt} } \makeatother \newcommand{\example}{% \refreshtextsizenow \begin{tikzpicture}[x=\textsizenow,y=\textsizenow] \draw (-3,-3) rectangle (3,3); \node at (0,0) {Hello world}; \end{tikzpicture} } \begin{document} { \Huge \example } { \huge \example } { \LARGE \example } { \Large \example } { \large \example } { \normalsize \example } { \small \example } { \footnotesize \example } { \scriptsize \example } { \tiny \example } \end{document} ``` It uses `\f@size` to set a length before each image is drawn. I then use the `x=...,y=...` keys to set the coordinate size. This seems to get *close* to what I am trying to do. However, if the code above is compiled, the horizontal spacing between the text and the sides shrink as the text size gets smaller. The vertical spacing seems somewhat consistent. I expect both the horizontal and vertical spacing to stay the same. Is this possible to fix?
https://tex.stackexchange.com/users/270870
Scaling TikZ picture based on text size around the environment
true
For font size dependent images, the following options can be used ``` \begin{tikzpicture}[x=1em,y=1em] \draw (-3,-3) rectangle (3,3); \node at (0,0) {Hello world}; \end{tikzpicture} ``` This sets the coordinate system so `1` is actually `1em`. `em's are a unit whose value are relative to the current font size. Considerations such as font family must also be taken into account as kerning or symbol sizes may differ from one font family to another.
0
https://tex.stackexchange.com/users/270870
685704
318,110
https://tex.stackexchange.com/questions/685711
2
I have a table made with booktabs with multiple values, some of which are negative. I want to substitute the "-" with an actual minus sign. I would also like the numbers to be centered without having the minus sign in consideration, avoiding these odd placements. ``` \documentclass{article} \usepackage{siunitx} \usepackage{booktabs} \usepackage{caption} \begin{document} \begin{table}[h] \centering \caption{Resumo dos resultados da atividade respiratória pelo complexo II através de um ensaio espetrofotométrico a \SI{600}{\nano\meter} com DCPIP}\label{tabelasss} \begin{tabular}{@{}ccccc@{}} \toprule Tempo (min) & B & 1 & 2 & 3 \\ \midrule 0 & 0.000 & 0.031 & 0.139 & -0.018 \\ 2 & 0.001 & 0.032 & 0.062 & -0.032 \\ 5 & -0.001 & 0.031 & -0.008 & -0.040 \\ 8 & -0.003 & 0.025 & -0.084 & -0.048 \\ 10 & -0.004 & 0.023 & -0.130 & -0.052 \\ 12 & -0.006 & 0.019 & -0.167 & -0.054 \\ 15 & -0.008 & 0.014 & -0.221 & -0.058 \\ 17 & -0.008 & 0.012 & -0.250 & -0.059 \\ 20 & -0.010 & 0.006 & -0.289 & -0.061 \\ 22 & -0.009 & 0.005 & -0.310 & -0.062 \\ 25 & -0.010 & 0.003 & -0.335 & -0.060 \\ 26 & -0.011 & 0.002 & -0.340 & -0.059 \\ 27 & -0.010 & 0.002 & -0.340 & -0.061 \\ 28 & -0.011 & 0.002 & -0.340 & -0.061 \\ 30 & -0.013 & 0.000 & -0.340 & -0.058 \\ \bottomrule \end{tabular} \end{table} \end{document} ```
https://tex.stackexchange.com/users/283064
How do I substitute the "-" with a minus sign without disaligning numbers in center enviorment
true
Have a look at the `S` column type from the `siunitx` package to properly align the numbers. This will also ensure that you actually get a minus sign instead of a hyphen. ``` \documentclass{article} \usepackage{siunitx} \usepackage{booktabs} \usepackage{caption} \begin{document} \begin{table}[h] \centering \caption{Resumo dos resultados da atividade respiratória pelo complexo II através de um ensaio espetrofotométrico a \SI{600}{\nano\meter} com DCPIP}\label{tabelasss} \begin{tabular}{ @{} S[table-format=2.0] S[table-format=-1.3] S[table-format=1.3] S[table-format=-1.3] S[table-format=-1.3] @{} } \toprule {Tempo (min)} & {B} & {1} & {2} & {3} \\ \midrule 0 & 0.000 & 0.031 & 0.139 & -0.018 \\ 2 & 0.001 & 0.032 & 0.062 & -0.032 \\ 5 & -0.001 & 0.031 & -0.008 & -0.040 \\ 8 & -0.003 & 0.025 & -0.084 & -0.048 \\ 10 & -0.004 & 0.023 & -0.130 & -0.052 \\ 12 & -0.006 & 0.019 & -0.167 & -0.054 \\ 15 & -0.008 & 0.014 & -0.221 & -0.058 \\ 17 & -0.008 & 0.012 & -0.250 & -0.059 \\ 20 & -0.010 & 0.006 & -0.289 & -0.061 \\ 22 & -0.009 & 0.005 & -0.310 & -0.062 \\ 25 & -0.010 & 0.003 & -0.335 & -0.060 \\ 26 & -0.011 & 0.002 & -0.340 & -0.059 \\ 27 & -0.010 & 0.002 & -0.340 & -0.061 \\ 28 & -0.011 & 0.002 & -0.340 & -0.061 \\ 30 & -0.013 & 0.000 & -0.340 & -0.058 \\ \bottomrule \end{tabular} \end{table} \end{document} ``` The number format `table-format=-1.4` in the above code will mean * space for a minus sign * 1 digit before the decimal separator * 3 digits after the decimal separator
2
https://tex.stackexchange.com/users/36296
685712
318,113
https://tex.stackexchange.com/questions/685714
2
In this example, the edges don't connect to the vertex it comes from. I'm using `tkz-graph`, and use `\tikzstyle{EdgeStyle}=[pos]` to give an arrow head to the edges. I modified the value of `\VertexInterMinSize` and `\VertexDistance`, but it doesn't make the vertex slightly bigger so to touch the edge. Making the vertex bigger by modifying `\VertexSmallMinSize` doesn't work either. ``` \documentclass{standalone} \usepackage{tkz-graph} \begin{document} \begin{tikzpicture} \GraphInit[vstyle=Classic] \renewcommand*{\VertexInterMinSize}{1mm} \renewcommand*{\VertexDistance}{1mm} \renewcommand*{\VertexSmallMinSize}{1mm} \Vertex[x=-2,y=0,Lpos=90,style = {font=\footnotesize},L=a]{a} \Vertex[x=0,y=0,Lpos=90,style = {font=\footnotesize,align=center},L={b\\b}]{b} \Vertex[x=3,y=-1,Lpos=0,style = {font=\footnotesize},L=c]{c} \Vertex[x=0,y=-2,Lpos=-90,style = {font=\footnotesize},L=d]{d} \Vertex[x=3,y=-3,Lpos=-90,style = {font=\footnotesize},L=e]{e} \tikzstyle{EdgeStyle}=[post] \tikzset{LabelStyle/.style = {draw opacity=0, fill opacity=0, text opacity=1,font=\footnotesize}} \Edge[label=1, labelstyle={above}](b)(a) \Edge[label=2, labelstyle={above}](b)(c) \Edge[label=3, labelstyle={above,xshift=2mm}](b)(e) \Edge[label=4, labelstyle={left}](b)(d) \Edge[label=5, labelstyle={below,xshift=-2mm}](d)(e) \Edge[label=6, labelstyle={right}](c)(e) \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/162307
tkz-graph: Edge's beginning doesn't connect to vertex
true
Instead `\tikzstyle{EdgeStyle}=[pos]`, I changed it to `\tikzstyle{EdgeStyle}=[->]`, and now the edges connect to the out vertex.
1
https://tex.stackexchange.com/users/162307
685715
318,114
https://tex.stackexchange.com/questions/685699
0
Please my first theorem which I want it to be Theorem 1.1 happens to be in Chapter 2 and as thus it reads Theorem 2.1 as opposed what I want. I mean Theorem 1.1, please how can I change this? By always defining what I want in the theorem number and sections.
https://tex.stackexchange.com/users/274171
How to change theorem definition
false
This is completely illogical, but the customer's always right. ``` \documentclass{book} \usepackage{amsthm} \newcommand{\thechapterminusone}{\the\numexpr\value{chapter}-1\relax} \newtheorem{theorem}{Theorem}[chapter] \renewcommand{\thetheorem}{\thechapterminusone.\arabic{theorem}} \begin{document} \chapter{First} \chapter{Second} \begin{theorem}\label{test} Some people have weird requirements. \end{theorem} \begin{proof} See the numbering of theorem~\ref{test}. \end{proof} \end{document} ``` Just remove the definition of `\thetheorem` if logic becomes active again.
1
https://tex.stackexchange.com/users/4427
685717
318,116
https://tex.stackexchange.com/questions/685728
6
I was looking for a macros simplifying pipe dreams drawing (these are specific tilings used in combinatorics). However I haven’t found one. So I wrote it myself and I am providing the possible solution down below in the answer.
https://tex.stackexchange.com/users/252527
Pipe dreams in TiKz
false
Here is a simple solution. (It is not the most efficient, but I’m still working on it). ``` \documentclass{minimal} \usepackage{tikz} \usepackage{xcolor} \usepackage{bm} \newcommand{\cross}[2]{ \begin{scope}[xshift=#1cm,yshift=-#2cm] \draw[very thick] (0,-0.5) -- (0.45,-0.5); \draw[very thick] (0.55,-0.5) -- (1,-0.5); \draw[very thick] (0.5,0) -- (0.5,-1); \end{scope} }%draws a cross \newcommand{\arcs}[2]{ \begin{scope}[xshift=#1cm,yshift=-#2cm] \draw[very thick] (0,-0.5) arc (-90:0:0.5cm); \draw[very thick] (0.5,-1) arc (180:90:0.5cm); \end{scope} }%draws elbows (arcs) \newcommand{\GRID}[1]{ \begin{scope} \draw[black!25!white] (0,-#1cm) |- (#1cm,0); \foreach \n in {0,...,{#1}} \draw[black!25!white] (\n+1,0) -- (\n+1,\n-#1); \foreach \n in {0,...,{#1}} \draw[black!25!white] (0,-\n-1) -- (#1-\n,-\n-1); \foreach \n in {1,...,{#1}} \draw[very thick] (\n-1,-#1+\n-0.5) arc (-90:0:0.5cm); \end{scope} }%draws a grid and the outer elbows \newcommand{\GRIDwitnum}[1]{ \begin{scope} \foreach \n in {1,...,#1} \node at (\n-0.5,0.5){$\bm{\mathsf{\n}}$}; \foreach \n in {1,...,#1} \node at (-0.5,-\n+0.5){$\bm{\mathsf{\n}}$}; \draw[black!25!white] (0,-#1cm) |- (#1cm,0); \foreach \n in {0,...,{#1}} \draw[black!25!white] (\n+1,0) -- (\n+1,\n-#1); \foreach \n in {0,...,{#1}} \draw[black!25!white] (0,-\n-1) -- (#1-\n,-\n-1); \foreach \n in {1,...,{#1}} \draw[very thick] (\n-1,-#1+\n-0.5) arc (-90:0:0.5cm); \end{scope} } %draws a grid and the outer elbows and numerates the pipe’ ends \begin{document} \begin{tikzpicture}[scale=0.6] \GRIDwitnum{6} \cross{0}{0} \cross{1}{0} \arcs{2}{0} \arcs{3}{0} \arcs{4}{0} \arcs{0}{1} \arcs{1}{1} \arcs{2}{1} \arcs{3}{1} \cross{0}{2} \cross{1}{2} \cross{2}{2} \cross{0}{3} \arcs{1}{3} \arcs{0}{4} \end{tikzpicture} \end{document} ```
5
https://tex.stackexchange.com/users/252527
685729
318,122
https://tex.stackexchange.com/questions/685728
6
I was looking for a macros simplifying pipe dreams drawing (these are specific tilings used in combinatorics). However I haven’t found one. So I wrote it myself and I am providing the possible solution down below in the answer.
https://tex.stackexchange.com/users/252527
Pipe dreams in TiKz
false
This is code I wrote a while ago for making knot mosaics. It probably needs updating, but works fine for your purpose. ``` % mosaic New environment for classical (unlabeled) knot mosaics. Usage is as follows: % \begin{mosaic}[<tikz options>]{<tile size in cm>} % <entry> \& <entry> \& ... \& <entry> \\ % <entry> \& <entry> \& ... \& <entry> \\ % ... % <entry> \& <entry> \& ... \& <entry> \\ % \end{mosaic} % Final \\ in last line is required. % Optional <size> has default 1. Unit is cm. Determines size of each tile. % Each <entry> is typically a tilename but can be anything or empty. Note that % <entries> must be separated by \& not just with & (as for a typical table). \documentclass{article} \usepackage{mathtools} \usepackage{tikz,environ} \NewEnviron{mosaic}[2][]{\begin{tikzpicture}[baseline]\def\tilesize{#2}\matrix[mosai,ampersand replacement=\&, #1]{\BODY};\end{tikzpicture}} \newcommand{\cspace}{.1} % spacing for crossings \newcommand{\tileedge}{.05pt} % thickness of tile edge. Does not scale. \newcommand{\knotthickness}{1.5pt} % thickness of knot for 1cm tile. Scales with tile size. \newcommand{\tileo}{\tikz \draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize);} \newcommand{\tilei}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (0,.5*\tilesize) to[out=0, in=90] (.5*\tilesize,0);}} \newcommand{\tileii}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (\tilesize,.5*\tilesize) to[out=180, in=90] (.5*\tilesize,0);}} \newcommand{\tileiii}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (\tilesize,.5*\tilesize) to[out=180, in=-90] (.5*\tilesize,\tilesize);}} \newcommand{\tileiv}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (0,.5*\tilesize) to[out=0, in=-90] (.5*\tilesize,\tilesize);}} \newcommand{\tilev}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (0,.5*\tilesize) to (\tilesize,.5*\tilesize);}} \newcommand{\tilevi}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (.5*\tilesize,0) to (.5*\tilesize,\tilesize);}} \newcommand{\tilevii}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (0,.5*\tilesize) to[out=0, in=90] (.5*\tilesize,0); \draw[#1,knotstyle={\tilesize*\knotthickness}] (\tilesize,.5*\tilesize) to[out=180, in=-90] (.5*\tilesize,\tilesize);}} \newcommand{\tileviii}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (\tilesize,.5*\tilesize) to[out=180, in=90] (.5*\tilesize,0); \draw[#1,knotstyle={\tilesize*\knotthickness}] (0,.5*\tilesize) to[out=0, in=-90] (.5*\tilesize,\tilesize);}} \newcommand{\tileix}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (0,.5*\tilesize) to (\tilesize,.5*\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (.5*\tilesize,0) to (.5*\tilesize,.5*\tilesize-\tilesize*\cspace); \draw[#1,knotstyle={\tilesize*\knotthickness}] (.5*\tilesize,.5*\tilesize+\tilesize*\cspace) to (.5*\tilesize,\tilesize);}} \newcommand{\tilex}[1][{}]{\tikz {\draw[tilestyle] (0,0) rectangle (\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (.5*\tilesize,0) to (.5*\tilesize,\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (0,.5*\tilesize) to (.5*\tilesize-\tilesize*\cspace,.5*\tilesize); \draw[#1,knotstyle={\tilesize*\knotthickness}] (.5*\tilesize+\tilesize*\cspace,.5*\tilesize) to (\tilesize,.5*\tilesize);}} \tikzset{tilestyle/.style={use as bounding box, line width=\tileedge}} % Add colors/styles here for tile edge and fill. Example: fill=gray!30 for light gray background \tikzset{knotstyle/.style={line width=#1}} % Add colors and other line styles here \tikzset{mosai/.style={execute at begin cell=\node\bgroup, execute at end cell=\egroup;, column sep={\tilesize cm,between origins}, row sep={\tilesize cm,between origins}, inner sep=0}} \begin{document} This is a displayed classical mosaic with tiles $T_0$--$T_{10}$ running across the rows. Classical mosaics need not be square. Empty entries leave empty mosaic tiles, i.e., no border square. \[ \begin{mosaic}{1} \tileo \& \tilei \& \tileii \& \tileiii\\ \tileiv \& \tilev \& \tilevi \& \tilevii\\ \tileviii \& \tileix \& \tilex \\ \end{mosaic} \] \vspace{2cm} \[ \begin{mosaic}[font=\Large\sffamily]{1} \& 1 \& 2\& 3 \& 4 \&5 \& 6\\ 1 \& \tilex \& \tilex \& \tileviii \& \tileviii \& \tileviii \& \tileiv\\ 2 \& \tileviii \& \tileviii \& \tileviii \& \tileviii \& \tileiv\\ 3 \& \tilex \& \tilex \& \tilex \& \tileiv\\ 4 \& \tilex \& \tileviii \& \tileiv\\ 5 \& \tileviii \& \tileiv\\ 6 \& \tileiv\\ \end{mosaic} \] \end{document} ```
5
https://tex.stackexchange.com/users/125871
685730
318,123
https://tex.stackexchange.com/questions/685732
0
When creating LaTeX language packages for use in by French mathematicians, German , chinese mathematicians and other mathematicians, it is helpful to know what English words various LaTeX commands were derived from. For example, a Chinese mathematician might have difficulty translating `dfrac` from English into Chinese (or Putonghua). What is `dfrac` when spelled out in full English words?
https://tex.stackexchange.com/users/178952
What English words does the `d` in `dfrac` represent?
false
`dfrac` is an abbreviation of `display fraction`
1
https://tex.stackexchange.com/users/178952
685733
318,124
https://tex.stackexchange.com/questions/685735
4
[I'm sorry if this is a duplicate. I searched and found related issues but haven't been able to solve my problem.] I have a displayed equation and I want to replace it with another in an overlay *without affecting the surrounding text*. As shown below, I've tried six different ways, but none of them works. The surrounding text is fixed, which is what I want, in the "uncover", "uncover&overprint", and "overprint&onslide" solutions below but the equation shifts. In the other solutions, the surrounding text shifts. I know absolute text positioning via the `textpos` package is a solution but it's tedious. I also think that giving a fake height to the less tall equation via `phantom` would work, too. But, I thought that a simple solution would be already there, seeing that `uncover` and `overprint` are able to fix the position of the surrounding text. ``` \documentclass[14pt,aspectratio=1609]{beamer} \begin{document} %---- \begin{frame}{only} Fixed text \only<1>{\[\int f(x)\]}% \only<2>{\[g(x)\]}% fixed text. \end{frame} %--- \begin{frame}{uncover} Fixed text \uncover<1>{\[\int f(x)\]}% \uncover<2>{\[g(x)\]}% fixed text. \end{frame} %--- \begin{frame}{uncover \& overprint} Fixed text \begin{overprint} \uncover<1>{\[\int f(x)\]}% \uncover<2>{\[g(x)\]}% fixed text. \end{overprint} \end{frame} %---- \begin{frame}{Overprint \& onslide} Fixed text \begin{overprint} \onslide<1>{\[\int f(x)\]}% \onslide<2>{\[g(x)\]}% \end{overprint} fixed text. \end{frame} %---- \begin{frame}{Overprint, only, \& onslide} Fixed text \begin{overprint} \only<1>{\[\int f(x)\]}% \onslide<2>{\[g(x)\]}% \end{overprint} fixed text. \end{frame} %---- \begin{frame}{alt} Fixed text \alt<2->% {\[g(x)\]}% {\[\int f(x)\]}% fixed text. \end{frame} \end{document} ```
https://tex.stackexchange.com/users/44271
Beamer: replace displayed equation in an overlay
true
The correct combination is `overprint` and `\onslide`. Note: the `\onslide` commands are used like `\item` commands (i.e. *without* argument). ``` \documentclass[14pt,aspectratio=1609]{beamer} \begin{document} \begin{frame}{Overprint \& onslide} Fixed text \begin{overprint} \onslide<1> \[\int f(x)\] \onslide<2> \[g(x)\] \end{overprint} fixed text. \end{frame} \end{frame} \end{document} ```
3
https://tex.stackexchange.com/users/14500
685737
318,125
https://tex.stackexchange.com/questions/598119
1
As far as I understood how tabulars are build, you declare how many columns you need and how to format them. In some columns (notably `l`, `c` and `r`) LaTeX computes the needed width of those columns. On other columns the author defines the width (by using `p{<width>}` and similar declarations). LaTeX also adds intercolumn space. This results in the total width of the table. I also think, I understand, how LaTeX computes the resulting width of a `X` column, when used in a `tabularx` environment, fitting the column, so that the total width reaches the defined width of the table. My question is: is it allowed, to use a `p{<width>}` declaration within a `\multicolumn`-command? As far as I understand, LaTeX must get confused if the author inserts such a `\multicolumn`, which defines its own width, instead of using the LaTeX computed width of the combined columns in question. For example's sake: lets say, we have two columns like a `l`-column and a `p{2cm}`. LaTeX found out, that the longest entry in the first column is 1cm so, the total usable width of these two columns is `1 cm + 2\tabcolsep + 2cm`. Suppose now that the author orders `\multicolumn{2}{p{5cm}}{...}`, which is obviously much wider than the LaTeX-computed width of `3cm + 2\tabcolsep`. But what should authors use instead, if they want to be able to insert lots of text, being distributed into several lines as in a regular `p`-column?
https://tex.stackexchange.com/users/120477
Is a p-column allowed in a \multicolumn?
false
With `tabularray`, you can choose the width of the multicolumn cell and also the spanning algorithm: ``` \documentclass{article} \usepackage{tabularray} \usepackage{caption} \begin{document} In Table \ref{tab:default} (default span), the multicolumn cell is 5cm wide. The third single cell is enlarged to reach, together with the other two cells, the total width of 5cm. \begin{table}[h] \centering \caption{\label{tab:default}Default span} \begin{tblr}{ hlines, vlines, cell{1}{1}={c=3}{c,5cm} } Multicolumn cell with default span \\ First & Second & Third \\ \end{tblr} \end{table} In Table \ref{tab:even} (even span), the multicolumn cell is 5cm wide. The three single cells are enlarged to have the same width and reach, all together, the total width of 5cm. \begin{table}[h] \centering \caption{\label{tab:even}Even span} \begin{tblr}{ hlines, vlines, hspan=even, cell{1}{1}={c=3}{c,5cm} } Multicolumn cell with even span\\ First & Second & Third \\ \end{tblr} \end{table} In Table \ref{tab:minimal} (minimal span), the multicolumn cell is adapted to the total width of the three single cells. In this case, the 5cm width of the multicolumn cell is ignored. \begin{table}[h] \centering \caption{\label{tab:minimal}Minimal span} \begin{tblr}{ hlines, vlines, cell{1}{1}={c=3}{c,5cm}, hspan=minimal, } Multicolumn cell with minimal span\\ First & Second & Third\\ \end{tblr} \end{table} \end{document} ``` P.S.: the vertical rules are added only to show the column width. They should not be used in professional tables.
1
https://tex.stackexchange.com/users/101651
685739
318,127
https://tex.stackexchange.com/questions/685719
3
I have created a minimal reproducible example. I start with: **test.md** ``` ∀x ∈ ℕ ( P(x) ) ``` and I am running the following command: ``` pandoc test.md -o test.pdf ``` I get the following error: > > Error producing PDF. > ! LaTeX Error: Unicode character ∀ (U+2200) > not set up for use with LaTeX. > > > How can I solve this issue ?
https://tex.stackexchange.com/users/200409
pandoc LaTeX Error: Unicode character ∀ (U+2200)not set up for use with LaTeX
true
You need to write your formula in math mode `$...$` (as already pointed out in the comments) and you have to use a pdf engine that understands unicode. test.md ``` $∀x ∈ ℕ ( P(x) )$ ``` and ``` pandoc --pdf-engine=lualatex test.md -o test.pdf ```
2
https://tex.stackexchange.com/users/29873
685741
318,129
https://tex.stackexchange.com/questions/685382
2
I am having increasing success with XyMTeX - but keep running into the same problem with specifying lone pair locations using either `\lonepairA` or `\lonepairB`. When ever I add optional locations for less than four lone pairs, the compiler hangs and I have to stop it with errors. Without the optional specification I get four lone pairs that overlap with bonds. ``` \documentclass[varwidth]{standalone} \usepackage{xymtexpdf} \usepackage{xcolor} \usepackage{graphicx} \usepackage{unicode-math} \setmainfont{Source Sans Pro} %\setmathfont{Latin Modern Math}% default setting \setmathfont{latinmodern-math.otf} \setmathfont[range={up,it}]{Source Sans Pro} % fix the issue with \smash \def\dotnodimension{\hbox{\smash{\hbox to0pt{\hss.\hss}}}} %% \begin{document} % I only want / need lonepairs at two positions. %This crashes the compiler % \begin{XyMcompd}(800,500)(-150,50){}{} % \Ltrigonal{0==C;1D==\lonepairB[12]{O};2==A;3==B} % \end{XyMcompd} %This works, but produces lonepairs that are unwanted \begin{XyMcompd}(800,500)(-150,50){}{} \Ltrigonal{0==C;1D==\lonepairB{O};2==A;3==B} \end{XyMcompd} \end{document} ```
https://tex.stackexchange.com/users/107583
XyMTeX \lonepair causing errors
false
could you try this code as a possible solution? Insert in your preamble: ``` \makeatletter \let\dotnodimensionorig=\dotnodimension \def\dotnodimension{\hbox{\dotnodimensionorig}} \let\phantomoriginal=\phantom \def\phantom#1{\hbox{\phantomoriginal{#1}}} \makeatother ``` I received it directly from the author of XyMTeX some time ago. This code works fine for me with XeLaTeX: ``` \documentclass[varwidth]{standalone} \usepackage{xymtexpdf} \usepackage{xcolor} \usepackage{graphicx} \usepackage{unicode-math} \setmainfont{Source Sans Pro} %\setmathfont{Latin Modern Math}% default setting \setmathfont{latinmodern-math.otf} \setmathfont[range={up,it}]{Source Sans Pro} % fix the issue with \smash %\def\dotnodimension{\hbox{\smash{\hbox to0pt{\hss.\hss}}}} %% \makeatletter \let\dotnodimensionorig=\dotnodimension \def\dotnodimension{\hbox{\dotnodimensionorig}} \let\phantomoriginal=\phantom \def\phantom#1{\hbox{\phantomoriginal{#1}}} \makeatother \begin{document} % I only want / need lonepairs at two positions. %This crashes the compiler \begin{XyMcompd}(800,500)(-150,50){}{} \Ltrigonal{0==C;1D==\lonepairB[12]{O};2==A;3==B} \end{XyMcompd} %This works, but produces lonepairs that are unwanted \begin{XyMcompd}(800,500)(-150,50){}{} \Ltrigonal{0==C;1D==\lonepairB{O};2==A;3==B} \end{XyMcompd} \end{document} ``` I hope this help to you.
4
https://tex.stackexchange.com/users/297044
685747
318,131
https://tex.stackexchange.com/questions/643480
1
Accorging to [this answer](https://tex.stackexchange.com/a/643415/258453), it's possible to add footnotes to columns in Optex. Although I have a vague idea about what the author has in mind, where/how exactly do I add `\penalty-10013` and `\penalty-10014` and other stuff possibly needed to make footnotes work in columns?
https://tex.stackexchange.com/users/258453
Adding footnotes to columns in Optex
true
I tried to solve the problem with "column footnotes" in two-column mode for OpTeX. The result is [OpTeX trick 0111 and 0112](https://petr.olsak.net/optex/optex-tricks.html#twocol). The design allows to start with full page width typesettig and then to switch to two column mode by `\twocol` and to finish this mode by `\endtwocol`. The `\insert`s work in each column individually, i.e. `\fnote`s and `\topinsert`s. It means that each column behaves like a small page individually. Moreover, user can put a vertical material with full page width at selected pages using `\toppage` macro. The code and more detailed description is available at mentioned web site.
3
https://tex.stackexchange.com/users/51799
685770
318,140
https://tex.stackexchange.com/questions/685742
0
I want to create a documentation .pdf that shows examples of code for my commands and also what the result is. To prevent differences between the description and the result I thought about creating a command to handle that: ``` \documentclass{article} \NewDocumentCommand{\example}{m} { #1 \par \begin{verbatim} #1 \end{verbatim} } \NewDocumentCommand{\myfunction}{O{default}m} { #1: This should be #2 } \begin{document} \example{\myfunction[Nobody]{quite easy}} \end{document} ``` The problems seems to be the verbatim section since it does not only get the contents of #1 but seems to take whatever is put into the brackets of `\example` until `\end{verbatim}` is found (which never comes)... Is that the case? If so, how to prevent it? P.S.: Using `\verb|#1|` also did not work...
https://tex.stackexchange.com/users/281557
How to display variable content as verbatim?
false
With the help of Ulrike I was able to find a workaround in the package `tcolorbox` that does exactly what I needed: ``` \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{listings} \NewDocumentCommand{\myfunction}{O{default}m} { #1: This should be #2 } \begin{document} \begin{tcblisting}{} \myfunction[Nobody]{quite easy} \end{tcblisting} \end{document} ```
0
https://tex.stackexchange.com/users/281557
685771
318,141
https://tex.stackexchange.com/questions/685768
0
Have been using a document since time immemorial with `\usepackage{babel}` and `\usepackage{chess}`, amongst many others which is why it took me hours to find the culprits. Out of the blue this evening I get the error ``` "! Package babel Error: You are loading directly a language style.(babel) This syntax is deprecated and you must use(babel) \usepackage[language]{babel}." ``` Reading the current chess user guide continues to leave me clueless. ``` \documentclass{article} % RN. 15/5/2023 % BRIEF DESCRIPTION: %======================= \usepackage[ngerman,french,spanish,italian,english]{babel} \usepackage{chess} \begin{document} Hi there. wtf! \end{document} ```
https://tex.stackexchange.com/users/11837
usepackage {babel} and {chess} incompatibility
true
`chess.sty` is dated 1992, so naturally has no support for the new version, latex2e, of latex which came out in 1993. You need to give package authors time to update, expecting things to work after only 30 years seems impatient! However you can do ``` \documentclass{article} % RN. 15/5/2023 % BRIEF DESCRIPTION: %======================= \usepackage[ngerman,french,spanish,italian,english]{babel} \makeatletter \let\babel@core@loaded\relax \let\resetat\relax \makeatother \usepackage{chess} \begin{document} Hi there. wtf! \end{document} ```
4
https://tex.stackexchange.com/users/1090
685772
318,142
https://tex.stackexchange.com/questions/685773
2
I have a beamer slide set that contains a list that gets revealed over multiple steps, something like this: ``` \begin{frame}{Result Overview} \begin{itemize} \item<1-> Result 1 \item<2-> Result 2 \item<3-> ... \item<4-> ... \end{itemize} \end{frame} ``` And a set of frames presenting the results like this: ``` \begin{frame}{Result 1} ... \end{frame} \begin{frame}{Result 2} ... \end{frame} ``` Is there a way to have those slides displayed in an alternating fashion like this * Result Overview (page 1) * Result 1 * Result Overview (page 2) * Result 2 * ... Without copy pasting the "Result Overview" frame before each Result frame?
https://tex.stackexchange.com/users/228852
Alternating Slides with Beamer
true
The `\againframe` macro is your new best friend: ``` \documentclass{beamer} \begin{document} \begin{frame}<1>[label=overview] \frametitle{Result Overview} \begin{itemize} \item<1-> Result 1 \item<2-> Result 2 \item<3-> ... \item<4-> ... \end{itemize} \end{frame} \begin{frame}{Result 1} ... \end{frame} \againframe<2>{overview} \begin{frame}{Result 2} ... \end{frame} \end{document} ```
3
https://tex.stackexchange.com/users/36296
685774
318,143
https://tex.stackexchange.com/questions/685719
3
I have created a minimal reproducible example. I start with: **test.md** ``` ∀x ∈ ℕ ( P(x) ) ``` and I am running the following command: ``` pandoc test.md -o test.pdf ``` I get the following error: > > Error producing PDF. > ! LaTeX Error: Unicode character ∀ (U+2200) > not set up for use with LaTeX. > > > How can I solve this issue ?
https://tex.stackexchange.com/users/200409
pandoc LaTeX Error: Unicode character ∀ (U+2200)not set up for use with LaTeX
false
For the comment: > > Even though I can't change source code to enclose everything between $...$ > > > Switching to xelatex or lualatex and using capable font as DeJaVu the example can be rendered "as is" without using the math mode (but of course, as plain text with the main font, so it will look very different): ``` --- format: pdf pdf-engine: xelatex mainfont: DejaVu Serif --- ∀x ∈ ℕ (P(x)) $∀x ∈ ℕ (P(x))$ ```
3
https://tex.stackexchange.com/users/11604
685788
318,147
https://tex.stackexchange.com/questions/247681
76
I am having trouble trying to create a simple to-do list in LaTex. Basically, what I want is a list with empty squares/boxes down the left side instead of bullets, numbers, letters, etc. Here is what I have been playing around with: ``` %%To do list%% \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{enumerate} %\setenumerate[0]{label=(\square*)} %\usepackage{enumitem} \usepackage[checklist]{enumitem} \renewcommand{\theenumi}{\square{enumi}} %\renewcommand{\labelitemi}{$\Box$} %\renewcommand{\labelitemi}{$\star$} \renewcommand{\labelenumi}{\theenumi} \begin{document} My todo list.\\ Immediate plan of action.\\ \let\oldenumerate\enumerate \renewcommand{\enumerate}{ \oldenumerate \setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} } \begin{enumerate} \item List item 1 goes here. \item List item 2 goes here. \begin{enumerate} \item Sublist item 1 goes here. \item Sublist item 2 goes here. \end{enumerate} \item List item 3 goes here \item List item 4 goes here. \end{enumerate} \end{document} ``` I have tried placing the new command after `\begin{enumerate}` in a few different ways, even tried to place it before and after `\item`, but nothing seems to work. I can get the list to enumerate with circles, stars, diamonds, etc. but for some reason, not the box/square. What am I doing wrong? I have been using LaTex for nearly a decade now and know there are more-often-then not numerous ways to achieve the same goal with LaTex, yet, I cannot figure this one out.
https://tex.stackexchange.com/users/79197
How to create checkbox todo list?
false
I wanted something super simple with no package dependencies. This worked for me: ``` \begin{itemize}[label={}] \item \lbrack\_\rbrack unchecked \item \lbrack x\rbrack checked \end{itemize} ```
0
https://tex.stackexchange.com/users/226006
685811
318,162
https://tex.stackexchange.com/questions/684041
2
I use Zotero with Better BibTeX to manage my references. I am trying to reference an article that has been submitted for publication. According to the [APA style guide](https://libguides.jcu.edu.au/apa/what-if#s-lg-box-21191678), the manuscript should be cited with year it was written, and listed in the references with "Manuscript submitted for publication" at the end of the reference. I have tried to follow the instructions in section 4.2.1 of the APA BibLaTeX style documentation, but either I am doing something wrong or it doesn't work. Adding `pubstate = {mansub}` to the bib entry correctly displays "Manuscript submitted for publication" at the end of the reference. However if I also give the year, then "Manuscript submitted for publication" is omitted from the reference. MWE: main.tex ``` \documentclass{article} \usepackage[american]{babel} \usepackage{hyperref} \usepackage{csquotes} \usepackage[backend=biber, style=apa]{biblatex} \addbibresource{references.bib} \DeclareLanguageMapping{american}{english-apa} \begin{document} \section{Introduction} \cite{matherIntraplateVolcanismTriggered2020} \printbibliography \end{document} ``` references.bib ``` @article{matherIntraplateVolcanismTriggered2020, title = {Intraplate Volcanism Triggered by Bursts in Slab Flux}, author = {Mather, Ben R. and Müller, R. Dietmar and Seton, Maria and Ruttor, Saskia and Nebel, Oliver and Mortimer, Nick}, date = {2020-12-16}, journaltitle = {Science Advances}, volume = {6}, number = {51}, pages = {eabd0953}, pubstate = {mansub}, publisher = {{American Association for the Advancement of Science}}, } ```
https://tex.stackexchange.com/users/167952
"Manuscript submitted for publication" with APA BibLaTeX style
false
`pubstate` is available as an alternative to supplying a year in citations and bibliography, manuscript submitted is not appearing as an additional item in the bibliography entry but in place of the year. If a year is available that is used and so `pubstate` is suppressed. Instead the `howpublished` field also supports `mansub` and adds an additional item in the bibliography entry indicating that the manuscript has been submitted for publication. ``` \begin{filecontents}{\jobname.bib} @unpublished{a, title = {Title}, author = {Author, A.}, journaltitle = {Journal}, date = {2023}, pubstate = {mansub}, howpublished = {mansub}, } @unpublished{b, title = {Title}, author = {Buthor, B.}, date = {2023}, howpublished = {mansub}, } @unpublished{c, title = {Title}, author = {Cuthor, C.}, howpublished = {mansub}, pubstate = {mansub}, } @unpublished{d, title = {Title}, author = {Duthor, D.}, pubstate = {mansub}, } @unpublished{e, title = {Title}, author = {Euthor, E.}, howpublished = {mansub}, } \end{filecontents} \documentclass{article} \usepackage[american]{babel} \usepackage{hyperref} \usepackage{csquotes} \usepackage[backend=biber, style=apa]{biblatex} \addbibresource{\jobname.bib} \begin{document} \cite{a,b,c,d,e} \printbibliography \end{document} ``` > > Author, 2023; Buthor, 2023; Cuthor, manuscript submitted for publication; > Duthor, manuscript submitted for publication; Euthor, n.d. > > > References > ---------- > > > Author, A. (2023). Title [Manuscript submitted for publication]. > > > Buthor, B. (2023). Title [Manuscript submitted for publication]. > > > Cuthor, C. (manuscript submitted for publication). Title [Manuscript submitted > > > for publication]. > > > Duthor, D. (manuscript submitted for publication). Title. > > > Euthor, E. (n.d.). Title [Manuscript submitted for publication]. > > > Note while this all carries over to `@article`, you most likely want to be using `@unpublished` (in Zotero this would mean setting Item Type to *Manuscript* rather than *Journal Article*) which doesn't expect a `journaltitle`.
1
https://tex.stackexchange.com/users/106162
685812
318,163
https://tex.stackexchange.com/questions/685813
0
When I try to use the `lettrine` package in Hebrew (via Babel), I can't seem to get the text to properly wrap around the drop cap, which works fine in English. How can I get `lettrine` to work with Hebrew text? MWE below ``` \documentclass{article} \usepackage{fontspec} \usepackage[nil,bidi=default]{babel} \babelprovide[import=en-GB,main]{british} \babelprovide[import=he]{hebrew} \babelfont[hebrew]{rm}[ Renderer=HarfBuzz, Scale = 1.2, Mapping=arabicdigits ]{KeterYG-Medium} \babeltags{hebrew=hebrew} %English, works \usepackage{lettrine} \setcounter{DefaultLines}{2} \renewcommand{\DefaultLraise}{0} \begin{document} \lettrine{W}{hereas} recognition of the inherent dignity and of the equal and inalienable rights of all members of the human family is the foundation of freedom, justice and peace in the world. Whereas disregard and contempt for human rights have resulted in barbarous acts which have outraged the conscience of mankind, and the advent of a world in which human beings shall enjoy freedom of speech and belief and freedom from fear and want has been proclaimed as the highest aspiration of the common people, \vspace{2em} \begin{hebrew} \lettrine{ה}{ואיל}% והכרה בכבוד הטבעי אשר לכל בני משפחת האדם ובזכויותיהם השוות והבלתי נפקעות הוא יסוד החופש, הצדק והשלום בעולם. הואיל והזלזול בזכויות האדם וביזוין הבשילו מעשים פראיים שפגעו קשה במצפונה של האנושות; ובנין עולם, שבו ייהנו כל יצורי אנוש מחירות הדיבור והאמונה ומן החירות מפחד וממחסור, הוכרז כראש שאיפותיו של כל אדם. \end{hebrew} \end{document} ```
https://tex.stackexchange.com/users/225434
Lettrine and Hebrew
true
Use `\selectlanguage{hebrew}` instead of `\begin{hebrew}...\end{hebrew}` (the latter does not change paragraph direction): ``` \documentclass{article} \usepackage{fontspec} \usepackage[nil,bidi=default]{babel} \babelprovide[import=en-GB,main]{british} \babelprovide[import=he]{hebrew} \babelfont[hebrew]{rm}[ Renderer=HarfBuzz, Scale = 1.2, % Mapping=arabicdigits % LuaTeX does not support this ]{KeterYG-Medium} \babeltags{hebrew=hebrew} %English, works \usepackage{lettrine} \setcounter{DefaultLines}{2} \renewcommand{\DefaultLraise}{0} \AddToHook{cmd/lettrine/before}{\ifnum\pardirection=1\shapemode=3\fi} \begin{document} \lettrine{W}{hereas} recognition of the inherent dignity and of the equal and inalienable rights of all members of the human family is the foundation of freedom, justice and peace in the world. Whereas disregard and contempt for human rights have resulted in barbarous acts which have outraged the conscience of mankind, and the advent of a world in which human beings shall enjoy freedom of speech and belief and freedom from fear and want has been proclaimed as the highest aspiration of the common people, \vspace{2em} \selectlanguage{hebrew} \lettrine[loversize=.4]{ה}{ואיל} והכרה בכבוד הטבעי אשר לכל בני משפחת האדם ובזכויותיהם השוות והבלתי נפקעות הוא יסוד החופש, הצדק והשלום בעולם. הואיל והזלזול בזכויות האדם וביזוין הבשילו מעשים פראיים שפגעו קשה במצפונה של האנושות; ובנין עולם, שבו ייהנו כל יצורי אנוש מחירות הדיבור והאמונה ומן החירות מפחד וממחסור, הוכרז כראש שאיפותיו של כל אדם. \end{document} ``` Unrelated to the question, LuaTeX does not support input mapping.
1
https://tex.stackexchange.com/users/264024
685819
318,165
https://tex.stackexchange.com/questions/685817
4
I find a strange conflict between `scrbook` and `dynkin-diagrams`, here is the code ``` \documentclass{scrbook} \usepackage{dynkin-diagrams} \begin{document} \chapter{One} Here is one \dynkin A2 \end{document} ``` An error message "Command \do undefined." is showing. However, if I use ``` \documentclass{scrbook} \usepackage{dynkin-diagrams} \begin{document} Here is one \dynkin A2 \end{document} ``` Then it works. **I wonder what cause it and how to fix this bug?**
https://tex.stackexchange.com/users/54169
conflict between scrbook and dynkin-diagrams
false
The style file `dynkin-diagrams.sty` uses LaTeX's `\renewcommand` when it defines a temporary macro `\do` because it supposes that `\do` was defined already by previous macros. This is almost always a correct assumption but not when the `\chapter` macro from `scrbook.cls` is used. This macro re-defines `\do` and finally does `\let\do=\relax`. Then the following `\renewcommand\do` invoked from `\dynkin` fails. It will be more correct if `dynkin-diagrams.sty` does `\def\do` and no `\renewcommand\do`, but we are not author of this macro file. One obscure workaround should be as follows: ``` \documentclass{scrbook} \usepackage{dynkin-diagrams} {\catcode`\@=11 \expandafter\gdef\expandafter\dynkin@save \expandafter{\dynkin@save \let\do=\LaTeX}} % :) \begin{document} \chapter{One} Here is one \dynkin A2 \end{document} ```
4
https://tex.stackexchange.com/users/51799
685825
318,168
https://tex.stackexchange.com/questions/685817
4
I find a strange conflict between `scrbook` and `dynkin-diagrams`, here is the code ``` \documentclass{scrbook} \usepackage{dynkin-diagrams} \begin{document} \chapter{One} Here is one \dynkin A2 \end{document} ``` An error message "Command \do undefined." is showing. However, if I use ``` \documentclass{scrbook} \usepackage{dynkin-diagrams} \begin{document} Here is one \dynkin A2 \end{document} ``` Then it works. **I wonder what cause it and how to fix this bug?**
https://tex.stackexchange.com/users/54169
conflict between scrbook and dynkin-diagrams
false
UPDATE 2023-05-20 ----------------- The new release of `dynkin-diagrams` released on 2023-05-18 has fixed the issue, by prefixing every usage of `\renewcommand{\do}[1]{...}` by `\providecommand{\do}{}`. ORIGINAL ANSWER --------------- For historical reasons, at the start of a document (that is, after `\begin{document}` is processed), `\do` has the meaning `\noexpand`. There have been discussions about removing this “hidden feature”, but it was thought that preserving this is important, because it has been so for about 30 years and packages *might* use it. And indeed do, as you discovered. If you look in the documentation of `etoolbox`, you'll find several examples of ``` \renewcommand{\do}[1]{...} ``` and `dynkin-diagrams` makes extensive usage of `etoolbox` for list processing. It could dispense with it, by choosing `expl3` instead of mixing a few of it with `etoolbox` and `xstrings`. As a consequence, no class or package should ever issue `\let\do\relax`, because, as far as `\renewcommand` is concerned, something equivalent to `\relax` is seen as undefined. Unfortunately, `scrbook` does it. You can use a workaround. When starting a diagram, the package issues `\dynkin@save` and you can hook in it to provide a definition for `\do`. ``` \documentclass{scrbook} \usepackage{dynkin-diagrams} \AddToHook{cmd/dynkin@save/before}{\providecommand{\do}{}} \begin{document} \chapter{One} Here is one \dynkin A2 \end{document} ```
3
https://tex.stackexchange.com/users/4427
685838
318,173
https://tex.stackexchange.com/questions/678828
0
This is a continuation of [another question](https://tex.stackexchange.com/questions/678697/how-do-i-create-and-format-this-table-in-an-a4-document). Here is the code for the table ``` \documentclass{article} \usepackage{geometry} \geometry{a4paper, % note: 'a4paper', not 'a3paper' showframe, % omit 'showframe' option in real document %total={170mm,300mm}, %left=20mm, top=20mm, margin=20mm } \usepackage{siunitx,booktabs} \newcolumntype{T}[1]{S[table-format=#1]} \begin{document} \begin{center} \sisetup{round-mode=places,round-precision=2} \begin{tabular}{ @{} T{1.2} *{5}{T{2.2}} S[table-format=2.3,round-precision=3] S[table-format=1.3,round-precision=3] @{} @{}} \toprule {Mass/ $m$, \unit{\kilo\gram}} & \multicolumn{6}{c}{Frequency/ $f$, \unit{\hertz} $\pm 0.001$} & {Tension/ $T$, \unit{\newton}} \\ \cmidrule(lr){2-7} & {Trial 1} & {Trial 2} & {Trial 3} & {Trial 4} & {Trial 5} & {Average} \\ \midrule 0.050 & 16.200 & 16.630 & 16.560 & 16.840 & 16.550 & 16.556 & 0.491 \\ 0.100 & 23.650 & 22.800 & 22.810 & 22.970 & 22.700 & 22.986 & 0.981 \\ 0.150 & 28.060 & 27.650 & 27.600 & 27.470 & 27.440 & 26.644 & 1.472 \\ 0.200 & 34.300 & 32.030 & 32.340 & 32.380 & 32.030 & 32.616 & 1.962 \\ 0.250 & 35.500 & 35.480 & 35.420 & 35.520 & 35.350 & 35.454 & 2.453 \\ 0.300 & 38.780 & 38.820 & 38.580 & 39.000 & 38.790 & 38.794 & 2.943 \\ 0.350 & 41.800 & 42.050 & 41.750 & 41.980 & 41.950 & 41.906 & 3.434 \\ 0.400 & 44.400 & 44.760 & 44.670 & 45.020 & 44.900 & 44.750 & 3.924 \\ 0.450 & 47.450 & 47.550 & 47.520 & 47.500 & 47.650 & 47.534 & 4.415 \\ 0.500 & 50.350 & 50.190 & 49.840 & 50.170 & 49.900 & 50.090 & 4.905 \\ \bottomrule \end{tabular} \end{center} \end{document} ``` How can I add additional columns on the right just like the tension column?
https://tex.stackexchange.com/users/268156
How can I add another column to this table
true
* add new column at right side of table is simple and is explained in comments below your question * since you said that new column is similar to the last column in provided MWE, just repeat this column specification and fill data in this column: ``` \documentclass{article} \usepackage{geometry} \geometry{a4paper, showframe, % omit 'showframe' option in real document margin=20mm } \usepackage{siunitx,booktabs} \newcolumntype{T}[1]{S[table-format=#1]} \begin{document} \begin{center} \sisetup{round-mode=places,round-precision=2} % <-- default: rounding to 2 decimal digits \begin{tabular}{ @{} T{1.2} *{5}{T{2.2}} S[table-format=2.3,round-precision=3] *{2}{S[table-format=1.3,round-precision=3]} @{}} \toprule {Mass/ $m$, \unit{\kilo\gram}} & \multicolumn{6}{c}{Frequency/ $f$, \unit{\hertz} $\pm 0.001$} & {Tension} & ??? \\ \cmidrule(lr){2-7} & {Trial 1} & {Trial 2} & {Trial 3} & {Trial 4} & {Trial 5} & {Average} & & \\ \midrule 0.050 & 16.200 & 16.630 & 16.560 & 16.840 & 16.550 & 16.556 & 0.491 & \\ 0.100 & 23.650 & 22.800 & 22.810 & 22.970 & 22.700 & 22.986 & 0.981 & \\ 0.150 & 28.060 & 27.650 & 27.600 & 27.470 & 27.440 & 26.644 & 1.472 & \\ \bottomrule \end{tabular} \end{center} \end{document} ``` )gray line show text block border) * or if you consider my answer on your previous question (so far you not accept any from received on it), than changes in table preamble are: ``` \documentclass{article} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------------------------% \usepackage[a4paper]{geometry} % <--- \usepackage{tabularray} \UseTblrLibrary{booktabs, siunitx} \begin{document} \begin{center} \sisetup{round-mode=places, % <--- added round-precision=2} % <--- added \begin{tblr}{colspec = { Q[c,si={table-format=1.2}] *{5}{X[c,si={table-format=2.2}]} X[c,si={table-format=2.3,round-precision=3}] % <--- changed *{2}{X[c,si={table-format=1.3,round-precision=3}]} % <--- added specification for new column }, row{1,2} = {guard} } \toprule \SetCell[r=2]{c} {Mass,\\ $m$ (kg)} % <--- changed & \SetCell[c=6]{c} Frequency, $f$ (Hz) $\pm 0.001$ & & & & & & \SetCell[r=2]{f} {Tension,\\ $T$ (\unit{\newton})} % <--- changed & \SetCell[r=2]{f} {new\\ column} % <--- added \\ \midrule & Trial 1& Trial 2& Trial 3& Trial 4& Trial 5& Average& & ??? \\ \midrule 0.050 & 16.200 & 16.630 & 16.560 & 16.840 & 16.550 & 16.556 & 0.491 & \\ 0.100 & 23.650 & 22.800 & 22.810 & 22.970 & 22.700 & 22.986 & 0.981 & \\ 0.150 & 28.060 & 27.650 & 27.600 & 27.470 & 27.440 & 26.644 & 1.472 & \\ 0.200 & 34.300 & 32.030 & 32.340 & 32.380 & 32.030 & 32.616 & 1.962 & \\ 0.250 & 35.500 & 35.480 & 35.420 & 35.520 & 35.350 & 35.454 & 2.453 & \\ 0.300 & 38.780 & 38.820 & 38.580 & 39.000 & 38.790 & 38.794 & 2.943 & \\ 0.350 & 41.800 & 42.050 & 41.750 & 41.980 & 41.950 & 41.906 & 3.434 & \\ 0.400 & 44.400 & 44.760 & 44.670 & 45.020 & 44.900 & 44.750 & 3.924 & \\ 0.450 & 47.450 & 47.550 & 47.520 & 47.500 & 47.650 & 47.534 & 4.415 & \\ 0.500 & 50.350 & 50.190 & 49.840 & 50.170 & 49.900 & 50.090 & 4.905 & \\ \bottomrule \end{tblr} \end{center} \end{document} ``` (red lines indicate text block borders)
1
https://tex.stackexchange.com/users/18189
685857
318,180
https://tex.stackexchange.com/questions/685855
2
I want a horizontal rule below the table which spans the full text width. I have tried the following approach, however, the rule only spans the table width and not the text width. ``` \documentclass[12pt,twoside,openright]{book} \usepackage{booktabs} \usepackage[table,xcdraw]{xcolor} \definecolor{mygray}{gray}{0.8} \newcommand*\tabendline{% \arrayrulecolor{mygray}\specialrule{1.15\heavyrulewidth}{0.15 cm}{0 cm} } \begin{document} \begin{table*} \centering \caption{\label{tab:table}Caption} \begin{tabular*}{0.6\linewidth}{@{\extracolsep{\fill}}c c c c@{\extracolsep{\fill}}} \hline A & B & C & D \\ \hline a & b & c & d \\ e & f & g & h \\ \tabendline \end{tabular*} \end{table*} \end{document} ```
https://tex.stackexchange.com/users/72517
How do I get a horizontal rule below the table that spans the full text width?
true
Add line out of tabular. ``` \documentclass[12pt,twoside,openright]{book} \usepackage{booktabs} \usepackage[table,xcdraw]{xcolor} \definecolor{mygray}{gray}{0.8} \newcommand*\tabendline{% \arrayrulecolor{mygray}\specialrule{1.15\heavyrulewidth}{0.15 cm}{0 cm} } \begin{document} \begin{table*} \centering \caption{\label{tab:table}Caption} \begin{tabular*}{0.6\linewidth}{@{\extracolsep{\fill}}c c c c@{\extracolsep{\fill}}} \hline A & B & C & D \\ \hline a & b & c & d \\ e & f & g & h \\ % \tabendline \end{tabular*} \color{mygray}\rule{\textwidth}{1.15\heavyrulewidth} \end{table*} \end{document} ```
2
https://tex.stackexchange.com/users/238422
685858
318,181
https://tex.stackexchange.com/questions/685855
2
I want a horizontal rule below the table which spans the full text width. I have tried the following approach, however, the rule only spans the table width and not the text width. ``` \documentclass[12pt,twoside,openright]{book} \usepackage{booktabs} \usepackage[table,xcdraw]{xcolor} \definecolor{mygray}{gray}{0.8} \newcommand*\tabendline{% \arrayrulecolor{mygray}\specialrule{1.15\heavyrulewidth}{0.15 cm}{0 cm} } \begin{document} \begin{table*} \centering \caption{\label{tab:table}Caption} \begin{tabular*}{0.6\linewidth}{@{\extracolsep{\fill}}c c c c@{\extracolsep{\fill}}} \hline A & B & C & D \\ \hline a & b & c & d \\ e & f & g & h \\ \tabendline \end{tabular*} \end{table*} \end{document} ```
https://tex.stackexchange.com/users/72517
How do I get a horizontal rule below the table that spans the full text width?
false
> > I want a horizontal rule below the table which spans the full text width > > > I suggest you define `\tabendline` on the basis of `\hrule`, a curious little vertical-mode command that draws a horizontal rule whose natural width is whatever the width of the current vertical-mode group is -- often, but not always, `\textwidth`. ``` \documentclass{book} \usepackage{booktabs} % for '\heavyrulewidth' length parameter \usepackage{xcolor} % for '\textcolor' macro \definecolor{mygray}{gray}{0.8} \newcommand\tabendline{% \textcolor{mygray}{\hrule height 1.15\heavyrulewidth}} \begin{document} \begin{table*} \centering \caption{\label{tab:table}Caption\strut} \begin{tabular*}{0.6\linewidth}{@{\extracolsep{\fill}} cccc @{}} \toprule A & B & C & D \\ \midrule a & b & c & d \\ e & f & g & h \\ \bottomrule \end{tabular*} \smallskip \tabendline \end{table*} \end{document} ```
1
https://tex.stackexchange.com/users/5001
685859
318,182
https://tex.stackexchange.com/questions/373253
8
Is there any way of controlling the size of the subcaptions in a subfloat? I've used: ``` \begin{figure} \centering \subfloat[Subcaption 1]{\label{fig:Pic_a} \includegraphics[width = 2.9cm]{Picture1}} \quad \subfloat[Subcaption 2]{\label{fig:Pic_b} \includegraphics[width = 2.9cm]{Picture2}} \end{figure} ``` So I've like to make the Subcaption1 and Subcaption2 smaller in textsize. Thank you!
https://tex.stackexchange.com/users/135322
Textsize in subfloat figure
false
It seems that the example code was not included, so here is one example code snippet. ``` \begin{figure} \centering \captionsetup[subfloat]{labelfont=scriptsize,textfont=scriptsize} \subfloat[Subcaption 1]{\label{fig:Pic_a} \includegraphics[width = 2.9cm]{figures/fig1}} \quad \subfloat[Subcaption 2]{\label{fig:Pic_b} \includegraphics[width = 2.9cm]{figures/fig2}} \end{figure} ```
2
https://tex.stackexchange.com/users/297109
685863
318,185
https://tex.stackexchange.com/questions/685864
2
I'm uploading an overleaf project to arxiv and everything compiles fine, the pdf document looks exactly as expected, but the references aren't clickable. I've followed all the instructions given here, including: * Uploading a bbl file. * Renaming my files to include \_renamed at the end and then uploading .aux files * Removing `\usepackage{hyperref}` but still, the links don't become active. The actual references are all in place, but they are just text. This is true for citations and references to figures. There's nothing in the arxiv output to indicate any error has occurred. The only warning I get is: ``` ) (/texlive/2020/texmf-dist/tex/latex/hyperref/xr-hyper.sty Package xr-hyper Warning: Load package `hyperref' after `xr-hyper'. ) ``` I'm using the xr-hyper package to cross-reference my appendix. Interestingly, when I remove the \usepackage{natbib}, then the main body doesn't compile, as it can't run the \citep function, but the appendix then suddenly has links that are clickable. Log file from arxiv: ``` [verbose]: ~~~~~~~~~~~ Running hpdflatex for the second time ~~~~~~~~ [verbose]: Running: "(export HOME=/tmp PATH=/texlive/2020/bin/arch:/bin; cd /submissions/4895371/ && pdflatex 'preprint_renamed.tex' < /dev/null)" 2>&1 [verbose]: This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./preprint_renamed.tex LaTeX2e <2020-02-02> patch level 5 L3 programming layer <2020-09-06> (/texlive/2020/texmf-dist/tex/latex/hyperref/xr-hyper.sty) (/texlive/2020/texmf-dist/tex/latex/base/article.cls Document Class: article 2019/12/20 v1.4l Standard LaTeX document class (/texlive/2020/texmf-dist/tex/latex/base/size10.clo)) (/texlive/2020/texmf-dist/tex/latex/geometry/geometry.sty (/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty) (/texlive/2020/texmf-dist/tex/generic/iftex/ifvtex.sty (/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty)) (/texlive/2020/texmf-config/tex/latex/latexconfig/geometry.cfg (/texlive/2020/texmf-dist/tex/generic/iftex/ifpdf.sty))) (/texlive/2020/texmf-dist/tex/latex/amsfonts/amsfonts.sty) (/texlive/2020/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/texlive/2020/texmf-dist/tex/latex/amsmath/amstext.sty (/texlive/2020/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/texlive/2020/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/texlive/2020/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/texlive/2020/texmf-dist/tex/latex/base/inputenc.sty) (/texlive/2020/texmf-dist/tex/generic/babel/babel.sty (/texlive/2020/texmf-dist/tex/generic/babel/babel.def (/texlive/2020/texmf-dist/tex/generic/babel/txtbabel.def)) (/texlive/2020/texmf-dist/tex/generic/babel-english/english.ldf)) (/texlive/2020/texmf-dist/tex/latex/mathtools/mathtools.sty (/texlive/2020/texmf-dist/tex/latex/tools/calc.sty) (/texlive/2020/texmf-dist/tex/latex/mathtools/mhsetup.sty)) (/texlive/2020/texmf-dist/tex/latex/base/latexsym.sty) (/texlive/2020/texmf-dist/tex/latex/preprint/authblk.sty) (/texlive/2020/texmf-dist/tex/latex/amscls/amsthm.sty) (/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.sty (/texlive/2020/texmf-dist/tex/latex/graphics/graphics.sty (/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty) (/texlive/2020/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/texlive/2020/texmf-dist/tex/latex/graphics-def/pdftex.def))) (/texlive/2020/texmf-dist/tex/latex/graphics/color.sty (/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg)) (/texlive/2020/texmf-dist/tex/latex/titlesec/titlesec.sty) (/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref.sty (/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (/texlive/2020/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty (/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty)) (/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty) (/texlive/2020/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) (/texlive/2020/texmf-dist/tex/generic/pdfescape/pdfescape.sty) (/texlive/2020/texmf-dist/tex/latex/hycolor/hycolor.sty) (/texlive/2020/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty) (/texlive/2020/texmf-dist/tex/latex/auxhook/auxhook.sty) (/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty) (/texlive/2020/texmf-dist/tex/latex/hyperref/pd1enc.def) (/texlive/2020/texmf-dist/tex/generic/intcalc/intcalc.sty) (/texlive/2020/texmf-dist/tex/generic/etexcmds/etexcmds.sty) (/texlive/2020/texmf-config/tex/latex/latexconfig/hyperref.cfg) (/texlive/2020/texmf-dist/tex/latex/url/url.sty) (/texlive/2020/texmf-dist/tex/generic/bitset/bitset.sty (/texlive/2020/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) (/texlive/2020/texmf-dist/tex/generic/atbegshi/atbegshi.sty)) (/texlive/2020/texmf-dist/tex/latex/hyperref/hpdftex.def (/texlive/2020/texmf-dist/tex/latex/atveryend/atveryend.sty) (/texlive/2020/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (/texlive/2020/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) (/texlive/2020/texmf-dist/tex/latex/amsfonts/amssymb.sty) (/texlive/2020/texmf-dist/tex/latex/natbib/natbib.sty) (/texlive/2020/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty (/texlive/2020/texmf-dist/tex/latex/base/ifthen.sty) (/texlive/2020/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty Document Style algorithmicx 1.2 - a greatly improved `algorithmic' style ) Document Style - pseudocode environments for use with the `algorithmicx' style ) (/texlive/2020/texmf-dist/tex/latex/algorithms/algorithm.sty (/texlive/2020/texmf-dist/tex/latex/float/float.sty)) (/texlive/2020/texmf-dist/tex/latex/tools/tabularx.sty (/texlive/2020/texmf-dist/tex/latex/tools/array.sty)) (/texlive/2020/texmf-dist/tex/latex/multirow/multirow.sty) (/texlive/2020/texmf-dist/tex/latex/caption/subcaption.sty (/texlive/2020/texmf-dist/tex/latex/caption/caption.sty (/texlive/2020/texmf-dist/tex/latex/caption/caption3.sty))) (/texlive/2020/texmf-dist/tex/latex/wrapfig/wrapfig.sty) (/texlive/2020/texmf-dist/tex/latex/sttools/stfloats.sty) (/texlive/2020/texmf-dist/tex/latex/bbm-macros/bbm.sty) (/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty (/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/texlive/2020/texmf-dist/tex/latex/colortbl/colortbl.sty) (/texlive/2020/texmf-dist/tex/latex/graphics/dvipsnam.def)) (/texlive/2020/texmf-dist/tex/latex/booktabs/booktabs.sty) (/texlive/2020/texmf-dist/tex/latex/makecell/makecell.sty) (/texlive/2020/texmf-dist/tex/latex/diagbox/diagbox.sty (/texlive/2020/texmf-dist/tex/latex/pict2e/pict2e.sty (/texlive/2020/texmf-dist/tex/latex/pict2e/pict2e.cfg) (/texlive/2020/texmf-dist/tex/latex/pict2e/p2e-pdftex.def))) (/texlive/2020/texmf-dist/tex/latex/adjustbox/adjustbox.sty (/texlive/2020/texmf-dist/tex/latex/xkeyval/xkeyval.sty (/texlive/2020/texmf-dist/tex/generic/xkeyval/xkeyval.tex (/texlive/2020/texmf-dist/tex/generic/xkeyval/xkvutils.tex))) (/texlive/2020/texmf-dist/tex/latex/adjustbox/adjcalc.sty) (/texlive/2020/texmf-dist/tex/latex/adjustbox/trimclip.sty (/texlive/2020/texmf-dist/tex/latex/collectbox/collectbox.sty) (/texlive/2020/texmf-dist/tex/latex/adjustbox/tc-pdftex.def)) (/texlive/2020/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty) (/texlive/2020/texmf-dist/tex/latex/varwidth/varwidth.sty)) (/texlive/2020/texmf-dist/tex/latex/tools/afterpage.sty) (/texlive/2020/texmf-dist/tex/latex/pdflscape/pdflscape.sty (/texlive/2020/texmf-dist/tex/latex/graphics/lscape.sty)) (/texlive/2020/texmf-dist/tex/latex/footmisc/footmisc.sty LaTeX Warning: Command \@footnotemark has changed. Check if current package is valid. ) (z_appendix.tex) No file z_appendix.tex. (z_appendix.aux) (/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./preprint_renamed.aux) *geometry* detected driver: pdftex (/texlive/2020/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/texlive/2020/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/texlive/2020/texmf-dist/tex/latex/grfext/grfext.sty) (/texlive/2020/texmf-config/tex/latex/latexconfig/epstopdf-sys.cfg)) (/texlive/2020/texmf-dist/tex/latex/hyperref/nameref.sty (/texlive/2020/texmf-dist/tex/latex/refcount/refcount.sty) (/texlive/2020/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty)) (./preprint_renamed.out) (./preprint_renamed.out) (./intro_v1.tex (/texlive/2020/texmf-dist/tex/latex/amsfonts/umsa.fd) (/texlive/2020/texmf-dist/tex/latex/amsfonts/umsb.fd) (/texlive/2020/texmf-dist/tex/latex/base/ulasy.fd) [1{/texlive/2020/texmf-var/f onts/map/pdftex/updmap/pdftex.map}]) [2] [3 <./images/fig3.png (PNG copy)> <./ images/fig4.png (PNG copy)> <./images/fig5.png (PNG copy)>] [4] [5] [6] [7] [8 <./images/sequences.pdf>] [9 <./images/fig4.pdf> <./ images/fig5.pdf>] [10 <./images/fig6.pdf>] [11 <./images/fig4v2.pdf>] Overfull \hbox (11.60017pt too wide) in paragraph at lines 445--459 [][] [12 <./imagesfig6.pdf>] [13 <./images/fig1.pdf>] [14] [15 <./images/fig8.pdf>] Overfull \hbox (3.79457pt too wide) in paragraph at lines 569--581 [][] [16] [17 <./images/fig7.pdf>] [18 <./images/fig_v2.pdf>] (./preprint_renamed.bbl [19] [20] [21]) [22] (./preprint_renamed.aux) ) (see the transcript file for additional information){/texlive/2020/texmf-dist/f onts/enc/dvips/cm-super/cm-super-ts1.enc}</texlive/2020/texmf-dist/fonts/type1/ public/amsfonts/cm/cmbx10.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsf onts/cm/cmbx12.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmb x7.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx8.pfb></tex live/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx9.pfb></texlive/2020/te xmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></texlive/2020/texmf-dist/fo nts/type1/public/amsfonts/cm/cmmi10.pfb></texlive/2020/texmf-dist/fonts/type1/p ublic/amsfonts/cm/cmmi5.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfon ts/cm/cmmi6.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7. pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></texliv e/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb></texlive/2020/texmf -dist/fonts/type1/public/amsfonts/cm/cmmib10.pfb></texlive/2020/texmf-dist/font s/type1/public/amsfonts/cm/cmr10.pfb></texlive/2020/texmf-dist/fonts/type1/publ ic/amsfonts/cm/cmr12.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/ cm/cmr17.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb> </texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></texlive/202 0/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></texlive/2020/texmf-dist/ fonts/type1/public/amsfonts/cm/cmr8.pfb></texlive/2020/texmf-dist/fonts/type1/p ublic/amsfonts/cm/cmr9.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfont s/cm/cmsy10.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy5. pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.pfb></texliv e/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb></texlive/2020/texmf -dist/fonts/type1/public/amsfonts/cm/cmsy8.pfb></texlive/2020/texmf-dist/fonts/ type1/public/amsfonts/cm/cmsy9.pfb></texlive/2020/texmf-dist/fonts/type1/public /amsfonts/cm/cmti10.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/c m/cmti7.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmti9.pfb> </texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></texlive/2 020/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt8.pfb></texlive/2020/texmf-di st/fonts/type1/public/amsfonts/cm/cmtt9.pfb></texlive/2020/texmf-dist/fonts/typ e1/public/amsfonts/symbols/msbm10.pfb></texlive/2020/texmf-dist/fonts/type1/pub lic/amsfonts/symbols/msbm7.pfb></texlive/2020/texmf-dist/fonts/type1/public/cm- super/sfrm1000.pfb> Output written on preprint_renamed.pdf (22 pages, 748871 bytes). Transcript written on preprint_renamed.log. [verbose]: WARNING: Supplemental 'rerun' check detected need for extra pass. [verbose]: ~~~~~~~~~~~ Running hpdflatex for the second time ~~~~~~~~ [verbose]: Running: "(export HOME=/tmp PATH=/texlive/2020/bin/arch:/bin; cd /submissions/4895371/ && pdflatex 'xxxpdfpages.tex' < /dev/null)" 2>&1 [verbose]: This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./xxxpdfpages.tex LaTeX2e <2020-02-02> patch level 5 L3 programming layer <2020-09-06> (/texlive/2020/texmf-dist/tex/latex/base/article.cls Document Class: article 2019/12/20 v1.4l Standard LaTeX document class (/texlive/2020/texmf-dist/tex/latex/base/size10.clo)) (/texlive/2020/texmf-dist/tex/latex/pdfpages/pdfpages.sty (/texlive/2020/texmf-dist/tex/latex/base/ifthen.sty) (/texlive/2020/texmf-dist/tex/latex/tools/calc.sty) (/texlive/2020/texmf-dist/tex/latex/eso-pic/eso-pic.sty (/texlive/2020/texmf-dist/tex/generic/atbegshi/atbegshi.sty (/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty) (/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) (/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty)) (/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty) (/texlive/2020/texmf-dist/tex/latex/xcolor/xcolor.sty (/texlive/2020/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/texlive/2020/texmf-dist/tex/latex/graphics-def/pdftex.def))) (/texlive/2020/texmf-dist/tex/latex/graphics/graphicx.sty (/texlive/2020/texmf-dist/tex/latex/graphics/graphics.sty (/texlive/2020/texmf-dist/tex/latex/graphics/trig.sty) (/texlive/2020/texmf-dist/tex/latex/graphics-cfg/graphics.cfg))) (/texlive/2020/texmf-dist/tex/latex/pdfpages/pppdftex.def)) (/texlive/2020/texmf-dist/tex/latex/hyperref/hyperref.sty (/texlive/2020/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty) (/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty) (/texlive/2020/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) (/texlive/2020/texmf-dist/tex/generic/pdfescape/pdfescape.sty) (/texlive/2020/texmf-dist/tex/latex/hycolor/hycolor.sty) (/texlive/2020/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty) (/texlive/2020/texmf-dist/tex/latex/auxhook/auxhook.sty) (/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty) (/texlive/2020/texmf-dist/tex/latex/hyperref/pd1enc.def) (/texlive/2020/texmf-dist/tex/generic/intcalc/intcalc.sty) (/texlive/2020/texmf-dist/tex/generic/etexcmds/etexcmds.sty) (/texlive/2020/texmf-config/tex/latex/latexconfig/hyperref.cfg) (/texlive/2020/texmf-dist/tex/latex/url/url.sty) (/texlive/2020/texmf-dist/tex/generic/bitset/bitset.sty (/texlive/2020/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty))) (/texlive/2020/texmf-dist/tex/latex/hyperref/hpdftex.def (/texlive/2020/texmf-dist/tex/latex/atveryend/atveryend.sty) (/texlive/2020/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty (/texlive/2020/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty))) (/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./xxxpdfpages.aux) (/texlive/2020/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/texlive/2020/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/texlive/2020/texmf-config/tex/latex/latexconfig/epstopdf-sys.cfg)) (/texlive/2020/texmf-dist/tex/latex/pdflscape/pdflscape.sty (/texlive/2020/texmf-dist/tex/latex/graphics/lscape.sty)) (/texlive/2020/texmf-dist/tex/latex/hyperref/nameref.sty (/texlive/2020/texmf-dist/tex/latex/refcount/refcount.sty) (/texlive/2020/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty)) (./xxxpdfpages.out) (./xxxpdfpages.out) [1 <./preprint_renamed.pdf{/texlive/202 0/texmf-var/fonts/map/pdftex/updmap/pdftex.map}>] [2 <./preprint_renamed.pdf>] [3 <./preprint_renamed.pdf>] [4 <./preprint_renamed.pdf>] [5 <./preprint_rename d.pdf>] [6 <./preprint_renamed.pdf>] [7 <./preprint_renamed.pdf>] [8 <./preprin t_renamed.pdf>] [9 <./preprint_renamed.pdf>] [10 <./preprint_renamed.pdf>] [11 <./preprint_renamed.pdf>] [12 <./preprint_renamed.pdf>] [13 <./preprint_ren amed.pdf>] [14 <./preprint_renamed.pdf>] [15 <./preprint_renamed.pdf>] [16 <./p reprint_renamed.pdf>] [17 <./preprint_renamed.pdf>] [18 <./preprint_renamed.pdf >] [19 <./preprint_renamed.pdf>] [20 <./preprint_renamed.pdf>] [21 <./preprint_ renamed.pdf>] [22 <./preprint_renamed.pdf>] [23 <./z_appendix_renamed.pdf>] [24 <./z_appendix_renamed.pdf>] [25 <./z_appendix_renamed.pdf>] [26 <./z_append ix_renamed.pdf>] [27 <./z_appendix_renamed.pdf>] [28 <./z_appendix_renamed.pdf> ] [29 <./z_appendix_renamed.pdf>] [30 <./z_appendix_renamed.pdf>] [31 <./z_appe ndix_renamed.pdf>] [32 <./z_appendix_renamed.pdf>] [33 <./z_appendix_renamed.pd f>] [34 <./z_appendix_renamed.pdf>] [35 <./z_appendix_renamed.pdf>] [36 <./z_ap pendix_renamed.pdf>] [37 <./z_appendix_renamed.pdf>] [38 <./z_appendix_renamed. pdf>] [39 <./z_appendix_renamed.pdf>] [40 <./z_appendix_renamed.pdf>] [41 <./z_ appendix_renamed.pdf>] [42 <./z_appendix_renamed.pdf>] [43 <./z_appendix_rename d.pdf>] [44 <./z_appendix_renamed.pdf>] (./xxxpdfpages.aux) )</texlive/2020/tex mf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></texlive/2020/texmf-dist/fon ts/type1/public/amsfonts/cm/cmbx12.pfb></texlive/2020/texmf-dist/fonts/type1/pu blic/amsfonts/cm/cmbx7.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfont s/cm/cmbx8.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx9.p fb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmbxti10.pfb></texl ive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></texlive/2020/te xmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></texlive/2020/texmf-dist/fo nts/type1/public/amsfonts/cm/cmmi5.pfb></texlive/2020/texmf-dist/fonts/type1/pu blic/amsfonts/cm/cmmi6.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfont s/cm/cmmi7.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.p fb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb></texlive /2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmmib10.pfb></texlive/2020/texm f-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></texlive/2020/texmf-dist/fonts /type1/public/amsfonts/cm/cmr12.pfb></texlive/2020/texmf-dist/fonts/type1/publi c/amsfonts/cm/cmr17.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/c m/cmr5.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></ texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></texlive/2020/ texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></texlive/2020/texmf-dist/fo nts/type1/public/amsfonts/cm/cmr9.pfb></texlive/2020/texmf-dist/fonts/type1/pub lic/amsfonts/cm/cmsy10.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfont s/cm/cmsy5.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy6.p fb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb></texlive /2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy8.pfb></texlive/2020/texmf- dist/fonts/type1/public/amsfonts/cm/cmsy9.pfb></texlive/2020/texmf-dist/fonts/t ype1/public/amsfonts/cm/cmti10.pfb></texlive/2020/texmf-dist/fonts/type1/public /amsfonts/cm/cmti7.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm /cmti9.pfb></texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb> </texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt8.pfb></texlive/20 20/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt9.pfb></texlive/2020/texmf-dis t/fonts/type1/public/amsfonts/symbols/msam7.pfb></texlive/2020/texmf-dist/fonts /type1/public/amsfonts/symbols/msbm10.pfb></texlive/2020/texmf-dist/fonts/type1 /public/amsfonts/symbols/msbm7.pfb></texlive/2020/texmf-dist/fonts/type1/public /cm-super/sfrm1000.pfb> Output written on xxxpdfpages.pdf (44 pages, 1074799 bytes). Transcript written on xxxpdfpages.log. ``` My latex set-up: ``` \RequirePackage{xr-hyper} \documentclass{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage{amsfonts} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{mathtools} \usepackage{latexsym} \usepackage{authblk} \usepackage{amsthm} % \excludecomment{proof} %\usepackage[notref, notcite]{showkeys} \usepackage{graphicx, color} \usepackage{titlesec} \titleformat{\subsection}[runin] {\normalfont\bfseries}{\thesubsection}{.5em}{} \titleformat{\subsubsection}[runin] {\normalfont\itshape}{\thesubsubsection}{.5em}{} \theoremstyle{plain} \newtheorem{definition}{Definition} % \newtheorem{remark}{Remark} \usepackage{amssymb} \usepackage[round]{natbib} \newcommand{\al}{\alpha} \newcommand{\te}{\theta} \newcommand{\RR}{\mathbb{R}} \newcommand{\cN}{\mathcal{N}} \newcommand{\cP}{\mathcal{P}} \newcommand{\given}{\,|\,} \definecolor{blendedblue}{rgb}{0.2,0.2,0.7} \newcommand{\sbl}[1]{{\color{blendedblue}{#1}}} \newcommand{\gre}[1]{{\color{green}{#1}}} \newcommand{\bl}[1]{\textcolor[rgb]{0.00,0.00,1.00}{#1}} \newcommand{\ve}[1]{\textcolor[rgb]{0.00,1.00,0.00}{#1}} \newcommand{\gris}[1]{\textcolor[RGB]{136,152,206}{#1}} \newcommand{\ora}[1]{\textcolor[rgb]{1.00,0.50,0.00}{#1}} \newcommand{\re}[1]{{\color{red}{#1}}} \usepackage{algpseudocode} \usepackage{algorithm,tabularx} \usepackage{amsmath} \usepackage{amssymb} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\argmin}{arg\,min} \usepackage{multirow} \usepackage{subcaption} \usepackage{wrapfig} \usepackage{stfloats} \newtheorem{problem}{Problem} \usepackage{bbm} \usepackage[dvipsnames,table]{xcolor} \usepackage{float} \usepackage{graphicx} \newtheorem{theorem}{Theorem} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{proposition}{Proposition} \newtheorem{lemma}{Lemma} \usepackage{booktabs} \definecolor{lightgray}{gray}{0.92} \usepackage[font=small,labelfont=bf,width=0.85\textwidth]{caption} \usepackage{multirow, makecell} \usepackage{diagbox} \usepackage{adjustbox} \captionsetup[figure]{labelfont={bf},name={Fig.},labelsep=period} \usepackage{afterpage} \usepackage{pdflscape} \usepackage[multiple]{footmisc} \makeatletter \newcommand{\multiline}[1]{% \begin{tabularx}{\dimexpr\linewidth-\ALG@thistlm}[t]{@{}X@{}} #1 \end{tabularx} } \makeatother % \usepackage{subfig} \usepackage{url} \graphicspath{ {./images/} } \renewcommand*{\Authand}{, } \newcommand\NoDo{\renewcommand\ithmicdo{}} % remove "do" from algs \algnewcommand\algorithmicforeach{\textbf{for each}} \algdef{S}[FOR]{ForEach}[1]{\algorithmicforeach\ #1\ \algorithmicdo} \theoremstyle{definition} %\newcommand{\basedir}{./appendix} \makeatletter \let\@fnsymbol\@arabic \makeatother \setlength{\parindent}{1.5em} \setlength{\parskip}{1em} \renewcommand{\baselinestretch}{1.2} %\usepackage{fancyhdr} %\pagestyle{fancy} %\fancyhf{} \usepackage{hyperref} \makeatletter \newcommand*{\addFileDependency}[1]{% argument=file name and extension \typeout{(#1)}% latexmk will find this if $recorder=0 % however, in that case, it will ignore #1 if it is a .aux or % .pdf file etc and it exists! If it doesn't exist, it will appear % in the list of dependents regardless) % % Write the following if you want it to appear in \listfiles % --- although not really necessary and latexmk doesn't use this % \@addtofilelist{#1} % % latexmk will find this message if #1 doesn't exist (yet) \IfFileExists{#1}{}{\typeout{No file #1.}} }\makeatother \newcommand*{\myexternaldocument}[1]{% \externaldocument{#1}% \addFileDependency{#1.tex}% \addFileDependency{#1.aux}% } %------------End of helper code-------------- % put all the external documents here! \myexternaldocument{z_appendix} ```
https://tex.stackexchange.com/users/281748
Links not clickable when uploading to arxiv
true
This is unfortunate but expected behaviour (see the note at <https://info.arxiv.org/help/submit_tex.html#how-to-include-supplemental-material>) when supplying multiple `.tex` documents to the arXiv compiler to be compiled independently with `pdflatex` (`latex` is handled differently). The arXiv compiler then uses `pdfpages` which does not preserve working hyperlinks in the two documents. All hyperlinks are affected and the problem will present without `xr-hyper`. There are some workarounds given in [Merging multiple pdf files without breaking hyperlinks](https://tex.stackexchange.com/q/497624/106162) but I'm not sure any of these will be usable while still having arXiv generate the individual PDFs. Depending on your needs and aims, you could merge the full tex documents to maintain links, or supply the supplement as a PDF as an [ancillary file](https://info.arxiv.org/help/ancillary_files.html) You can see the issue locally with * `main.tex` ``` \documentclass{article} \pdfoutput=1 \usepackage{hyperref} \begin{document} \section{Foo}\label{foo} \clearpage \section{Bar} \ref{foo} \end{document} ``` * `supp.tex` ``` \documentclass{article} \pdfoutput=1 \usepackage{hyperref} \begin{document} zzz \end{document} ``` * `pdfpages.tex` ``` \documentclass{article} \pdfoutput=1 \usepackage{pdfpages} \usepackage{hyperref} \begin{document} \includepdf[pages=-]{main} \includepdf[pages=-]{supp} \end{document} ```
2
https://tex.stackexchange.com/users/106162
685870
318,188
https://tex.stackexchange.com/questions/685865
4
I want to perform a loop (type within) on all the paths of a text. I tried to build a picture with `btex ... etex` but it seems that this kind of picture has only one element (`length` gives 1). I want something like the glyph example of mpman.pdf, but for a whole word. Is there a way? ``` picture mots[]; mots[1]:= btex coucou etex shifted (2cm,0); beginfig(0); show length(mots[1]); for i within mots[1]: show i; endfor; draw mots[1]; endfig; end. ```
https://tex.stackexchange.com/users/217400
Browse all path of an text picture with MetaPost
false
Yes, but you need to go down a level. Like this: ``` prologues := 3; outputtemplate := "%j%c.eps"; picture word; word = btex Cuckoo etex; beginfig(1); x = 0; for p within word: if textual p: string w; w = textpart p; for i = 1 upto length w: string c; picture g; c = substring (i-1, i) of w; g = glyph c of fontpart p scaled 1/4; for thing within g: drawarrow pathpart thing shifted (x,0); endfor x := x + 160; endfor fi endfor endfig; end. ``` Compiling this with `mpost` should produce an EPS file that looks like this: There may be more efficient ways of doing this, but I have not discovered any. Notice that `textpart` returns a string of one *or more* characters, and that there may be more than one `pathpart` in the `<picture>` returned by `glyph` (for example in the "o" characters).
4
https://tex.stackexchange.com/users/15036
685871
318,189
https://tex.stackexchange.com/questions/685878
1
I have the following code in my preamble (with added `document` environment to obey Tex.SE's format): ``` \documentclass[a4paper,12pt]{article} \usepackage[margin=1in]{geometry} \setlength\parindent{0.5in} \usepackage{setspace} \doublespacing \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} % clear all header and footer fields \fancyhead[R]{\thepage} % page number in the upper right-hand corner \renewcommand{\headrulewidth}{0pt} % remove the header rule \begin{document} Place holder. \end{document} ``` Now my page number is flush with my right margin, which is great, because I need 1.0" of distance from the right side of the page to the page number. However, I also need 0.5" of distance from the top of the page to the page number, which is not the case here. How do I define the distance between the top of the page and the page number in my header? **P.S.** My end goal here is to have an MLA formatted document, thus the question.
https://tex.stackexchange.com/users/262394
Define height of page number in header
true
You can use the already used `geometry` package to setup the top margin, either using several options to set the margin above the page head, the height of the page head and the distance below it or just set the top margin and include the page head to the text area instead of the margin: ``` \documentclass[a4paper,12pt]{article} \usepackage[margin=1in,top=0.5in,includehead]{geometry} \setlength\parindent{0.5in}% I recommend to use package parskip. \usepackage[doublespacing]{setspace} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} % clear all header and footer fields \fancyhead[R]{\thepage} % page number in the upper right-hand corner \renewcommand{\headrulewidth}{0pt} % remove the header rule \begin{document} Test \end{document} ```
2
https://tex.stackexchange.com/users/277964
685882
318,193
https://tex.stackexchange.com/questions/685865
4
I want to perform a loop (type within) on all the paths of a text. I tried to build a picture with `btex ... etex` but it seems that this kind of picture has only one element (`length` gives 1). I want something like the glyph example of mpman.pdf, but for a whole word. Is there a way? ``` picture mots[]; mots[1]:= btex coucou etex shifted (2cm,0); beginfig(0); show length(mots[1]); for i within mots[1]: show i; endfor; draw mots[1]; endfig; end. ```
https://tex.stackexchange.com/users/217400
Browse all path of an text picture with MetaPost
false
First a somewhat different version of the other answer: ``` prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); save g, x, w ; picture g; x := 0 ; string w; w := "Cuckoo" ; for i = 1 upto length w: g := glyph (substring (i-1, i) of w) of "cmr10" scaled 1/10 ; for thing within g: drawarrow pathpart thing shifted (x,0) withpen pencircle scaled 1pt ; endfor x := x + xpart urcorner g + 2pt ; endfor endfig; end. ``` (I don't know what that little thingy on the left is, it almost looks like a small piece of the arrow to the right, but I hope not.) A bit more fun (well, MetaFun), compiled with `context`: ``` \startMPpage[offset=1ts] picture word ; word = image( draw outlinetext.d ("Cuckoo")(scaled 5) ) ; for i within word : drawarrow pathpart i randomizedcontrols 1 withcolor (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1)); endfor ; \stopMPpage ``` The output if the text is changed to "Too baffled". Note the kerning between the T and the o, and the ffl ligature.
3
https://tex.stackexchange.com/users/52406
685889
318,198
https://tex.stackexchange.com/questions/685915
3
I want to typeset the hyphens in the margin using plain TeX (I'm using the XeTeX engine, if that's important to you). For example: ``` Lorem ipsum dolor sit amet, consecte- tuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridi- culus mus. Donec quam felis, ultrici- es nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringil- la vel, aliquet nec, vulputate eget, arcu. ``` There is a similar question on this website [Put hyphen on the margin, not in the text](https://tex.stackexchange.com/questions/250395/put-hyphen-on-the-margin-not-in-the-text), but it only covers LaTeX and ConTeXt. I think the way to go is to redefine `\hypenchar` so that it produces `\discretionary{\rlap-}{}{}`.
https://tex.stackexchange.com/users/nan
How do I put the hyphens in the margin in plain TeX?
false
From the [XeTeX manual §7](https://texdoc.org/serve/xetex/0#section.7): > > ### `\XeTeXprotrudechars ⟨integer⟩` > > > Equivalent to `\pdfprotrudechars` in > pdfTeX for controlling character protrusion or “margin kerning”. When > set to zero (default), character protrusion is turned off. When set to > one, it is activated but will not affect line-breaking. When set to > two, line-breaking decisions will change as a result of the character > protrusion. > > > > > > > #### Example: > > > > > > > > ``` > > \XeTeXprotrudechars=2 > > \font\rm="[texgyrepagella-regular.otf]"\relax > > \rm > > \rpcode\font\XeTeXcharglyph\hyphenchar\font=250 > > \hsize=20mm > > a a a a a a a a a a abbabbabb aabbabbabb abbabb > > > > ``` > > > > > > > > > See the pdfTeX documentation for further details. > > > ### `\rpcode ⟨font⟩ ⟨char slot⟩ (integer, )` > > > Sets the right-side character > protrusion value of the `⟨char slot⟩` in the specified `⟨font⟩` to *n*/1000 em. *n* is clipped to ±1000. > > > ### `\lpcode ⟨font⟩ ⟨char slot⟩ (integer, )` > > > Sets the left-side character protrusion value of the `⟨char slot⟩` > in the specified `⟨font⟩` to *n*/1000 em. *n* is clipped to ±1000. > > >
1
https://tex.stackexchange.com/users/270600
685919
318,212
https://tex.stackexchange.com/questions/685915
3
I want to typeset the hyphens in the margin using plain TeX (I'm using the XeTeX engine, if that's important to you). For example: ``` Lorem ipsum dolor sit amet, consecte- tuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridi- culus mus. Donec quam felis, ultrici- es nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringil- la vel, aliquet nec, vulputate eget, arcu. ``` There is a similar question on this website [Put hyphen on the margin, not in the text](https://tex.stackexchange.com/questions/250395/put-hyphen-on-the-margin-not-in-the-text), but it only covers LaTeX and ConTeXt. I think the way to go is to redefine `\hypenchar` so that it produces `\discretionary{\rlap-}{}{}`.
https://tex.stackexchange.com/users/nan
How do I put the hyphens in the margin in plain TeX?
true
as in latex or context, you can enable the built in protrusion ``` \XeTeXprotrudechars=2 \font\rm=[lmroman10-regular.otf] \rm \rpcode\font\XeTeXcharglyph\hyphenchar\font=350 \hsize=6.5cm \parindent=0pt Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur rididculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. \bye ```
3
https://tex.stackexchange.com/users/1090
685921
318,213
https://tex.stackexchange.com/questions/685923
3
I'm writing math notes, and I would like to use the symbol for the letter T that appears in this picture (seen in a TeX.StackExchange post): [click](https://i.stack.imgur.com/980yM.jpg) The symbol I want is in the line "**Calligraphic**: UPRIGHT: euler (Euler script)". How can I load it? Note that I'm not interested in changing all symbols in my document. I just want to use that T perhaps once in the entire document.
https://tex.stackexchange.com/users/297148
I want to use a specific symbol
false
The font you're referring to is Euler Script and is provided by the `euscript` package. In it we find ``` \DeclareMathAlphabet\EuScript{U}{eus}{m}{n} ``` For a single letter it would be a waste of resources to define a new math alphabet, but we have all the needed data. ``` \documentclass{article} \usepackage{amsmath} \DeclareRobustCommand{\specialT}{\mathord{\text{\usefont{U}{eus}{m}{n}T}}} \begin{document} $\specialT$ \end{document} ```
5
https://tex.stackexchange.com/users/4427
685925
318,214
https://tex.stackexchange.com/questions/685922
0
I switched my Texteditor from TexMaker to Spacemacs, but am not anymore able to compile my Sanskrit Translations with mixed Language into a pdf with LuaLatex. In TexMaker it was possible. In Spacemacs I do not find the clue. Here is a short version of my document: ``` \documentclass{article} \usepackage{fontspec} \usepackage[ngerman]{babel} \usepackage{polyglossia} \setmainlanguage{ngerman} \setotherlanguage{sanskrit} \newfontfamily\devanagarifont{Noto Serif Devanagari} \begin{document} \begin{sanskrit} परमहंस \end{sanskrit} paramahaṃsa \end{document} ``` In the manual of Spacemacs `https://develop.spacemacs.org/layers/+lang/latex/README.html` I see that as a TeX-Engine you can use xetex and luatex. I tried both in adding to the end of the .tex-document: ``` %%% Local Variables: %%% TeX-engine: xetex ///or luatex %%% End: ``` Did not work. I also tried this: ``` (setq-default dotspacemacs-configuration-layers '((latex :variables latex-build-engine 'xetex /// or 'luatex))) ``` Any clue how I can create with spacemacs that file?
https://tex.stackexchange.com/users/137565
Devanagari and Latin fonts in the same file with Lualatex in Spacemacs
false
I got it: In the end of the file: ``` %%% Local Variables: %%% coding: utf-8 %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End: ```
0
https://tex.stackexchange.com/users/137565
685926
318,215
https://tex.stackexchange.com/questions/507728
3
Is there a possibility to place text on a svg vector image without using Inkscape? For me it is much more convenient to change the text quickly using `\overpic` and `\put` than opening Inkscape and generating the pdf\_tex file every time. Or is that just the only way to do it? Thanks!
https://tex.stackexchange.com/users/191224
Adding text on a SVG image with overpic or similar
false
There is a way to use overpic as well - add the SVG figure, and after the SVG include but before the caption part, add another overpic figure with a transparent line. Then you can add text to this overpic figure as you wish... E.g., ``` \begin{figure}[h] \includesvg[inkscapelatex=false,width=\linewidth]{figures/xxx.svg} \begin{overpic}[width=\linewidth,height=0.001in]{figures/blank.png} \put(20, 20) {Blah blah!} \end{overpic} \caption{\label{fig}Blah blah blah!} \end{figure} ```
0
https://tex.stackexchange.com/users/297151
685928
318,216
https://tex.stackexchange.com/questions/685918
0
I am currently trying to simplify the process of creating commented ordered and unordered lists in LaTeX. I have a method that achieves the desired visual result, but the syntax seems overly complex. I'm wondering if there's a cleaner or more straightforward approach. Here's my current implementation: ``` \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage{tabularx} \usepackage{booktabs} \begin{document} \section{Example A} \hspace{\parindent} \noindent\begin{tabularx}{\textwidth}{@{}l@{\hspace{0.5cm}}lX} \textbullet & First Statement & \# First Comment \\ \addlinespace \textbullet & Second Statement & \# Second Comment \\ \addlinespace \textbullet & Third Statement & \# Third Comment \\ \addlinespace \end{tabularx} \hspace{-\parindent} This is some commentary on the list. \section{Example B} \hspace{\parindent} \noindent\begin{tabularx}{\textwidth}{@{}l@{\hspace{0.5cm}}lX} 1. & First Statement & \# First Comment \\ \addlinespace 2. & Second Statement & \# Second Comment \\ \addlinespace 3. & Third Statement & \# Third Comment \\ \addlinespace \end{tabularx} \hspace{-\parindent} This is some commentary on the list. \end{document} ``` I attempted to simplify this by creating new commands for the beginning and end of the list, but encountered issues with closing the list: ``` \newcommand{\beginCommentList}{ \hspace{\parindent} \noindent\begin{tabularx}{\textwidth}{@{}l@{\hspace{0.5cm}}lX}} \newcommand{\closeCommentList}{ \end{tabularx} \hspace{-\parindent}} ``` Ideally, I'd like to find a solution that allows for a simpler syntax, such as: ``` \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage{tabularx} \usepackage{booktabs} % Define CommentItemize % Define CommentEnumerate \begin{document} \section{Example A} \begin{CommentItemize} First Statement & First Comment Second Statement & Second Comment Third Statement & Third Comment \end{CommentItemize} This is some commentary on the list. \section{Example B} \begin{CommentEnumerate} First Statement & First Comment Second Statement & Second Comment Third Statement & Third Comment \end{CommentEnumerate} This is some commentary on the list. \end{document} ``` Any suggestions or feedback on how to achieve this would be greatly appreciated. Thank you in advance for your help!
https://tex.stackexchange.com/users/203389
Simplifying the Creation of Commented Ordered and Unordered Lists in LaTeX
false
Coerce a list in a table column could be a bad idea. You can use the normal itemize or enumerate environments but instead of the standard `\item Statement` use a macro as `\foo{Statement}{Comment}`. The advantage is that in the same list you can still use just `\item Statement` when the comment is not needed at all in some row, or type some like `\foo[30]{Statement}{Comment}`if you want limit some item to only the 30% of the width to include a very long comment without affect to the whole list. ``` \documentclass{article} \usepackage{lipsum,xcolor} \newcommand\foo[3][5]{\item\parbox[t]{.#1\linewidth}{#2}\hfill\parbox[t]{\dimexpr.95\linewidth-0.#1\linewidth}{\color{olive}\sffamily {\bfseries\#} #3}} \begin{document} \begin{enumerate} \foo {First Statement} {First Comment} \foo {Second Statement} {Second Comment} \foo {Third Statement} {Third Comment} \foo {\lipsum[1][1-2]} {\lipsum[2][1]} \foo {\lipsum[6][1-2]} {\lipsum[7][1]} \foo[20] {\lipsum[1][1]} {\lipsum[2][1-3]} \foo[70] {\lipsum[1][1-6]} {\lipsum[2][1]} \end{enumerate} \end{document} ```
1
https://tex.stackexchange.com/users/11604
685932
318,218
https://tex.stackexchange.com/questions/685937
1
``` Let $f : \mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}$, $f(z) = z + \frac{1}{z}$. Given that $f(z) = \begin{cases} \sqrt{2 + \sqrt{n}} &\text{if } z \in \mathbb{R} \setminus \lbrace 0\rbrace \\ \sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}} &\text{if } z \in \mathbb{C} \setminus \mathbb{R} \end{cases} for some positive integer $n$ and that $f(z^8) = 2023$ for all $z \in \mathbb{C} \setminus \lbrace 0\rbrace$, find $n$. ``` Here is my latex code for a piecewise function, but the output is just one line, not two lines. How can I make it look like a normal piecewise function? Thank you!
https://tex.stackexchange.com/users/297165
Piecewise Function Formatting
true
As mentioned in comment, your equation code is not terminated by `$`. Adding it and extend your code fragment to complete small document (MWE: Minimal Working Example) I got: ``` \documentclass{article} \usepackage{amsmath, amssymb} \begin{document} Let $f : \mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}$, $f(z) = z + \frac{1}{z}$. Given that $ f(z) = \begin{cases} \sqrt{2 + \sqrt{n}} & \text{if } z \in \mathbb{R} \setminus \lbrace 0 \rbrace \\ \sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}} & \text{if } z \in \mathbb{C} \setminus \mathbb{R} \end{cases} $ for some positive integer $n$ and that $f(z^8) = 2023$ for all $z \in \mathbb{C} \setminus \lbrace 0\rbrace$, find $n$. \end{document} ``` However, I would write your conditional equation as ``` \documentclass{article} \usepackage{mathtools, amssymb} \begin{document} Let $f : \mathbb{C} \setminus \{0\} \rightarrow \mathbb{C}$, $f(z) = z + \frac{1}{z}$. Given that \[ f(z) = \begin{dcases} \sqrt{2 + \sqrt{n}} & \text{if } z \in \mathbb{R} \setminus \lbrace 0 \rbrace \\ \sqrt{1 + \frac{\sqrt{n}}{2}} + i \sqrt{-1 + \frac{\sqrt{n}}{2}} & \text{if } z \in \mathbb{C} \setminus \mathbb{R} \end{dcases} \] for some positive integer $n$ and that $f(z^8) = 2023$ for all $z \in \mathbb{C} \setminus \lbrace 0\rbrace$, find $n$. \end{document} ```
2
https://tex.stackexchange.com/users/18189
685939
318,223
https://tex.stackexchange.com/questions/685917
3
I want to redefine the **aufgabe** environment and combine it with the declared **tcolorbox**. In the end **Aufgabe 1 *subtitle*** should have the same textcolor/backgroundcolor like **Exercise 0.1**. I also want to use the same command `\begin{aufgabe}...\end{aufgabe}` with the redefined environment. ``` \documentclass{article} \usepackage[skins,hooks,xparse,breakable]{tcolorbox} \usepackage{xcolor} \usepackage{chngcntr} \usepackage{blindtext} \usepackage{tikz} \newcounter{examplecounter} \counterwithin{examplecounter}{section} \usetikzlibrary{calc} \definecolor{headercolourgreen}{rgb}{0,0.7019,0.7019} \usepackage[ typ=ab, fach=, lerngruppe=, farbig % nummer=2A, % datumAnzeigen, % namensfeldAnzeigen, ]{schule} \DeclareTColorBox{new}{O{}}{ enhanced, breakable, arc=0pt, boxrule=0pt, colback=white, before skip={2em}, % increase spacing before the env overlay unbroken and first={ % draw box on the left \node[fill=headercolourgreen!5, font=\color{headercolourgreen}\sffamily\bfseries\large, anchor=south west, xshift=2mm ] (titlebox) at (frame.north west) {Exercise \refstepcounter{examplecounter}\theexamplecounter}; \draw[draw=headercolourgreen, line width=2pt] (titlebox.north west-|frame.north west)--+(0,-1.5); }, % } \author{} \title{} \date{\today} \begin{document} \begin{aufgabe}[subtitle=subtitle] \blindtext \end{aufgabe} \null \begin{aufgabe}[subtitle=subtitle] \blindtext \end{aufgabe} \null \begin{new} \blindtext \end{new} \null \begin{new} \blindtext \end{new} \end{document} ```
https://tex.stackexchange.com/users/37163
How to modify an existing environment with tcolorbox and keeping the name?
false
If I understood you comment, here is one way to acieve the desired results: First, setup `pgfkeys` to extract the value of the `subtitle=` option: ``` \pgfkeys{MyAufgabe/.cd, subtitle/.store in=\MyAufgabeSubtitle, } ``` This will store the value of the `subtitle=` in `\MyAufgabeSubtitle`. Next redefine the `aufgabe` enviroment to extract the subtitle and pass `\MyAufgabeSubtitle` to `tcolobbox`. I defined this as `aufgabeAux` enviroment so it is simpler to see the difference between this and the `new` enviroment: ``` \renewenvironment{aufgabe}[1][]{% \pgfkeys{MyAufgabe/.cd, subtitle={}, #1}% \begin{aufgabeAux}[\MyAufgabeSubtitle]% }{% \end{aufgabeAux}% }% ``` ### References: * [Simple example of pgfkeys](https://tex.stackexchange.com/questions/114012/simple-example-of-pgfkeys) ### Result: ### Code: ``` \documentclass{article} \usepackage[skins,hooks,xparse,breakable]{tcolorbox} \usepackage{xcolor} \usepackage{chngcntr} \usepackage{blindtext} \usepackage{tikz} \newcounter{examplecounter} \counterwithin{examplecounter}{section} \usetikzlibrary{calc} \definecolor{headercolourgreen}{rgb}{0,0.7019,0.7019} \usepackage[ typ=ab, fach=, lerngruppe=, farbig % nummer=2A, % datumAnzeigen, % namensfeldAnzeigen, ]{schule} \tcbset{MyStyle/.style={ enhanced, breakable, arc=0pt, boxrule=0pt, colback=white, before skip={2em}, % increase spacing before the env }} \DeclareTColorBox{new}{O{}}{ MyStyle, overlay unbroken and first={ % draw box on the left \node[fill=headercolourgreen!5, font=\color{headercolourgreen}\sffamily\bfseries\large, anchor=south west, xshift=2mm ] (titlebox) at (frame.north west) {Exercise \refstepcounter{examplecounter}\theexamplecounter}; \draw[draw=headercolourgreen, line width=2pt] (titlebox.north west-|frame.north west)--+(0,-1.5); }, } \DeclareTColorBox{aufgabeAux}{O{}}{ MyStyle, overlay unbroken and first={ % draw box on the left \node[fill=headercolourgreen!5, font=\color{headercolourgreen}\sffamily\bfseries\large, anchor=south west, xshift=2mm ] (titlebox) at (frame.north west) {Aufgabe \refstepcounter{aufgabe}\theaufgabe\ #1}; \draw[draw=headercolourgreen, line width=2pt] (titlebox.north west-|frame.north west)--+(0,-1.5); }, } %% Save the original version in case it is still needed \let\oldaufgabe\aufgabe \let\endoldaufgabe\endaufgabe \pgfkeys{MyAufgabe/.cd, subtitle/.store in=\MyAufgabeSubtitle, } \renewenvironment{aufgabe}[1][]{% \pgfkeys{MyAufgabe/.cd, subtitle={}, #1}% \begin{aufgabeAux}[\MyAufgabeSubtitle]% }{% \end{aufgabeAux}% }% \author{} \title{} \date{\today} \begin{document} \begin{oldaufgabe}[subtitle=Some Subtitle] This is an example of using the original \verb|aufgabe| environment. This should appear as the original did. \end{oldaufgabe} \bigskip\hrule\bigskip \begin{aufgabe}[subtitle=This is a subtitle] This is an example of using the new \verb|aufgabe| environment with a subtitle. This should have the title appear as the \verb|new| environment. \end{aufgabe} \begin{aufgabe} Another example of using the new \verb|aufgabe| environment, but \textbf{without a subtitle}. \end{aufgabe} \begin{new}[subtitle This is a subtitle] This the sample format that is the desired format for the new \verb|aufgabe| environment . \end{new} \end{document} ```
3
https://tex.stackexchange.com/users/4301
685940
318,224
https://tex.stackexchange.com/questions/685865
4
I want to perform a loop (type within) on all the paths of a text. I tried to build a picture with `btex ... etex` but it seems that this kind of picture has only one element (`length` gives 1). I want something like the glyph example of mpman.pdf, but for a whole word. Is there a way? ``` picture mots[]; mots[1]:= btex coucou etex shifted (2cm,0); beginfig(0); show length(mots[1]); for i within mots[1]: show i; endfor; draw mots[1]; endfig; end. ```
https://tex.stackexchange.com/users/217400
Browse all path of an text picture with MetaPost
true
I’ve remembered of the Syracuse animation: <https://melusine.eu.org/syracuse/metapost/animations/mehats/?swf=anim.swf#simple_source> Here is the code: ``` verbatimtex%&latex \documentclass{article} \usepackage{fourier} \begin{document} etex; % text material and glyphs contours picture tex_pct, glp_pct; numeric glp_num, pth_num[]; path glp_pth[][]; % tex_pct btex .. etex material % glp_num number of glyphs within tex_pct % pth_num[i] number of paths defining the rank i (0 .. glp_num-1) glyph % glp_pth[i][j] rank j (0 .. pth_num[i]-1) path of the rank i glyph % glp_pct glyphs picture tex_pct:=btex Too baffled etex scaled 3; glp_pct:=nullpicture; string fnt_str, txt_str, sub_str; numeric txt_wd; glp_num:=0; for tkn within tex_pct: if textual tkn: fnt_str:=fontpart tkn; txt_str:=textpart tkn; txt_wd:=0; for glp_idx=0 upto (length txt_str-1): sub_str:=substring (glp_idx, glp_idx+1) of txt_str; pth_num[glp_num]:=0; for sub_tkn within glyph ASCII sub_str of fnt_str scaled (fontsize fnt_str/1000) xscaled xxpart tkn yscaled yypart tkn shifted (txt_wd+xpart tkn, ypart tkn): glp_pth[glp_num][pth_num[glp_num]]:=pathpart sub_tkn; addto glp_pct doublepath glp_pth[glp_num][pth_num[glp_num]]; pth_num[glp_num]:=pth_num[glp_num]+1; endfor glp_num:=glp_num+1; txt_wd:=txt_wd+ (xxpart tkn)*xpart urcorner (sub_str infont fnt_str); endfor fi endfor beginfig(0); for i:= 0 upto glp_num-1: for j:= 0 upto pth_num[i]-1: draw glp_pth[i][j]; endfor endfor endfig; end ``` Unfortunately, I do not understand everything. * why the ligatures are ok here? (the `ASCII` parameter?) * if i am right, the kernings come with the bounding box of the glyph? * i do not understand why there is a factor 1/1000 for the `fontsize`.
0
https://tex.stackexchange.com/users/217400
685946
318,226
https://tex.stackexchange.com/questions/685929
2
The combination of class dinbrief and package pdfpages is not compiling for me. Here's the MWE (well, minimum non-working example in this case): ``` \documentclass[]{dinbrief} \usepackage[demo]{pdfpages} \begin{document} Text here \includepdf[pages=1]{somePdfFile} \end{document} ``` And this is the resulting .log after running pdflatex on the .tex file: ``` This is pdfTeX, Version 3.141592653-2.6-1.40.25 (MiKTeX 23.5) (preloaded format=pdflatex 2023.5.17) 17 MAY 2023 01:40 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **./anschreiben_mimimal.tex (anschreiben_mimimal.tex LaTeX2e <2022-11-01> patch level 1 L3 programming layer <2023-05-11> (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/dinbrief\dinbrief.cls Document Class/Style 'dinbrief' - Version 1.73 University of Karlsruhe - 2000/03/02 12:49:21 *** dinbrief: Running in LaTeX 2e mode! *** dinbrief: NFSS 2! Document Class: dinbrief 2000/03/02 LaTeX2e class \ka@db@tmpdima=\dimen140 \ka@db@tmpdimb=\dimen141 \@mainlbl=\write3 \GZA=\dimen142 \ltf@headheight=\dimen143 \lts@headheight=\dimen144 \ltf@headsep=\dimen145 \lts@headsep=\dimen146 \ltf@textheight=\dimen147 \lts@textheight=\dimen148 \ka@db@txtlmarg=\dimen149 \addrhpos=\dimen150 \addrvpos=\dimen151 \addrwd=\dimen152 \addrht=\dimen153 \addroffset=\dimen154 \ka@db@addrhoffs=\dimen155 \backaddrht=\dimen156 \reflinevpos=\dimen157 \ufldmarkvpos=\dimen158 \lfldmarkvpos=\dimen159 \perfmarkvpos=\dimen160 \ka@db@foldmarkhoffs=\dimen161 \ka@db@perfmarkhoffs=\dimen162 \ka@db@foldmarklen=\dimen163 \ka@db@perfmarklen=\dimen164 \bottomtextvpos=\dimen165 \ka@db@headup=\dimen166 \ka@db@vfuzz=\dimen167 \ka@db@stdskip=\dimen168 \ka@db@fieldwd=\dimen169 \ka@db@fldskip=\dimen170 \ka@db@shfldwd=\dimen171 \ka@db@indadr=\dimen172 \dlabelheight=\dimen173 \dlabeltopmargin=\dimen174 \dlabelwidth=\dimen175 \clabelnumber=\count185 \cspare=\count186 \c@lt@state=\count187 \c@letter=\count188 \labelcount=\count189 \c@labelgen=\count190 \yearcnt=\count191 \@betr=\box51 (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/dinbrief\dinbrief.cfg)) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/pdfpages\pdfpages.sty Package: pdfpages 2022/12/19 v0.5x Insert pages of external PDF documents (AM) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/base\ifthen.sty Package: ifthen 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC) ) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/tools\calc.sty Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ) \calc@Acount=\count192 \calc@Bcount=\count193 \calc@Adimen=\dimen176 \calc@Bdimen=\dimen177 \calc@Askip=\skip48 \calc@Bskip=\skip49 LaTeX Info: Redefining \setlength on input line 80. LaTeX Info: Redefining \addtolength on input line 81. \calc@Ccount=\count194 \calc@Cskip=\skip50 ) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/eso-pic\eso-pic.sty Package: eso-pic 2023/05/03 v3.0c eso-pic (RN) \ESO@tempdima=\dimen178 \ESO@tempdimb=\dimen179 (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty Package: keyval 2022/05/29 v1.15 key=value parser (DPC) \KV@toks@=\toks16 ) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty Package: xcolor 2022/06/12 v2.14 LaTeX color extensions (UK) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 227. (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.def File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex ) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\mathcolor.ltx ) Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1353. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1357. Package xcolor Info: Model `RGB' extended on input line 1369. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1371. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1372. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1373. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1374. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1375. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1376. )) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty Package: trig 2021/08/11 v1.11 sin cos tan (DPC) ) (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.cf g File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 107. ) \Gin@req@height=\dimen180 \Gin@req@width=\dimen181 ) \AM@pagewidth=\dimen182 \AM@pageheight=\dimen183 \AM@fboxrule=\dimen184 (C:\Users\username\AppData\Local\Programs\MiKTeX\tex/latex/pdfpages\ppnull.def File: ppnull.def 2022/12/19 v0.5x Pdfpages dummy driver (AM) Package pdfpages Warning: I will use a dummy \includepdf command (pdfpages) which will insert empty pages instead of the actual (pdfpages) PDF file because we are running in `demo' mode. ) \pdfpages@includegraphics@status=\count195 \AM@pagebox=\box52 \AM@global@opts=\toks17 \AM@pagecnt=\count196 \AM@toc@title=\toks18 \AM@lof@heading=\toks19 \c@AM@survey=\count197 \AM@templatesizebox=\box53 ) (anschreiben_mimimal.aux) \openout1 = `anschreiben_mimimal.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5. LaTeX Font Info: ... okay on input line 5. Package pdfpages Warning: I cannot determine the number of pages of the (pdfpages) included document, because we are running in (pdfpages) `demo' mode. (pdfpages) You can use the option `lastpage' to give me a hint. ! Undefined control sequence. \set@color ...\@pdfcolorstack push{\current@color }\aftergroup \reset@color \@outputpage ...t {\vfil \color@hbox \normalcolor \hb@xt@ \textwidth {\@theh... \@opcol ...te@singlecol@structures@@ \@outputpage \fi \global \@mparbottom \... <output> ...specialoutput \else \@makecol \@opcol \@startcolumn \@whilesw \i... \newpage ...prevdepth \fi \fi \vfil \penalty -\@M \AM@output@i ...ean {AM@endoflist}{false}\newpage \whiledo {\not \boolean {A... \\includepdf ...ndafter {\the \AM@global@opts ,#1} \fi \AM@CheckAtEnd \endgro... l.9 \includepdf[pages=1]{somePdfFile} ? ! Undefined control sequence. \set@color ...\@pdfcolorstack push{\current@color }\aftergroup \reset@color \@outputpage ...footskip \color@hbox \normalcolor \hb@xt@ \textwidth {\@thef... \@opcol ...te@singlecol@structures@@ \@outputpage \fi \global \@mparbottom \... <output> ...specialoutput \else \@makecol \@opcol \@startcolumn \@whilesw \i... \newpage ...prevdepth \fi \fi \vfil \penalty -\@M \AM@output@i ...ean {AM@endoflist}{false}\newpage \whiledo {\not \boolean {A... \\includepdf ...ndafter {\the \AM@global@opts ,#1} \fi \AM@CheckAtEnd \endgro... l.9 \includepdf[pages=1]{somePdfFile} ? [1 {C:/Users/username/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}] ! Undefined control sequence. \set@color ...\@pdfcolorstack push{\current@color }\aftergroup \reset@color \@outputpage ...t {\vfil \color@hbox \normalcolor \hb@xt@ \textwidth {\@theh... \@opcol ...te@singlecol@structures@@ \@outputpage \fi \global \@mparbottom \... <output> ...specialoutput \else \@makecol \@opcol \@startcolumn \@whilesw \i... \newpage ...prevdepth \fi \fi \vfil \penalty -\@M \AM@output@i ...e \@firstcolumnfalse \fi \newpage \ifthenelse {\boolean {AM@... \\includepdf ...ndafter {\the \AM@global@opts ,#1} \fi \AM@CheckAtEnd \endgro... l.9 \includepdf[pages=1]{somePdfFile} ? ! Undefined control sequence. \set@color ...\@pdfcolorstack push{\current@color }\aftergroup \reset@color \@outputpage ...footskip \color@hbox \normalcolor \hb@xt@ \textwidth {\@thef... \@opcol ...te@singlecol@structures@@ \@outputpage \fi \global \@mparbottom \... <output> ...specialoutput \else \@makecol \@opcol \@startcolumn \@whilesw \i... \newpage ...prevdepth \fi \fi \vfil \penalty -\@M \AM@output@i ...e \@firstcolumnfalse \fi \newpage \ifthenelse {\boolean {AM@... \\includepdf ...ndafter {\the \AM@global@opts ,#1} \fi \AM@CheckAtEnd \endgro... l.9 \includepdf[pages=1]{somePdfFile} ? [2] ) Here is how much of TeX's memory you used: 2239 strings out of 476360 34229 string characters out of 5788497 1850993 words of memory out of 5000000 22688 multiletter control sequences out of 15000+600000 512287 words of font info for 32 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 72i,8n,76p,238b,258s stack positions out of 10000i,1000n,20000p,200000b,200000s <C:/Users/username/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/c m/cmr10.pfb> Output written on anschreiben_mimimal.pdf (2 pages, 12959 bytes). PDF statistics: 14 PDF objects out of 1000 (max. 8388607) 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000) ``` I believe this can be traced back to the packages directly. This is a new install of Miktex on Windows. I was using the exact same combination of class and package on an older computer with an older Miktex install, so presumably something became incompatible in the meantime. Do you know how to solve this incompatibility?
https://tex.stackexchange.com/users/297152
Incompatibility between dinbrief and pdfpages?
true
`dinbrief` is incompatible with all LaTeX versions from 2020/10/01. (IMHO it wasn't fully compatible even earlier, but from that LaTeX release it breaks the `\begin{document}` code of LaTeX and so very often causes errors.) So you should not use it any longer. As a workaround *for old letters you still need to compile*, you could try a LaTeX version rollback using package `latexrelease`: ``` \RequirePackage[2020/03/02]{latexrelease} \documentclass[]{dinbrief} \usepackage[demo]{pdfpages} \begin{document} Text here \includepdf[pages=1]{somePdfFile} \end{document} ``` But note, that this would not work for all documents, because the current releases of some other packages depend on current LaTeX releases and therefore would fail with the rollback. In such a case you would have additional effort to make it run again. There are several alternatives for (not only) German letters that work with an up-to-date LaTeX release, e.g., [`g-brief`](https://www.ctan.org/pkg/g-brief), [`scrlttr2`](https://www.ctan.org/pkg/scrlttr2), [`scrletter`](https://www.ctan.org/pkg/scrletter), [`akletter`](https://www.ctan.org/pkg/akletter) etc.
4
https://tex.stackexchange.com/users/277964
685947
318,227
https://tex.stackexchange.com/questions/21986
26
I usually prepare my talks using powerpoint/openoffice-impress/keynote, where I explaing programs, pseudocodes, etc. Recently I was thinking about creating text-only, code-only and pseudocode-only slides with beamer and then exporting them somehow to powerpoint where I modify them to add figures or some minor details for polishing the presentation, which are usually hard to do with beamer. I googled a bit around and found that beamer can export to PDF or PS but not to powerpoint. I wonder anyway if you know some possibility of conversion from beamer to on-screen editable powerpoint/openoffice-impress/keynote.
https://tex.stackexchange.com/users/4567
Export beamer slides to powerpoint/openoffice-impress/keynote editable format
false
On Windows 10, I first used Adobe Acrobat to convert the `.pdf` to images, and then used [LibreOffice](https://www.libreoffice.org/) to merge the images into a `.pptx` as backgrounds. This method produced visually identical results to the original slides, but the text could not be edited directly. The advangages of the method is that you can easily add common components of PowerPoint such as gifs and shapes. 1. Open the `.pdf` file by Adobe Acrobat. Edit the text here (Once converted into images, the text cannot be modified). Select `File` → `Export To` → `Image` → `PNG`. Click the `setting` and choose a `resolution` as large as you like, e.g. `600 pixels/inch`. Save these `.png` images into a directory. 2. In LibreOffice, click `File` → `New` → `Presentation` to create an empty presentation. Then click `Tool` → `Marco` → `Organize Marco` → `Basic` → `New` to create a new marco. Fill in the marco with the following code (see details in [Fill the background of a presentation file with pics via commandline](https://stackoverflow.com/a/48408229/12224183)), where the number of loops and the path of `.png` images in `Test1` should be modified accordingly. ``` Sub InsertSlideWithBackgroundImage(imageFilePath) imageFileURL = ConvertToURL(imageFilePath) oDoc = ThisComponent oBackground = oDoc.createInstance("com.sun.star.drawing.Background") oBitmaps = ThisComponent.createInstance( "com.sun.star.drawing.BitmapTable") iBitmap = 1 Do sBitmapName = "bk" & iBitmap iBitmap = iBitmap + 1 Loop Until Not oBitmaps.hasByName(sBitmapName) oBitmaps.insertByName(sBitmapName, imageFileURL) oBackground.FillStyle = com.sun.star.drawing.FillStyle.BITMAP oBackground.FillBitmap = oBitmaps.getByName(sBitmapName) oBackground.FillBitmapMode = com.sun.star.drawing.BitmapMode.STRETCH oSlideList = oDoc.getDrawPages() oSlide = oSlideList.insertNewByIndex(oSlideList.Count) oSlide.Background = oBackground End Sub Sub Test1 For i = 1 To 20 If i< 10 Then Call InsertSlideWithBackgroundImage("D:/temp/slides_Page_0" & i & ".png") Else Call InsertSlideWithBackgroundImage("D:/temp/slides_Page_" & i & ".png") End If Next End Sub ``` 3. Run the marco `Test1`. Save the resulting file as `.pptx`.Then you get an identical but uneditable powerpoint.
1
https://tex.stackexchange.com/users/254188
685948
318,228
https://tex.stackexchange.com/questions/685959
2
I want to have a command called `\ensureinfocommand` that can be called like this: ``` \ensureinfocommand{studentid} ``` This call will check if the command `\studentid` already exists and if not, it should create the following: ``` \newcommand\studentid[1]{ \newcommand\@studentid{#1} } ``` I tried implementing `\ensureinfocommand` like the following: ``` \newcommand\ensureinfocommand[1]{ \ifcsname#1\endcsname\else \expandafter\newcommand\csname#1\endcsname[1]{ \expandafter\newcommand\csname @#1\endcsname{##1} } \fi } ``` This creates all the necessary commands, but the output of `\@studentid` is wrong. ``` \ensureinfocommand{studentid} \studentid{1234567} \begin{document} \@studentid \end{document} ``` This prints `studentid` and not `1234567` and I don't get why. Does anybody see what's wrong with my commands?
https://tex.stackexchange.com/users/286979
Command that creates new command based on argument
true
You are missing `\makeatletter` in using `\@studentid`. ``` \documentclass{article} \newcommand\ensureinfocommand[1]{% \ifcsname#1\endcsname\else \expandafter\newcommand\csname#1\endcsname[1]{% \expandafter\newcommand\csname @#1\endcsname{##1}% }% \fi } \ensureinfocommand{studentid} \studentid{1234567} \begin{document} \makeatletter\@studentid\makeatother \end{document} ``` I also took the liberty to add suitable `%`'s to avoid extraneous space tokens.
4
https://tex.stackexchange.com/users/293669
685964
318,233
https://tex.stackexchange.com/questions/685958
2
I see this code in the book's source "The Not So Short Introduction to LaTeX": ``` \newcommand{\CTANref}{\begingroup \urlstyle{tt}\Url} % \def\CTAN|#1|{\href{http://www.ctan.org/tex-archive/#1}{\CTANref|CTAN://#1|}} ``` 1. Why is there no `\endgroup` in CTANref? 2. Is `\def\CTAN|#1|` same as `\def\CTAN[#1]`? 3. Why use `\def` and `\newcommand` both? Couldn't `\newcommand` at both places have worked? 4. How can I implement the above using just one macro?
https://tex.stackexchange.com/users/264077
Why is there no `\endgroup`?
true
The reason is that `\Url` will provide the missing `\endgroup`. One sees in `url.sty` the definition of `\url`: ``` \def\DeclareUrlCommand#1#2{\def#1{\leavevmode\begingroup #2\Url}} % Sample (and default) configuration: % \DeclareUrlCommand\url{} ``` which means it does ``` \leavevmode\begingroup\Url ``` The code you quote is modeled on this. The actual `\endgroup` comes from `\Url@z` in particular. Check `url.sty` source code.
2
https://tex.stackexchange.com/users/293669
685965
318,234
https://tex.stackexchange.com/questions/679489
1
I am using `\glsdesc{XX}` to replace `\gls{XX}` when `XX` is used only once in my document. How to replace `\glspl{XX}` when that is the only occurrence? `\glspldesc` and `\glsdescpl` are not defined. ``` \documentclass{article} \usepackage[ nonumberlist, nogroupskip, nomain, acronym ]{glossaries} \usepackage{glossaries-extra} \makenoidxglossaries \newabbreviation {XX}{XX}{Some Long XX} \setkeys{glslink}{hyper=false} \begin{document} \glspl{XX} \glsdesc{XX} %\glspldesc{XX} fails but should print XXs %\glsdescpl{XX} fails but should print XXs \printnoidxglossaries \end{document} ```
https://tex.stackexchange.com/users/79165
glossaries, glspldesc or glsdescpls
false
You don't want the description but the long form, so use the associated long form commands which do have `*pl` alternatives as well as different capitalisations. With [`glossaries-extra`](https://www.ctan.org/pkg/glossaries-extra) this should be `\glsxtrlong`, or `\acl` with the `shortcuts=ac` package option. With just [`glossaries`](https://www.ctan.org/pkg/glossaries) this would be `\glsentrylong` or `\acrlong`, or `\acl` with the `shortcuts=true` package option. ``` \documentclass{article} \usepackage[ nonumberlist, nogroupskip, nomain, acronym ]{glossaries} \usepackage[shortcuts=ac]{glossaries-extra} \makenoidxglossaries \newabbreviation {XX}{XX}{Some Long XX} \setkeys{glslink}{hyper=false} \begin{document} \glspl{XX} \glsdesc{XX} \glsentrylong{XX} \glsentrylongpl{XX} \acrlong{XX} % Note the glossaries-extra warning \acrlongpl{XX} % Note the glossaries-extra warning \glsxtrlong{XX} % Requires glossaries-extra \glsxtrlongpl{XX} % Requires glossaries-extra \acl{XX} % Requires shortcuts package option \aclp{XX} % Requires shortcuts package option \printnoidxglossaries \end{document} ``` > > Some Long XXs (XXs) > > > Some Long XX > > > Some Long XX > > > Some Long XXs > > > Some Long XX > > > Some Long XXs > > > Some Long XX > > > Some Long XXs > > > Some Long XX > > > Some Long XXs > > > Acronyms > -------- > > > XX Some Long XX. > > >
0
https://tex.stackexchange.com/users/106162
685969
318,237
https://tex.stackexchange.com/questions/685927
5
I'm using `xindy` to create indeces. However, the default sort order is not sensible for uppercase and lowercase. Is there a way to create a .xdy file so that the uppercases are sorted in front of lowercases. Here is an example: ``` A Abel....... Alex....... aboutism... account.... axis....... B Bible...... basics..... bigger..... ``` I think the issue is, by default, uppercase letters are mapped to lowercase letters, thus cannot be distinguished former and sorted according to that. I wonder if anyone can help me create a .xdy that sorts alphabet **case-sensitively.**
https://tex.stackexchange.com/users/54169
Is there a way to sort index from Uppercases to lowercases
false
Use at own risk. ``` % make sure Aa.xdy and Aa_utf8.xdy are in working directory % pdflatex foo.tex % xindy -M Aa.xdy foo.idx % pdflatex foo.tex \documentclass{article} \usepackage{makeidx} \makeindex \begin{document} \index{Abel} \index{Alex} \index{aboutism} \index{account} \index{axis} \index{Bible} \index{basics} \index{bigger} \printindex \end{document} ``` file `Aa.xdy`: ``` ;;; -*- mode: lisp; coding: utf-8; -*- ;;; provided by user691586, May 17 2023 ;; USE AT OWN RISK -- THIS IS PROVIDED WITH NO WARRANTY ;; OF ANY KIND NOR LIABILITY OF ANY THING AT ALL ;; (forever) ;; USAGE: put this file together with companion Aa_utf8.xdy ;; in your working directory. Execute *latex on foo.tex, ;; then xindy -M Aa.xdy foo.idx, then again *latex. ;; (but xindy is hyperref-incompatible last time I checked, ;; although I don't recall what was this incompatibility, ;; perhaps something having to do with page hyperlinking) (require "latex-loc-fmts.xdy") (require "numeric-sort.xdy") ;; do not use texindy ;; do not load latex.xdy, we copy here what's needed ;(require "latex.xdy") ;; from latex.xdy and tex.xdy ;;; ;;; TeX conventions ;;; ;; Discard leading and trailing white space. Collapse multiple white ;; space characters to blank. (merge-rule "^ +" "" :eregexp) (merge-rule " +$" "" :eregexp) (merge-rule " +" " " :eregexp) ;; Handle TeX markup (merge-rule "\\([{}$%&#])" "\1" :eregexp) ;; Standard location classes: arabic and roman numbers, and alphabets. (define-location-class "arabic-page-numbers" ("arabic-numbers")) (define-location-class "roman-page-numbers" ("roman-numbers-lowercase")) (define-location-class "Roman-page-numbers" ("roman-numbers-uppercase")) (define-location-class "alpha-page-numbers" ("alpha")) (define-location-class "Alpha-page-numbers" ("ALPHA")) ;;; ;;; Output Markup ;;; (markup-index :open "\begin{theindex} \providecommand*\lettergroupDefault[1]{} \providecommand*\lettergroup[1]{% \par\textbf{#1}\par \nopagebreak } " :close "~n~n\end{theindex}~n" :tree) (markup-letter-group-list :sep "~n~n \indexspace~n") (markup-letter-group :open-head "~n % ") (markup-indexentry :open "~n \item " :depth 0) (markup-indexentry :open "~n \subitem " :depth 1) (markup-indexentry :open "~n \subsubitem " :depth 2) (markup-locclass-list :open ", " :sep ", ") (markup-locref-list :sep ", ") (require "makeindex.xdy") (require "latin-lettergroups.xdy") ;; (utf8 *may* work but will require LaTeX from recent ;; years so that the (in)famous IeC macro is not used ;; in idx file ;; ) (require "Aa_utf8.xdy") ``` File `Aa_utf8.xdy`: ``` ;; -*- mode: lisp; coding: utf-8-unix; -*- ;; Modeled on xindy/lang/general/utf8.xdy and utf8-lang.xdy ;; provided by user691586, May 17 2023 ;; USE AT OWN RISK -- THIS IS PROVIDED WITH NO WARRANTY ;; OF ANY KIND NOR LIABILITY OF ANY THING AT ALL ;; (forever) ;; (utf8 *may* work but will require LaTeX from recent ;; years so that the (in)famous IeC macro is not used ;; in idx file ;; ) ;; USAGE: put this file together with companion Aa.xdy ;; in your working directory. Execute *latex on foo.tex, ;; then xindy -M Aa.xdy foo.idx, then again *latex. (define-letter-group "A" ) (define-letter-group "a" :after "A") (define-letter-group "B" :after "a") (define-letter-group "b" :after "B") (define-letter-group "C" :after "b") (define-letter-group "c" :after "C") (define-letter-group "D" :after "c") (define-letter-group "d" :after "D") (define-letter-group "E" :after "d") (define-letter-group "e" :after "E") (define-letter-group "F" :after "e") (define-letter-group "f" :after "F") (define-letter-group "G" :after "f") (define-letter-group "g" :after "G") (define-letter-group "H" :after "g") (define-letter-group "h" :after "H") (define-letter-group "I" :after "h") (define-letter-group "i" :after "I") (define-letter-group "J" :after "i") (define-letter-group "j" :after "J") (define-letter-group "K" :after "j") (define-letter-group "k" :after "K") (define-letter-group "L" :after "k") (define-letter-group "l" :after "L") (define-letter-group "M" :after "l") (define-letter-group "m" :after "M") (define-letter-group "N" :after "m") (define-letter-group "n" :after "N") (define-letter-group "O" :after "n") (define-letter-group "o" :after "O") (define-letter-group "P" :after "o") (define-letter-group "p" :after "P") (define-letter-group "Q" :after "p") (define-letter-group "q" :after "Q") (define-letter-group "R" :after "q") (define-letter-group "r" :after "R") (define-letter-group "S" :after "r") (define-letter-group "s" :after "S") (define-letter-group "T" :after "s") (define-letter-group "t" :after "T") (define-letter-group "U" :after "t") (define-letter-group "u" :after "U") (define-letter-group "V" :after "u") (define-letter-group "v" :after "V") (define-letter-group "W" :after "v") (define-letter-group "w" :after "W") (define-letter-group "X" :after "w") (define-letter-group "x" :after "X") (define-letter-group "Y" :after "x") (define-letter-group "y" :after "Y") (define-letter-group "Z" :after "y") (define-letter-group "z" :after "Z") (define-rule-set "user-alphabetize" :rules (("Ă" "A" :string) ("Ā" "A" :string) ("ā" "a" :string) ("ă" "a" :string) ("Ē" "E" :string) ("ē" "e" :string) ("Ĕ" "E" :string) ("ĕ" "e" :string) ("Ī" "I" :string) ("ī" "i" :string) ("Ĭ" "I" :string) ("ĭ" "i" :string) ("Ō" "O" :string) ("ō" "o" :string) ("Ŏ" "O" :string) ("ŏ" "o" :string) ("ß" "SS" :string) ("Ū" "U" :string) ("ū" "u" :string) ("Ŭ" "U" :string) ("ŭ" "u" :string) )) (define-rule-set "user-resolve-case" :rules (("Ā" "8" :string) ("ā" "9" :string) ("Ă" "8" :string) ("ă" "9" :string) ("Ē" "8" :string) ("ē" "9" :string) ("Ĕ" "8" :string) ("ĕ" "9" :string) ("Ī" "8" :string) ("ī" "9" :string) ("Ĭ" "8" :string) ("ĭ" "9" :string) ("Ō" "8" :string) ("ō" "9" :string) ("Ŏ" "8" :string) ("ŏ" "9" :string) ("Ū" "8" :string) ("ū" "9" :string) ("Ŭ" "8" :string) ("ŭ" "9" :string) ("ß" "99" :string) ("A" "8" :string) ("B" "8" :string) ("C" "8" :string) ("D" "8" :string) ("E" "8" :string) ("F" "8" :string) ("G" "8" :string) ("H" "8" :string) ("I" "8" :string) ("J" "8" :string) ("K" "8" :string) ("L" "8" :string) ("M" "8" :string) ("N" "8" :string) ("O" "8" :string) ("P" "8" :string) ("Q" "8" :string) ("R" "8" :string) ("S" "8" :string) ("T" "8" :string) ("U" "8" :string) ("V" "8" :string) ("W" "8" :string) ("X" "8" :string) ("Y" "8" :string) ("Z" "8" :string) ("a" "9" :string) ("b" "9" :string) ("c" "9" :string) ("d" "9" :string) ("e" "9" :string) ("f" "9" :string) ("g" "9" :string) ("h" "9" :string) ("i" "9" :string) ("j" "9" :string) ("k" "9" :string) ("l" "9" :string) ("m" "9" :string) ("n" "9" :string) ("o" "9" :string) ("p" "9" :string) ("q" "9" :string) ("r" "9" :string) ("s" "9" :string) ("t" "9" :string) ("u" "9" :string) ("v" "9" :string) ("w" "9" :string) ("x" "9" :string) ("y" "9" :string) ("z" "9" :string) )) ; somewhat random as user691586 does not quite understand ; what is going on ; look in xindy/modules/lang/general/uft8.xdy for more complex ; setup (define-sort-rule-orientations (forward backward)) (use-rule-set :run 0 :rule-set ("user-alphabetize")) (use-rule-set :run 1 :rule-set ("user-resolve-case")) ``` This has not been tested beyond the above ascii example:
1
https://tex.stackexchange.com/users/293669
685989
318,247
https://tex.stackexchange.com/questions/685927
5
I'm using `xindy` to create indeces. However, the default sort order is not sensible for uppercase and lowercase. Is there a way to create a .xdy file so that the uppercases are sorted in front of lowercases. Here is an example: ``` A Abel....... Alex....... aboutism... account.... axis....... B Bible...... basics..... bigger..... ``` I think the issue is, by default, uppercase letters are mapped to lowercase letters, thus cannot be distinguished former and sorted according to that. I wonder if anyone can help me create a .xdy that sorts alphabet **case-sensitively.**
https://tex.stackexchange.com/users/54169
Is there a way to sort index from Uppercases to lowercases
false
If you are using OpTeX then you needn't any external program for sorting index. The sorting is done using TeX macros. There are macros `\_sortingdataLANG` etc. they enables to configure the sorting process. I copied the default `\_sortingdatalatin` from the OpTeX macros and modified it slightly in order to realize your request. The result is here: ``` \def \sortingdataAa {% /,{ },-,&,@,% A,a,À,à,Â,â,Ä,ä,Á,á,% Ą,ą,% B,b,% C,c,% Ć,ć,Č,č,% D,d,Ď,ď,% E,e,È,è,É,é,Ë,ë,Ê,ê,Ě,ě,% Ę,ę,% F,f,% G,g,% H,h,% ^^T^^U^^V,% ch Ch CH I,i,Í,í,Ï,ï,Î,î,% J,j,% K,k,% L,l,Ĺ,ĺ,Ľ,ľ,% Ł,ł,% M,m,% N,n,Ň,ň,% Ń,ń,Ñ,ñ,% O,o,Ö,ö,Ó,ó,Ô,ô,% P,p,% Q,q,% R,r,Ŕ,ŕ,% Ř,ř,% S,s,ß,% Ś,ś,Š,š,% T,t,Ť,ť,% U,u,Ù,ù,Û,û,Ü,ü,Ú,ú,Ů,ů,Ű,ű,% V,v,% W,w,% X,x,% Y,y,Ý,ý,Ÿ,ÿ,% Z,z,% Ž,ž,% Ź,ź,% Ż,ż,% ^^Z,% Hungarian: cz:c^^Z, etc., see \_compoundcharshu in lang-data.opm 0,1,2,3,4,5,6,7,8,9,'% } \let\_sortingdataen = \sortingdataAa % English language will use the \sortingdataAa \ii Alex \ii aboutism \ii axis \ii Abel \ii basics \ii account \ii bigger \ii Bible \nonum\sec Index \makeindex \bye ``` See OpTeX manual, sections 1.5.2 and 2.33 for more details.
2
https://tex.stackexchange.com/users/51799
685990
318,248
https://tex.stackexchange.com/questions/685982
1
I am trying to prepare a presentation with Beamer. I have two laptops one of them is a 2015 MacBook Air i7 and the other one is a MacBook Air M2. I am using TexShop with the same version, version 5.12, on both laptops. On my old laptop everything works fine but on the new one, when I tried to write something in the block environment a black frame appear on the blocks, see first photo. I tried many things but couldn't find a solution. By the way in the log file, I have the following error message: %%%% WARNING: Transparency operations ignored - need to use -dALLOWPSTRANSPARENCY. I also searched a solution for this error but couldn't find one being applicable to the TexShop. Is there anyone have an idea about this problem? Thank you in advance. Ps: If I typeset the file with LuaLaTeX it works without the black frame. But in this case, the universal letters (Turkish letters in my case) do not appear in the dvi. Is there any solution to show accent letters in LuaLaTeX? Edit: I am using MacTeX April version. I checked the TeX Live Utility and its version is 1.54. Below, I present the commands which produce the first photo I gave. ``` \documentclass[xcolor={dvipsnames,table},t]{beamer} \usetheme{Berlin} \usecolortheme{whale} \setbeamercolor*{palette tertiary{use=structure,fg=white,bg=black} \setbeamercolor*{palette quaternary}{fg=white,bg=black} \setbeamercolor{frametitle}{bg=structure!75,fg=white} \setbeamercolor{block title}{bg=structure!75,fg=white} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[shorthands=off,turkish]{babel} \begin{document} \begin{frame}[t] \begin{block}{balabal} blabala \end{block} \end{frame} \end{document} ``` If I typeset the same codes with LuaLaTeX I obtain the second photo. Interestingly now only some Turkish characters, ı,ş etc., do not appear and some, ü, ç, etc, appear. [1]: <https://i.stack.imgur.com/4DCuR.png> [2]: <https://i.stack.imgur.com/bUYgl.png>
https://tex.stackexchange.com/users/153144
Black frame in block in Beamer
true
If you compile with `lualatex`, remove the `fontenc` package to get your Turkish letters. (... and the closing `}` after `{palette tertiary` is missing) ``` % !TeX TS-program = lualatex \documentclass[xcolor={dvipsnames,table},t]{beamer} \usetheme{Berlin} \usecolortheme{whale} \setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=black} \setbeamercolor*{palette quaternary}{fg=white,bg=black} \setbeamercolor{frametitle}{bg=structure!75,fg=white} \setbeamercolor{block title}{bg=structure!75,fg=white} %\usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[shorthands=off,turkish]{babel} \begin{document} \begin{frame}[t] Interestingly now only some Turkish characters, ı,ş etc., do not appear and some, ü, ç, etc, appear. \begin{block}{balabal} blabala \end{block} \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
685999
318,250
https://tex.stackexchange.com/questions/686003
4
I am using enumitem package to deal with lists, in some cases nested ones. I would like to define a command `\staritem` to add an asterisk before an item not depending of knowing the level of the nested list. For example, the code ``` \documentclass{article} \usepackage{enumitem} \newcommand\staritem{???} \begin{document} \begin{enumerate}[label=(\alph*)] \item Item 1 \staritem Item 2 \item Item 3 \begin{enumerate}[label=(\roman*)] \item Item 3.1 \item Item 3.2 \staritem Item 3.3 \end{enumerate} \end{enumerate} \end{document} ``` should output: (a) Item 1 \*(b) Item 2 (c) Item 3 (i) Item 3.1 (ii) Item 3.2 \*(iii) Item 3.3 I know that `\item[*\theenumi]` and `\item[*\theenumii]` do the job, but I would like the flexbility of not inform the level of nested enumerate environment.
https://tex.stackexchange.com/users/297214
Command to add asterisk before some items in nested lists, independent of the level
false
You could use this : ``` \documentclass{article} \usepackage{enumitem} \newcommand\staritem{\item[*\csname theenum\roman{enumi}\endcsname]} \begin{document} \begin{enumerate}[label=(\alph*)] \item Item 1 \staritem Item 2 \item Item 3 \begin{enumerate}[label=(\roman*)] \item Item 3.1 \item Item 3.2 \staritem Item 3.3 \end{enumerate} \end{enumerate} \end{document} ``` Screenshot:
3
https://tex.stackexchange.com/users/120578
686007
318,254
https://tex.stackexchange.com/questions/686003
4
I am using enumitem package to deal with lists, in some cases nested ones. I would like to define a command `\staritem` to add an asterisk before an item not depending of knowing the level of the nested list. For example, the code ``` \documentclass{article} \usepackage{enumitem} \newcommand\staritem{???} \begin{document} \begin{enumerate}[label=(\alph*)] \item Item 1 \staritem Item 2 \item Item 3 \begin{enumerate}[label=(\roman*)] \item Item 3.1 \item Item 3.2 \staritem Item 3.3 \end{enumerate} \end{enumerate} \end{document} ``` should output: (a) Item 1 \*(b) Item 2 (c) Item 3 (i) Item 3.1 (ii) Item 3.2 \*(iii) Item 3.3 I know that `\item[*\theenumi]` and `\item[*\theenumii]` do the job, but I would like the flexbility of not inform the level of nested enumerate environment.
https://tex.stackexchange.com/users/297214
Command to add asterisk before some items in nested lists, independent of the level
true
The current counter name is accessible as `\@enumctr`. Remove the line with `\@currentlabel` if you don't want that cross-references to the starred items have the \*. ``` \documentclass{article} \usepackage{enumitem} \makeatletter \newcommand\staritem{% \par\refstepcounter{\@enumctr}% \edef\@currentlabel{*\@currentlabel}% \item[{\makebox[0pt][r]{*}}\csname the\@enumctr\endcsname]% } \makeatother \begin{document} \ref{test} \begin{enumerate}[label=(\alph*)] \item Item 1 \staritem\label{test} Item 2 \item Item 3 \begin{enumerate}[label=(\roman*)] \item Item 3.1 \item Item 3.2 \staritem Item 3.3 \end{enumerate} \end{enumerate} \end{document} ```
4
https://tex.stackexchange.com/users/4427
686013
318,256
https://tex.stackexchange.com/questions/686023
4
Is there a package or option that starts alternating row colors from within a table, so that no matter how many manually-colored rows are inserted, the alternating can be started again with the *same* color each time? (In a single table, I want to manually color a few "heading" rows, each followed by an undetermined number of alternating gray/white rows -- always starting with gray.)
https://tex.stackexchange.com/users/182238
Call alternating row colors from within the table?
false
Like this (change colors and alignment as You like)? Code: ``` \documentclass{article} \usepackage[table]{xcolor} \begin{document} \begin{center} \rowcolors{2}{gray!50}{white} \begin{tabular}{lcr} \rowcolor{red!50} Table head1 & Table head1 & Table head1\\ \rowcolor{green!50} Table head2 & Table head2 & Table head2\\ odd & odd & odd \\ even & even & even\\ odd & odd & odd \\ even & even & even\\ odd & odd & odd \\ even & even & even\\ \end{tabular} \end{center} \end{document} ```
9
https://tex.stackexchange.com/users/24644
686024
318,261
https://tex.stackexchange.com/questions/685914
2
I have to adjust text size and to do this I use the following code having read [this](https://texblog.org/2012/08/29/changing-the-font-size-in-latex/) article but unfortunately it seems there is something does not work so that I thought to put here an answer where I ask how adjust text size: could someone help me, please? ``` \documentclass[10pt]{article} \usepackage{titlesec} \usepackage{mathrsfs} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{amsmath} \usepackage{txfonts} \usepackage{enumitem} \usepackage[T1]{fontenc} \usepackage{layout} \usepackage[paperheight=29.7cm,paperwidth=21cm,textwidth=17cm,textheight=25 cm]{geometry} \linespread{1.5} \begin{document} A \end{document} ```
https://tex.stackexchange.com/users/296807
Why the command \documentclass[n pt]{article} is not useful to adjust text size?
true
Any document class only accepts a certain set of options that can be set as optional argument (between the square brackets) to the command `\documentclass`. The `article` class only supports a small set of options that are meant to change the font size of the document, and those are `10pt`, `11pt` and `12pt`. Other document classes might support more such options (like the `extarticle` class as noted in the comments), but still, each of these options is a previously defined option and, although it looks like it could work, you can not use any arbitrary value here. So, for the `article` class, you could do ``` \documentclass[11pt]{article} \begin{document} \section{Foo} Bar { \footnotesize baz } qux. \end{document} ``` and this would change the default font size (also accesible via `\normalsize`) to 11pt and all other font sizes respectively. But you cannot, for the above mentioned reasons, use `13pt` in this way, for example. The above code snippet would output: There are other ways to set the font size in a document explicitly, such as the `\fontsize` command (note that it takes two commands, the second meant to set the line spacing, and needs a `\selectfont` command after it). But using this command, you would only change the regular font size of the document (that is, `\normalsize`). So, you could set `\fontsize` at the very beginning of your document like this: ``` \documentclass[10pt]{article} \begin{document} \fontsize{11pt}{12pt}\selectfont \section{Foo} Bar { \footnotesize baz } qux. \end{document} ``` But the text that is not typeset in `\normalsize` (such as the section title or "baz" in the above example) will still have the same font size set by the document class. It is maybe not that easy to see in this example, but "baz" is smaller here than in the example above where we set the `11pt` option to the document class. If you want to change the default size of a document and also all other font sizes respectively, you can make use of the `fontsize` package. So, instead of the first example, you could also do ``` \documentclass{article} \usepackage[fontsize=11pt]{fontsize} \begin{document} \section{Foo} Bar { \footnotesize baz } qux. \end{document} ``` Which would output the exact same as the example where we used `11pt` as option to the document class. But you could also use arbitrary font sizes this way: ``` \documentclass{article} \usepackage[fontsize=13pt]{fontsize} \begin{document} \section{Foo} Bar { \footnotesize baz } qux. \end{document} ```
2
https://tex.stackexchange.com/users/47927
686029
318,264