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/688384 | 1 | I want to show the entire slide transparent until it is properly uncovered. But I do not uncover them necessarily in the order in which they are written (parts of formulae are shown later). I have switched from `\onslide` and `\pause` to `\uncover<1-+(-2),+->{}` as advised previously. But this does not work in the example below, specifically for `\onslide<5->{xx}`.
```
\documentclass{beamer}
\begin{document}
\setbeamercovered{transparent=10}
\begin{frame}
\frametitle{Signals}\uncover<1-+(-2),+->{}
\begin{itemize}[<+->]
\item Informed investment banks receive an imperfect signal \textcolor<2-3>{red}{s} on the \textcolor<2-3>{blue}{return}:
\item $\textcolor<3,6>{blue}{R}=\alert<3-4,6>{s}\onslide<5->{+\textcolor<5-6>{green}{\varepsilon}}$
\item For uninformed investment banks it is $\textcolor<4>{red}{E\left[s\right]=\mu}$, $\textcolor<4,6>{red}{Var\left[s\right]=\sigma_S^2}$
\item $\textcolor<5>{green}{E\left[\varepsilon\right]=0}$, $\textcolor<5,6>{green}{Var\left[\varepsilon\right]=\sigma_{\varepsilon}^2}$
\item $\textcolor<6>{blue}{Var\left[R\right]}=\textcolor<6>{blue}{\sigma_R^2}=\textcolor<6>{red}{\sigma_S^2}+\textcolor<6>{green}{\sigma_{\varepsilon}^2}$\onslide<7>{}
\end{itemize}
\end{frame}
\end{document}
```
| https://tex.stackexchange.com/users/296029 | Transparency in beamer if not uncovered in order | true | You can use `\onslide<1-2,5->{...}` to avoid the double transparency on the first two overlays:
```
\documentclass{beamer}
\begin{document}
\setbeamercovered{transparent=10}
\begin{frame}
\frametitle{Signals}\uncover<1-+(-2),+->{}
\begin{itemize}[<+->]
\item Informed investment banks receive an imperfect signal \textcolor<2-3>{red}{s} on the \textcolor<2-3>{blue}{return}:
\item $\textcolor<3,6>{blue}{R}=\alert<3-4,6>{s}\onslide<1-2,5->{+\textcolor<5-6>{green}{\varepsilon}}$
\item For uninformed investment banks it is $\textcolor<4>{red}{E\left[s\right]=\mu}$, $\textcolor<4,6>{red}{Var\left[s\right]=\sigma_S^2}$
\item $\textcolor<5>{green}{E\left[\varepsilon\right]=0}$, $\textcolor<5,6>{green}{Var\left[\varepsilon\right]=\sigma_{\varepsilon}^2}$
\item $\textcolor<6>{blue}{Var\left[R\right]}=\textcolor<6>{blue}{\sigma_R^2}=\textcolor<6>{red}{\sigma_S^2}+\textcolor<6>{green}{\sigma_{\varepsilon}^2}$\onslide<7>{}
\end{itemize}
\end{frame}
\end{document}
```
| 0 | https://tex.stackexchange.com/users/36296 | 688385 | 319,348 |
https://tex.stackexchange.com/questions/687953 | 1 | I am setting up a `.latexmkrc` configuration for my workflow with `latexmk`, and ran into a dead end regarding a pathing/lookup problem.
my setup so far (use as MWE)
----------------------------
### `.latexmkrc`:
```
# Set the program used to generate the PDF
# 1: pdflatex
# 2: postscript conversion, don't use this
# 3: dvi conversion, don't use this
# 4: lualatex
# 5: xelatex
$pdf_mode = 1;
# Move all axuiliary files to a separate directory, so they do not clutter up the project directory
$emulate_aux = 1;
$aux_dir = "tmp";
# Move the compiled files (and synctex) to a separate directory
$out_dir = 'build';
set_tex_cmds(" --shell-escape -interaction=nonstopmode -file-line-error -synctex=1 ");
$clean_ext .= ' %R.figlist %R-figure* %R.makefile fls.tmp';
$latex = 'internal tikzlatex latex %B %O %S';
$pdflatex = 'internal tikzlatex pdflatex %B %O %S';
$lualatex = 'internal tikzlatex lualatex %B %O %S';
$xelatex = 'internal tikzlatex xelatex %B %O %S';
$hash_calc_ignore_pattern{'pdf'} = '^(/CreationDate|/ModDate|/ID)';
$hash_calc_ignore_pattern{'ps'} = '^%%CreationDate';
sub tikzlatex {
my ($engine, $base, @args) = @_;
my $ret = 0;
print "Tikzlatex: ===Running '$engine @args'...\n";
$ret = system( $engine, @args );
print "Tikzlatex: Fixing .fls file ...\n";
system "echo INPUT \"$aux_dir1$base.figlist\" > \"$aux_dir1$base.fls.tmp\"";
system "echo INPUT \"$aux_dir1$base.makefile\" >> \"$aux_dir1$base.fls.tmp\"";
system "cat \"$aux_dir1$base.fls\" >> \"$aux_dir1$base.fls.tmp\"";
rename "$aux_dir1$base.fls.tmp", "$aux_dir1$base.fls";
if ($ret) { return $ret; }
if ( -e "$aux_dir1$base.makefile" ) {
system "echo \"$aux_dir1$base.makefile\"";
if ($engine eq 'xelatex') {
print "Tikzlatex: ---Correcting '$aux_dir1$base.makefile' made under xelatex\n";
system( 'perl', '-i', '-p', '-e', 's/^\^\^I/\t/', "$aux_dir1$base.makefile" );
}
elsif ($engine eq 'latex') {
print "Tikzlatex: ---Correcting '$aux_dir1$base.makefile' made under latex\n";
system( 'perl', '-i', '-p', '-e', 's/\.epsi/\.ps/', "$aux_dir1$base.makefile" );
}
print "Tikzlatex: ---Running 'make -f $aux_dir1$base.makefile' ...\n";
if ($aux_dir) {
# latexmk has set $ENV{TEXINPUTS} in this case.
my $SAVETEXINPUTS = $ENV{TEXINPUTS};
$ENV{TEXINPUTS} = good_cwd().$search_path_separator.$ENV{TEXINPUTS};
pushd( $aux_dir );
$ret = system "make", "-j", "5", "-f", "$base.makefile";
&popd;
$ENV{TEXINPUTS} = $SAVETEXINPUTS;
}
else {
$ret = system "make", "-j", "5", "-f", "$base.makefile";
}
if ($ret) {
print "Tikzlatex: !!!!!!!!!!!!!! Error from make !!!!!!!!! \n",
" The log files for making the figures '$aux_dir1$base-figure*.log'\n",
" may have information\n";
}
}
else {
print "Tikzlatex: No '$aux_dir1$base.makefile', so I won't run make.\n";
}
return $ret;
}
```
### `mwe.tex`: (not working)
```
% mwe.tex
\documentclass{article}
\usepackage{tikz,pgfplots, pgfplotstable}
\usetikzlibrary{external}
% NOTE: data.csv cannot be generated fromfilecontents, as it end up in /tmp then
\tikzexternalize[
mode=list and make,
only named=true,%
] % activate
\begin{document}
\begin{figure}
\tikzsetnextfilename{external-figure}%
% \tikzpicturedependsonfile{src/data.csv}
\input{src/figure.tikz}
\end{figure}
\end{document}
```
### `src/data.csv`:
```
x, y
0, 0
1, 1
```
### `src/figure.tikz`:
```
\begin{tikzpicture}
\pgfplotstableread[
col sep = comma,
]{src/data.csv}{\dataX}
\begin{axis}
\addplot table from {\dataX};
\end{axis}
\end{tikzpicture}%
```
Problem description:
--------------------
During compilation, `make -f tmp/mwe.makefile` cannot find the file `tmp/data.csv`, but it has to be given relative to the root file for regular input.
I want to be able to keep using the aux-dir setup, in order to separate the multitude of temporary files my documents create from the source files and from the output files.
I do not believe this is an issue with `pgfplotstable`, but with the search paths in general, when using auxiliary directories. `pgfplotstable` is to be understood as example then.
Investigated solutions:
-----------------------
1. If I move `\pgfplotstableread` into `mwe.tex`, instead of it being part of the input, `latexmk` runs through without errors. *I would prefer bundling the loading of data inside the tikzpicture environments, as in my MW(n)E.*\*
2. The obvious next step: Moving `\pgfplotstableread` outside the `tikzpicture` environment, but keeping it inside `src/figure.tikz` would be an acceptable solution, but throws the error as well.
Seeking advice
--------------
I am lost and have run out of ideas what to try next. Can anyone give advice on:
* how to achieve the desired behaviour?
* how to automatically modify the makefile that `externalize` and `list-and-make` create accordingly?
| https://tex.stackexchange.com/users/53868 | pgfplotstable, externalize and list-and-make with auxiliary output directory | false | I have taken up the comment by John Collins and refined my `.latexmkrc` accordingly. To try it out, run it together with the other files initially provided in my M(n)WE.
`.latexmkrc`:
-------------
```
# Set the program used to generate the PDF
# 1: pdflatex
# 2: postscript conversion, don't use this
# 3: dvi conversion, don't use this
# 4: lualatex
# 5: xelatex
$pdf_mode = 1;
# Move all axuiliary files to a separate directory, so they do not clutter up the project directory
$emulate_aux = 1;
$aux_dir = "tmp";
# Move the compiled files (and synctex) to a separate directory
$out_dir = 'build';
# This is the directory latexmk links for makefiles inside the $aux_dir: Place all external resources here.
$source_dir = "src";
# Produce less console output
$silent = 1;
set_tex_cmds(" --shell-escape -interaction=nonstopmode -file-line-error -synctex=1 ");
$clean_ext .= ' %R.figlist %R-figure* %R.makefile fls.tmp';
$latex = 'internal tikzlatex latex %B %O %S';
$pdflatex = 'internal tikzlatex pdflatex %B %O %S';
$lualatex = 'internal tikzlatex lualatex %B %O %S';
$xelatex = 'internal tikzlatex xelatex %B %O %S';
$hash_calc_ignore_pattern{'pdf'} = '^(/CreationDate|/ModDate|/ID)';
$hash_calc_ignore_pattern{'ps'} = '^%%CreationDate';
sub tikzlatex {
my ($engine, $base, @args) = @_;
my $ret = 0;
print "Tikzlatex: ===Running '$engine @args'...\n";
$ret = system( $engine, @args );
print "Tikzlatex: Fixing .fls file ...\n";
system "echo INPUT \"$aux_dir1$base.figlist\" > \"$aux_dir1$base.fls.tmp\"";
system "echo INPUT \"$aux_dir1$base.makefile\" >> \"$aux_dir1$base.fls.tmp\"";
system "cat \"$aux_dir1$base.fls\" >> \"$aux_dir1$base.fls.tmp\"";
rename "$aux_dir1$base.fls.tmp", "$aux_dir1$base.fls";
if ($ret) { return $ret; }
if ( -e "$aux_dir1$base.makefile" ) {
system "echo \"$aux_dir1$base.makefile\"";
if ($engine eq 'xelatex') {
print "Tikzlatex: ---Correcting '$aux_dir1$base.makefile' made under xelatex\n";
system( 'perl', '-i', '-p', '-e', 's/^\^\^I/\t/', "$aux_dir1$base.makefile" );
}
elsif ($engine eq 'latex') {
print "Tikzlatex: ---Correcting '$aux_dir1$base.makefile' made under latex\n";
system( 'perl', '-i', '-p', '-e', 's/\.epsi/\.ps/', "$aux_dir1$base.makefile" );
}
print "Tikzlatex: ---Running 'make -f $aux_dir1$base.makefile' ...\n";
if ($aux_dir) {
# latexmk has set $ENV{TEXINPUTS} in this case.
my $SAVETEXINPUTS = $ENV{TEXINPUTS};
$ENV{TEXINPUTS} = good_cwd().$search_path_separator.$ENV{TEXINPUTS};
# since some files are trying to get source files during compilation of the externalize list-and-make makefile, provide them with a symlink to the source files:
$current_dir = getcwd();
$existing_file = "$current_dir/$source_dir";
$new_file = "$current_dir/$aux_dir/$source_dir";
my $symlink_exists = eval { symlink ( $existing_file, $new_file);; 1 };
if (not($symlink_exists)) {
print "Tikzlatex: ---Creation of symlink failed. Please create a symlink from '$aux_dir/$source_dir' to '<document root>/$source_dir' manually.\n";
}
pushd( $aux_dir );
$ret = system "make", "-j", "5", "-f", "$base.makefile";
&popd;
$ENV{TEXINPUTS} = $SAVETEXINPUTS;
}
else {
$ret = system "make", "-j", "5", "-f", "$base.makefile";
}
if ($ret) {
print "Tikzlatex: !!!!!!!!!!!!!! Error from make !!!!!!!!! \n",
" The log files for making the figures '$aux_dir1$base-figure*.log'\n",
" may have information\n";
}
}
else {
print "Tikzlatex: No '$aux_dir1$base.makefile', so I won't run make.\n";
}
return $ret;
}
```
In particular, I want to point out the following added lines:
```
# This is the directory latexmk links for makefiles inside the $aux_dir: Place all external resources here.
$source_dir = "src";
```
```
# since some files are trying to get source files during compilation of the externalize list-and-make makefile, provide them with a symlink to the source files:
$current_dir = getcwd();
$existing_file = "$current_dir/$source_dir";
$new_file = "$current_dir/$aux_dir/$source_dir";
my $symlink_exists = eval { symlink ( $existing_file, $new_file);; 1 };
if (not($symlink_exists)) {
print "Tikzlatex: ---Creation of symlink failed. Please create a symlink from '$aux_dir/$source_dir' to '<document root>/$source_dir' manually.\n";
}
```
which automatically generate the symlink (on most platforms) needed to find the external dependencies.
Manual creation of the symlink was not an option, as I fear other users will delete the `$aux_dir`, and not know or not remember to reinstall the symlink.
If anyone wants to add their suggestions, I am happy to improve my script.
| 0 | https://tex.stackexchange.com/users/53868 | 688388 | 319,349 |
https://tex.stackexchange.com/questions/687943 | 3 | I would like to put the title in the center of the page and to have it typeset in "Huge" font. I have the titles of the chapters typeset in "Huge" font. Why is the title of the document not typeset in "Huge" font.
```
\documentclass[10pt,oneside]{book}
%Some packages
\usepackage{amsmath, mathtools, amssymb, amsthm}
\usepackage{hyperref} % for "\texorpdfstring" command
\usepackage{enumitem}
\allowdisplaybreaks
%This package allows Chapter titles to be single spaced.
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\setstretch{0.2}\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
{\setstretch{0.2}\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\singlespacing\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
%\titleformat{\chapter}[display]{\normalfont\huge\bfseries\onehalfspacing}{\chaptertitlename\ \thechapter}{40pt}{\huge}
%\titleformat{\section}{\singlespacing\normalfont\Large\bfseries}{\thesection}{1em}{}
%\titleformat{\subsection}{\singlespacing\normalfont\large\bfseries}{\thesubsection}{1em}{}
%\titleformat{\subsubsection}{\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
\usepackage{setspace}
\usepackage{sectsty}
\allsectionsfont{\onehalfspacing}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,intersections}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
%These make top, right, bottom margins confirming to the requirements
\usepackage[a4paper,bindingoffset=0.0in,%
left=1.5in,right=1in,top=1in,bottom=1in,%
footskip=.25in]{geometry} %, showframe
\usepackage{setspace}
\usepackage{blindtext}
% small stuff
\usepackage{amsfonts}
\usepackage{hyperref}
\urlstyle{same}
\usepackage{footnote}
\hypersetup{colorlinks,linkcolor={black},citecolor={black},urlcolor={black}}
%Does not count introduction when numbering theorems, etc.
\setcounter{chapter}{0}
%Makes page numbers appear
\pagestyle{plain}
\begin{document}
%Makes the page numbers roman numerals, and doesn't count these pages in the table of contents.
\frontmatter
\thispagestyle{empty}
\vbox to 1truein{}
\centerline{The Rules of Arithmetic}
\newpage
\chapter{A Criterion for Equivalent Quotients}
\noindent \textbf{Theorem} \\
\begin{equation*}
\frac{a}{b} = \frac{ac}{bc}
\end{equation*}
{\em for any natural number $a$, $b$, and $c$.}
\vskip0.25in
This theorem can easily be extended to quotients. We illustrate the utility of the theorem and its corollary in the following examples.
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Express $\displaystyle{\frac{2.6}{6.5}}$ as a decimal.
\vskip0.2in
\noindent \textbf{Solution}
\begin{equation*}
\frac{2.6}{6.5} = \frac{2.6 \cdot 10}{6.5 \cdot 10}
= \frac{26}{65}
= \frac{2\cdot13}{5\cdot13}
= \frac{2}{5}
= 0.4. \ \rule{1.5ex}{1.5ex}
\end{equation*}
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Evaluate $\displaystyle{\frac{0.625}{0.00125}}$.
\vskip0.2in
\noindent \textbf{Solution}
\begin{equation*}
\frac{0.625}{0.00125}
= \frac{0.625\cdot10^5}{0.00125\cdot10^5}
= \frac{625 \cdot 100}{125}
= \frac{(5 \cdot 125)100}{125}
= 5 \cdot 100
= 500. \ \rule{1.5ex}{1.5ex}
\end{equation*}
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Evaluate $\displaystyle{\frac{1.43}{0.055} + \frac{169}{0.0104}}$.
\vskip0.2in
\noindent \textbf{Solution}
\begin{align*}
\frac{1.43}{0.055} + \frac{169}{0.0104}
&= \frac{1.43\cdot10^3}{0.055\cdot10^3} + \frac{169\cdot10^4}{0.0104\cdot10^4} \\
&= \frac{143\cdot10}{55} + \frac{169\cdot10^4}{104} \\
&= \frac{(11\cdot13)(2\cdot5)}{5\cdot11} + \frac{13^2\cdot(8\cdot1250)}{13\cdot8} \\
&= 2 \cdot 13 + 13 \cdot 1250 \cdot \\
&= 26 + 16250 \\
&= 16276. \ \rule{1.5ex}{1.5ex}
\end{align*}
\newpage
\chapter{Rule for the Addition of Quotients}
\noindent \textbf{Theorem} \\
\begin{equation*}
\frac{a}{c} + \frac{b}{c} = \frac{a + b}{c}
\end{equation*}
{\em for any natural numbers $a$, $b$, and $c$.}
\vskip0.25in
This theorem can easily be extended to quotients. We illustrate the utility of the theorem and its corollary in the following examples.
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Evaluate $\displaystyle{\frac{0.54}{0.081} + \frac{8.1}{0.243}}$.
\vskip0.2in
\noindent \textbf{Solution}
\begin{align*}
\frac{0.54}{0.081} + \frac{8.1}{0.243}
&= \frac{0.54 \cdot 1000}{0.081 \cdot 1000}
+ \frac{8.1 \cdot 1000}{0.243 \cdot 1000} \\
&= \frac{54 \cdot 100}{81}
+ \frac{81 \cdot 100}{243} \\
&= \frac{(2 \cdot 27)100}{3 \cdot 27}
+ \frac{81 \cdot 100}{3 \cdot 81} \\
&= \frac{2 \cdot 100}{3}
+ \frac{100}{3} \\
&= \frac{200}{3} + \frac{100}{3} \\
&= \frac{200 + 100}{3} \\
&= \frac{300}{3} \\
&= \frac{3 \cdot 100}{3} \\
&= 100. \ \rule{1.5ex}{1.5ex}
\end{align*}
\end{document}
```
| https://tex.stackexchange.com/users/56838 | Typesetting the title in the center of page using geometry package | true | Use `\newgeometry`.
```
\documentclass[10pt,oneside]{book}
%Some packages
\usepackage{amsmath, mathtools, amssymb, amsthm}
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage{setspace}
%\usepackage{sectsty} % not with titlesec
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,intersections}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\usepackage[
a4paper,
bindingoffset=0.0in,
left=1.5in,
right=1in,
top=1in,
bottom=1in,
footskip=.25in,
%showframe,
]{geometry}
\usepackage{footnote}
\usepackage{blindtext}
\usepackage{hyperref}
\hypersetup{colorlinks,linkcolor={black},citecolor={black},urlcolor={black}}
\urlstyle{same}
\allowdisplaybreaks
%This package allows Chapter titles to be single spaced.
\titleformat{\chapter}[display]
{\setstretch{0.2}\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
{\setstretch{0.2}\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\singlespacing\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
%\titleformat{\chapter}[display]{\normalfont\huge\bfseries\onehalfspacing}{\chaptertitlename\ \thechapter}{40pt}{\huge}
%\titleformat{\section}{\singlespacing\normalfont\Large\bfseries}{\thesection}{1em}{}
%\titleformat{\subsection}{\singlespacing\normalfont\large\bfseries}{\thesubsection}{1em}{}
%\titleformat{\subsubsection}{\singlespacing\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
%\allsectionsfont{\onehalfspacing}% not with titlesec
%Makes page numbers appear
\pagestyle{plain}
\begin{document}
%Makes the page numbers roman numerals, and doesn't count these pages in the table of contents.
\frontmatter
\newgeometry{margin=0pt}
\pagestyle{empty}
\vspace*{-\topskip}
\vspace*{\fill}
\centerline{\Huge\bfseries The Rules of Arithmetic}
\vspace*{\fill}
\restoregeometry
\mainmatter
\chapter{A Criterion for Equivalent Quotients}
\noindent \textbf{Theorem} \\
\begin{equation*}
\frac{a}{b} = \frac{ac}{bc}
\end{equation*}
{\em for any natural number $a$, $b$, and $c$.}
\vskip0.25in
This theorem can easily be extended to quotients. We illustrate the utility of the theorem and its corollary in the following examples.
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Express $\displaystyle{\frac{2.6}{6.5}}$ as a decimal.
\vskip0.2in
\noindent \textbf{Solution}
\begin{equation*}
\frac{2.6}{6.5} = \frac{2.6 \cdot 10}{6.5 \cdot 10}
= \frac{26}{65}
= \frac{2\cdot13}{5\cdot13}
= \frac{2}{5}
= 0.4. \ \rule{1.5ex}{1.5ex}
\end{equation*}
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Evaluate $\displaystyle{\frac{0.625}{0.00125}}$.
\vskip0.2in
\noindent \textbf{Solution}
\begin{equation*}
\frac{0.625}{0.00125}
= \frac{0.625\cdot10^5}{0.00125\cdot10^5}
= \frac{625 \cdot 100}{125}
= \frac{(5 \cdot 125)100}{125}
= 5 \cdot 100
= 500. \ \rule{1.5ex}{1.5ex}
\end{equation*}
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Evaluate $\displaystyle{\frac{1.43}{0.055} + \frac{169}{0.0104}}$.
\vskip0.2in
\noindent \textbf{Solution}
\begin{align*}
\frac{1.43}{0.055} + \frac{169}{0.0104}
&= \frac{1.43\cdot10^3}{0.055\cdot10^3} + \frac{169\cdot10^4}{0.0104\cdot10^4} \\
&= \frac{143\cdot10}{55} + \frac{169\cdot10^4}{104} \\
&= \frac{(11\cdot13)(2\cdot5)}{5\cdot11} + \frac{13^2\cdot(8\cdot1250)}{13\cdot8} \\
&= 2 \cdot 13 + 13 \cdot 1250 \cdot \\
&= 26 + 16250 \\
&= 16276. \ \rule{1.5ex}{1.5ex}
\end{align*}
\chapter{Rule for the Addition of Quotients}
\noindent \textbf{Theorem} \\
\begin{equation*}
\frac{a}{c} + \frac{b}{c} = \frac{a + b}{c}
\end{equation*}
{\em for any natural numbers $a$, $b$, and $c$.}
\vskip0.25in
This theorem can easily be extended to quotients. We illustrate the utility of the theorem and its corollary in the following examples.
\vskip0.25in
\noindent \textbf{Example} \vskip1.25mm
Evaluate $\displaystyle{\frac{0.54}{0.081} + \frac{8.1}{0.243}}$.
\vskip0.2in
\noindent \textbf{Solution}
\begin{align*}
\frac{0.54}{0.081} + \frac{8.1}{0.243}
&= \frac{0.54 \cdot 1000}{0.081 \cdot 1000}
+ \frac{8.1 \cdot 1000}{0.243 \cdot 1000} \\
&= \frac{54 \cdot 100}{81}
+ \frac{81 \cdot 100}{243} \\
&= \frac{(2 \cdot 27)100}{3 \cdot 27}
+ \frac{81 \cdot 100}{3 \cdot 81} \\
&= \frac{2 \cdot 100}{3}
+ \frac{100}{3} \\
&= \frac{200}{3} + \frac{100}{3} \\
&= \frac{200 + 100}{3} \\
&= \frac{300}{3} \\
&= \frac{3 \cdot 100}{3} \\
&= 100. \ \rule{1.5ex}{1.5ex}
\end{align*}
\end{document}
```
I reorganized your preamble to have package loading first and options later. Don't use both `titlesec` and `sectsty`.
I have some reservations on `\setstretch{0.2}`, but my main concern is about your code for the main text: LaTeX is *not* a word processor, you'll benefit from reading some introductory manuals.
Using `\\` for ending lines is *bad* and I can assure you that I used `\noindent` inside the `document` environment perhaps a handful of times. Don't use `\vskip`: it's a primitive with a few peculiarities.
In order to add something below the centered title:
```
\frontmatter
\newgeometry{margin=0pt}
\pagestyle{empty}
\vspace*{-\topskip}
\vspace*{\fill}
\centerline{\Huge\bfseries The Rules of Arithmetic}
\vbox to 0pt{
\vspace{1in}
\centering
\Huge\bfseries Quotients
\vss
}
\vspace*{\fill}
\restoregeometry
\mainmatter
```
(the rest of the code is the same)
| 4 | https://tex.stackexchange.com/users/4427 | 688390 | 319,351 |
https://tex.stackexchange.com/questions/688386 | 0 | I am writing a Table in Latex. I want `+-` to be center aligned in the `$N_{s}$` column. I wrote a code like the following but it is not aligned.
I have imported a package `\sisetup{separate-uncertainty}` but didn't help.
```
\begin{table}[htbp]
\begin{center}
%\label{tab:ul_data}
\caption{\label{tab:ul_data} Summary of the reconstruction efficiency ($\epsilon$), signal yields ($N_{S}$), signal significance ($\mathcal{S}$) and upper limit (U.L.) on the signal yield ($N_{pl}^{UL}$) and branching fraction ($\mathcal{B}$) at 90\% confidence level for \textcolor{red}{each mode}.}
%\resizebox{12cm}{!}{%
\begin{tabular}{c c c c c c}
\hline \hline
Decay mode & $\epsilon$ (\%)& $N_S$ &\textcolor{red}{$\mathcal{S}$ ($\sigma$)}&$N_{pl}^{UL}$ & $\mathcal{B} \times 10^{-7}$ \\ [0.5ex]
\hline \hline
\noalign{\smallskip}\hline\noalign{\smallskip}
$D^{0} \rightarrow pe^{-}$ & 10.16 &\phantom{0}$-6.43 \pm 8.5$ & \textemdash& 16.2 & $ < 5.10 $ \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow pe^{-}$ & 10.19 & $-18.4 \pm 23$ & \textemdash& 22.0 & $< 6.94 $ \\ [1ex]
%\hline
$D^{0} \rightarrow \bar{p}e^{+}$ & \phantom{0}9.72 & \phantom{0}$-4.7 \pm 23$ & \textemdash& 21.6 & $< 7.10 $ \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow \bar{p}e^{+}$ & \phantom{0}9.62 & $7.1 \pm 9.0$ & 0.60& 23.0 & $< 7.64 $ \\ [1ex]
%\hline
$D^{0} \rightarrow p\mu^{-}$ & 10.75 & $11.0 \pm 23$ & 0.95& 17.1 & $<5.06$ \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow p\mu^{-}$ & 10.71 &$-10.8 \pm 27$ & \textemdash& 20.5 & $<6.12 $ \\ [1ex]
%\hline
$D^{0} \rightarrow \bar{p}\mu^{+}$ & 10.52 &\phantom{0}$-4.5 \pm 14$ & \textemdash& 21.0 & $<6.32$ \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow \bar{p}\mu^{+}$ & 10.45 & \phantom{4}$16.7 \pm 8.8$ & 1.56& 21.4 & $<6.55$ \\ [1ex]
\hline \hline
\end{tabular}
\end{center}
\end{table}
```
| https://tex.stackexchange.com/users/298826 | How to align text in the Table in latex? | false | You could use the `siunitx` package. This will not only allow you to align the `+-` signs, but you can also stop to manually fiddle with the alignment of the numbers:
```
\documentclass{article}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{siunitx}
\sisetup{uncertainty-mode = separate}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Summary of the reconstruction efficiency ($\epsilon$), signal yields ($N_{S}$), signal significance ($\mathcal{S}$) and upper limit (U.L.) on the signal yield ($N_{pl}^{UL}$) and branching fraction ($\mathcal{B}$) at 90\% confidence level for \textcolor{red}{each mode}.}
\label{tab:ul_data}
\begin{tabular}{c S[table-format=2.2] S[table-format=-2.2+-2.2] S[table-format=1.2] S[table-format=2.1] S[table-format=<1.2]}
\hline \hline
{{Decay mode}} & {{$\epsilon$ (\%)}}& {{$N_S$}} &
{{\textcolor{red}{$\mathcal{S}$($\sigma$)}}}
&{{$N_{pl}^{UL}$}} & {{$\mathcal{B} \times 10^{-7}$}} \\ [0.5ex]
\hline \hline
$D^{0} \rightarrow pe^{-}$ & 10.16 & -6.43 \pm 8.5 & {{\textemdash}}& 16.2 & < 5.10 \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow pe^{-}$ & 10.19 & -18.4 \pm 23 & {{\textemdash}}& 22.0 & < 6.94 \\ [1ex]
%\hline
$D^{0} \rightarrow \bar{p}e^{+}$ & 9.72 & -4.7 \pm 23 & {{\textemdash}}& 21.6 & < 7.10 \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow \bar{p}e^{+}$ & 9.62 & 7.1 \pm 9.0 & 0.60& 23.0 & < 7.64 \\ [1ex]
%\hline
$D^{0} \rightarrow p\mu^{-}$ & 10.75 & 11.0 \pm 23 & 0.95& 17.1 & <5.06 \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow p\mu^{-}$ & 10.71 &-10.8 \pm 27 & {{\textemdash}}& 20.5 & <6.12 \\ [1ex]
%\hline
$D^{0} \rightarrow \bar{p}\mu^{+}$ & 10.52 &-4.5 \pm 14 & {{\textemdash}}& 21.0 & <6.32 \\ [1ex]
%\hline
$\bar{D}^{0} \rightarrow \bar{p}\mu^{+}$ & 10.45 & 16.7 \pm 8.8 & 1.56& 21.4 & <6.55 \\ [1ex]
\hline \hline
\end{tabular}
\end{table}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/36296 | 688391 | 319,352 |
https://tex.stackexchange.com/questions/688380 | 0 | I am writing a journal article which contains some figures and tables. The left and right margins are not same. I have used the following command:
```
\usepackage[left=2cm,right=2cm,paper=a4paper]{geometry}
```
I have tried setting different values but nothing is changing the margins. How to fix this problem?
| https://tex.stackexchange.com/users/240422 | How to set margin in an article having figures and tables | false | You can rewrite the code as shown below
```
\usepackage{geometry}
\geometry{
a4paper,
left=2cm,
right=2cm,
}
```
Source: <https://www.overleaf.com/learn/latex/Page_size_and_margins>
Check out this link, it has good documentation on customizing the margins.
| 1 | https://tex.stackexchange.com/users/298830 | 688401 | 319,357 |
https://tex.stackexchange.com/questions/688408 | 2 | Minimal not working example:
```
\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,varwidth,xstring,environ}
\newsavebox{\tempbox} %Allows to use fbox in newenvironment
\makeatletter
\NewEnviron{result}[1][\textwidth]{%
\StrPosition{\BODY}{\qedhere}[\@Position]%
\IfEq{\@Position}{0}{%
\BODY
}{%
%% Does contain \qedhere
}%
}%
\makeatother
\begin{document}
\begin{result}[7cm]
abc $\mathcal{A}$
\end{result}
\end{document}
```
The code above doesn't work for an unknown reason. Enven stranger is that if I use my original code :
```
\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,varwidth,xstring,environ}
\newsavebox{\tempbox} %Allows to use fbox in newenvironment
\makeatletter
\NewEnviron{result}[1][\textwidth]{%
\StrPosition{\BODY}{\qedhere}[\@Position]%
\IfEq{\@Position}{0}{%
%% Does not contain \qedhere
\begin{center} %The box will be centered
\begin{lrbox}{\tempbox} %Allows to use fbox in newenvironment
\begin{varwidth}{#1} %Minipage that set its width to the text width it contains
\begin{center}
\BODY
\end{center}
\end{varwidth}
\end{lrbox}\fbox{\usebox{\tempbox}}
\end{center}
}{%
}%
}%
\makeatother
\begin{document}
% \begin{result}[7cm]
% abc $\mathcal{A}$
% \end{result}
\end{document}
```
and if I test with the following code, it works :
```
\begin{result}[7cm]
abc $\mapsto $
\end{result}
\begin{center}
\begin{lrbox}{\tempbox}
\begin{varwidth}{7cm}
\begin{center}
abc $\mathcal{A}$
\end{center}
\end{varwidth}
\end{lrbox}\fbox{\usebox{\tempbox}}
\end{center}
```
| https://tex.stackexchange.com/users/270421 | Undefined control sequence but everything is defined | true | Looks as if xstring doesn't like the \mathcal. You could use the in-built LaTeX tools:
```
\documentclass{article}
\usepackage{amsmath,amsthm,amssymb,varwidth}
\newsavebox{\tempbox} %Allows to use fbox in newenvironment
\ExplSyntaxOn
\NewDocumentEnvironment{result}{O{\textwidth}+b}
{
\tl_if_in:nnTF {#2}{\qedhere}
{}{#2}
}{}%
\ExplSyntaxOff
\begin{document}
\begin{result}[7cm]
abc $\mathcal{A}$
\end{result}
\end{document}
```
| 2 | https://tex.stackexchange.com/users/2388 | 688409 | 319,360 |
https://tex.stackexchange.com/questions/688403 | 1 | I would like to specify the background (or border) color of a flashcard with the "flashcard" document class, how can I do that?
Here a minimal exemple:
```
\documentclass[testpage,grid]{flashcards}
\renewcommand{\cardfrontheadstyle}[2][]
{\renewcommand{\flashcards@ps@front@head}
{\csname \flashcards@ps@front@head@#2\endcsname}
\ifthenelse{\equal{#1}{}}{}{%
\renewcommand{\flashcards@format@front@head}{#1}}}
\begin{document}
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %
% Flashcard %
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %
\cardfrontfoot{Acide/Base}
\begin{flashcard}[Savoir]{Donner la définition d'un acide}
Un acide AH est une espèce chimique capable de libérer un proton.
\end{flashcard}
\end{document}
```
| https://tex.stackexchange.com/users/298839 | Color flashcards with flashcards document class | true | The OP originally asked for the `flashcard` document class, which is why I came up with an answer for that.
I hope that this won't break anything, but you should be able to patch the package like this (the example is taken from the package code):
```
\documentclass[a4paper]{flashcard}
\usepackage{xcolor}
\makeatletter
\renewcommand{\FC@nopadfbox}[1]{\fboxsep=0pt\fbox{\colorbox{flashcardbgcolor}{#1}}}
\makeatother
\renewcommand{\flashcardformat}{\centering\LARGE}
\renewcommand{\flashcardbackword}{Solution}
\flashcardtopic{The Holy Grail}
\begin{document}
\colorlet{flashcardbgcolor}{yellow}%
\flashcard{Who rescues Sir Galahad from the Castle Anthrax?}{Sir
Lancelot}
\colorlet{flashcardbgcolor}{orange}%
\flashcard[Ni!]{What is the one word the Knights of Ni can't hear?}{It}
\colorlet{flashcardbgcolor}{cyan}%
\flashcard[][Credits]{What once bit the narrator's sister?}{A Moose}
\colorlet{flashcardbgcolor}{green}%
\flashcard{How does King Arthur defeat the killer rabbit?}{Uses the Holy
Hand Grenade of Antioch}
\colorlet{flashcardbgcolor}{white}%
\end{document}
```
Coloring the border is more complicated, but also possible:
```
\documentclass[a4paper]{flashcard}
\usepackage{etoolbox, xcolor}
\makeatletter
\renewcommand{\FC@nopadfbox}[1]{\fboxsep=0pt\color{flashcardbordercolor}\fbox{\colorbox{flashcardbgcolor}{#1}}}
\renewcommand{\FC@pvbox}[1]{\fboxsep=2pt\fboxrule=0pt\color{flashcardbordercolor}\fbox{\vbox{\color{flashcardtextcolor}#1}}}
\makeatother
\renewcommand{\flashcardformat}{\centering\LARGE}
\renewcommand{\flashcardbackword}{Solution}
\flashcardtopic{The Holy Grail}
\colorlet{flashcardbordercolor}{red}
\colorlet{flashcardtextcolor}{black}
\begin{document}
\colorlet{flashcardbgcolor}{yellow}%
\flashcard{Who rescues Sir Galahad from the Castle Anthrax?}{Sir
Lancelot}
\colorlet{flashcardbgcolor}{orange}%
\flashcard[Ni!]{What is the one word the Knights of Ni can't hear?}{It}
\colorlet{flashcardbgcolor}{cyan}%
\flashcard[][Credits]{What once bit the narrator's sister?}{A Moose}
\colorlet{flashcardbgcolor}{green}%
\flashcard{How does King Arthur defeat the killer rabbit?}{Uses the Holy
Hand Grenade of Antioch}
\colorlet{flashcardbordercolor}{blue}%
\colorlet{flashcardbgcolor}{white}%
\end{document}
```
---
For the `flashcards` document class, you can probably make use of the same logic. Since there is only one `\fbox` used, you could replace this by `\fcolorbox` which is provided by the `xcolor` package (note that for some reason the empty boxes are somehow drawn twice which is, however, not an error introduced by this patch but rather a bug in the package in general):
```
\documentclass[testpage,grid,avery5371]{flashcards}
\usepackage{xcolor}
\makeatletter
\renewcommand{\flashcards@gridbox}[1]{%
\setlength{\fboxsep}{0in}\fcolorbox{flashcardbordercolor}{flashcardbgcolor}{#1}}
\makeatother
\begin{document}
\colorlet{flashcardbgcolor}{yellow}
\colorlet{flashcardbordercolor}{red}
\cardfrontfoot{Acide/Base}
\begin{flashcard}[Savoir]{Donner la définition d'un acide}
Un acide AH est une espèce chimique capable de libérer un proton.
\end{flashcard}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/47927 | 688410 | 319,361 |
https://tex.stackexchange.com/questions/107252 | 61 | In many equation editors (e.g. MS Word 2007 and Daum Equation Editor), there's a double square bracket. Is there a TeX equivalent for `[[`, `((`, `))`, and `]]`?
| https://tex.stackexchange.com/users/nan | Double square brackets | false | In the case that you would have a conflict between [stmaryrd](https://ctan.org/pkg/stmaryrd) and another package, or that you dislike some redefinitions of symbols (such as \bigtriangledown), you may want to use the following line to import only the commands that you wish:
```
\usepackage[only,llbracket,rrbracket]{stmaryrd}
```
| 4 | https://tex.stackexchange.com/users/298844 | 688412 | 319,363 |
https://tex.stackexchange.com/questions/103980 | 15 | I want to fill a tikz-picture with a pattern, based on an external picture.
Is this possible? If yes, how?
I tried to define a new pattern with `\pgfdeclarepatternformonly`, but `\pgfuseimage` seems to be no valid command inside `\pgfdeclarepatternformonly`.
Remark:
* In my example I used a [marble](http://en.wikipedia.org/wiki/Marble)-picture, but my question is independend from this special picture.
* I force the tile to 1cm. Probably it would be better to use the real size of the tile image.
* If I define `\pgfdeclarepatternformonly` after `\begin{document}` the LaTeX error disappear, but the pattern does not work.
My MNWE (minimal not working Example):
```
\documentclass[]{standalone}
\usepackage{tikz}
\usetikzlibrary{patterns}
%Source: http://upload.wikimedia.org/wikipedia/de/thumb/f/f9/LapG.jpg/83px-LapG.jpg
%But could be any other picture
\pgfdeclareimage[width=1cm,height=1cm]{marble}{83px-LapG}%force quadratic tile
\pgfdeclarepatternformonly{marble}{\pgfpoint{0cm}{0cm}}{\pgfpoint{1cm}{1cm}}{\pgfpoint{1cm}{1cm}}{
\pgfuseimage{marble}%! LaTeX Error: Missing \begin{document}.
}
\begin{document}
\begin{tikzpicture}
% This should create a rectangle with 15*15 tiles.
\draw[pattern=marble] (0,0) rectangle (15,15);
\end{tikzpicture}
\end{document}
```
| https://tex.stackexchange.com/users/6563 | TikZ: Define pattern with reference to external picture | false | For non-repetitive patterns, `path picture={\node{whatever thing to draw};}` offers a great flexibility, allowing you for instance to draw an image in background at absolute position. Otherwise, you can use the TikZ image fill extensions from the tcolorbox package as proposed [here](https://tex.stackexchange.com/questions/219356/how-to-create-a-rectangle-filled-with-image-using-tikz):
```
\documentclass{article}
\usepackage[skins]{tcolorbox}
\begin{document}
\noindent\begin{tikzpicture}
\path[fill overzoom image=example-image-a] (0,0) rectangle (\textwidth,4cm);
\end{tikzpicture}
\medskip
\noindent\begin{tikzpicture}
\path[fill stretch image=example-image-b] (0,0) rectangle (\textwidth,4cm);
\end{tikzpicture}
\medskip
\noindent\begin{tikzpicture}
\path[fill tile image*={height=3cm}{example-image-c}] (0,0) rectangle (\textwidth,4cm);
\end{tikzpicture}
Absolute positioning:
% absolute coordinates
\noindent\begin{tikzpicture}
[
remember picture,
absolute fill image/.style={
path picture={
\node[anchor=center] at (current page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{#1}};
}
}
]
\path[draw=green,absolute fill image={example-image-b}] (0,0) circle[radius=1cm];
\path[draw=red,absolute fill image={example-image-b}] (.5,.5) circle[radius=1cm];
\end{tikzpicture}
\end{document}
```
| 0 | https://tex.stackexchange.com/users/116348 | 688415 | 319,364 |
https://tex.stackexchange.com/questions/688417 | 1 | For the acronym *transparency-enhancing technologies (TETs)*, only the plural form is used.
I have:
```
\DeclareAcronym{tet}{
short = TET,
long = transparency-enhancing technology,
long-plural-form = transparency-enhancing technologies,
}
```
In my text, I can use `\acp{tet}` to display the plural.
But in the list of acronyms, it will show up as "**TET** transparency-enhancing technology" (singular form).
How can I configure the acronym so that the list of acronyms displays it in the plural form?
| https://tex.stackexchange.com/users/102094 | How to display acronym in plural form in list of acronyms with the 'acro' package? | true | If the plural form is to be used exclusively, the most sensible solution seems to be to make the acronym plural by default:
```
\DeclareAcronym{tets}{
short = TETs,
long = transparency-enhancing technologies,
plural =, % explicitly disable plural
}
```
Note that I disable the pluralization by setting `plural` to the empty string.
Then, in the text, `\acp{tets}` will still work and print TETs instead of TETss.
| 0 | https://tex.stackexchange.com/users/102094 | 688418 | 319,366 |
https://tex.stackexchange.com/questions/688417 | 1 | For the acronym *transparency-enhancing technologies (TETs)*, only the plural form is used.
I have:
```
\DeclareAcronym{tet}{
short = TET,
long = transparency-enhancing technology,
long-plural-form = transparency-enhancing technologies,
}
```
In my text, I can use `\acp{tet}` to display the plural.
But in the list of acronyms, it will show up as "**TET** transparency-enhancing technology" (singular form).
How can I configure the acronym so that the list of acronyms displays it in the plural form?
| https://tex.stackexchange.com/users/102094 | How to display acronym in plural form in list of acronyms with the 'acro' package? | false | You can use the `list` key in `\DeclareAcronym`, if supplied this is used in the list in place of the long form.
```
\documentclass{article}
\usepackage{acro}
\DeclareAcronym{tet}{
short = TET,
long = transparency-enhancing technology,
long-plural-form = transparency-enhancing technologies,
list = transparency-enhancing technologies,
}
\begin{document}
\printacronyms
\acf{tet}
\acfp{tet}
\end{document}
```
| 0 | https://tex.stackexchange.com/users/106162 | 688422 | 319,368 |
https://tex.stackexchange.com/questions/688414 | 1 | The package `xcolor` has a way of extracting the components of a colour specification:
```
\extractcolorspec{red!50}\spec
% \spec now has the value {rgb}{1,0.5,0.5}
```
Is there a way of doing the same, but from lua code instead of tex?
| https://tex.stackexchange.com/users/258593 | Access (x)color definitions from lua | false | I found the following workaround, but would welcome a more idiomatic approach.
On the TeX side, we need a few allocations (those could be done in pure lua, if needed):
```
\makeatletter
\newtoks \getcolor@runtoks
\newtoks \getcolor@spectoks
\newtoks \getcolor@valtoks
\getcolor@runtoks{%
\expandafter\extractcolorspec
\expandafter{\the\getcolor@spectoks}\getcolor@spec
\expandafter\getcolor@valtoks
\expandafter\@gobble\getcolor@spec}
\makeatother
```
And then the following lua definition will do:
```
function getcolor(spec)
tex.scantoks('getcolor@spectoks', 0, spec)
tex.runtoks 'getcolor@runtoks'
return tex.toks['getcolor@valtoks']
end
```
This return value is a comma-separated string that will likely need further processing. However, this saves the trouble of re-implementing all calculations in lua.
| 0 | https://tex.stackexchange.com/users/258593 | 688428 | 319,372 |
https://tex.stackexchange.com/questions/688433 | 0 | I want to create a frame which contains a list whereby after each pause the previous list items fade and a new list item is revealed (not faded), after a final pause I want all the items to become unfaded. I wanted to use \onslide but it doesnt seem to work. Something like this :
```
\usepackage{tikz}
\usetikzlibrary{trees,shapes}
\setbeamercovered{transparent}
\begin{frame}
\begin{itemize}
\onslide<1>{\item one item}
\pause
\onslide<2>{\item two item}
\pause
\onslide<3>{\item three item}
\end{itemize}
\pause
\end{frame}
```
| https://tex.stackexchange.com/users/298842 | Faded text after a pause on beamer | true | You could use the following default action for the `itemize` environment (replace `5` with the overlay number on which all items should be uncovered):
```
\documentclass{beamer}
\setbeamercovered{transparent}
\begin{document}
\begin{frame}
\pause
\begin{itemize}[<+,5>]
\item one item
\item two item
\item three item
\end{itemize}
\end{frame}
\end{document}
```
| 0 | https://tex.stackexchange.com/users/36296 | 688435 | 319,374 |
https://tex.stackexchange.com/questions/688436 | 5 | The following code fails. I am looking for some advice.
```
\documentclass{beamer}
\usepackage{nicematrix}
\usepackage{tikz}
\NewDocumentCommand\drawstrike{ mmm } {
\begin{tikzpicture}[
remember picture,
overlay
]
\draw[
very thick,
red,
opacity = 0.5
]
([xshift=-3pt]this-#1-#2-#3.north west)
--
([xshift=3pt]this-#1-#2-#3.south east);
\end{tikzpicture}
}
\ExplSyntaxOn
\int_new:N \l_row_int
\int_new:N \l_col_int
\NewDocumentCommand\strikeme{ mmm } {
\int_set:Nn \l_row_int { \int_div_truncate:nn {#3}{#2} }
\int_set:Nn \l_col_int { \int_mod:nn {#3} {#2}}
\int_compare:nNnTF \l_col_int = 0 {
\int_set:Nn \l_col_int { #2 }
} {
\int_set:Nn \l_row_int { \l_row_int + 1}
}
\drawstrike{#1}{\int_use:N \l_row_int}{\int_use:N \l_col_int}
}
\seq_new:N \l_notprime_seq
\int_new:N \l_tested_int
\int_new:N \l_striked_int
\int_new:N \l_max_int
\NewDocumentCommand\eratosthenes{ O{#2}m }{
$\AutoNiceMatrix[
hvlines,
columns - width = auto,
name = this-#1 % NOT SEEN FROM THE LOOP...
]{
#2-#2
}{
\cellval{#2}{\arabic{iRow}}{\arabic{jCol}}
}$
\int_set:Nn \l_tested_int { 1 }
\int_set:Nn \l_max_int { #2*#2 }
\int_while_do:nn {
\l_tested_int <= #1
} {
\int_compare:nNnTF \l_tested_int = 1 {
\strikeme{#1}{#2}{1}
\seq_put_left:Nn \l_notprime_seq 1
} {
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_tested_int} {
\int_set:Nn \l_striked_int { 2*\l_tested_int }
\int_while_do:nn {
\l_striked_int <= \l_max_int
} {
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_striked_int} {
\strikeme{#1}{#2}{\int_use:N \l_striked_int}
\seq_put_left:Nx \l_notprime_seq {\int_use:N \l_striked_int}
}
\int_set:Nn \l_striked_int { \l_striked_int + \l_tested_int }
}
}
}
\int_incr:N \l_tested_int
}
}
\NewDocumentCommand\cellval{ mmm }{
\int_eval:n{#3 + #1*(#2 - 1)}
}
\ExplSyntaxOff
\begin{document}
\foreach \i in {0,...,4}{
\begin{frame}
\frametitle{Étape \i}
\begin{center}
\eratosthenes[\i]{10}
\end{center}
\end{frame}
}
\end{document}
```
| https://tex.stackexchange.com/users/6880 | nicematrix, LaTeX3 matrix naming and for loop | false | Use of the so ugly `\expandafter` does the job. Is there another way to do that?
```
\documentclass{beamer}
\usepackage{nicematrix}
\usepackage{tikz}
\NewDocumentCommand\drawstrike{ mmm } {
\begin{tikzpicture}[
remember picture,
overlay
]
\draw[
very thick,
red,
opacity = 0.5
]
([xshift=-3pt]this-#1-#2-#3.north west)
--
([xshift=3pt]this-#1-#2-#3.south east);
\end{tikzpicture}
}
\ExplSyntaxOn
\int_new:N \l_row_int
\int_new:N \l_col_int
\NewDocumentCommand\strikeme{ mmm } {
\int_set:Nn \l_row_int { \int_div_truncate:nn {#3}{#2} }
\int_set:Nn \l_col_int { \int_mod:nn {#3} {#2}}
\int_compare:nNnTF \l_col_int = 0 {
\int_set:Nn \l_col_int { #2 }
} {
\int_set:Nn \l_row_int { \l_row_int + 1}
}
\drawstrike{#1}{\int_use:N \l_row_int}{\int_use:N \l_col_int}
}
\seq_new:N \l_notprime_seq
\int_new:N \l_tested_int
\int_new:N \l_striked_int
\int_new:N \l_max_int
\NewDocumentCommand\eratosthenes{ O{#2}m }{
$\AutoNiceMatrix[
hvlines,
columns - width = auto,
name = this-#1
]{
#2-#2
}{
\cellval{#2}{\arabic{iRow}}{\arabic{jCol}}
}$
\int_set:Nn \l_tested_int { 1 }
\int_set:Nn \l_max_int { #2*#2 }
\int_while_do:nn {
\l_tested_int <= #1
} {
\int_compare:nNnTF \l_tested_int = 1 {
\strikeme{#1}{#2}{1}
\seq_put_left:Nn \l_notprime_seq 1
} {
% \int_show:N \l_tested_int
% \seq_show:N \l_notprime_seq
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_tested_int} {
\int_set:Nn \l_striked_int { 2*\l_tested_int }
% \int_show:N \l_striked_int
\int_while_do:nn {
\l_striked_int <= \l_max_int
} {
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_striked_int} {
\strikeme{#1}{#2}{\int_use:N \l_striked_int}
\seq_put_left:Nx \l_notprime_seq {\int_use:N \l_striked_int}
}
\int_set:Nn \l_striked_int { \l_striked_int + \l_tested_int }
}
}
}
\int_incr:N \l_tested_int
}
}
\NewDocumentCommand\cellval{ mmm }{
\int_eval:n{#3 + #1*(#2 - 1)}
}
\ExplSyntaxOff
\begin{document}
\foreach \i in {0,...,4}{
\begin{frame}
\frametitle{Étape \i}
\begin{center}
\expandafter\eratosthenes\expandafter[\i]{10}
\end{center}
\end{frame}
}
\end{document}
```
| 4 | https://tex.stackexchange.com/users/6880 | 688439 | 319,376 |
https://tex.stackexchange.com/questions/688429 | 4 | I try to have several `\multiframes` using `\multido`. But the following minimal example program (which should result in an animation of a growing rotating wedge) gives the error:
`! Package animate Error: Content of first frame must not have zero width.` The code looks like this
```
\documentclass{article}
\usepackage{pst-sigsys}
\usepackage{multido}
\usepackage[final]{animate}
\newcommand{\mywedge}[2]{%
\pspicture*(-5,-5)(5,5)
\degrees[4]
\pscircle(0,0){#2}
\pswedge[linestyle=solid,fillcolor=teal,fillstyle=solid]{#2}{#1}{\inteval{#1+1}}
\endpspicture
}
\begin{document}
\begin{animateinline}[controls={play,step}]{2}
\multido{\iradius=1+1}{4}{%
\multiframe{4}{iangle=0+1}{%
\mywedge{\iangle}{\iradius}
}
\newframe
}
\end{animateinline}
\end{document}
```
Omitting the `\multido` and the then useless `\newframe` (and providing a number instead of `\iradius` as the second argument to `\mywedge`) gives the expected result (but then of course the wedge doesn't grow anymore). Why doesn't this work and how do I make it work?
| https://tex.stackexchange.com/users/298851 | multiframe within multido does not work | true | `\multido` *with embedded* `\newframe` does not work well inside `animateinline`. `\newframe` closes a TeX group and thereby hides `\iradius` which is locally defined by `\multido`.
As a fix I would use one of the LaTeX3 stepping functions, e. g. `\int_step_inline:nnnn`. (See `texdoc interface3`.) Also, the last loop iteration should not insert a `\newframe`. Otherwise, an empty frame would be inserted at the end of the animation. An integer conditional is used to prevent this.
```
\documentclass{article}
\usepackage{pst-sigsys}
\usepackage[final]{animate}
\ExplSyntaxOn
\let\intStepInlinennnn\int_step_inline:nnnn
\let\intComparenT\int_compare:nT
\ExplSyntaxOff
\newcommand{\mywedge}[2]{%
\pspicture*(-5,-5)(5,5)
\degrees[4]
\pscircle(0,0){#2}
\pswedge[linestyle=solid,fillcolor=teal,fillstyle=solid]{#2}{#1}{\inteval{#1+1}}
\endpspicture
}
\begin{document}
\begin{animateinline}[controls={play,step}]{2}
\intStepInlinennnn{1}{1}{4}{%
\multiframe{4}{iangle=0+1}{%
\mywedge{\iangle}{#1}
}
\intComparenT{#1<4}{\newframe}
}
\end{animateinline}
\end{document}
```
| 3 | https://tex.stackexchange.com/users/1053 | 688440 | 319,377 |
https://tex.stackexchange.com/questions/688429 | 4 | I try to have several `\multiframes` using `\multido`. But the following minimal example program (which should result in an animation of a growing rotating wedge) gives the error:
`! Package animate Error: Content of first frame must not have zero width.` The code looks like this
```
\documentclass{article}
\usepackage{pst-sigsys}
\usepackage{multido}
\usepackage[final]{animate}
\newcommand{\mywedge}[2]{%
\pspicture*(-5,-5)(5,5)
\degrees[4]
\pscircle(0,0){#2}
\pswedge[linestyle=solid,fillcolor=teal,fillstyle=solid]{#2}{#1}{\inteval{#1+1}}
\endpspicture
}
\begin{document}
\begin{animateinline}[controls={play,step}]{2}
\multido{\iradius=1+1}{4}{%
\multiframe{4}{iangle=0+1}{%
\mywedge{\iangle}{\iradius}
}
\newframe
}
\end{animateinline}
\end{document}
```
Omitting the `\multido` and the then useless `\newframe` (and providing a number instead of `\iradius` as the second argument to `\mywedge`) gives the expected result (but then of course the wedge doesn't grow anymore). Why doesn't this work and how do I make it work?
| https://tex.stackexchange.com/users/298851 | multiframe within multido does not work | false |
```
\begin{animateinline}[controls={play,step}]{2}
\psLoop{4}{%
\multiframe{4}{iangle=0+1}{%
\mywedge{\iangle}{\psLoopIndex}
}
\newframe
}
\end{animateinline}
```
| 4 | https://tex.stackexchange.com/users/187802 | 688448 | 319,381 |
https://tex.stackexchange.com/questions/688436 | 5 | The following code fails. I am looking for some advice.
```
\documentclass{beamer}
\usepackage{nicematrix}
\usepackage{tikz}
\NewDocumentCommand\drawstrike{ mmm } {
\begin{tikzpicture}[
remember picture,
overlay
]
\draw[
very thick,
red,
opacity = 0.5
]
([xshift=-3pt]this-#1-#2-#3.north west)
--
([xshift=3pt]this-#1-#2-#3.south east);
\end{tikzpicture}
}
\ExplSyntaxOn
\int_new:N \l_row_int
\int_new:N \l_col_int
\NewDocumentCommand\strikeme{ mmm } {
\int_set:Nn \l_row_int { \int_div_truncate:nn {#3}{#2} }
\int_set:Nn \l_col_int { \int_mod:nn {#3} {#2}}
\int_compare:nNnTF \l_col_int = 0 {
\int_set:Nn \l_col_int { #2 }
} {
\int_set:Nn \l_row_int { \l_row_int + 1}
}
\drawstrike{#1}{\int_use:N \l_row_int}{\int_use:N \l_col_int}
}
\seq_new:N \l_notprime_seq
\int_new:N \l_tested_int
\int_new:N \l_striked_int
\int_new:N \l_max_int
\NewDocumentCommand\eratosthenes{ O{#2}m }{
$\AutoNiceMatrix[
hvlines,
columns - width = auto,
name = this-#1 % NOT SEEN FROM THE LOOP...
]{
#2-#2
}{
\cellval{#2}{\arabic{iRow}}{\arabic{jCol}}
}$
\int_set:Nn \l_tested_int { 1 }
\int_set:Nn \l_max_int { #2*#2 }
\int_while_do:nn {
\l_tested_int <= #1
} {
\int_compare:nNnTF \l_tested_int = 1 {
\strikeme{#1}{#2}{1}
\seq_put_left:Nn \l_notprime_seq 1
} {
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_tested_int} {
\int_set:Nn \l_striked_int { 2*\l_tested_int }
\int_while_do:nn {
\l_striked_int <= \l_max_int
} {
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_striked_int} {
\strikeme{#1}{#2}{\int_use:N \l_striked_int}
\seq_put_left:Nx \l_notprime_seq {\int_use:N \l_striked_int}
}
\int_set:Nn \l_striked_int { \l_striked_int + \l_tested_int }
}
}
}
\int_incr:N \l_tested_int
}
}
\NewDocumentCommand\cellval{ mmm }{
\int_eval:n{#3 + #1*(#2 - 1)}
}
\ExplSyntaxOff
\begin{document}
\foreach \i in {0,...,4}{
\begin{frame}
\frametitle{Étape \i}
\begin{center}
\eratosthenes[\i]{10}
\end{center}
\end{frame}
}
\end{document}
```
| https://tex.stackexchange.com/users/6880 | nicematrix, LaTeX3 matrix naming and for loop | true | UPDATE:
In the latest version of `nicematrix` (6.20a 2023-06-30), the value of the key `name` is expanded (in the TeX sens).
Hence, the output is as expected...
---
In the current version of `nicematrix` (v. 6.20 2023-06-04), the value of the key `name` of an environment or command of `nicematrix` (such as `\AutoNiceMatrix`) is not expanded (and stored as a `str` of L3). Therefore, all your arrays have the same name: `this-\i`.
Maybe it would be a good idea to change that behavior in the next version of `nicematrix`...
At this time, the workaround is to expand the optional argument of your command `\eratosthenes`. The best way is probably to use `\exp_args:Nx` in the command `\eratosthenes`, which requires an auxiliary function at the L3 level:
```
\NewDocumentCommand\eratosthenes{ O{#2}m }{
\exp_args:Nx \__projetmbc_eratosthenes:nn { #1 } { #2 }
}
\cs_new_protected:Nn \__projetmbc_eratosthenes:nn {
$\AutoNiceMatrix[
hvlines,
columns - width = auto,
.........
```
Here is the whole code:
```
\documentclass{beamer}
\usepackage{nicematrix}
\usepackage{tikz}
\NewDocumentCommand\drawstrike{ mmm } {%
\begin{tikzpicture}[
remember picture,
overlay
]
\draw[
very thick,
red,
opacity = 0.5
]
([xshift=-3pt]this-#1-#2-#3.north west)
--
([xshift=3pt]this-#1-#2-#3.south east);
\end{tikzpicture}%
}
\ExplSyntaxOn
\int_new:N \l_row_int
\int_new:N \l_col_int
\NewDocumentCommand\strikeme{ mmm } {
\int_set:Nn \l_row_int { \int_div_truncate:nn {#3}{#2} }
\int_set:Nn \l_col_int { \int_mod:nn {#3} {#2}}
\int_compare:nNnTF \l_col_int = 0 {
\int_set:Nn \l_col_int { #2 }
} {
\int_set:Nn \l_row_int { \l_row_int + 1}
}
\drawstrike{#1}{\int_use:N \l_row_int}{\int_use:N \l_col_int}
}
\seq_new:N \l_notprime_seq
\int_new:N \l_tested_int
\int_new:N \l_striked_int
\int_new:N \l_max_int
\NewDocumentCommand\eratosthenes{ O{#2}m }{
\exp_args:Nx \__projetmbc_eratosthenes:nn { #1 } { #2 }
}
\cs_new_protected:Nn \__projetmbc_eratosthenes:nn {
$\AutoNiceMatrix[
hvlines,
columns - width = auto,
name = this-#1
]{
#2-#2
}{
\cellval{#2}{\arabic{iRow}}{\arabic{jCol}}
}$
\int_set:Nn \l_tested_int { 1 }
\int_set:Nn \l_max_int { #2*#2 }
\int_while_do:nn {
\l_tested_int <= #1
} {
\int_compare:nNnTF \l_tested_int = 1 {
\strikeme{#1}{#2}{1}
\seq_put_left:Nn \l_notprime_seq 1
} {
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_tested_int} {
\int_set:Nn \l_striked_int { 2*\l_tested_int }
\int_while_do:nn {
\l_striked_int <= \l_max_int
} {
\seq_if_in:NxF \l_notprime_seq {\int_use:N \l_striked_int} {
\strikeme{#1}{#2}{\int_use:N \l_striked_int}
\seq_put_left:Nx \l_notprime_seq {\int_use:N \l_striked_int}
}
\int_set:Nn \l_striked_int { \l_striked_int + \l_tested_int }
}
}
}
\int_incr:N \l_tested_int
}
}
\NewDocumentCommand\cellval{ mmm }{
\int_eval:n{#3 + #1*(#2 - 1)}
}
\ExplSyntaxOff
\begin{document}
\foreach \i in {0,...,4}{
\begin{frame}
\frametitle{Étape \i}
\begin{center}
\eratosthenes[\i]{10}
\end{center}
\end{frame}
}
\end{document}
```
| 8 | https://tex.stackexchange.com/users/163000 | 688450 | 319,382 |
https://tex.stackexchange.com/questions/688331 | 3 | Is there an easy way to ensure that a page break will not intervene between a `\section` macro (or another similar macro) and an `\itemize` environment (or another similar environment)?
I have used package `titlesec` to make `\section` look how I want it, but I wonder if there is something I could add to titlesec to ensure that there won't be a pagebreak between the section heading and the list.
Here is the problem code:
```
\documentclass{book}
\usepackage{lipsum}
\usepackage{titlesec}
\titleformat{\section}[runin]
{\normalfont\scshape}
{}{0pt}{}
\titlespacing{\section}
{\parindent}{*2}{\wordsep}
\begin{document}
\lipsum[10-14]
Words
Words
Words
Words
\section{Section}
\begin{itemize}
\item Words
\item Words
\item Words
\end{itemize}
\end{document}
```
| https://tex.stackexchange.com/users/277990 | Ensure that page break does not intervene between a section heading and a list | true | You've changed the default layout of `\section` from a `display`-style heading to a `runin`-style heading. And since you don't have any content following the `\section` other than a list, a page break occurs. You can conveniently issue a `\pagebreak` prior to `\section` wherever you have these odd cases. Or, an automated solution can be provided (with some finetuning required) by [`needspace`](//ctan.org/pkg/needspace):
```
\documentclass{book}
\usepackage{lipsum}
\usepackage{titlesec,needspace}
\titleformat{\section}[runin]
{\normalfont\scshape}
{}{0pt}{}
\titlespacing{\section}
{\parindent}{*2}{\wordsep}
\NewCommandCopy{\oldsection}{\section}
\RenewDocumentCommand{\section}{}{%
\needspace{2\baselineskip}% Need roughly 2 lines available, otherwise issue a page break
\oldsection
}
\begin{document}
\lipsum[10-14]
Words
Words
Words
Words
\section{Section}
\begin{itemize}
\item Words
\item Words
\item Words
\end{itemize}
\end{document}
```
| 2 | https://tex.stackexchange.com/users/5764 | 688452 | 319,384 |
https://tex.stackexchange.com/questions/688432 | 0 | Firstly, I would like to apologize. It's customary to submit a Minimal Working Example (MWE), but my working file is so extensive that I'm unable to identify where the issue lies. Therefore, I'm writing to explain my current situation and ask for assistance.
Question: I encounter an issue when I include the bibliography. Specifically, I want to see a result like "BROWN (in small caps), John (in regular lowercase)". However, in the output, it shows as "BROWN (in small caps), JOHN (also in small caps)". If I use a font that doesn't support small caps, it entirely outputs as "Brown (in regular lowercase), John (in regular lowercase)".
Working Environment: I'm using TeXShop (version 5.12), Bibdesk (1.8.18 (6107)), biber, and XeLaTeX on MacOS Monterey Version 12.6.2.
My "tex" working file and the "bib" database file are well-connected. I've specified the path accurately to read the necessary data clearly.
In the bib file, the Author field is entered as {\textsc{Brown}, John}. Even if I remove the \textsc or change it to {John Brown}, the issue with small caps remains the same.
I am required to use Times New Roman in my document. However, I've heard that Times New Roman does not support small caps. So, I've tested with three fonts that resemble Times New Roman and support small caps (Latin Modern, TeX Gyre Termes, Nimbus Roman No9 L). The results were all the same. Contrary to my intention, it only outputs as "BROWN (in small caps), JOHN (also in small caps)".
Thank you for taking the time to read and consider my situation.
| https://tex.stackexchange.com/users/175627 | Seeking Assistance: Small Caps Issue in Bibliography Using BibLaTeX and XeLaTeX | false |
```
\documentclass[a4paper, 12pt]{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\newcommand{\smallcaps}[1]{{\addfontfeatures{Letters=UppercaseSmallCaps}#1}}
\usepackage[
backend=biber,
style=chicago-authordate,
maxbibnames=3,
maxcitenames=2,
autocite=superscript,
doi=true,
url=true,
isbn=false
]{biblatex}
\renewcommand*{\mkbibnamefamily}[1]{{\textsc{\normalsize #1}}}
\begin{filecontents}{\jobname.bib}
@article{smith2020,
author = {Smith, John},
title = {The Importance of Small Caps},
journal = {Journal of Typography},
year = {2020},
volume = {10},
number = {2},
pages = {20-35},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\section{Introduction}
This is an example document showcasing the usage of small caps in LaTeX.
\smallcaps{Small caps} is a typographic feature that formats text in uppercase letters but with reduced size. It can be useful for emphasizing certain words or names, such as \smallcaps{Smith}.
\subsection{Citations}
Here is a citation example using the \texttt{biblatex-chicago} style. According to \textcite{smith2020}, small caps are important in typography.
\printbibliography
\end{document}
```
| 1 | https://tex.stackexchange.com/users/175627 | 688456 | 319,385 |
https://tex.stackexchange.com/questions/688459 | 2 | In the mwe below, I want the question number counter to start at #44 instead of #1 because this doc is part 2 of a larger problem set:
I tried inserting `\task\SetTaskNumber{44}` but that produced an `undefined control sequence error`.
Being a tex newby, I don't really understand how and where the enumeration is created. Guessing the executing code line is `\begin{tasks} [style=enumerate](2)`.
If possible, please identify the code line that specifies a starting number of "1" and how to change that starting number to "44".
Thanks very much for taking time to read and respond to this!
mwe:
```
\documentclass[12pt]{exam}
\usepackage[a4paper,margin=0.5in,include head]{geometry}
\printanswers
% un-comment to print solutions.
\renewcommand{\solutiontitle}{}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{framed}
\usepackage{bm}
\usepackage{multicol}
\usepackage[nice]{nicefrac}
\usepackage{tasks}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{arr/.style = {blue,-{Triangle[angle=60:1pt 3]}, thick,
shorten <=2mm, shorten >=2mm}
}
\newcommand\arr{\tikz[baseline=-0.65ex] % <--- new
\draw[blue,-{Triangle[angle=60:1pt 3]}, very thick,
shorten <=2mm, shorten >=2mm
] (0,0) -- ++ (1,0); }
\pagestyle{head}
\header{\textbf{ Algebra II: Q4 Final Exam: R E V I E W (Units 12-15)}}
{}
{}
\newcommand{\pagetop}{%
}
\newlength{\lwidth}
\settowidth{\lwidth}{(99)\enspace}
\settasks{after-item-skip=1em,
after-skip=2cm,
label-width=\lwidth,
item-indent=0pt,
label=(\arabic*), %
label-offset = -\lwidth,
item-format = \hspace{\lwidth},
column-sep=2em,
}
\makeatletter
\renewcommand{\fullwidth}[1]{%
\vbox{%
\leftskip=-\lwidth \rightskip=0pt
\advance\linewidth\@totalleftmargin%
\@totalleftmargin=0pt%
#1}%
\nobreak
}
\begin{document}
%definition for bigskip = 1 line to replace all \bigskip
\def\bigskip{\vskip\bigskipamount}
\begin{tasks}
[style=enumerate](2)
% undefined control sequence error: ***\task\SetTaskNumber{44}***
\task![]\fullwidth{\textbf
{Simplify each radical expression.}}
%%% Prob #1
\task
$5\sqrt48$
\begin{solutionorbox}[\SolutionSpace]
$5\sqrt{48}\arr 5(\sqrt{16})(\sqrt3) \arr (5)(4)(\sqrt3)$\bigskip
\colorbox{yellow}{$20\sqrt3$}
\end{solutionorbox}
%%%%%%%%Prob #2
\task
$\sqrt{16x^{14}}$
\begin{solutionorbox}[\SolutionSpace]
$(\sqrt{16})(\sqrt{x^{14}}) \arr 4(x^{14\div 2})$\bigskip
\colorbox{yellow}{$4x^7$}
\end{solutionorbox}
\end{tasks}
\end{document}```
```
| https://tex.stackexchange.com/users/184615 | Tasks environment: How to set counter to begin at number other than #1 | true | Just use the `start=...` key for the task specification:
```
\documentclass{exam}
\usepackage{tasks}
\begin{document}
\begin{tasks}
[style=enumerate,start=44](2)
\task A question
\task Another one
\end{tasks}
\end{document}
```
| 2 | https://tex.stackexchange.com/users/2693 | 688461 | 319,388 |
https://tex.stackexchange.com/questions/688463 | 0 | I am formetting pseudo code algorithms with multiple procedures in it, but formatting has somes issues such as `endProcedure=0`in latex output though. How can I fix this? thanks
**my current script**
```
\documentclass{article}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\algnewcommand{\LineComment}[1]{\State \(\triangleright\) #1}
\algdef{SE}[PROCEDURE]{Procedure}{EndProcedure}%
[2]{\algorithmicprocedure\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
{\algorithmicend\ \algorithmicprocedure}%
\algdef{SE}[FUNCTION]{Function}{EndFunction}%
[2]{\algorithmicfunction\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
{\algorithmicend\ \algorithmicfunction}%
\begin{document}
\begin{algorithm}
\caption{some text for caption}
\label{alg:mergesort}
\LineComment{ s,a: text, text, or text}
\LineComment{ $text: text, or text}
\LineComment{ text, text, or text}
\begin{algorithmic}[1]
\Procedure{sort}{s,a}
\State $\mathbf{z_a} \gets \text{srt}_s(a)$
\State $\mathbf{z_a} \gets \text{srt}_a(a)$
\State \Return $\mathbf{z_a}, \mathbf{z_a}$
\EndProcedure
\Procedure{mergesort}{s,a,t}
\State $\mathbf{z_t} \gets \text{srt}_t(t)$
\State $\mathbf{z_a, z_a} \gets \text{sort}(s,a)$
\State $\mathbf{z_a} \gets \mathbf{z_a}+\mathbf{z_t}$ \Comment{text, text, or text}
\State $\mathbf{z_a} \gets \mathbf{z_a}+\mathbf{z_t}$
\State $\mathbf{z_{\hat{a}}} \gets \text{mergesort}([\mathbf{z_a}, \mathbf{z_a}])$
\State $\mathbf{\hat{a}} \gets \text{pred}_a(\mathbf{z_{\hat{a}}})$
\State \Return $\mathbf{\hat{a}}$
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document}
```
| https://tex.stackexchange.com/users/224850 | how to fix the issue in pseudo code algorithms with multiple precedures in latex? | true | You should put these `\LineComment` in the `algorithmic` enviroment.
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\algnewcommand{\LineComment}[1]{\State \(\triangleright\) #1}
\algdef{SE}[PROCEDURE]{Procedure}{EndProcedure}%
[2]{\algorithmicprocedure\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
{\algorithmicend\ \algorithmicprocedure}%
\algdef{SE}[FUNCTION]{Function}{EndFunction}%
[2]{\algorithmicfunction\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
{\algorithmicend\ \algorithmicfunction}%
\begin{document}
\begin{algorithm}
\caption{some text for caption}
\label{alg:mergesort}
\begin{algorithmic}[1]
\LineComment{ s,a: text, text, or text}
\LineComment{ $text: text, or text$}
\LineComment{ text, text, or text}
\Procedure{sort}{s,a}
\State $\mathbf{z_a} \gets \text{srt}_s(a)$
\State $\mathbf{z_a} \gets \text{srt}_a(a)$
\State \Return $\mathbf{z_a}, \mathbf{z_a}$
\EndProcedure
\Procedure{mergesort}{s,a,t}
\State $\mathbf{z_t} \gets \text{srt}_t(t)$
\State $\mathbf{z_a, z_a} \gets \text{sort}(s,a)$
\State $\mathbf{z_a} \gets \mathbf{z_a}+\mathbf{z_t}$ \Comment{text, text, or text}
\State $\mathbf{z_a} \gets \mathbf{z_a}+\mathbf{z_t}$
\State $\mathbf{z_{\hat{a}}} \gets \text{mergesort}([\mathbf{z_a}, \mathbf{z_a}])$
\State $\mathbf{\hat{a}} \gets \text{pred}_a(\mathbf{z_{\hat{a}}})$
\State \Return $\mathbf{\hat{a}}$
\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document}
```
I suggest to use `algpseudocodex`, it is more powerful, such as `\LComment`.
| 1 | https://tex.stackexchange.com/users/238422 | 688464 | 319,389 |
https://tex.stackexchange.com/questions/688480 | 1 | In beamer, I want to insert a bibliography but there are too many references to fit on one page. Hence I sue the option `allowframebreaks` to split it over many pages.
My issue is about the numbering of these pages : it sets a new number for each page, and I would like to have the same number for all of them, as if I had used `\only`.
Here is an ECM :
```
\documentclass{beamer}
\usepackage{biblatex}
\addbibresource{biblio.bib}
\usepackage{lipsum}
\setbeamerfont{page number in head/foot}{size=\large}
\setbeamertemplate{footline}[frame number]
\begin{document}
\begin{frame}
\frametitle{Hello world}
\nocite{*}
This is frame number 1.
\end{frame}
\begin{frame}[allowframebreaks]{Bibliography}
\printbibliography
\end{frame}
\end{document}
```
with the bibliography `biblio.bib` :
```
@article{article1,
author = {article author 1},
journal = {journal name 1},
number = {0},
title = {\lipsum[1]},
volume = {0},
year = {2023}
}
@article{article2,
author = {article author 2},
journal = {journal name 2},
number = {0},
title = {\lipsum[2]},
volume = {0},
year = {2023}
}
```
This table shows the frame numbering I'd like to have on each page
| Pdf page | Numbering I get | Numbering I'd like to have |
| --- | --- | --- |
| 1 (*Hello world*) | 1/3 | 1/2 |
| 2 (*Bibliography I*) | 2/3 | 2/2 |
| 3 (*Bibliography II*) | 3/3 | 2/2 |
| https://tex.stackexchange.com/users/243474 | Do not change frame number with allowframebreaks | true | You could use the `noframenumbering` option to switch off frame numbers and manually increase the counter before the frame:
```
\documentclass{beamer}
\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{lipsum}
\setbeamerfont{page number in head/foot}{size=\large}
\setbeamertemplate{footline}[frame number]
\begin{document}
\begin{frame}
\frametitle{Hello world}
\nocite{*}
\cite{knuth:ct}
This is frame number 1.
\end{frame}
\addtocounter{framenumber}{1}
\begin{frame}[allowframebreaks,noframenumbering]{Bibliography}
\printbibliography
\end{frame}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/36296 | 688481 | 319,396 |
https://tex.stackexchange.com/questions/688457 | 1 | I dislike the look of the output of the following code because the period mark following the fraction looks confused (to my eyes, at least), almost like it's trying to be a degree symbol. I wish that it was sitting on the same (invisible horizontal) line that the denominators are sitting on, only I don't want it to be inside of the denominator (that is, I don't want to write `$$\frac{S}{D} = \frac{x}{360.}$$` rather than `$$\frac{S}{D} = \frac{x}{360}.$$`), because that would awkwardly extend the fraction line above the period.
How can I place the period on the outside of the fraction such that it is at the same vertical level as the period in `$$\frac{S}{D} = \frac{x}{360.}$$`?
```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Suppose I have something like $$\frac{S}{D} = \frac{x}{360}.$$
\end{document}
```
(Note: A closely related question is raised at [Vertical position of punctuation following fractions in display-style equations](https://tex.stackexchange.com/questions/50161/vertical-position-of-punctuation-following-fractions-in-display-style-equations), but there is no talk there of dropping the period to the floor, which is what I want.)
| https://tex.stackexchange.com/users/277990 | Lower the period following a display style fraction | true | I see nothing wrong in the second example (just normal punctuation), but also the third example may be appealing (thin space before the period).
I can see no reason for lowering the period, like in the first example: it's definitely out of place there.
```
\documentclass{article}
\usepackage{amsmath}
\newlength{\lowerpunct}
\newcommand{\finalfrac}[3]{%
% #1 = numerator, #2 = denominator, #3 = punctuation
\settodepth{\lowerpunct}{$\displaystyle\frac{#1}{#2}$}%
\frac{#1}{#2}%
\raisebox{-\lowerpunct}{#3}%
}
\begin{document}
Suppose I have something like
\[
\frac{S}{D} = \finalfrac{x}{360}{.}
\]
Suppose I have something like
\[
\frac{S}{D} = \frac{x}{360}.
\]
Suppose I have something like
\[
\frac{S}{D} = \frac{x}{360}\,.
\]
\end{document}
```
| 1 | https://tex.stackexchange.com/users/4427 | 688482 | 319,397 |
https://tex.stackexchange.com/questions/688476 | 1 | I am writing a document with loads of code snippets, and page breaks make it hard to read. I would like to prevent those if possible.
I saw in [Avoid page breaks in \lstlistings](https://tex.stackexchange.com/questions/73231/avoid-page-breaks-in-lstlistings) that one of the solutions is to wrap the `\lstlisting` with a `\minipage`.
Now, instead of writing this every time, I would like to create a new `\lstnewenvironment` to do that for me. Here is what I tried:
```
\lstnewenvironment{codesnippet}[1][]
{
\lstset{#1}
\begin{minipage}{\linewidth}
}
{
\end{minipage}
}
```
and further down:
```
\begin{codesnippet}
class Wrapper[T](val x: T)
class IntWrapper(val x: Int)
val numbers = 1 to 1000000
val ws = numbers.map(Wrapper(_))
val iws = numbers.map(IntWrapper(_))
val noUnboxing =
iws.map(w => IntWrapper(w.x*w.x + 2*w.x)).foldLeft(0)(_ + _.x)
val withUnboxing =
ws.map(w => Wrapper(w.x*w.x + 2*w.x)).foldLeft(0)(_ + _.x)
\end{codesnippet}
```
However, the compilation crashes as soon as it reaches the code:
```
! Emergency stop.
<*> ./main.tex
*** (job aborted, no legal \end found)
```
I checked using the tip given in [Emergency stop (job aborted/no legal end found)](https://tex.stackexchange.com/questions/444622/emergency-stop-job-aborted-no-legal-end-found#comment1116280_444622), and it indeed crashes once it reaches the `codesnippet` environment.
Is there a way to circumvent this? Or am I doing this wrong?
Here is a minimal example that crashes:
```
\documentclass[a4paper]{article}
\usepackage{listings}
\lstnewenvironment{codesnippet}[1][]
{
\lstset{#1}
\begin{minipage}{\linewidth}
}
{
\end{minipage}
}
\begin{document}
\begin{codesnippet}
class Wrapper[T](val x: T)
class IntWrapper(val x: Int)
val numbers = 1 to 1000000
val ws = numbers.map(Wrapper(_))
val iws = numbers.map(IntWrapper(_))
val noUnboxing =
iws.map(w => IntWrapper(w.x*w.x + 2*w.x)).foldLeft(0)(_ + _.x)
val withUnboxing =
ws.map(w => Wrapper(w.x*w.x + 2*w.x)).foldLeft(0)(_ + _.x)
\end{codesnippet}
\end{document}
```
and the resulting log:
```
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (MiKTeX 23.5) (preloaded format=pdflatex 2023.5.30) 13 JUN 2023 10:43
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./test.tex
(test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-05-15>
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/base\size10.clo
File: size10.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@section=\count186
\c@subsection=\count187
\c@subsubsection=\count188
\c@paragraph=\count189
\c@subparagraph=\count190
\c@figure=\count191
\c@table=\count192
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/listings\listings.sty
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
\lst@mode=\count193
\lst@gtempboxa=\box51
\lst@token=\toks17
\lst@length=\count194
\lst@currlwidth=\dimen141
\lst@column=\count195
\lst@pos=\count196
\lst@lostspace=\dimen142
\lst@width=\dimen143
\lst@newlines=\count197
\lst@lineno=\count198
\lst@maxwidth=\dimen144
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/listings\lstmisc.sty
File: lstmisc.sty 2023/02/27 1.9 (Carsten Heinz)
\c@lstnumber=\count199
\lst@skipnumbers=\count266
\lst@framebox=\box52
)
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/listings\listings.cfg
File: listings.cfg 2023/02/27 1.9 listings configuration
))
Package: listings 2023/02/27 1.9 (Carsten Heinz)
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-pdfte
x.def
File: l3backend-pdftex.def 2023-04-19 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count267
\l__pdf_internal_box=\box53
) (test.aux)
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 14.
LaTeX Font Info: ... okay on input line 14.
\c@lstlisting=\count268
LaTeX Font Info: Trying to load font information for OML+cmr on input line 2
5.
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/base\omlcmr.fd
File: omlcmr.fd 2022/07/10 v2.5l Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OML/cmr/m/n' in size <10> not available
(Font) Font shape `OML/cmm/m/it' tried instead on input line 25.
Overfull \hbox (39.0039pt too wide) in paragraph at lines 25--26
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
[]
Overfull \hbox (15.00366pt too wide) in paragraph at lines 27--28
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
[]
LaTeX Font Info: Trying to load font information for OMS+cmr on input line 2
8.
(C:\Users\Aisteru\AppData\Local\Programs\MiKTeX\tex/latex/base\omscmr.fd
File: omscmr.fd 2022/07/10 v2.5l Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 28.
)
! Emergency stop.
<*> ./test.tex
*** (job aborted, no legal \end found)
Here is how much of TeX's memory you used:
2143 strings out of 476410
31864 string characters out of 5790057
1859845 words of memory out of 5000000
22565 multiletter control sequences out of 15000+600000
512622 words of font info for 33 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
41i,5n,48p,153b,1289s stack positions out of 10000i,1000n,20000p,200000b,200000s
! ==> Fatal error occurred, no output PDF file produced!
```
| https://tex.stackexchange.com/users/239334 | \lstnewenvironment does not work with \minipage | true | I'm not sure why definining such an environment. Anyway, the documentation of `listings` is not really clear about the issue, but when verbatim material is concerned, inner environments have to be called by their internal names, here `\minipage` and `\endminipage`.
```
\documentclass[a4paper]{article}
\usepackage{listings}
\lstnewenvironment{codesnippet}[1][]
{\lstset{#1}\minipage{\linewidth}}
{\endminipage}
\begin{document}
\begin{center}
\begin{codesnippet}
class Wrapper[T](val x: T)
class IntWrapper(val x: Int)
val numbers = 1 to 1000000
val ws = numbers.map(Wrapper(_))
val iws = numbers.map(IntWrapper(_))
val noUnboxing =
iws.map(w => IntWrapper(w.x*w.x + 2*w.x)).foldLeft(0)(_ + _.x)
val withUnboxing =
ws.map(w => Wrapper(w.x*w.x + 2*w.x)).foldLeft(0)(_ + _.x)
\end{codesnippet}
\end{center}
\end{document}
```
Here I reproduce what I get with `columns=flexible`, because without this option the output is really awful.
| 1 | https://tex.stackexchange.com/users/4427 | 688484 | 319,398 |
https://tex.stackexchange.com/questions/688467 | 0 | Somewhere I read about egreg's `\ensuremath`-only-when-really-needed-campaign and I was convinced by it, but I often need to use some mathematical shapes in the context of "text" and I was wondering if commands like the following should also be barred by the idea of this campaign?
```
\DeclareTextCommand{\textnull}{TU}{$\varnothing$}
\DeclareTextCommand{\textnull}{OT1}{$\varnothing$}
\DeclareTextCommand{\textnull}{T1}{$\varnothing$}
\DeclareTextCommand{\textempty}{TU}{$\emptyset$}
\DeclareTextCommand{\textempty}{OT1}{$\emptyset$}
\DeclareTextCommand{\textempty}{T1}{$\emptyset$}
```
I think they should be, because technically where I will be using these symbols will not be a place for "maths", so now my actual question is how to access these shapes from fonts and call them in TeX? Irrespective of mode, just accessing a font-shape. If the method is different for different engines, I would love to know all of them.
| https://tex.stackexchange.com/users/174620 | How to access the shapes of math-mode characters in text-mode? | true | `amssymb` defines
```
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
...
\DeclareMathSymbol{\varnothing} {\mathord}{AMSb}{"3F}
```
So you can access this in text mode as
```
\documentclass{article}
\newcommand\textvarnothing{{\usefont{U}{msb}{m}{n}\symbol{"3F}}}
\begin{document}
Look \textvarnothing\ no math.
\end{document}
```
but I see no advantages over `$\varnothing$`.
| 4 | https://tex.stackexchange.com/users/1090 | 688492 | 319,400 |
https://tex.stackexchange.com/questions/168757 | 16 | I am attempting to construct a Beamer presentation and I'm experiencing some difficulty. While I can insert a background image on the title slide using a "global setting", I don't want it to appear on every subsequent slide. Every subsequent slide (including the navigation/menu slide) should have a completely blue background with text of a currently undetermined color. Any help would be appreciated.
```
\documentclass{beamer}
\usetheme{Antibes}
\usepackage{graphicx}
\usepackage{tikz}
% \setbeamercolor{normal text}{fg=yellow}
\setbeamercolor{frametitle}{bg={}}
\title[...]{My title}
\usebackgroundtemplate{\includegraphics[width=\paperwidth, height=\paperheight]{08171830.jpg}}
\beamertemplatenavigationsymbolsempty
\date{}
\begin{document}
\AtBeginSection[]
{
\usebackgroundtemplate{}
\begin{frame}
\setbeamertemplate{background canvas}[default]
\frametitle{Outline}
\tableofcontents[currentsection]
\end{frame}
}
\begin{frame}
\titlepage
\end{frame}
\section{Introduction}
\usebackgroundtemplate{}
\begin{frame}{History}
This is a test page!
\end{frame}
\end{document}
```
| https://tex.stackexchange.com/users/49048 | Creating a background image on the title page only using Beamer | false | We can use tikz to set a background image with absolute positioning and wrap it in `\addtobeamertemplate{title page}` which can be done from the header or a style file.
```
\addtobeamertemplate{title page}{
\begin{tikzpicture}[remember picture,overlay]
\node[above right,inner sep=0pt] at (current page.south west)
{
\includegraphics[width=\paperwidth]{background.jpg}
};
\end{tikzpicture}
}{}
```
The tikz code comes from this article on making title slides <https://latex-beamer.com/tutorials/beautiful-title-slide/>
| 2 | https://tex.stackexchange.com/users/173929 | 688493 | 319,401 |
https://tex.stackexchange.com/questions/688499 | 0 | I am looking for the same functionality as simc/auto\_size\_text,
a flutter widget that automatically resizes text to fit perfectly within its bounds.
However, I want to achieve this for physically printed flashcards at various sizes. Particularly A6 paper, but a template that I can alter for different page sizes, A4 to business card, would be best.
```
\fillpage{}
\resizebox{\textwidth}{!}{
?
?
```
Can LaTex do this? What command to search for, or should I start making a python script to go directly to pdf?
| https://tex.stackexchange.com/users/298907 | Automatically resizes text to fit perfectly within its bounds | true | The `fitting` library from [`tcolorbox`](https://ctan.org/pkg/tcolorbox?lang=en) can be used to fit text to boxes. Below is a bare minimum example; see the `tcolorbox` documentation for how to adjust other properties of the box. Paper size can be set via `geometry` package.
*Note:* the library never increases the text size by itself. Instead, you need to specify a base font size that is known to be too big, after which the library will scale it down to fit. (You can compare the effects by removing the `\tcbset{fit basedim=35pt}` line from the code below.)
```
\documentclass{article}
\usepackage{fix-cm} % Allow arbitrary font scaling for Computer Modern
\usepackage[margin=0.25in]{geometry} % Just so that the examples fit on the same page
\usepackage{tcolorbox}
\tcbuselibrary{fitting}
\usepackage{lipsum} % Just for dummy text
\begin{document}
\tcbset{fit basedim=35pt} % tcb doesn't enlarge text; it starts with this base dimensional and shrinks text to fit
% So if you need the font to possibly scale __up__ you need to specify a larger size to boot.
\tcboxfit[height=5.8in,width=4.1in]{\lipsum[1]} % A6 size, portrait
\tcboxfit[width=5.8in,height=4.1in]{\lipsum[2]} % A6 size, landscape
\end{document}
```
| 1 | https://tex.stackexchange.com/users/119 | 688506 | 319,407 |
https://tex.stackexchange.com/questions/688491 | 1 | I have the following table I want to span across the two main text columns in IEEEtran, however, whenever I try to print it, the table goes on to the next page. I have tried the H specifier but it makes the table disappear. What can I do? Could somebody please help me out?
```
\begin{table*}{h!}
\centering
\caption{BTC dataset sample (last five rows)}
\label{tab:dataset}
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
time & timeDate & close & high & low & open & volumefrom & volumeto \\ \hline
1682985600000 & 2023-05-02 & 28694.85 & 28896.62 & 27897.95 & 28086.19 & 32635.23 & 927167494.21 \\ \hline
1683072000000 & 2023-05-03 & 29041 & 29274.35 & 28155.84 & 28694.85 & 40240.91 & 1150094643.14 \\ \hline
1683158400000 & 2023-05-04 & 28866.54 & 29370.41 & 28703.83 & 29041 & 27555.47 & 798614954.67 \\ \hline
1683244800000 & 2023-05-05 & 29550.84 & 29697.23 & 28853.1 & 28866.54 & 35357.4 & 1037025191.1 \\ \hline
1683331200000 & 2023-05-06 & 28845.45 & 29857.86 & 28459.77 & 29550.84 & 23039.88 & 670625654.68 \\ \hline
\end{tabular}
\end{table*}
```
| https://tex.stackexchange.com/users/258412 | Issue trying to print table across whole page without printing on the next one with IEEEtran | false | @Zarko has already pointed out in a comment that if the `twocolumn` option is is in effect (as is the case by default for the `IEEEtran` document class), LaTeX *always* places double-wide floats, i.e., `figure*` and `table*` environments, at the *top of a page*. While this may seem to be needlessly constraining at first, there are excellent typographical reasons for imposing this constraint. The chief advantage is legibility.
There *is* something you can do, though: Make the table more attractive from a visual/aesthetic point of view. The purpose of this action is to entice the readers of your document to actually spend more than about twelve milliseconds glancing at the table.
* The first improvement would be to give the table a more open and inviting "looK". This may be achieved by getting rid of all vertical lines or "rules" and using fewer, but well-spaced horizontal lines or "rules". This may be achieved with the help of the user macros of the [booktabs](https://www.ctan.org/pkg/booktabs/) package.
* The second improvement would be to align the numbers in columns 3 thru 8 on their decimal markers. This may be achieved with the help of the `S` column type provided by the [siunitx](https://ctan.org/pkg/siunitx) package.
I trust you will agree with me that taking these simple measures can have a major effect.
```
\documentclass{IEEEtran}
\usepackage{newtxtext,newtxmath} % Times Roman for both text and math material
\usepackage{siunitx,booktabs}
\begin{document}
\begin{table*}
\centering
\caption{before}
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
time & timeDate & close & high & low & open & volumefrom & volumeto \\ \hline
1682985600000 & 2023-05-02 & 28694.85 & 28896.62 & 27897.95 & 28086.19 & 32635.23 & 927167494.21 \\ \hline
1683072000000 & 2023-05-03 & 29041 & 29274.35 & 28155.84 & 28694.85 & 40240.91 & 1150094643.14 \\ \hline
1683158400000 & 2023-05-04 & 28866.54 & 29370.41 & 28703.83 & 29041 & 27555.47 & 798614954.67 \\ \hline
1683244800000 & 2023-05-05 & 29550.84 & 29697.23 & 28853.1 & 28866.54 & 35357.4 & 1037025191.1 \\ \hline
1683331200000 & 2023-05-06 & 28845.45 & 29857.86 & 28459.77 & 29550.84 & 23039.88 & 670625654.68 \\ \hline
\end{tabular}
\bigskip\bigskip
\caption{after}
\begin{tabular}{@{}
l l
*{5}{S[table-format= 5.2]}
S[table-format=10.2]
@{}}
\toprule
time & date & {close} & {high} & {low} & {open} & {volumefrom} & {volumeto} \\ \midrule
1682985600000 & 2023-05-02 & 28694.85 & 28896.62 & 27897.95 & 28086.19 & 32635.23 & 927167494.21 \\
1683072000000 & 2023-05-03 & 29041 & 29274.35 & 28155.84 & 28694.85 & 40240.91 & 1150094643.14 \\
1683158400000 & 2023-05-04 & 28866.54 & 29370.41 & 28703.83 & 29041 & 27555.47 & 798614954.67 \\
1683244800000 & 2023-05-05 & 29550.84 & 29697.23 & 28853.1 & 28866.54 & 35357.4 & 1037025191.1 \\
1683331200000 & 2023-05-06 & 28845.45 & 29857.86 & 28459.77 & 29550.84 & 23039.88 & 670625654.68 \\ \bottomrule
\end{tabular}
\end{table*}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/5001 | 688507 | 319,408 |
https://tex.stackexchange.com/questions/687411 | 1 | This is essentially a modified question of [1](https://tex.stackexchange.com/questions/148563/how-can-i-streamline-insertion-of-latex-math-mode-symbols-in-auctex) but with math fonts instead.
What I want is an AucTex command to add to my `.emacs` to do the following:
If I'm outside a math environment like `equation` or outside a pair of dollar signs `$`, If I press ``1 C`, `$\mathbb{C}$@` is inserted in the buffer where `@` denotes the position of the cursor.
However, if I'm inside a math environment or inside a a pair of dollar signs, only `\mathbb{C}@` is inserted.
I want ``2 C` to do the same as ``1 C` but with `\mathcal` instead.
The insertion of math fonts is very common, so this would save a bit of time.
I tried modifying the answer of @[giordano](https://tex.stackexchange.com/users/31416/giordano) but I couldn't do it.
| https://tex.stackexchange.com/users/12484 | How can I streamline insertion of math fonts in AucTeX? | true | It turned out to be simpler than I thought.
To get the desired effect with `\mathcal`, just add the following to `.emacs`
```
(defun my-LaTeX-math-cal (char dollar)
(interactive "*c\nP")
(if (texmathp)
(LaTeX-math-cal char dollar)
(LaTeX-math-cal char t))
)
```
and then bind `my-LaTeX-math-cal` to whatever shortcut. Similar things can be done for `\mathbb` and `\mathfrak`.
| 0 | https://tex.stackexchange.com/users/12484 | 688508 | 319,409 |
https://tex.stackexchange.com/questions/688499 | 0 | I am looking for the same functionality as simc/auto\_size\_text,
a flutter widget that automatically resizes text to fit perfectly within its bounds.
However, I want to achieve this for physically printed flashcards at various sizes. Particularly A6 paper, but a template that I can alter for different page sizes, A4 to business card, would be best.
```
\fillpage{}
\resizebox{\textwidth}{!}{
?
?
```
Can LaTex do this? What command to search for, or should I start making a python script to go directly to pdf?
| https://tex.stackexchange.com/users/298907 | Automatically resizes text to fit perfectly within its bounds | false | Another possibility is to use [`shapepar`](https://ctan.org/pkg/shapepar) together with `\resizebox`.
**Caveats**:
* `\resizebox` has its first two arguments "width" and "height"; but `\shapepar`'s `\rectangleshape` has them as "height" first and then "width". Be careful when you prepare your document.
* `\shapepar` can only, as its name suggests, shape a paragraph. So no *displayed* math (inline math is okay) or anything that adjusts the vertical spacing.
* `\Shapepar` works on entire paragraphs; you need to make sure that the paragraph is terminated (via either a blank line or a `\par`) if you wrap it in `\resizebox`.
Code:
```
\documentclass{article}
\usepackage[margin=0.25in]{geometry}
\usepackage{shapepar} % Use shapepar to build the correct shape of text block
\usepackage{graphicx} % Use resizebox to scale it to the right size
\usepackage{lipsum}
\begin{document}
% Note that \Shapepar requires the paragraph to be terminated.
% This means we must include either a blank line or a \par.
\resizebox{5.8in}{!}{\Shapepar{\rectangleshape{4.1}{5.8}} \lipsum[1]\par}
\resizebox{4.1in}{!}{\Shapepar{\rectangleshape{5.8}{4.1}} \lipsum[2]\par}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/119 | 688510 | 319,410 |
https://tex.stackexchange.com/questions/688521 | 0 | Yes, I know there is an `arrowhead` option, but for some reason it didn't works. Is there an alternative?
```
\documentclass{article}
\usepackage[
a4paper,
margin=15mm,
bindingoffset=2mm,
heightrounded,
]{geometry}
\usepackage{mathptmx}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes.arrows,arrows.meta}
\begin{document}
\begin{flushleft}
\begin{tikzpicture}
\draw[blue, ultra thick] (0,0) -- (4,0);
\draw[blue, ultra thick] (0,5) -- (4,5);
\node at (-1, 0) {\huge{$E_0$}};
\node at (-1, 5) {\huge{$E_1$}};
\foreach \x in {0,1,2,3}
\draw[red, very thick] (6,\x) -- (10,\x);
\foreach \x in {0,0.2,0.4,0.6}
\draw[black, thick] (12,\x) -- (16,\x);
\foreach \x in {1,1.2,1.4,1.6}
\draw[black, thick] (12,\x) -- (16,\x);
\foreach \x in {2,2.2,2.4,2.6}
\draw[black, thick] (12,\x) -- (16,\x);
\foreach \x in {5,6,7,8}
\draw[red, very thick] (6,\x) -- (10,\x);
\foreach \x in {5,5.2,5.4,5.6}
\draw[black, thick] (12,\x) -- (16,\x);
\foreach \x in {6,6.2,6.4,6.6}
\draw[black, thick] (12,\x) -- (16,\x);
\foreach \x in {7,7.2,7.4,7.6}
\draw[black, thick] (12,\x) -- (16,\x);
\draw[latex-latex] (2,0) -- (2,5) node[midway,fill=white]{\huge{$\Delta E_1$}};
\end{tikzpicture}
\end{flushleft}
\end{document}
```
| https://tex.stackexchange.com/users/258662 | Change arrow head in latex style | false | I don't know if it is what you are interested in but you can use **stealth arrows**,
```
\documentclass{article}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows,shapes,positioning}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{figure}
\begin{tikzpicture}
\draw[very thick, {Stealth[length=3mm, width=2.5mm]}-{Stealth[length=3mm, width=8mm]}] (0,-1)--(10,-1);
\end{tikzpicture}
\end{figure}
\end{document}
```
giving the following result
| 2 | https://tex.stackexchange.com/users/298934 | 688526 | 319,414 |
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 | Using `\pause` inside a tikzpicture is not the best of ideas. This can cause other problems, like missing footlines.
Instead, I suggest to use the `overlay-beamer-styles` library:
```
---
title: "Test Slides"
format: beamer
header-includes:
- \usepackage{tikz}
- \usetikzlibrary{overlay-beamer-styles}
---
### Intro
Here is a TikZ picture
```{=latex}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\draw[visible on=<2->] (0,0) circle (2cm);
\end{tikzpicture}
```
```
| 1 | https://tex.stackexchange.com/users/36296 | 688529 | 319,415 |
https://tex.stackexchange.com/questions/688530 | 0 | This question follows <https://tex.stackexchange.com/a/688116/298558> .
Here, I asked a question about \newtcolorbox taking agruments. On page 15 on the manual there is an example that takes 2 arguments:
```
\newtcolorbox{mybox}[2][]{colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries,
colbacktitle=red!85!black,enhanced, attach boxed title to top center={yshift=-2mm},
title={#2},#1}
```
```
\begin{mybox}[colback=yellow]{Hello there}
This is my own box with a mandatory title
and options.
\end{mybox}
```
I would like to pass 3 or 4 arguments to \newtcolorbox so that it takes the following form:
```
\newtcolorbox{mybox}[4][]{colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries,
colbacktitle=red!85!black,enhanced, attach boxed title to top center={yshift=-2mm},
title={#2}, height = #3, halign = #4, #1}
```
This works:
```
\begin{mybox}[colback=yellow]{Hello there}{0.3\textheight}{flush center} This is my own box with a mandatory title and options. \end{mybox}
```
This doesn't work:
```
\begin{mybox}[colback=yellow, halign = flush left]{Hello there}{0.3\textheight}
```
I would be pleased, if someone could give me ideas.
| https://tex.stackexchange.com/users/298558 | 3 or 4 arguments for `\newtcolorbox` | true | You provided no example in the question but in comments you show
```
\documentclass{article}
\usepackage[many]{tcolorbox}
\newtcolorbox{mybox}[4][]{%
colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries,
colbacktitle=red!85!black,enhanced, attach boxed title to top center={yshift=-2mm},
title={#2}, height = {#3}, halign = {#4}, #1}
\begin{document}
\begin{mybox}[colback=yellow]{Hello there}{0.3\textheight}
This is my own box with a mandatory title
and options.
\end{mybox}
\end{document}
```
which produces
```
! Package pgfkeys Error: Choice 'T' unknown in choice key '/tcb/halign'. I am g
oing to ignore this key.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help.
...
l.10 T
his is my own box with a mandatory title
?
```
Note the linebreak after `T` showing this has been read. It is the 4th argument of your command, so produce `halign={T}` and the error shown.
You could use
```
\documentclass{article}
\usepackage[many]{tcolorbox}
\newtcolorbox{mybox}[4][]{%
colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries,
colbacktitle=red!85!black,enhanced, attach boxed title to top center={yshift=-2mm},
title={#2}, height = {#3}, halign = {#4}, #1}
\begin{document}
\begin{mybox}[colback=yellow]{Hello there}{0.3\textheight}{left}
This is my own box with a mandatory title
and options.
\end{mybox}
\end{document}
```
But mixing keyval and positional arguments is an anti-pattern, I would use
```
\documentclass{article}
\usepackage[many]{tcolorbox}
\newtcolorbox{mybox}[2][]{%
colback=red!5!white, colframe=red!75!black,fonttitle=\bfseries,
colbacktitle=red!85!black,enhanced, attach boxed title to top center={yshift=-2mm},
title={#2}, #1}
\begin{document}
\begin{mybox}[colback=yellow, height = 0.3\textheight, halign =left]{Hello there}
This is my own box with a mandatory title
and options.
\end{mybox}
\end{document}
```
| 2 | https://tex.stackexchange.com/users/1090 | 688536 | 319,420 |
https://tex.stackexchange.com/questions/688538 | 1 | Take the following MWE:
```
\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage[english]{babel}
\title[Title]{Title}
\author[Author]{Author}
\institute{Institute}
\date[21/10/1985]{21/10/1985}
\begin{document}
\setbeamercovered{transparent}
\begin{frame}
\frametitle{Transparency}
\begin{itemize}
\onslide<1>
\item Back
\onslide<2>
\item to
\onslide<3>
\item the
\onslide<4>
\item Future.
\end{itemize}
\end{frame}
\end{document}
```
Presently, we have the following situation:
* in the first frame, the first bullet is visible and the remaining three are transparent;
* in the second frame, the second bullet is visible and the remaining three are transparent;
* in the third frame, the third bullet is visible and the remaining three are transparent;
* in the fourth frame, the fourth bullet is visible and the remaining three are transparent.
I have the following question. Can we obtain the following pattern?
* in the first frame, the first bullet is visible and the remaining three are invisible;
* in the second frame, the first bullet is transparent, the second bullet is visible, and the remaining two are invisible;
* in the third frame, the first and the second bullet are transparent, the third bullet is visible and the fourth is invisible;
* in the fourth frame, the first, the second bullet, and the third bullet are transparent, and the fourth is visible.
Thanks a lot in advance for any feedback.
| https://tex.stackexchange.com/users/77815 | Uncovering Frames with Transparency and Invisibility at the same Time | true | You could set the `still covered` opaqueness to 0% so that still covered items are not visible:
```
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamercovered{%
still covered={\opaqueness<1->{0}},
again covered={\opaqueness<1->{15}}
}
\begin{document}
\begin{frame}
\frametitle{Transparency}
\begin{itemize}[<+>]
\item Back
\item to
\item the
\item Future.
\end{itemize}
\end{frame}
\end{document}
```
| 2 | https://tex.stackexchange.com/users/36296 | 688540 | 319,422 |
https://tex.stackexchange.com/questions/688544 | 0 | The [TeX Live availability](https://www.tug.org/texlive/acquire.html) page states that installing old versions of TeX Live can be done, and different versions on the same system will not conflict. It provides a link to the [historic archive](https://www.tug.org/historic/), but no instructions for how to do the installation.
The [Quick install for Unix](https://www.tug.org/texlive/quickinstall.html) page provides step-by-step instructions, but they do not work when installing older versions. The `./install.tl` perl script complains that the repository is of a different version than the script, like so:
```
./install-tl: The TeX Live versions of the local installation
and the repository being accessed are not compatible:
local: 2021
repository: 2023
```
| https://tex.stackexchange.com/users/19109 | Seeking step-by-step instructions to install an old version of TeX Live | false | Steps
-----
To install the 2021 version of Tex Live on a Unix system, run the following commands. For releases from other years, simply replace `2021` with the desired year.
```
cd /tmp # or some other working directory
wget https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2021/tlnet-final/install-tl-unx.tar.gz
zcat < install-tl-unx.tar.gz | tar xf - # See below about the tar archive name
cd install-tl-20220322/ # Replace with the directory that zcat/tar actually produced
sudo mkdir /usr/local/texlive
sudo chown $USER /usr/local/texlive # See below regarding root or group ownership
./install-tl -repository ftp://tug.org/historic/systems/texlive/2021/tlnet-final
```
Finally, prepend `/usr/local/texlive/2021/bin/x86_64-linux` (replacing the
year and platform as appropriate) to your PATH. You can have multiple versions installed with no problem because each is located entirely within a separate subdirectory: `/usr/local/texlive/2020/`, `/usr/local/texlive/2021/`, etc. To switch from one version to another, just change your PATH.
Notes
-----
In the `wget` command, `https://ftp.math.utah.edu/pub/tex/historic` is the URL of the mirror for the United States. You should replace it with another mirror if you are downloading TeX Live elsewhere in the world. Other mirrors are shown on the [Historic archive](https://www.tug.org/historic/) page.
If you've been installing multiple versions and have already downloaded another version, then `wget` may append a number to the name of the tar archive, giving you something like `install-tl-unx.tar.gz.2`. Be sure to use this name in the `zcat` line.
In the directory whose name is of the form `install-tl-*`, the `*` is the date of the last release of TeX Live of the year in question. Usually this date will
be early in the following year.
You do not need to be root to run `./install-tl` nor does TeX Live need to be owned by root. You only need a [writable directory](https://www.tug.org/texlive/quickinstall.html#running) to install to. By default, `./install-tl` installs to `/usr/local`. Best is to create a group for TeX Live admins, run `chgrp` to change the group of `/usr/local/texlive`, add user(s) to the group, and run `./install-tl` as one of the users of that group.
`./install-tl` is a perl script. The original instructions from TUG called `perl` explicitly to run it. If the last command above doesn't work, try this instead:
```
perl ./install-tl -repository ftp://tug.org/historic/systems/texlive/2021/tlnet-final
```
| 1 | https://tex.stackexchange.com/users/19109 | 688545 | 319,424 |
https://tex.stackexchange.com/questions/688563 | 0 | I have a beamer code (see below) that generates some dummy slides using Metropolis theme. This specific part of the code
```
%****************************************
%****************************************
%****************************************
% PROBLEM HERE
%****************************************
%****************************************
%****************************************
\newcommand{\MenuSpacing}{50em}
\newcommand{\HorizontalPositionOfPageNumber}{11.5pt}
\setbeamertemplate{headline}{%
\leavevmode%
\hbox{%
% \definecolor{boxcol}{gray}{0.13}
\begin{beamercolorbox}[wd=\paperwidth,ht=4ex,dp=2.25ex]{palette}%
\hspace*{\MenuSpacing}
\MenuTextSize{\insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll \hskip0pt}}
\end{beamercolorbox}%
}
}
\setbeamercovered{dynamic}
%****************************************
%****************************************
%****************************************
```
takes care of inserting a menu on the top right of each slide. The alignment of the menu with the page number is done manually, by means of the command \MenuSpacing. When a new section is added or an old section is removed, the alignment must be reestablished by means of several recompilations and adjustments, which is quite tedious. So, I am searching for a way to make this alignment automatic. Would you have any idea about how to achieve that?
```
%!TEX program = xelatex
\documentclass[xcolor=dvipsnames,compress,aspectratio=169]{beamer} % Aspect ratio=16:9
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
\usepackage{ragged2e}
\usepackage{mathtools}
\usepackage{changepage}
\usepackage{ifthen}
%****************************************
%****************************************
%****************************************
% DONE
%****************************************
%****************************************
%****************************************
%*< My Colors >
\definecolor{mywhite} {RGB}{245, 245, 247}
\definecolor{myblue} {RGB}{ 73, 135, 156}
\definecolor{myred} {RGB}{255, 73, 93}
%****************************************
%****************************************
%****************************************
\makeatletter
\newcommand{\srcsizetwo}{\@setfontsize{\srcsize}{2pt}{2pt}}
\newcommand{\srcsizethree}{\@setfontsize{\srcsize}{3pt}{3pt}}
\newcommand{\srcsizefour}{\@setfontsize{\srcsize}{4pt}{4pt}}
\newcommand{\srcsizefive}{\@setfontsize{\srcsize}{5pt}{5pt}}
\newcommand{\srcsizesix}{\@setfontsize{\srcsize}{6pt}{6pt}}
\newcommand{\srcsizeseven}{\@setfontsize{\srcsize}{7pt}{7pt}}
\newcommand{\srcsizeeight}{\@setfontsize{\srcsize}{8pt}{8pt}}
\newcommand{\srcsizenine}{\@setfontsize{\srcsize}{9pt}{9pt}}
\newcommand{\srcsizeten}{\@setfontsize{\srcsize}{10pt}{10pt}}
\newcommand{\srcsizeeleven}{\@setfontsize{\srcsize}{11pt}{11pt}}
\newcommand{\srcsizetwelve}{\@setfontsize{\srcsize}{12pt}{12pt}}
%****************************************
%****************************************
%****************************************
\newcommand{\crlf}{\textbackslash}
\newcommand{\MenuTextSize}{\srcsizefour}
\newcommand{\mytitlesize}{\srcsizeeleven}
\newcommand{\mytextsize}{\srcsizeeight}
\newcommand{\mytextsizesmall}{\srcsizeeight}
\newcommand{\mytextsizesmaller}{\srcsizeseven}
\newcommand{\mytextsizeevensmaller}{\srcsizesix}
%****************************************
%****************************************
%****************************************
%*< Slide Style >
\apptocmd{\frame}{}{\justifying}{}
\let\olditem\item
\renewcommand\item{\olditem\justifying}
\renewcommand{\indent}{\hspace*{1em}}
\setbeamertemplate{itemize/enumerate body begin}{\mytextsize}
\setbeamertemplate{itemize/enumerate subbody begin}{\mytextsize}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
%****************************************
%****************************************
%****************************************
%*< Slide Style >
%Loading Metropolis...
\usetheme{metropolis}
\usefonttheme{professionalfonts}
\defaultfontfeatures{Mapping=tex-text}
\setsansfont[BoldItalicFont={* Demi Bold Italic},
ItalicFont={* Demi Bold},
BoldFont={* Demi Bold},
% UprightFont={* Regular}]{Fira}
UprightFont={* Regular}]{Avenir Next}
% \setsansfont[BoldFont={Fira Sans}]{Fira Sans Light}
% \setmonofont{Fira Mono}
% \usepackage[sfdefault]{Fira Sans}
\newcommand{\mycolortheme}{myblue}
\newcommand{\mycolorbackground}{mywhite}
\newcommand{\colorforegroundoftheprogressbar}{myblue}
\newcommand{\colorbackgroundoftheprogressbar}{gray}
\metroset{progressbar=foot,numbering=none, titleformat frame=regular}
% \setbeamercolor{progress bar}{fg=airforceblue, bg=gray}
\setbeamercolor{progress bar}{fg=\colorforegroundoftheprogressbar, bg=\colorbackgroundoftheprogressbar}
\setbeamercolor{palette}{bg=Black!90}
\setbeamercolor{palettew}{bg=White}
\setbeamercolor{section in head/foot}{fg=white,bg=Black!97}
\beamertemplatenavigationsymbolsempty
% \setbeamertemplate{frametitle}{}
\setbeamertemplate{frametitle continuation}[from second][\nonumber]
\setbeamerfont{frametitle}{size=\mytitlesize,series=\bfseries\scshape}
\setbeamercolor{frametitle}{fg=Black,bg=white}
% \setbeamerfont{normal text}{size=\mytextsizesmall}
\setbeamerfont{caption}{series=\normalfont,size=\mytextsizesmaller}
%****************************************
%****************************************
%****************************************
% PROBLEM HERE
%****************************************
%****************************************
%****************************************
\newcommand{\MenuSpacing}{50em}
\newcommand{\HorizontalPositionOfPageNumber}{11.5pt}
\setbeamertemplate{headline}{%
\leavevmode%
\hbox{%
% \definecolor{boxcol}{gray}{0.13}
\begin{beamercolorbox}[wd=\paperwidth,ht=4ex,dp=2.25ex]{palette}%
\hspace*{\MenuSpacing}
\MenuTextSize{\insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll \hskip0pt}}
\end{beamercolorbox}%
}
}
\setbeamercovered{dynamic}
%****************************************
%****************************************
%****************************************
\setbeamertemplate{footline}{
\usebeamercolor[fg]{page number in head}%
\usebeamerfont{page number in head}%
\hfill
\srcsizefour{\color{black!30}\insertframenumber~|~\inserttotalframenumber}
\hspace{\HorizontalPositionOfPageNumber}
\vspace{8pt}
}
\date{}
\apptocmd{\frame}{}{\justifying}{}
%****************************************
%****************************************
%****************************************
% Loading chapters
\begin{document}
\maketitle
\AtBeginSection{}
\section{~~Section 1}
\begin{frame}[t,fragile,allowframebreaks]\frametitle{}
\mytextsize
\justifying Dummy text\ldots
\end{frame}
\section{~~Section 2}
\begin{frame}[t,fragile,allowframebreaks]\frametitle{}
\mytextsize
\justifying Dummy text\ldots
\end{frame}
\section{~~Section 3}
\begin{frame}[t,fragile,allowframebreaks]\frametitle{}
\mytextsize
\justifying Dummy text\ldots
\end{frame}
\section{~~Section 4}
\begin{frame}[t,fragile,allowframebreaks]\frametitle{}
\mytextsize
\justifying Dummy text\ldots
\end{frame}
\section{~~Section 5}
\begin{frame}[t,fragile,allowframebreaks]\frametitle{}
\mytextsize
\justifying Dummy text\ldots
\end{frame}
\section{~~Section 6}
\begin{frame}[t,fragile,allowframebreaks]\frametitle{}
\mytextsize
\justifying Dummy text\ldots
\end{frame}
\end{document}
```
| https://tex.stackexchange.com/users/107636 | Automatic menu alignment in Metropolis | true | You are adding `\hskip0pt plus1filll \hskip0pt` on the right hand side of your navigation bar, this makes it left aligned. Instead of making your navigation bar left aligned and then manually add space in front of it, make it right aligned:
```
\documentclass[xcolor=dvipsnames]{beamer}
\makeatletter
\newcommand{\srcsizefour}{\@setfontsize{\srcsize}{4pt}{4pt}}
\makeatother
\usetheme{metropolis}
\setbeamercolor{palette}{bg=Black!90}
\setbeamercolor{section in head/foot}{fg=white,bg=Black!97}
\newcommand{\HorizontalPositionOfPageNumber}{11.5pt}
\setbeamertemplate{headline}{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=4ex,dp=2.25ex]{palette}%
\srcsizefour
\insertsectionnavigationhorizontal{\paperwidth}{\hskip0pt plus1filll \hskip0pt}{\hskip5pt}
\end{beamercolorbox}%
}
}
\setbeamertemplate{footline}{
\usebeamercolor[fg]{page number in head}%
\usebeamerfont{page number in head}%
\hfill
\srcsizefour\color{black!30}\insertframenumber~|~\inserttotalframenumber
\hspace{\HorizontalPositionOfPageNumber}
\vspace{8pt}
}
\addtobeamertemplate{section in head/foot}{\hskip0.1cm}{}
\begin{document}
\section{Section 1}
\begin{frame}
\frametitle{}
Dummy text\ldots
\end{frame}
\section{Section 2}
\begin{frame}
\frametitle{}
Dummy text\ldots
\end{frame}
\section{Section 3}
\begin{frame}
\frametitle{}
Dummy text\ldots
\end{frame}
\section{Section 4}
\begin{frame}
\frametitle{}
Dummy text\ldots
\end{frame}
\section{Section 5}
\begin{frame}
\frametitle{}
Dummy text\ldots
\end{frame}
\section{Section 6}
\begin{frame}
\frametitle{}
Dummy text\ldots
\end{frame}
\end{document}
```
| 0 | https://tex.stackexchange.com/users/36296 | 688566 | 319,434 |
https://tex.stackexchange.com/questions/157408 | 4 | How can I write a text section in latex in the right bottom side of the page with a nice font ? It is for some thanks text.
Now I have:
```
\vfill
{\sffamily
\begin{flushright}
\begin{tabular}{l}
TEXTTEXTTEXTTEXTTEXT\\
\\
TEXTTEXTTEXTTEXTTEXT\\
\\
TEXTTEXTTEXTTEXTTEXT\\
\\
TEXTTEXTTEXTTEXTTEXTTEXT\\
\end{tabular}
\end{flushright}
}
```
| https://tex.stackexchange.com/users/76035 | Text section in right bottom of side | false | There is a neat package called `textpos` that helps you to place anything absolutely on the page.
### Loading the package
Include it in your preamble. You need to pass the option absolute for absolute positioning to work.
`\usepackage[absolute]{textpos}`
If you want to use relative positioning later you may always switch between the two modes using:
`\TPoptions{absolute=false}` and `\TPoptions{absolute=true}`
But you need to pass this package option for absolute positioning to work. Enabling it later using `\TPoptions{absolute=true}` will result in an error message.
### Defining the grid
Now you need to define a grid:
`\TPGrid[horizontalBorder,verticalBorder]{numRows}{numColumns}`
Here is an example grid:
`\TPGrid[20mm,10mm]{5}{5}`
### Placing boxes
You may enable debug view of the grid with this instruction:
`\TPShowGrid{numRows}{numColumns}`
Ensure that the numRows and numColumns match
In our case we want a 1 by 1 grid without any border:
`\TPGrid[0mm,0mm]{1}{1}`
It might be helpful to enable debug view of our boxes:
`\TPoptions{showboxes=true}`
Now you can start positioning your textblock:
```
\begin{textblock}{widthInGridCells}[originXAsFractionOfBoxWidth,originYAsFractionOfBoxHeight](XInGridCells,YInGridCells)
Textcontent
\end{textblock}
```
Lets talk about the options:
* **widthInGridCells** (How wide our box is. Approximate its width based on your content)
* **XInGridCells** (Where the x coordinate of the origin of our box should be placed. We want to place it all the way in the bottom right corner. As our grid is only one cell wide we put a 1 here)
* **YInGridCells** (Where the y coordinate of the origin of our box should be placed. We want to place it all the way in the bottom right corner. As our grid is only one cell high we put a 1 here)
* **originXAsFractionOfBoxWidth** (Where the origin of our box is supposed to be. (0,0) is the top left corner and (1,1) the bottom right corner.) We want out origin to be all the way to the right of the box. Therefore we put a 1 here.
* **originYAsFractionOfBoxHeight** (Where the origin of our box is supposed to be. (0,0) is the top left corner and (1,1) the bottom right corner.) We want out origin to be all the way to the bottom of the box. Therefore we put a 1 here.
`\begin{textblock}{0.25}[1,1](1,1)` will now put the origin of our box in the bottom right corner of the page. We specified our origin to be the bottom right corner of our box. The box is 1/4 of our page wide
### Example bottom right with page padding:
```
\TPGrid[10mm,10mm]{1}{1}
%\TPShowGrid{1}{1}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{0.25}[1,1](1,1)
\rule{5cm}{0.12mm}\\
Signum, Date
\end{textblock}
```
### Example bottom left with page padding:
```
\TPGrid[10mm,10mm]{1}{1}
%\TPShowGrid{1}{1}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{0.25}[0,1](0,1)
\rule{5cm}{0.12mm}\\
Signum, Date
\end{textblock}
```
### Example page center no page padding:
```
\TPGrid[0mm,0mm]{1}{1}
%\TPShowGrid{1}{1}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{0.25}[0.5,0.5](0.5,0.5)
\rule{5cm}{0.12mm}\\
Signum, Date
\end{textblock}
```
### Example bottom starting after 1/3 of the page with vertical padding
```
\TPGrid[0mm,10mm]{3}{3}
%\TPShowGrid{3}{3}
%\TPoptions{absolute=true, showboxes=true}
\begin{textblock}{1}[0,1](1,3)
\rule{5cm}{0.12mm}\\
Signum, Date
\end{textblock}
```
Theres also textblock\* for absolute units you max calculate using the calc package
```
\begin{textblock*}{widthAsUnit}[originXAsFractionOfBoxWidth,originYAsFractionOfBoxHeight](XAsUnit,YAsUnit)
Textcontent
\end{textblock*}
```
| 3 | https://tex.stackexchange.com/users/244037 | 688569 | 319,435 |
https://tex.stackexchange.com/questions/569400 | 0 | I have this working example:
```
\documentclass[letterpaper,12pt]{article}
\usepackage{hyperref}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\frac{d}{dx}&(\sin^{-1} x)=\frac{1}{\sqrt{1-x^2}} & \frac{d}{dx}&(\cos^{-1} x)=-\frac{1}{\sqrt{1-x^2}} \\
\frac{d}{dx}&(\tan^{-1} x)=\frac{1}{1-x^2} & \frac{d}{dx}&(\cot^{-1} x)=-\frac{1}{1-x^2} \\
\frac{d}{dx}&(\sec^{-1} x)=\frac{1}{ x \sqrt{x^2-1} & \frac{d}{dx}(\csc^{-1} x)=-\frac{1}{x \sqrt{x^2-1}}
\end{align*}
\end{document}
```
Compiling gives this error
```
Runaway argument?
\frac {d}{dx}&(\sin ^{-1} x)=\frac {1}{\sqrt {1-x^2}} & \frac {d}{dx\ETC.
! Paragraph ended before \align* was complete.
<to be read again>
\par
l.13
```
I can't spot any errors with the align.
| https://tex.stackexchange.com/users/228159 | Compiling error - Paragraph ended before \align* was complete | false | user227987 is no longer here, so to not leave this question unanswered:
In the last line of the `align*` a `}` is missing as well as a `&`. The line should read:
```
% v v
\frac{d}{dx}&(\sec^{-1} x)=\frac{1}{ x \sqrt{x^2-1}} & \frac{d}{dx}&(\csc^{-1} x)=-\frac{1}{x \sqrt{x^2-1}}
% ^ ^
```
As user227987 pointed out, alignment at `=` is more common, but your choice of course.
| 1 | https://tex.stackexchange.com/users/6865 | 688570 | 319,436 |
https://tex.stackexchange.com/questions/263876 | 41 | I am writing scientific or technical documents in LaTeX. Often I need to type a non-breaking space, for example when using equation references:
```
Equation~\eqref{eq:equation1example} shows blaa...
```
Is there a way of inserting non-breaking hyphens?
For example, this may be useful for technical terms such as `Runge-Kutta`, `non-linear`, `non-converging` or `Van-der-Pol Oscillator` which would not usually be split over lines.
Additionally, this may be desirable for citations and Author names, or publisher names.
| https://tex.stackexchange.com/users/34831 | How to type a non-breaking hyphen (dash, "-" character) in scientific or technical documents | false | The package [`extdash`](https://www.ctan.org/pkg/extdash) provides several options for typesetting hyphens and dashes, including disabling line-breaks after them by either:
1. adding an asterisk to the written-out command
```
something\Hyphdash* something
something\Endash* something
```
2. with the `shortcuts` option loaded, using equal signs instead of hyphens:
```
something\=/something
something\==/something
```
(examples from the package documentation)
| 0 | https://tex.stackexchange.com/users/45006 | 688571 | 319,437 |
https://tex.stackexchange.com/questions/688578 | 3 | I'm working on a document with several chapters. In the end of each chapter I have tasks which I want to enumerate as 101, 102, ... ,112 (chapter 1), 201, 202, ... 212 (chapter 2) and so on.
For now, my solution is use of the packages enumitem and etoolbox and the \setlist command:
**Updated code, a small document illustrating the problem**
```
\documentclass{report}
\usepackage{enumitem}
\usepackage{etoolbox}
\setlist[enumerate]{label=\thechapter 0\arabic{*}.,resume}
% restart the enumerate list every chapter
\preto\chapter{
\restartlist{enumerate}
}
\title{Running enumeration according to chapters}
\begin{document}
\chapter{First Chapter}
\section{Tasks Chapter \thechapter}
\begin{enumerate}
\item Task 1
\item Task 2
\item Task 3
\item Task 4
\item Task 5
\item Task 6
\item Task 7
\item Task 8
\item Task 9
\item Task 10
\end{enumerate}
\chapter{Second chapter}
\section{Tasks Chapter \thechapter}
\begin{enumerate}
\item Task 1
\item Task 2
\item Task 3
\item Task 4
\item Task 5
\item Task 6
\item Task 7
\item Task 8
\item Task 9
\item Task 10
\end{enumerate}
\end{document}
```
This works for enumeration up to 109, 209 and so on, but the 10:th task will be labeled 1010, 2010 and so on.
How can I achieve that kind of enumeration which will use no more (and no less) than two positions for the running numbering and the leftmost position for the chapters?
| https://tex.stackexchange.com/users/293637 | Enumerate items with respect to chapters | true | As suggested by Jhor, you can use this code :
```
\documentclass{report}
\title{Running enumeration according to chapters}
\begin{document}
\chapter{First Chapter}
\section{Tasks Chapter \thechapter}
\begin{enumerate}
\setcounter{enumi}{\numexpr 100*\value{chapter}\relax}
\item Task 1
\item Task 2
\item Task 3
\item Task 4
\item Task 5
\item Task 6
\item Task 7
\item Task 8
\item Task 9
\item Task 10
\end{enumerate}
\chapter{Second chapter}
\section{Tasks Chapter \thechapter}
\begin{enumerate}
\setcounter{enumi}{\numexpr 100*\value{chapter}\relax}
\item Task 1
\item Task 2
\item Task 3
\item Task 4
\item Task 5
\item Task 6
\item Task 7
\item Task 8
\item Task 9
\item Task 10
\end{enumerate}
\end{document}
```
And if you prefer, you can create a new environnement :
```
\documentclass{report}
\title{Running enumeration according to chapters}
\newenvironment{chapenumerate}
{
\begin{enumerate}
\setcounter{enumi}{\numexpr 100*\value{chapter}\relax}
}
{
\end{enumerate}
}
\begin{document}
\chapter{First Chapter}
\section{Tasks Chapter \thechapter}
\begin{chapenumerate}
\item Task 1
\item Task 2
\item Task 3
\item Task 4
\item Task 5
\item Task 6
\item Task 7
\item Task 8
\item Task 9
\item Task 10
\end{chapenumerate}
\chapter{Second chapter}
\section{Tasks Chapter \thechapter}
\begin{chapenumerate}
\item Task 1
\item Task 2
\item Task 3
\item Task 4
\item Task 5
\item Task 6
\item Task 7
\item Task 8
\item Task 9
\item Task 10
\end{chapenumerate}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/213141 | 688581 | 319,442 |
https://tex.stackexchange.com/questions/688579 | 1 | I am compiling the following latex file:
```
\documentclass{article}
\begin{document}
$\begin{array}{c}
1\\
2
\end{array}$
\end{document}
```
Compiling the above via TeXlive 2023 up to date (14/06/2023)
```
make4ht test.tex "mathml"
```
The output `test.html` contains only the first line of the table.
| https://tex.stackexchange.com/users/213141 | Bad output with make4ht array and mathml | true | This is a bug in `make4ht`. It automatically cleans some common issues in the MathML code produced by TeX4ht. One of them is spurious empty last rows in `array`. In this case, the code incorrectly thinks that the second row is empty, and removes it.
You can saved this fixed file as `domfilters/make4ht-mathmlfixes.lua` in the directory with your document, or install the development version of [make4ht](https://github.com/michal-h21/make4ht).
```
local log = logging.new("mathmlfixes")
-- <mglyph> should be inside <mi>, so we don't process it
-- even though it is a token element
local token = {"mi", "mn", "mo", "mtext", "mspace", "ms"}
local token_elements = {}
for _, tok in ipairs(token) do token_elements[tok] = true end
-- helper functions to support MathML elements with prefixes (<mml:mi> etc).
--
local function get_element_name(el)
-- return element name and xmlns prefix
local name = el:get_element_name()
if name:match(":") then
local prefix, real_name = name:match("([^%:]+):?(.+)")
return real_name, prefix
else
return name
end
end
local function get_attribute(el, attr_name)
-- attributes can have the prefix, but sometimes they don't have it
-- so we need to catch both cases
local _, prefix = get_element_name(el)
prefix = prefix or ""
return el:get_attribute(attr_name) or el:get_attribute(prefix .. ":" .. attr_name)
end
local function get_new_element_name(name, prefix)
return prefix and prefix .. ":" .. name or name
end
local function update_element_name(el, name, prefix)
local newname = get_new_element_name(name, prefix)
el._name = newname
end
local function create_element(el, name, prefix)
return el:create_element(newname)
end
local function is_token_element(el)
local name, prefix = get_element_name(el)
return token_elements[name], prefix
end
local function fix_token_elements(el)
-- find token elements that are children of other token elements
if is_token_element(el) then
local parent = el:get_parent()
local is_parent_token, prefix = is_token_element(parent)
if is_parent_token then
-- change top element in nested token elements to mstyle
update_element_name(parent, "mstyle", prefix)
end
end
end
local function fix_nested_mstyle(el)
-- the <mstyle> element can be child of token elements
-- we must exterminate it
local el_name = get_element_name(el)
if el_name == "mstyle" then
local parent = el:get_parent()
if is_token_element(parent) then
-- if parent doesn't have the mathvariant attribute copy it from <mstyle>
if not parent:get_attribute("mathvariant") then
local mathvariant = el:get_attribute("mathvariant")
parent._attr = parent._attr or {}
parent:set_attribute("mathvariant", mathvariant)
end
-- copy the contents of <mstyle> to the parent element
parent._children = el._children
end
end
end
local function fix_mathvariant(el)
-- set mathvariant of <mi> that is child of <mstyle> to have the same value
local function find_mstyle(x)
-- find if element has <mstyle> parent, and its value of mathvariant
if not x:is_element() then
return nil
elseif get_element_name(x) == "mstyle" then
return x:get_attribute("mathvariant")
else
return find_mstyle(x:get_parent())
end
end
if get_element_name(el) == "mi" then
-- process only <mi> that have mathvariant set
local oldmathvariant = el:get_attribute("mathvariant")
if oldmathvariant then
local mathvariant = find_mstyle(el:get_parent())
if mathvariant then
el:set_attribute("mathvariant", mathvariant)
end
end
end
end
local function contains_only_text(el)
-- detect if element contains only text
local elements = 0
local text = 0
local children = el:get_children() or {}
for _ , child in ipairs(children) do
if child:is_text() then text = text + 1
elseif child:is_element() then elements = elements + 1
end
end
return text > 0 and elements == 0
end
-- check if <mstyle> element contains direct text. in that case, add
-- <mtext>
local function fix_missing_mtext(el)
if el:get_element_name() == "mstyle" and contains_only_text(el) then
-- add child <mtext>
log:debug("mstyle contains only text: " .. el:get_text())
-- copy the current mode, change it's element name to mtext and add it as a child of <mstyle>
local copy = el:copy_node()
copy._name = "mtext"
copy._parent = el
el._children = {copy}
end
end
local function is_radical(el)
local radicals = {msup=true, msub=true, msubsup=true}
return radicals[el:get_element_name()]
end
local function get_mrow_child(el)
local get_first = function(x)
local children = x:get_children()
return children[1]
end
local first = get_first(el)
-- either return first child, and if the child is <mrow>, return it's first child
if first and first:is_element() then
if first:get_element_name() == "mrow" then
return get_first(first), first
else
return first
end
end
end
local function fix_radicals(el)
if is_radical(el) then
local first_child, mrow = get_mrow_child(el)
-- if the first child is only one character long, it is possible that there is a problem
if first_child and string.len(first_child:get_text()) == 1 then
local name = first_child:get_element_name()
local siblings = el:get_siblings()
local pos = el:find_element_pos()
-- it doesn't make sense to do any further processing if the element is at the beginning
if pos == 1 then return end
if name == "mo" then
for i = pos, 1,-1 do
end
end
end
end
end
-- put <mrow> as child of <math> if it already isn't here
local allowed_top_mrow = {
math=true
}
local function top_mrow(math)
local children = math:get_children()
local put_mrow = false
-- don't process elements with one or zero children
-- don't process elements that already are mrow
local parent = math:get_parent()
local parent_name
if parent then parent_name = get_element_name(parent) end
local current_name, prefix = get_element_name(math)
if #children < 2 or not allowed_top_mrow[current_name] or current_name == "mrow" or parent_name == "mrow" then return nil end
local mrow_count = 0
for _,v in ipairs(children) do
if v:is_element() and is_token_element(v) then
put_mrow = true
-- break
elseif v:is_element() and get_element_name(v) == "mrow" then
mrow_count = mrow_count + 1
end
end
if not put_mrow and get_element_name(math) == "math" and mrow_count == 0 then
-- put at least one <mrow> to each <math>
put_mrow = true
end
if put_mrow then
local newname = get_new_element_name("mrow", prefix)
local mrow = math:create_element(newname)
for _, el in ipairs(children) do
mrow:add_child_node(el)
end
math._children = {mrow}
end
end
local function get_fence(el, attr, form)
-- convert fence attribute to <mo> element
-- attr: open | close
-- form: prefix | postfix
local char = el:get_attribute(attr)
local mo
if char then
local name, prefix = get_element_name(el)
local newname = get_new_element_name("mo", prefix)
mo = el:create_element(newname, {fence="true", form = form})
mo:add_child_node(mo:create_text_node(char))
end
return mo
end
local function fix_mfenced(el)
-- TeX4ht uses in some cases <mfenced> element which is deprecated in MathML.
-- Firefox doesn't support it already.
local name, prefix = get_element_name(el)
if name == "mfenced" then
-- we must replace it by <mrow><mo>start</mo><mfenced children...><mo>end</mo></mrow>
local open = get_fence(el, "open", "prefix")
local close = get_fence(el, "close", "postfix")
-- there can be also separator attribute, but it is not used in TeX4ht
-- change <mfenced> to <mrow> and remove all attributes
local newname = get_new_element_name("mrow", prefix)
el._name = newname
el._attr = {}
-- open must be first child, close needs to be last
if open then el:add_child_node(open, 1) end
if close then el:add_child_node(close) end
end
end
local function is_fence(el)
return get_element_name(el) == "mo" and el:get_attribute("fence") == "true"
end
local function fix_mo_to_mfenced(el)
-- LibreOffice NEEDS <mfenced> element. so we need to convert <mrow><mo fence="true">
-- to <mfenced>. ouch.
if is_fence(el) then
local parent = el:get_parent()
local open = el:get_text():gsub("%s*", "") -- convert mo content to text, so it can be used in
-- close needs to be the last element in the sibling list of the current element
local siblings = el:get_siblings()
el:remove_node() -- we don't need this element anymore
local close
for i = #siblings, 1, -1 do
last = siblings[i]
if last:is_element() then
if is_fence(last) then -- set close attribute only if the last element is fence
close = last:get_text():gsub("%s*", "")
last:remove_node() -- remove <mo>
end
break -- break looping over elements once we find last element
end
end
-- convert parent <mrow> to <mfenced>
local _, prefix = get_element_name(parent)
local newname = get_new_element_name("mfenced", prefix)
parent._name = newname
parent._attr = {open = open, close = close}
end
end
local function fix_numbers(el)
-- convert <mn>1</mn><mo>.</mo><mn>3</mn> to <mn>1.3</mn>
if get_element_name(el) == "mn" then
local n = el:get_sibling_node(1)
-- test if next element is <mo class="MathClass-punc">.</mo>
if n and n:is_element()
and get_element_name(n) == "mo"
and get_attribute(n, "class") == "MathClass-punc"
and n:get_text() == "."
then
-- get next element and test if it is <mn>
local x = el:get_sibling_node(2)
if x and x:is_element()
and get_element_name(x) == "mn"
then
-- join numbers and set it as text content of the current element
local newnumber = el:get_text() .. "." .. x:get_text()
log:debug("Joining numbers: " .. newnumber)
el._children = {}
local newchild = el:create_text_node(newnumber)
el:add_child_node(newchild)
-- remove elements that hold dot and decimal part
n:remove_node()
x:remove_node()
end
end
end
end
local function just_operators(list)
-- count <mo> and return true if list contains just them
local mo = 0
for _, x in ipairs(list) do
if get_element_name(x) == "mo" then mo = mo + 1 end
end
return mo
end
local function fix_operators(x)
-- change <mo> elements that are only children of any element to <mi>
-- this fixes issues in LibreOffice with a^{*}
-- I hope it doesn't introduce different issues
-- process only <mo>
local el_name, prefix = get_element_name(x)
if el_name ~= "mo" then return nil end
local siblings = x:get_siblings()
-- test if current element list contains only <mo>
if just_operators(siblings) == #siblings then
if #siblings == 1 then
if not x:get_attribute("stretchy") then
-- one <mo> translates to <mtext>
local newname = get_new_element_name("mtext", prefix)
x._name = newname
log:debug("changing one <mo> to <mtext>: " .. x:get_text())
-- I think we should use <mi>, but LO incorrectly renders it in <msubsup>,
-- even if we use the mathvariant="normal" attribute. <mtext> works, so
-- we use that instead.
-- x:set_attribute("mathvariant", "normal")
end
else
-- multiple <mo> translate to <mtext>
local text = {}
for _, el in ipairs(siblings) do
text[#text+1] = el:get_text()
end
-- replace first <mo> text with concetanated text content
-- of all <mo> elements
x._children = {}
local newtext = table.concat(text)
local text_el = x:create_text_node(newtext)
log:debug("changing <mo> to <mtext>: " .. newtext)
x:add_child_node(text_el)
-- change <mo> to <mtext>
local newname = get_new_element_name("mtext", prefix)
x._name = newname
-- remove subsequent <mo>
for i = 2, #siblings do
siblings[i]:remove_node()
end
end
end
end
local function is_last_element(el)
local siblings = el:get_siblings()
-- return true only if the current element is the last in the parent's children
for i = #siblings, 1, -1 do
local curr = siblings[i]
if curr == el then
return true
elseif curr:is_element() then
return false
end
end
return false
end
local function is_empty_row(el)
-- empty row should contain only one <mtd>
local count = 0
if el:get_text():match("^%s*$") then
for _, child in ipairs(el:get_children()) do
if child:is_element() then count = count + 1 end
end
else
-- row is not empty if it contains any text
return false
end
-- if there is one or zero childrens, then it is empty row
return count < 2
end
local function delete_last_empty_mtr(el)
-- arrays sometimes contain last empty row, which causes rendering issues,
-- so we should remove them
local el_name, prefix = get_element_name(el)
if el_name == "mtr"
and get_attribute(el, "class") == "array-row"
and is_last_element(el)
and is_empty_row(el)
then
el:remove_node()
end
end
return function(dom)
dom:traverse_elements(function(el)
if settings.output_format ~= "odt" then
-- LibreOffice needs <mfenced>, but Firefox doesn't
fix_mfenced(el)
else
fix_mo_to_mfenced(el)
end
fix_radicals(el)
fix_token_elements(el)
fix_nested_mstyle(el)
fix_missing_mtext(el)
fix_numbers(el)
fix_operators(el)
fix_mathvariant(el)
top_mrow(el)
delete_last_empty_mtr(el)
end)
return dom
end
```
This is the result with the fixed filter:
| 1 | https://tex.stackexchange.com/users/2891 | 688584 | 319,443 |
https://tex.stackexchange.com/questions/688597 | 7 | I have just read that using `frametitle` explicitly is the recommended way for a frame's title when using the `beamer` package [1], i.e. `\begin{frame}\frametitle{<title>} ... \end{frame}` is recommended over `\begin{frame}{<title>} ... \end{frame}`. Can somebody educate me why that is the case?
A MWE might look as follows:
```
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Some descriptive title}
\begin{itemize}
\item bla
\item bla
\item bla
\end{itemize}
\end{frame}
\end{document}
```
[1] [What is a frame in beamer?](https://tex.stackexchange.com/questions/504002/what-is-a-frame-in-beamer#comment1273591_504007)
| https://tex.stackexchange.com/users/120427 | Why is using frametitle the recommended way when using the beamer class? | true | I usually recommend `\frametitle` because it is more powerful, for example, you can use
```
\frametitle<1>{title for first overlay}
\frametitle<2>{another title}
\frametitle<article:0>{A frametitle only for presentation}
```
to change the frametitle between overlays or modes. On can also use
```
\frametitle[short version]{long version}
```
to set a short and long version of the frametitle (which is more an academic example, as there are not a lot themes which will actually make use of the short frametitle...)
I'm also confident that `\frametitle` will continue to work in the future. On the other hand, the code which, behind the scenes, powers `\begin{frame}{...}` is more or less a series of dirty hacks. In case this code breaks for whatever reason in the future, I'm not sure if there will be considerable efforts to keep this syntax alive. Removing this syntax would have a lot of advantages. The beamer code would get much simpler and easier to maintain and one could avoid a lot of problems caused by this syntax. Everybody who ever tried to use a group at the start of frame can probably relate...
And just a personal preference: the syntax `\begin{frame}{...}` as such is just weird. The frame title is optional, nevertheless it looks like a mandatory argument -- confusing ...
| 15 | https://tex.stackexchange.com/users/36296 | 688601 | 319,447 |
https://tex.stackexchange.com/questions/688598 | 2 | It appears that the TIPA package and the Cyrillic T2A fontenc-package cancel themselves out, only ever allowing the first defined package in the preamble to spell out in the document.
A friend needs both packages working for their thesis, however. Is there a way to either make these two compatible or to define new commands for a number of cyrillic signs (since there are only one or two needed there compared to multiple TIPA symbols)?
Here is the code that does not work:
```
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{adjustbox}
\usepackage{natbib}
\usepackage{accents}
\usepackage{alphabeta}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[T1]{tipa}
\usepackage{linguex}
\usepackage[linguistics]{forest}
\renewcommand{\eachwordone}{\itshape}
\begin{document}
\exg. \textbf{učęštju} \textbf{emu} ljudi vъ crkve \label{ex:ucestju}\\
teach-PrP.DAT.SG. he-DAT. people-ACC.PL. in temple-LOC.SG.\\
`While he was teaching people in the temple ...'\\
(C. Mar. Lk. 20.1 from \citet[149]{lunt_old_2001})
\exg. $[$\textbf{hefði} þá verit þetta boðit$]$, þá væri margr maðr... \label{ex:hefditha}\\
have-P.S.3sg. then be-PP. this-NOM.SG. offer-PP.NOM.SG. then be-P.S.3sg. many-NOM.SG. man-NOM.SG.\\
`Had this then been offered, then many a man would have been...’\\
(Old Norse. Heimskringla 9.91, from Faarlund, 2007, 252)
\end{document}
```
We would need to define ъ in particular. \newcommand{\yer}{ъ} did not work, but unfortunately we cannot find any other way of defining cyrillic signs. Maybe through Unicode?
All help is appreciated. Thanks in advance!
| https://tex.stackexchange.com/users/270897 | TIPA package clashes with [T2A] for Cyrillic signs | false | If you only need ъ, you should be able to access this glyph via the `\texthardsign` command provided by the [`tipa` package](http://mirrors.ctan.org/fonts/tipa/tipa/doc/tipaman.pdf).
If you want to keep this character in your code, you can set `\DeclareUnicodeCharacter{044A}{\texthardsign}` in your document preamble (I'd suggest using `\textup` to revert to non-italic text instead of abusing math mode):
```
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{adjustbox}
\usepackage{natbib}
\usepackage{accents}
\usepackage{alphabeta}
\usepackage[T1]{tipa}
\usepackage{linguex}
\usepackage[linguistics]{forest}
\renewcommand{\eachwordone}{\itshape}
\DeclareUnicodeCharacter{044A}{\texthardsign}
\begin{document}
\exg. \textbf{učęštju} \textbf{emu} ljudi vъ crkve \label{ex:ucestju}\\
teach-PrP.DAT.SG. he-DAT. people-ACC.PL. in temple-LOC.SG.\\
`While he was teaching people in the temple ...'\\
(C. Mar. Lk. 20.1 from \citet[149]{lunt_old_2001})
\exg. \textup{[}\textbf{hefði} þá verit þetta boðit\textup{]}, þá væri margr maðr... \label{ex:hefditha}\\
have-P.S.3sg. then be-PP. this-NOM.SG. offer-PP.NOM.SG. then be-P.S.3sg. many-NOM.SG. man-NOM.SG.\\
`Had this then been offered, then many a man would have been...’\\
(Old Norse. Heimskringla 9.91, from Faarlund, 2007, 252)
\end{document}
```
| 2 | https://tex.stackexchange.com/users/47927 | 688603 | 319,448 |
https://tex.stackexchange.com/questions/688600 | -1 | I would like a TiKZ code to generate the following diagram, drawn with the following PSTrick code, to draw two concentric flower petals diagram, arranged in a circle,
one with 8 petals and the outer with 16 petals.
(This is part of a Sri yantra (or Sri chakra) drawing found in various sites, for example:
<https://codegolf.stackexchange.com/questions/42410/draw-sri-yantra>
Here is the PSTrick Code
```
\SpecialCoor
\qdisk(0,0){5pt}
\multido{\rAngleA=-11.25+22.50,\rAngleB=11.25+22.50}{16}{%
\pscustom[fillcolor=blue,fillstyle=solid]{%
\psarc(0,0){6.5}{\rAngleA}{\rAngleB}
\psbezier%
(! 6.5 \rAngleB\space cos mul 6.5 \rAngleB\space sin mul)%
(! /a \rAngleB\space 7.75 sub def 8 a cos mul 8 a sin mul)%
(! /a \rAngleB\space 10.25 sub def 7 a cos mul 7 a sin mul)%
(! /a \rAngleB\space 11.25 sub def 8 a cos mul 8 a sin mul)
\psbezier%
(! /a \rAngleA\space 11.25 add def 8 a cos mul 8 a sin mul)
(! /a \rAngleA\space 10.25 add def 7 a cos mul 7 a sin mul)%
(! /a \rAngleA\space 7.75 add def 8 a cos mul 8 a sin mul)%
(! 6.5 \rAngleA\space cos mul 6.5 \rAngleA\space sin mul)%
}
}
\multido{\rAngleA=-22.5+45.0,\rAngleB=22.5+45.0}{8}{%
\pscustom[fillcolor=red,fillstyle=solid]{%
\psarc(0,0){5.5}{\rAngleA}{\rAngleB}
\psbezier%
(! 5.5 \rAngleB\space cos mul 5.5 \rAngleB\space sin mul)%
(! /a \rAngleB\space 6.75 sub def 7 a cos mul 7 a sin mul)%
(! /a \rAngleB\space 12.5 sub def 5 a cos mul 5 a sin mul)%
(! /a \rAngleB\space 22.5 sub def 6.5 a cos mul 6.5 a sin mul)
\psbezier%
(! /a \rAngleA\space 22.5 add def 6.5 a cos mul 6.5 a sin mul)
(! /a \rAngleA\space 12.5 add def 5 a cos mul 5 a sin mul)%
(! /a \rAngleA\space 6.75 add def 7 a cos mul 7 a sin mul)%
(! 5.5 \rAngleA\space cos mul 5.5 \rAngleA\space sin mul)%
}
}
```
| https://tex.stackexchange.com/users/89517 | A TikZ code needed for the diagram generated by the following PSTrick code | true | A quick conversion of the above code would probably result in something like this:
```
\documentclass[border=10pt, tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\fill (0,0) circle[radius=5pt];
\foreach \i in {0,...,16} {
\pgfmathsetmacro{\rAngleA}{-11.25+(22.50*\i)}
\pgfmathsetmacro{\rAngleB}{11.25+(22.50*\i)}
\path[draw, fill=blue]
(\rAngleA:6.5) arc[radius=6.5, start angle=\rAngleA, end angle=\rAngleB] --
({6.5*cos(\rAngleB)},{6.5*sin(\rAngleB)}) .. controls
({8*cos(\rAngleB-7.75)},{8*sin(\rAngleB-7.75)}) and
({7*cos(\rAngleB-10.25)},{7*sin(\rAngleB-10.25)}) ..
({8*cos(\rAngleB-11.25)},{8*sin(\rAngleB-11.25)}) --
({8*cos(\rAngleA+11.25)},{8*sin(\rAngleA+11.25)}) .. controls
({7*cos(\rAngleA+10.25)},{7*sin(\rAngleA+10.25)}) and
({8*cos(\rAngleA+7.75)},{8*sin(\rAngleA+7.75)}) ..
({6.5*cos(\rAngleA)},{6.5*sin(\rAngleA)}) -- cycle;
\path[draw]
(0,0) -- ({6.5*cos(\rAngleA)},{6.5*sin(\rAngleA)})
(0,0) -- ({8*cos(\rAngleB-11.25)},{8*sin(\rAngleB-11.25)});
}
\foreach \i in {0,...,8} {
\pgfmathsetmacro{\rAngleA}{-22.5+(45.0*\i)}
\pgfmathsetmacro{\rAngleB}{22.5+(45.0*\i)}
\path[draw, fill=red]
(\rAngleA:5.5) arc[radius=5.5, start angle=\rAngleA, end angle=\rAngleB] --
({5.5*cos(\rAngleB)},{5.5*sin(\rAngleB)}) .. controls
({7*cos(\rAngleB-6.75)},{7*sin(\rAngleB-6.75)}) and
({5*cos(\rAngleB-12.5)},{5*sin(\rAngleB-12.5)}) ..
({6.5*cos(\rAngleB-22.5)},{6.5*sin(\rAngleB-22.5)}) --
({6.5*cos(\rAngleA+22.5)},{6.5*sin(\rAngleA+22.5)}) .. controls
({5*cos(\rAngleA+12.5)},{5*sin(\rAngleA+12.5)}) and
({7*cos(\rAngleA+6.75)},{7*sin(\rAngleA+6.75)}) ..
({5.5*cos(\rAngleA)},{5.5*sin(\rAngleA)}) -- cycle;
\path[draw]
(0,0) -- ({5.5*cos(\rAngleA)},{5.5*sin(\rAngleA)})
(0,0) -- ({6.5*cos(\rAngleB-22.5)},{6.5*sin(\rAngleB-22.5)});
}
\end{tikzpicture}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/47927 | 688607 | 319,449 |
https://tex.stackexchange.com/questions/688495 | 2 | I am trying to draw a neural network with a gradient with Tikz. I have the code without errors for the normal neural network, but when I add path fading for the gradient a couple things go wrong. First some of the lines show thicker than the others, and second one of the lines shows "Dimension too large error" (even though this error doesn't show if I remove the path fading option).
I'm at a loss for what to do. Here's the code with the errors:
```
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fadings}
\definecolor{my_grad_1}{HTML}{3A1C71}
\definecolor{my_grad_2}{HTML}{D76D77}
\definecolor{my_grad_3}{HTML}{FFAF7B}
\begin{document}
\tikzset{%small neurons for the input and hidden layers
small neuron/.style={
circle,
draw,
minimum size=0.75cm
},
big neuron/.style={%big neurons for the output layer
circle,
draw,
minimum size=3cm,
}
}
%% Tikzpicture for the neural Network
\begin{tikzpicture}
\foreach \m [count=\y] in {1,...,10}{
\pgfmathsetmacro\z{4.25+\y}
\node [small neuron, color = my_grad_1] (input-\m) at (0, \z) {};
}
\foreach \m [count=\y] in {1,...,7}{
\pgfmathsetmacro\z{5.75+\y}
\node [small neuron, color = my_grad_2] (hidden-\m) at (3, \z) {};
}
\foreach \m [count=\y] in {1,...,5}{
\pgfmathsetmacro\z{3.25*\y}
\node [big neuron, color= my_grad_3] (output-\m) at (8, \z) {};
}
\foreach \i in {1,...,10}
\foreach \j in {1,...,7}{
\draw [path fading = east, color = my_grad_1, line width = 0.5pt] (input-\i) -- (hidden-\j);
\draw [path fading = west, color = my_grad_2, line width = 0.5pt] (input-\i) -- (hidden-\j);
}
\foreach \i in {1,...,7}
\foreach \j in {1,...,5}{
\draw[path fading = east, color=my_grad_2, line width = 0.5pt] (hidden-\i) -- (output-\j);
\draw[path fading = west, color=my_grad_3, line width = 0.5pt] (hidden-\i) -- (output-\j);
}
\end{tikzpicture}
\end{document}
```
I suppose this is some sort of library conflict, but I can't find a workaround. Any help would be appreciated!
| https://tex.stackexchange.com/users/212758 | Line in Tikz environment showing thicker and giving "Dimension too large" error when using path fading | false | It seems that path fading won't work for horizontal lines. I found a workaround by drawing a rectangle of height the same thickness as my lines (0.5pt). The end result is this:
```
\documentclass[tikz, border = 1mm]{standalone}
\usetikzlibrary{fadings}
\definecolor{my_grad_1}{HTML}{3A1C71} % purple
\definecolor{my_grad_2}{HTML}{D76D77} % pink
\definecolor{my_grad_3}{HTML}{FFAF7B} % orange
\begin{document}
\tikzset{%small neurons for the input and hidden layers
small neuron/.style={
circle,
draw,
minimum size=0.75cm,
},
big neuron/.style={%big neurons for the output layer
circle,
draw,
minimum size=3cm,
}
}
%% Tikzpicture for the neural Network
\begin{tikzpicture}
\draw [left color = my_grad_2, right color = my_grad_3, draw = none] (3, 9.75cm-0.2pt) rectangle (6.5, 9.75cm+0.2pt);
\foreach \m [count=\y] in {1,...,10}{
\pgfmathsetmacro\z{4.25+\y}
\node [small neuron, color = my_grad_1, fill = white] (input-\m) at (0, \z) {};
}
\foreach \m [count=\y] in {1,...,7}{
\pgfmathsetmacro\z{5.75+\y}
\node [small neuron, color = my_grad_2, fill = white] (hidden-\m) at (3, \z) {};
}
\foreach \m [count=\y] in {1,...,5}{
\pgfmathsetmacro\z{3.25*\y}
\node [big neuron, color= my_grad_3, fill = white] (output-\m) at (8, \z) {};
}
\foreach \i in {1,...,10}
\foreach \j in {1,...,7}{
\draw [path fading = east, color = my_grad_1, line width = 0.5pt] (input-\i) -- (hidden-\j);
\draw [path fading = west, color = my_grad_2, line width = 0.5pt] (input-\i) -- (hidden-\j);
}
\foreach \i in {1,2,3,5,6,7}
\foreach \j in {1,...,5}{
\draw[path fading = east, color=my_grad_2, line width = 0.5pt] (hidden-\i) -- (output-\j);
\draw[path fading = west, color=my_grad_3, line width = 0.5pt] (hidden-\i) -- (output-\j);
}
\foreach \j in {1,2,4,5}{
\draw[path fading = east, color=my_grad_2, line width = 0.5pt] (hidden-4) -- (output-\j);
\draw[path fading = west, color=my_grad_3, line width = 0.5pt] (hidden-4) -- (output-\j);
}
\end{tikzpicture}
\end{document}
```
| 2 | https://tex.stackexchange.com/users/212758 | 688610 | 319,451 |
https://tex.stackexchange.com/questions/619589 | 1 | When I compile a file containing
```
\documentclass{article}
\usepackage{mathtools}
\mathtoolsset{centercolon}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}\ar[r,","] &\end{tikzcd}$:$
\end{document}
```
with the command `pdflatex -interaction=nonstopmode file.tex`, the compilation hangs instead of giving me an error message.
Where should I report this?
(I'm using texlive 2020 on ubuntu 21.04)
| https://tex.stackexchange.com/users/193342 | pdfLaTeX hangs with tikz-cd and comma in the arrow label | false | Braces are needed, and the tikzcd documentation says this explicitly:
>
> Similarly, a label can receive additional options via the syntax
> "⟨label text⟩"⟨label options⟩. Both ⟨label text⟩ and ⟨label options⟩
> need to be enclosed in curly braces if they contain commas.
>
>
>
There is a reference to the main TikZ documentation on labels (section 17.10.4), which discusses the alternative syntax of `label={...}`, but that does not appear to work inside a tikzcd `\arrow[...]` construct (so you couldn't write `\ar[r,label={,}]`, for example, but `\ar[r,"{,}"]` does work).
| 0 | https://tex.stackexchange.com/users/217981 | 688612 | 319,452 |
https://tex.stackexchange.com/questions/362157 | 3 | I'm trying to expand a value for an argument which will be the range of pages included in the document, but I can't figure out how to do that.
At first, I was getting
>
> ERROR: Missing = inserted for \ifnum.
>
>
>
The MWE is
```
\documentclass{article}
\usepackage{pdfpages}
\newcommand{\myargval}{1-3}
\begin{document}
\includepdf[pages=1-3, clip]{example.pdf}
\includepdf[pages=\myargval, clip]{example.pdf}
\end{document}
```
The commenters explained how to use \edef & \noexpand to evaluate the value of the argument.
However, in a full version, I'm also having another argument `pagecommand` which should not be expanded:
```
\documentclass{article}
\usepackage{pdfpages}
\newcommand{\myargval}{1-3}
\begin{document}
\includepdf[pages=1-3, clip, pagecommand={\thispagestyle{headings}}]{example.pdf}
\edef\temp{\noexpand\includepdf[pages=\myargval, clip, pagecommand={\thispagestyle{headings}}]{example.pdf}}\temp
\end{document}
```
If I use that, I get:
>
> ERROR: Incomplete \iffalse; all text was ignored after line 10.
>
>
>
| https://tex.stackexchange.com/users/41338 | how to expand a keyval argument | false | You can use a key=value interface that comes with that feature built in (I'd recommend `expkv`, but I'm its author... Other packages that have some expansion-control support built in are `pgfkeys` and `options`. Adding a wrapper around an existing macro that uses other key=value parsers is easiest with `expkv`.).
Unfortunately you want to use it for an existing macro that already uses another key=value interface, so we have to augment this one a bit (similar to @egreg's answer, but much simpler here). To do so we use `\ekvparse` (it'll apply the rules described below), and rebuild the key=value list afterwards with two auxiliary macros (`\xincludepdf@k` and `\xincludepdf@kv` in the following).
`expkv` provides a mechanism to specify expansions of key-values in a simple way. Just prefix your key with `<rules>:` (including the space after the colon) and the rules will get executed (in a key=value-pair the rules apply to value, if no =value was given they apply to the key). The following rules are built in (in the 2023-01-23 release):
* `o` expand the value once
* `e` fully expand the value using `\expanded`
* `c` build a macro from the provided value (using `\csname`)
* `f` expand the value until an unexpandable token is hit (if that's a space the space is removed)
* `V` the value should be a single token, expands that token to the value (if it's a macro this is in effect `o`, if it's a register will result in that register's contents)
* `v` like doing `c` and `V` (but different result if the resulting macro was undefined)
* `s` strips one set of surrounding spaces and (if afterwards around everything) braces
* `b` adds one set of braces around the value
* `p{<stuff>}` places `<stuff>` before the value
* `P{<stuff>}` places `<stuff>` after the value
* `g` gobbles the first token or brace-group of value
* `\r` reinsert the result of all expansions as additional key=value input
* `\key{<rules>}` in a key=value pair apply to the key instead of the value
* `R` same as `V\r`
* `r` same as `v\r`
Multiple rules are consecutively applied from left to right, exception to this is `\r` that'll always apply after all other rules are processed.
For this use case we only need the `o`-rule (or could use the `V`-rule instead).
```
\documentclass{article}
\usepackage{pdfpages}
\usepackage{expkv}
\newcommand{\myargval}{1-3}
\makeatletter
\newcommand\xincludepdf[2][]
{%
\expandafter\includepdf
% inner \expanded fully expands \ekvparse,
% outer \expanded fully expands all \xincludepdf@k(v)
\expanded{\expanded{[\ekvparse\xincludepdf@k\xincludepdf@kv{#1}]}}%
{#2}%
}
% needs to protect against the outer \expanded, so uses \unexpanded (we don't
% want to expand more than the explicitly stated rules need)
\newcommand\xincludepdf@k[1]{,\unexpanded{#1}}
% the space between the = and the value make this more robust for most key=value
% parsers
\newcommand\xincludepdf@kv[2]{,\unexpanded{#1= {#2}}}
\makeatother
\begin{document}
\includepdf[pages=1-3, clip]{example-image-duck.pdf}
% o: means expand the value once, the space after the colon is mandatory
\xincludepdf[o: pages=\myargval, clip]{example-image-duck.pdf}
\end{document}
```
The `\ekvparse` doesn't need to know any of the keys of `\includepdf`, it'll just handle your requested expansion, every other parsing is handled by `\includepdf` itself, that'll complain if it encounters an unknown key.
| 0 | https://tex.stackexchange.com/users/117050 | 688615 | 319,454 |
https://tex.stackexchange.com/questions/688598 | 2 | It appears that the TIPA package and the Cyrillic T2A fontenc-package cancel themselves out, only ever allowing the first defined package in the preamble to spell out in the document.
A friend needs both packages working for their thesis, however. Is there a way to either make these two compatible or to define new commands for a number of cyrillic signs (since there are only one or two needed there compared to multiple TIPA symbols)?
Here is the code that does not work:
```
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{adjustbox}
\usepackage{natbib}
\usepackage{accents}
\usepackage{alphabeta}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[T1]{tipa}
\usepackage{linguex}
\usepackage[linguistics]{forest}
\renewcommand{\eachwordone}{\itshape}
\begin{document}
\exg. \textbf{učęštju} \textbf{emu} ljudi vъ crkve \label{ex:ucestju}\\
teach-PrP.DAT.SG. he-DAT. people-ACC.PL. in temple-LOC.SG.\\
`While he was teaching people in the temple ...'\\
(C. Mar. Lk. 20.1 from \citet[149]{lunt_old_2001})
\exg. $[$\textbf{hefði} þá verit þetta boðit$]$, þá væri margr maðr... \label{ex:hefditha}\\
have-P.S.3sg. then be-PP. this-NOM.SG. offer-PP.NOM.SG. then be-P.S.3sg. many-NOM.SG. man-NOM.SG.\\
`Had this then been offered, then many a man would have been...’\\
(Old Norse. Heimskringla 9.91, from Faarlund, 2007, 252)
\end{document}
```
We would need to define ъ in particular. \newcommand{\yer}{ъ} did not work, but unfortunately we cannot find any other way of defining cyrillic signs. Maybe through Unicode?
All help is appreciated. Thanks in advance!
| https://tex.stackexchange.com/users/270897 | TIPA package clashes with [T2A] for Cyrillic signs | false | You get the error
```
! LaTeX Error: Command \cyrhrdsn unavailable in encoding T1.
```
which you can solve by telling LaTeX that `\cyrhrdsn` must be taken from the T2A encoding, if found outside of Cyrillic contexts.
```
\documentclass{article}
\usepackage[T2A,T1]{fontenc}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\usepackage{adjustbox}
\usepackage{natbib}
\usepackage{accents}
\usepackage{alphabeta}
\usepackage[T1]{tipa}
\usepackage{linguex}
\usepackage[linguistics]{forest}
\renewcommand{\eachwordone}{\itshape}
% declare the necessary encoding switch
\DeclareTextSymbolDefault{\cyrhrdsn}{T2A}
\begin{document}
\exg. \textbf{učęštju} \textbf{emu} ljudi vъ crkve \label{ex:ucestju}\\
teach-PrP.DAT.SG. he-DAT. people-ACC.PL. in temple-LOC.SG.\\
`While he was teaching people in the temple ...'\\
(C. Mar. Lk. 20.1 from \citet[149]{lunt_old_2001})
\exg. \textup{[}\textbf{hefði} þá verit þetta boðit\textup{]}, þá væri margr maðr...
\label{ex:hefditha}\\
have-P.S.3sg. then be-PP. this-NOM.SG. offer-PP.NOM.SG. then
be-P.S.3sg. many-NOM.SG. man-NOM.SG.\\
`Had this then been offered, then many a man would have been...’\\
(Old Norse. Heimskringla 9.91, from Faarlund, 2007, 252)
\end{document}
```
| 2 | https://tex.stackexchange.com/users/4427 | 688616 | 319,455 |
https://tex.stackexchange.com/questions/688596 | 1 | I'm trying to insert a subtable into my document. I have loaded the subcaption package, as well as installed the caption package via MikTex. However I still get the `Environment subtable undefined. \begin{subtable}` error, as well as the ".5" from `.5\linewidth` put in front of my table. How can I fix this?
Here's an extract from the document:
```
\documentclass[a4paper, 11pt]{article}
\usepackage[left=3.5cm, right=2.5cm, top=1.5cm, bottom=1.5cm]{geometry}
\usepackage{amsmath}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{xcolor}
\usepackage{subfig}
\usepackage{multirow}
\usepackage{tikz}
\usepackage{comment}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{subfig}
\usetikzlibrary{shapes.geometric, arrows}
\usepackage[version=3]{mhchem}
\usepackage{textcomp}
\usepackage{lmodern}
\begin{table}
\centering
\caption{\textbf{Zusammensetzung des Mastermixes für die
PCR Reagenzien.}}
\begin{subtable}{.5\linewidth}
\begin{tabular}{r l}
$4.0\mu l$ & dNTPs ($10mM$) \\
$12.0\mu l$ & Oligo forw-\textit{TRP1} ($5\mu M$) \\
$12.0\mu l$ & Oligo rev-\textit{TRP1} ($5\mu M$) \\
$20.0\mu l$ & 10 x Taq Puffer \\
$12.0\mu l$ & \ce{MgCl2} \\
$132.0\mu l$ & \ce{H2O} \\
$4.0\mu l$ & Taq Polymerase ($1u*\mu l^{-1}$)\\
\end{tabular}
\end{subtable}
\hspace{\fill}
\begin{subtable}{.5\linewidth}
\begin{tabular}{r l}
$4.0\mu l$ & dNTPs ($10mM$) \\
$12.0\mu l$ & Oligo forw-\textit{LEU2} ($5\mu M$) \\
$12.0\mu l$ & Oligo rev-\textit{LEU2} ($5\mu M$) \\
$20.0\mu l$ & 10 x Taq Puffer \\
$12.0\mu l$ & \ce{MgCl2} \\
$132.0\mu l$ & \ce{H2O} \\
$4.0\mu l$ & Taq Polymerase ($1u*\mu l^{-1}$)\\
\end{tabular}
\end{subtable}
\end{table}
```
And here's the errors this is generating:
```
44: Environment subtable undefined. \begin{subtable}
44: Missing number, treated as zero. \begin{subtable}{.5\linewidth}
44: Illegal unit of measure (pt inserted). \begin{subtable}{.5\linewidth}
54: \begin{table} on input line 41 ended by \end{subtable}. \end{subtable}
56: Environment subtable undefined. \begin{subtable}
56: Missing number, treated as zero. \begin{subtable}{.5\linewidth}
56: Illegal unit of measure (pt inserted). \begin{subtable}{.5\linewidth}
67: \begin{table} on input line 41 ended by \end{subtable}. \end{subtable}
: No \author given.
38: Underfull \hbox (badness 10000) in paragraph
38: Underfull \hbox (badness 10000) in paragraph
```
Please note that the code shown above is just an extract and the line numbers in the error messages won't match. If there's some confusion and you need the line numbers applicable to the uploaded code please let me know.
I'm absolutely stumped about this, I don't know what to do.
Thank you all very much for your help in advance.
Max
| https://tex.stackexchange.com/users/298993 | Environment Subtable not defined | true | User @JasperHabicht has already solved the OP's immediate issue. The solution? Don't load both `subfig` and `subcaption`.
There's still a major issue with the OP's code: The `subtable` machinery isn't used at all! A `subtable` environment is basically a `minipage` that knows what to do if it encounters a `\caption` directive. Since no such instances occur, there's really no point in using `subtable` environments to begin with. Instead, I suggest the two `tabular` environments simply be separated by `\hspace{\fill}`.
I would also like to recommend loading the `siunitx` package and using its `\qty` and `\unit` macros to typeset quantities and their associated scientific units in a widely recognized, and less hackish, format.
```
\documentclass[a4paper, 11pt]{article}
%% (I've simplified the preamble to a bare minimum)
\usepackage[left=3.5cm,right=2.5cm,%
top=1.5cm,bottom=1.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{microtype}
\usepackage{caption}
\captionsetup[table]{textfont=bf}
\usepackage[version=3]{mhchem}
\usepackage{siunitx}% for \qty macro
\begin{document}
\begin{table}
\caption{Zusammensetzung des Mastermixes für die PCR Reagenzien\textmd{.}}
\begin{tabular}[t]{@{} rl @{}}
\qty{4.0}{\micro\litre} & dNTPs (\qty{10}{\milli M}) \\
\qty{12.0}{\micro\litre} & Oligo forw-\textit{TRP1} (\qty{5}{\micro M}) \\
\qty{12.0}{\micro\litre} & Oligo rev-\textit{TRP1} (\qty{5}{\micro M}) \\
\qty{20.0}{\micro\litre} & 10 $\times$ Taq Puffer \\
\qty{12.0}{\micro\litre} & \ce{MgCl2} \\
\qty{132.0}{\micro\litre}& \ce{H2O} \\
\qty{4.0}{\micro\litre} & Taq Polymerase (\qty{1}{u(\micro\liter)\tothe{-1}})
\end{tabular}%
\hspace{\fill}
\begin{tabular}[t]{@{} rl @{}}
\qty{4.0}{\micro\litre} & dNTPs (\qty{10}{\milli M}) \\
\qty{12.0}{\micro\litre} & Oligo forw-\textit{LEU2} (\qty{5}{\micro M}) \\
\qty{12.0}{\micro\litre} & Oligo rev-\textit{LEU2} (\qty{5}{\micro M}) \\
\qty{20.0}{\micro\litre} & 10 $\times$ Taq Puffer \\
\qty{12.0}{\micro\litre} & \ce{MgCl2} \\
\qty{132.0}{\micro\litre}& \ce{H2O} \\
\qty{4.0}{\micro\litre} & Taq Polymerase (\qty{1}{u(\micro\liter)\tothe{-1}})
\end{tabular}
\end{table}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/5001 | 688617 | 319,456 |
https://tex.stackexchange.com/questions/688609 | 4 | The code provided [here](https://tex.stackexchange.com/a/396298/18401) (where the workaround for `gcd()` issue isn't needed anymore, at least in `pgfplots` 1.18) does:
* work if the class used is e.g. `article`,
* not work if the class used is `beamer`.
Indeed, the compilation of the following MCE:
```
\documentclass{beamer}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
% Load math library, for \tikzmath
\usetikzlibrary{math}
\pgfplotsset{
% Typeset fractions of pi at regular intervals on x axis
x axis in pi/.style={
% Make sure the x axis is in radians
trig format plots=rad,
% Set tick distance from style argument
xtick distance={pi/#1},
% Set label style: calculate reduced fraction of pi
xticklabel={
\tikzmath{
% Calculate this tick's multiple of pi/#1
int \numorig, \gcd, \num, \denom, \absnum;
\numorig = round(\tick*#1/pi);
% Calculate reduced fraction for \numorig/#1
\gcd = gcd(\numorig,#1);
\num = \numorig / \gcd;
\absnum = abs(\num);
\denom = #1 / \gcd;
% Build label text
if \num < 0 then {
let \sign = -;
} else {
let \sign =;
};
if \absnum == 1 then {
let \numpi = \pi;
} else {
let \numpi = \absnum\pi;
};
if \denom == 1 then {
if \num == 0 then {
{ \strut$0$ };
} else {
{ \strut$\sign\numpi$ };
};
} else {
{ \strut$\sign\frac{\numpi}{\denom}$ };
% Other style with all pi symbols same and aligned:
% { \strut$\sign\frac{\absnum}{\denom}\pi$ };
};
}
},
},
}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\begin{axis}[
x axis in pi=2, % tick distance as fraction of pi
]
\addplot {sin(x)};
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
```
fails with the error:
```
(./test-beamer.nav)
! Missing \endcsname inserted.
<to be read again>
\protect
l.62 \end{frame}
?
```
Note that adding the `fragile` option to the `frame` environment doesn't help.
Do you understand what's going on?
| https://tex.stackexchange.com/users/18401 | beamer and pgfplots doesn't work if tikz 'math' library is used | true | The issue lies in the way the `math` library handles variable names; in essence for the `\gcd`-variable it'll try to use it inside of a `\csname` construct.
Your issue can be reduced to the following MWE:
```
\RequirePackage{amsmath}
\RequirePackage{tikz}
\usetikzlibrary{math}
\tikzmath{\gcd = 1;}
\stop
```
The difference lies in LaTeX's standard definition of `\gcd` (`\meaning` starts with `macro`) and the definition in `amsmath` (`\meaning` starts with `\protected`), so we can further reduce our MWE:
```
\RequirePackage{tikz}
% make \gcd \protected, but don't alter it otherwise
\protected\expandafter\def\expandafter\gcd\expandafter{\gcd}
\usetikzlibrary{math}
\tikzmath{\gcd = 1;}
\stop
```
Now the `math`-parser doesn't understand that this is a variable but thinks it's part of a keyword, grabs everything up to the next space (or does it? Not sure here), and tries to build the keyword name of that with `\csname` which fails badly.
So you can't assign to variables which are already defined `\protected` in the `math` library (well, if you use the `let` keyword you can, so `\tikzmath{let \gcd=;}` works and afterwards you can use the name `\gcd`)!
If you change that variable's name (e.g., to `\mygcd`) everything works again:
```
\documentclass{beamer}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
% Load math library, for \tikzmath
\usetikzlibrary{math}
\pgfplotsset{
% Typeset fractions of pi at regular intervals on x axis
x axis in pi/.style={
% Make sure the x axis is in radians
trig format plots=rad,
% Set tick distance from style argument
xtick distance={pi/#1},
% Set label style: calculate reduced fraction of pi
xticklabel={
\tikzmath{
% Calculate this tick's multiple of pi/#1
int \numorig, \gcd, \num, \denom, \absnum;
\numorig = round(\tick*#1/pi);
% Calculate reduced fraction for \numorig/#1
\mygcd = gcd(\numorig,#1);
\num = \numorig / \mygcd;
\absnum = abs(\num);
\denom = #1 / \mygcd;
% Build label text
if \num < 0 then {
let \sign = -;
} else {
let \sign =;
};
if \absnum == 1 then {
let \numpi = \pi;
} else {
let \numpi = \absnum\pi;
};
if \denom == 1 then {
if \num == 0 then {
{ \strut$0$ };
} else {
{ \strut$\sign\numpi$ };
};
} else {
{ \strut$\sign\frac{\numpi}{\denom}$ };
% Other style with all pi symbols same and aligned:
% { \strut$\sign\frac{\absnum}{\denom}\pi$ };
};
}
},
},
}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\begin{axis}[
x axis in pi=2, % tick distance as fraction of pi
]
\addplot {sin(x)};
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
```
| 5 | https://tex.stackexchange.com/users/117050 | 688620 | 319,458 |
https://tex.stackexchange.com/questions/688582 | 1 | I would like to find a way (ideally a command like \begin{medmatrix}) to make a matrix halfway between the size of
```
\begin{smallmatrix}
a& b\\
c& d
\end{smallmatrix}
```
and
```
\begin{matrix}
a& b\\
c& d
\end{matrix}
```
Does such a command exist?
| https://tex.stackexchange.com/users/203669 | Goldilocks size for matrix (between pmatrix and smallmatrix) | false | I wouldn't bother, but there's `\medmath` from `nccmath`.
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{nccmath}
\begin{document}
\begin{gather*}
\left[\begin{smallmatrix}
a& b\\
c& d
\end{smallmatrix}\right]
\\
\medmath{\begin{bmatrix}
a& b\\
c& d
\end{bmatrix}}
\\
\begin{bmatrix}
a& b\\
c& d
\end{bmatrix}
\end{gather*}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/4427 | 688627 | 319,460 |
https://tex.stackexchange.com/questions/61896 | 57 | I have a photograph that I'm loading into my LaTeX document.
I'd like the photograph to have rounded corners and no visible border.
I'd prefer not to edit the original photograph.
Any thoughts on how to do this?
| https://tex.stackexchange.com/users/7478 | LaTeX Photo With Rounded Corners | false | Just in case anyone comes back to this, I used [this](https://tex.stackexchange.com/questions/81842/creating-a-drop-shadow-with-guassian-blur) stack exchange thread combined with Peter Grill's answer to create a `.tex` file that you can include into your own LaTEX project (with `\include{yourFileNameHere.tex}`. You can then call `\shadowImage[]{image}` like you would `\includegraphics[]{image}` and it will create an image with rounded corners and a centered drop shadow. An example is shown below:
```
\usepackage{tikz}
\usetikzlibrary{shadows,calc}
% code adapted from https://tex.stackexchange.com/a/11483/3954
% some parameters for customization
\def\shadowshift{3pt,-3pt}
\def\shadowradius{6pt}
\colorlet{innercolor}{black!10}
\colorlet{outercolor}{gray!0}
% this draws a shadow under a rectangle node
\newcommand\drawshadow[1]{
\begin{pgfonlayer}{shadow}
\shade[outercolor,inner color=innercolor,outer color=outercolor] ($(#1.south west)+(\shadowshift)+(\shadowradius/2,\shadowradius/2)$) circle (\shadowradius);
\shade[outercolor,inner color=innercolor,outer color=outercolor] ($(#1.north west)+(\shadowshift)+(\shadowradius/2,-\shadowradius/2)$) circle (\shadowradius);
\shade[outercolor,inner color=innercolor,outer color=outercolor] ($(#1.south east)+(\shadowshift)+(-\shadowradius/2,\shadowradius/2)$) circle (\shadowradius);
\shade[outercolor,inner color=innercolor,outer color=outercolor] ($(#1.north east)+(\shadowshift)+(-\shadowradius/2,-\shadowradius/2)$) circle (\shadowradius);
\shade[top color=innercolor,bottom color=outercolor] ($(#1.south west)+(\shadowshift)+(\shadowradius/2,-\shadowradius/2)$) rectangle ($(#1.south east)+(\shadowshift)+(-\shadowradius/2,\shadowradius/2)$);
\shade[left color=innercolor,right color=outercolor] ($(#1.south east)+(\shadowshift)+(-\shadowradius/2,\shadowradius/2)$) rectangle ($(#1.north east)+(\shadowshift)+(\shadowradius/2,-\shadowradius/2)$);
\shade[bottom color=innercolor,top color=outercolor] ($(#1.north west)+(\shadowshift)+(\shadowradius/2,-\shadowradius/2)$) rectangle ($(#1.north east)+(\shadowshift)+(-\shadowradius/2,\shadowradius/2)$);
\shade[outercolor,right color=innercolor,left color=outercolor] ($(#1.south west)+(\shadowshift)+(-\shadowradius/2,\shadowradius/2)$) rectangle ($(#1.north west)+(\shadowshift)+(\shadowradius/2,-\shadowradius/2)$);
\filldraw ($(#1.south west)+(\shadowshift)+(\shadowradius/2,\shadowradius/2)$) rectangle ($(#1.north east)+(\shadowshift)-(\shadowradius/2,\shadowradius/2)$);
% \shade[outercolor,right color=black!40,left color=black!40] ($(#1.north west)+(-\shadowradius/12,\shadowradius/12)$) rectangle ($(#1.south east)+(\shadowradius/12,-\shadowradius/12)$);%Frame
\end{pgfonlayer}
}
% create a shadow layer, so that we don't need to worry about overdrawing other things
\pgfdeclarelayer{shadow}
\pgfsetlayers{shadow,main}
\newsavebox\mybox
\newlength\mylen
\newcommand\shadowimage[2][]{
\setbox0=\hbox{\includegraphics[#1]{#2}}
\setlength\mylen{\wd0}
\ifnum\mylen<\ht0
\setlength\mylen{\ht0}
\fi
\divide \mylen by 50
\def\shadowshift{0,0}
\def\shadowradius{\the\dimexpr\mylen+\mylen+\mylen\relax}
\begin{tikzpicture}
\begin{scope}
\clip [rounded corners=\shadowradius * 0.8] (0,0) rectangle coordinate (centerpoint) (\the\wd0, \the\ht0);
\node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[#1]{#2}};
\end{scope}
\drawshadow{image}
\end{tikzpicture}
}
```
| 1 | https://tex.stackexchange.com/users/299029 | 688642 | 319,467 |
https://tex.stackexchange.com/questions/304097 | 1 | I have just been using the default label and reference formats, i.e. `$\label{eqn:a}$` and `\ref{eqn:a}` but I was wondering if there's a way to change the format of the references. For example if I am referring back to Theorem 1.1 `$\label{thm:1.1}$` using `\ref{thm:1.1}` it shows in the `.pdf` file as simply 1.1.
I would like my references to say more than the number, i.e. to say Theorem 1.1 in the `.pdf` (I would also like this to be true for my Definitions and Lemmas). Obviously I know that this doesn't make sense for a line in a proof but is there a way to change the format when you are referring to a labelled theorem(or definition/lemma/etc.)??
| https://tex.stackexchange.com/users/94227 | How to change label/reference formats | false | You can consider using autoref. I think it is included in the thmtools package (<https://ctan.org/pkg/thmtools>).
`\autoref{theorem-label-here}` will render Theorem 1.1.
Edit: Sorry, my bad, `autoref` comes from the `hyperref` package (<https://ctan.org/pkg/hyperref?lang=en>).
| 0 | https://tex.stackexchange.com/users/231218 | 688644 | 319,468 |
https://tex.stackexchange.com/questions/688643 | 3 | I would like to align my table the following way:
Arsen\_\_\_\_\_\_0,63+-0,12\_\_\_\_\_\_\_\_\_\_18 +-12
Blei\_\_\_\_\_\_\_\_11,7+-0,6\_\_\_\_\_\_\_\_\_\_109 +-9
As you can see, I don't want to have any space between the \pm sign and the numbers, even if some of the numbers have decimal places (the latter should be completely ignored)
How can I achieve this with my table? I couldn't get the job done using sinunitx.
```
\documentclass[listof=totoc, %Abildungsverzeichnis, Bildverz.)
twoside, openright,
bibliography=totocnumbered,%num. L.Verz.
numbers=noenddot] %keine Punkte nach Section-Nummerierung
{scrreprt} %Dokumentklasse
\usepackage[top=25mm,bottom=20mm,
footskip=24pt] %Länge zwischen Text und Seitenzahl
{geometry}
\usepackage{siunitx}
\usepackage{colortbl}
\usepackage{nicematrix}
\usepackage{booktabs}
\begin{document}
% Table generated by Excel2LaTeX from sheet 'Tabelle1'
\begin{table}[htbp]
\centering
\caption{Add caption}
\begin{tabular}{lcccccc}
\toprule
\textbf{Element} & \multicolumn{1}{l}{\textbf{TWP/f}} & \multicolumn{1}{l}{\textbf{Pavement}} & \multicolumn{1}{l}{\textbf{Road Side}} & \multicolumn{1}{l}{\textbf{Elbe}} & \multicolumn{1}{l}{\textbf{Freiberger Mulde}} & \textbf{Saale} \\
\midrule
\textbf{Arsen*} & \cellcolor[rgb]{ 0, .439, .753}0,63 \pm 0,12 & \cellcolor[rgb]{ 0, .69, .314}18 \pm 12 & \cellcolor[rgb]{ 0, .69, .314}15,7 \pm 0,6 & \cellcolor[rgb]{ .573, .816, .314}38 \pm 6 & n. b. & n. b. \\
\textbf{Blei} & \cellcolor[rgb]{ 0, .439, .753}11,7 \pm 0,6 & \cellcolor[rgb]{ .573, .816, .314}109 \pm 9 & \cellcolor[rgb]{ .573, .816, .314}172 \pm 18 & \cellcolor[rgb]{ 1, .871, .216}109 \pm 26 & \cellcolor[rgb]{ 1, 0, 0}1900 & \cellcolor[rgb]{ .573, .816, .314}120 \\
\textbf{Cadmium} & \cellcolor[rgb]{ 0, .439, .753}0,23 \pm 0,06 & \cellcolor[rgb]{ 0, .69, .314}0,67 \pm 0,12 & \cellcolor[rgb]{ 0, .69, .314}1,0 \pm 0,0 & \cellcolor[rgb]{ 1, .6, 0}5,2 \pm 0,9 & \cellcolor[rgb]{ 1, 0, 0}440 & \cellcolor[rgb]{ 1, .6, 0}6,1 \\
\textbf{Chrom} & \cellcolor[rgb]{ 0, .439, .753}3,20 \pm 0,27 & \cellcolor[rgb]{ 1, .871, .216}242 \pm 17 & \cellcolor[rgb]{ 1, .871, .216}344 \pm 9 & \cellcolor[rgb]{ .573, .816, .314}112 \pm 19 & \cellcolor[rgb]{ 1, .871, .216}260 & \cellcolor[rgb]{ 0, .69, .314}96 \\
\textbf{Kupfer} & \cellcolor[rgb]{ 0, .439, .753}18 \pm 3 & \cellcolor[rgb]{ 1, 0, 0}510 \pm 100 & \cellcolor[rgb]{ 1, 0, 0}1047 \pm 6 & \cellcolor[rgb]{ .573, .816, .314}99 \pm 27 & n. b. & n. b. \\
\textbf{Nickel} & \cellcolor[rgb]{ 0, .439, .753}4,9 \pm 0,5 & \cellcolor[rgb]{ 1, .871, .216}122 \pm 11 & \cellcolor[rgb]{ .573, .816, .314}88 \pm 3 & \cellcolor[rgb]{ 0, .69, .314}50 \pm 5 & n. b. & n. b. \\
\textbf{Zink} & \cellcolor[rgb]{ 1, 0, 0}10430 \pm 80 & \cellcolor[rgb]{ 1, .6, 0}980 \pm 28 & \cellcolor[rgb]{ 1, 0, 0}2250 \pm 40 & \cellcolor[rgb]{ 1, .6, 0}950 \pm 190 & \cellcolor[rgb]{ 1, 0, 0}20100 & \cellcolor[rgb]{ 0, .69, .941}110 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{document}
```
Thank you!
| https://tex.stackexchange.com/users/299028 | Align table exclusively to plus-minus signs without taking the decimal point into account | true | Here's a solution that employs the [dcolumn](https://www.ctan.org/pkg/dcolumn) package. It exploits the fact that there's no `.` (dot, aka full stop) symbol in the four columns in question (other than in the `\cellcolor` directives). I've converted all instances of `\pm` to `.` and have defined a new column type, `d`, which converts instances of `.` back to `\pm`. That way, the column's contents will be centered on the `\pm` symbols.
```
\documentclass[listof=totoc, %Abildungsverzeichnis, Bildverz.)
twoside, openright,
bibliography=totocnumbered,%num. L.Verz.
numbers=noenddot] %keine Punkte nach Section-Nummerierung
{scrreprt} %Dokumentklasse
\usepackage[top=25mm,bottom=20mm,
hmargin=20mm, % set as needed
footskip=24pt] %Länge zwischen Text und Seitenzahl
{geometry}
\usepackage{siunitx}
\usepackage{colortbl}
\usepackage{nicematrix}
\usepackage{booktabs}
%% new code:
\usepackage{dcolumn}
\newcolumntype{d}{D{.}{\:\pm\:}{-1}} % for columns 2 to 5
\newcolumntype{C}{>{$}c<{$}} % for columns 6 & 7
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro
\usepackage{icomma} % treat commas in math mode as decimal markers
\begin{document}
\begin{table}[htbp]
\setlength\extrarowheight{3pt} % for a less-cramped look
\centering
\caption{Add caption} \label{tab:addlabel}
\begin{tabular}{@{} l *{4}{d} CC }
\hline
\textbf{Element} &
\mc{\textbf{TWP/f}} &
\mc{\textbf{Pavement}} &
\mc{\textbf{Road Side}} &
\mc{\textbf{Elbe}} &
\textbf{Freiberger} &
\textbf{Saale} \\[-3pt]
& & & & & \textbf{Mulde} \\
\hline
\textbf{Arsen*} & \cellcolor[rgb]{ 0, .439, .753}0,63 . 0,12 & \cellcolor[rgb]{ 0, .69, .314}18 . 12 & \cellcolor[rgb]{ 0, .69, .314}15,7 . 0,6 & \cellcolor[rgb]{ .573, .816, .314}38 . 6 & \mc{n.b.} & \mc{n.b.}\\
\textbf{Blei} & \cellcolor[rgb]{ 0, .439, .753}11,7 . 0,6 & \cellcolor[rgb]{ .573, .816, .314}109 . 9 & \cellcolor[rgb]{ .573, .816, .314}172 . 18 & \cellcolor[rgb]{ 1, .871, .216}109 . 26 & \cellcolor[rgb]{ 1, 0, 0}1900 & \cellcolor[rgb]{ .573, .816, .314}120 \\
\textbf{Cadmium} & \cellcolor[rgb]{ 0, .439, .753}0,23 . 0,06 & \cellcolor[rgb]{ 0, .69, .314}0,67 . 0,12 & \cellcolor[rgb]{ 0, .69, .314}1,0 . 0,0 & \cellcolor[rgb]{ 1, .6, 0}5,2 . 0,9 & \cellcolor[rgb]{ 1, 0, 0}440 & \cellcolor[rgb]{ 1, .6, 0}6,1 \\
\textbf{Chrom} & \cellcolor[rgb]{ 0, .439, .753}3,20 . 0,27 & \cellcolor[rgb]{ 1, .871, .216}242 . 17 & \cellcolor[rgb]{ 1, .871, .216}344 . 9 & \cellcolor[rgb]{ .573, .816, .314}112 . 19 & \cellcolor[rgb]{ 1, .871, .216}260 & \cellcolor[rgb]{ 0, .69, .314}96 \\
\textbf{Kupfer} & \cellcolor[rgb]{ 0, .439, .753}18 . 3 & \cellcolor[rgb]{ 1, 0, 0}510 . 100 & \cellcolor[rgb]{ 1, 0, 0}1047 . 6 & \cellcolor[rgb]{ .573, .816, .314}99 . 27 & \mc{n.b.} & \mc{n.b.} \\
\textbf{Nickel} & \cellcolor[rgb]{ 0, .439, .753}4,9 . 0,5 & \cellcolor[rgb]{ 1, .871, .216}122 . 11 & \cellcolor[rgb]{ .573, .816, .314}88 . 3 & \cellcolor[rgb]{ 0, .69, .314}50 . 5 & \mc{n.b.} & \mc{n.b.} \\
\textbf{Zink} & \cellcolor[rgb]{ 1, 0, 0}10430 . 80 & \cellcolor[rgb]{ 1, .6, 0}980 . 28 & \cellcolor[rgb]{ 1, 0, 0}2250 . 40 & \cellcolor[rgb]{ 1, .6, 0}950 . 190 & \cellcolor[rgb]{ 1, 0, 0}20100 & \cellcolor[rgb]{ 0, .69, .941}110 \\
\hline
\end{tabular}
\end{table}%
\end{document}
```
| 4 | https://tex.stackexchange.com/users/5001 | 688647 | 319,470 |
https://tex.stackexchange.com/questions/61896 | 57 | I have a photograph that I'm loading into my LaTeX document.
I'd like the photograph to have rounded corners and no visible border.
I'd prefer not to edit the original photograph.
Any thoughts on how to do this?
| https://tex.stackexchange.com/users/7478 | LaTeX Photo With Rounded Corners | false | When we are using OpTeX then we need not to use TikZ. The `\clipinoval` macro is provided.
```
\def\photo#1#2{\setbox0=\hbox{\picw=#1\inspic{#2}}
\clipinoval .5\wd0 .5\ht0 \wd0 \ht0 {\box0}}
\photo{70mm}{eiffeltower.jpg}
\bye
```
The `\clipinoval` macro used default diameter of corners 5mm but you can set another value using `\roundess` parameter.
| 3 | https://tex.stackexchange.com/users/51799 | 688655 | 319,474 |
https://tex.stackexchange.com/questions/688623 | 0 | I have used `\usepackage[style=apa, backend=biber, uniquename=false]{biblatex}` command in my article. Now I need help to (i) delete the issue number of the referred journals (ii) make volume of the journal in references BOLD (iii) For multiple author names are joined by '&" symbol, want them to be 'and', however in .bib file its 'and' but in the .tex file its showing symbol. I am using APA style
| https://tex.stackexchange.com/users/297991 | Customisation of Biblatex command | false | You can get rid of the `number` field with a sourcemap (see for example [Disable ISSN but keep ISBN with biblatex](https://tex.stackexchange.com/q/40097/35864), [Is it possible to suppress a specific field from bibtex .bbl in biblatex?](https://tex.stackexchange.com/q/32930/35864)). The `volume` can be formatted in bold by modifying the field format (cf. [Make the author names, the year, and the journal's volume number bold with biblatex/biber](https://tex.stackexchange.com/q/497426/35864)).
For the "&" we need to modify the context-sensitive `finalnamedelim` delimiter.
```
\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber, uniquename=false]{biblatex}
\DeclareSourcemap{
\maps[datatype = bibtex]{
\map{
\pertype{article}
\step[fieldset = number, null]
}
}
}
\DeclareFieldFormat[article]{volume}{\mkbibbold{\apanum{#1}}}
\DeclareDelimFormat[parencite]{finalnamedelim}
{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\bibstring{and}\space}
\DeclareDelimFormat[bib,biblist]{finalnamedelim}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\ifthenelse{\value{liststop}>2}
{\finalandcomma}
{}%
\addspace\bibstring{and}\space}}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson,aksin}
\printbibliography
\end{document}
```
| 2 | https://tex.stackexchange.com/users/35864 | 688662 | 319,479 |
https://tex.stackexchange.com/questions/688613 | 0 | I looked up for different solutions about how to include alternative text for images in LuLaTeX (1.17.0). I found the following [solution](https://tex.stackexchange.com/a/75104/48642)
```
\documentclass[a4paper,11pt,naustrian]{article}
\usepackage{accsupp}
\usepackage{graphicx}
\begin{document}
123
\BeginAccSupp{method=escape, ActualText=2. Tag \%4,space}
\EndAccSupp{}
\includegraphics{img.png}%
66
\BeginAccSupp{method=plain, ActualText=abc\%4,space}
\includegraphics{img.png}%
\EndAccSupp{}
\end{document}
```
Some questions with the above code:
1. I am not clear if the `\BeginAccSupp` and `\EndAccSupp` should include the graphic or not. I didn't find a comment in the documentation. I'm thinking it might get tricky with the placement of image across pages.
2. When I read the documentation of `accsupp` I read that the method `plain` might result in invalid PDF files since special chars are not protected. Does anybody know what special chars are referred to? I was thinking about the `%` but obviously this is double escaped in the PDF file:
```
ET
/Span<</ActualText(2.\040Tag\040\\%4)>>BDC
BT
```
Is there a way to correct it?
3. Reading the documentation I can use as well `pdfliteral`s. But somehow I didn't succeed with - is there a way to correct it?
```
\BeginAccSupp{pdfliteral=direct}
\pdfextension literal direct{/ActualText(2. Tag \%4)}
\EndAccSupp{}
```
end in
```
/Span<<>>BDC
/ActualText(2. Tag \%4)
ET
EMC
```
4. Is it better use the package options or encode by oneself the pdfstring and use `pdfliteral`? (once I have a working sample)
| https://tex.stackexchange.com/users/48642 | Accessibility - alternative text with lualatex (accsupp) | true | 1. The ActualText is a replacement text for the content and should surround it. For an image that is no problem as that is a box and so won't break over pages.
2. The syntax of a literal string is described in the PDF reference. Beside other you have to escapes parentheses (as they are used around the whole string), backslash, and you have to map non-ascii chars to some octal or similar representation. This is what the escape method do. As soon as you have TeX macros in it (and this includes macros like `\%`) it is safer to use the pdfstringdef method.
3. If you want to use \pdfliteral directly (but be aware that this is pdftex specific, luatex and xetex need other commands) you must use them before and after your content. You can use `\showoutput` to see what exactly accsupp is inserting:
```
.\pdfliteral page{/Span<</ActualText(\(test\))>>BDC}
...\glue(\topskip) 6.28543
...\hbox(4.71457+0.0)x360.0, glue set 327.79163fil
....\hbox(0.0+0.0)x17.0
....\OT1/cmr/m/n/10.95 x
....\OT1/cmr/m/n/10.95 x
....\glue 3.65 plus 1.825 minus 1.21666
....\pdfliteral page{EMC}
```
Side remark: do not put too much trust into this space option. ActualText normal works fine if you use a screen reader, but when copy&paste you are at the mercy of the heuristics of the PDF reader, and half of the time they ignore the setting.
| 2 | https://tex.stackexchange.com/users/2388 | 688667 | 319,480 |
https://tex.stackexchange.com/questions/67535 | 8 | It is interesting that there is no question in this site about the intersection between line and plane. In 3-space, a line is passing through a plane. Finding intersection in 3-space is a very important problem but seems to be difficult in tikz-3dplot. I have two questions: 1) how to find the intersecting point and 2) how to hide the line behind the plane?
```
\tdplotsetmaincoords{45}{10}
\begin{tikzpicture}[scale=1,tdplot_main_coords,>=stealth',font=\scriptsize]
%plane
\draw[fill=gray!40,opacity=.8] (.5,-1.5,0) -- (4,-1.5,0) -- (4,1.5,0) -- (.5,1.5,0) -- cycle;
%points
\coordinate (or) at (2,1.5,-4);
\tdplotsetcoord{p}{5}{10}{0};
\tdplotsetcoord{oo}{0}{0}{0};
%line
\draw (or) -- (p);
%axis
\draw[->] (oo) -- +(.5,0,0) node[right]{$x$};
\draw[->] (oo) -- +(0,.5,0) node[right]{$y$};
\draw[->] (oo) -- +(0,0,.5) node[left]{$z$};
\end{tikzpicture}
```
| https://tex.stackexchange.com/users/13342 | How to find the intersection point between line and plane in tikz-3dplot? | false | Again, if the plane is horizontal there is a very simple way. Ti*k*Z can find the intersection of two lines with:
```
\coordinate (I) at (intersection of A--B and C--D);
```
I define a macro that creates simultaneously two coordinates: any given point and its projection over the xy-plane. Then, the intersection between line and plane is the same as the intersection between the line and its projection.
```
\documentclass[tikz,border=1.618mm]{standalone}
\usetikzlibrary{3d,perspective}
\newcommand{\pointandprojection}[4]% x,y,z, name
{% creates a cooridinate A and its horizontal projection A-0
\coordinate (#4) at (#1,#2,#3);
\coordinate (#4-0) at (#1,#2,0);
}
\begin{document}
\begin{tikzpicture}[3d view={110}{30},line cap=round,line join=round]
% coordinates
\pointandprojection{-1.5}{-1}{2}{P};
\pointandprojection{1.5}{1.8}{-1}{Q};
\coordinate (I) at (intersection of P--Q and P-0--Q-0);
% line below plane
\draw[dashed,red] (Q-0) -- (Q);
\draw[red] (Q) -- (I);
% plane and x,y-axis
\draw[fill=gray!20,fill opacity=0.8,canvas is xy plane at z=0] (-2,-2) rectangle (2,2);
\draw[gray!50] (P-0) -- (Q-0);
\draw[-latex] (0,0,0) -- (3,0,0) node[left] {$x$};
\draw[-latex] (0,0,0) -- (0,3,0) node[right] {$y$};
% line above plane
\draw[dashed,red] (P-0) -- (P);
\draw[red] (P) -- (I);
% z-axis
\draw[-latex] (0,0,0) -- (0,0,3) node[above] {$z$};
% points
\foreach\i in {P,Q,I,P-0,Q-0}
\fill (\i) circle (0.25mm);
\end{tikzpicture}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/231368 | 688674 | 319,482 |
https://tex.stackexchange.com/questions/688679 | 1 | how to add external font path in latex? when I compile the latex(texlive 2023) document in macOS 13.2, shows error:
```
Package fontspec Error: The font "HelveticaNeueLTPro-Md" cannot be found.
```
I have already tried to put the font into the path and add the path like this:
```
\setmainfont[
Path = /Users/xiaoqiangjiang/Library/texmf/tex/latex/Font,
Extension = .otf,
]{HelveticaNeueLTPro-Md}
```
still could not fixed this issue. what should I do to add the font path in macOS? this is the folder font list:
```
> ll
total 48760
-rw-r--r-- 1 xiaoqiangjiang staff 41K Jun 15 18:28 HelveticaNeueLTPro-Md.otf
-rw-r--r-- 1 xiaoqiangjiang staff 34K Jun 15 18:28 HelveticaNeueLTPro-Roman.otf
-rw-r--r-- 1 xiaoqiangjiang staff 12M Jun 15 18:28 Pro_GB18030.ttf
-rw-r--r-- 1 xiaoqiangjiang staff 12M Jun 15 18:28 Pro_GB18030DemiBold.ttf
```
I have tried to copy the file to folder `~/Library/Fonts`, still could not fixed this issue.
| https://tex.stackexchange.com/users/69600 | Package fontspec Error: The font "HelveticaNeueLTPro-Md" cannot be found | true | Put the fonts into `/Users/.../Library/Fonts/HelveticaNeue/`
Then run in a terminal `luaotfload-tool --update`. Now the files should be listed with
```
luafindfont helveticaneue
```
e.g.:
```
bash-3.2$ luafindfont helveticaneueltpro
No. Filename Symbolic name Path
1. HelveticaNeueLTPro-Bd.otf helveticaneueltpro /Users/voss/Library/Fonts/Helvetica/
2. HelveticaNeueLTPro-BdCn.otf helveticaneueltpro /Users/voss/Library/Fonts/Helvetica/
3. HelveticaNeueLTPro-BdCnO.otf helveticaneueltpro /Users/voss/Library/Fonts/Helvetica/
4. HelveticaNeueLTPro-BdEx.otf helveticaneueltpro /Users/voss/Library/Fonts/Helvetica/
[...]
```
And `lualatex` or `xelatex` will find the fonts.
| 2 | https://tex.stackexchange.com/users/187802 | 688681 | 319,485 |
https://tex.stackexchange.com/questions/688673 | 2 | I'm trying to understand the error messages when using latex without having to google them all. The following example produces 10 errors when using TexpadTeX (based on TeX Version 3.14159265 with e-TeX extensions) running in extended mode embedded in Texpad 760 (preloaded format=latex 2021.3.29):
```
\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
1=1
\end{gather}
\end{document}
```
The problem with the code above (from a user perspective) is that there is a blank line within the gather environment, which isn't allowed. The generated error messages however are the following:
1. `! Paragraph ended before \gather was complete. <to be read again> \par l.6`
2. `! Missing $ inserted. <inserted text> $ l.6`
3. `! Missing \endgroup inserted. <inserted text> \endgroup l.6`
4. `! Display math should end with $$. <to be read again> \par l.6`
5. `! Misplaced \cr. \math@cr@@@ ->\cr l.7 \end{gather}`
6. `! Misplaced \noalign. \math@cr@@ ... \iffalse }\fi \math@cr@@@ \noalign {\vskip #1\relax } l.7 \end{gather}`
7. `! Misplaced \noalign. \black@ #1->\noalign {\ifdim #1>\displaywidth \dimen@ \prevdepth \nointerlin... l.7 \end{gather}`
8. `! Extra }, or forgotten \endgroup. \endgather ->\math@cr \black@ \totwidth@ \egroup $$\ignorespacesafterend l.7 \end{gather}`
9. `! Missing $ inserted. <inserted text> $ l.7 \end{gather}`
10. `! Display math should end with $$. <to be read again> \endgroup l.7 \end{gather}`
I don't quite understand how someone could deduce the action "remove the empty line inside the gather environment" from these error messages. Which of these error messages points me in that direction?
Thanks in advance!
| https://tex.stackexchange.com/users/296871 | understanding amsmath gather environment error messages | true | TeX offers the functionality to continue compilation after an error. This is implemented because errors can sometimes be local and can therefore allow the rest of the document to be typeset normally, even if there are issues in the output around the error.
In my opinion this is an unfortunate design decision, because 1. the output can be suboptimal and often plain wrong, 2. it teaches users that it is ok to ignore errors, and 3. it makes it difficult to pinpoint the actual error that needs fixing (as is the case in the current question about `gather`).
In the default setting LaTeX compilers such as pdfLaTeX *do not* continue and immediately stop processing when the first error is found. Most editors and online environments, including TeXPad, however *do* enable this functionality, leading to much confusion.
Long introduction, the main point is: always look at the first error only, and ignore everything that comes after, because all other error messages are irrelevant for the root cause of the problem. In this case the first error message is:
```
! Paragraph ended before \gather was complete.
<to be read again>
\par
l.6
```
This error indicates that a paragraph has ended while it should not have ended. In TeX there are two ways of ending a paragraph: with the command `\par`, or with an empty line.
The error message tells you that an unexpected paragraph ending was found, so to fix that you need to remove that paragraph ending. There is no `\par` in the code but there is an empty line. Therefore you know that you need to remove the empty line.
Granted, this requires the knowledge that empty line means paragraph ending, and that the solution is to *remove* that paragraph ending. This is part of learning TeX as a language, which will take some time and experience. Error messages can be cryptic, but once you learn some of these details then you will find that the information needed to fix the error is (almost) always indeed presented in the error message.
| 6 | https://tex.stackexchange.com/users/89417 | 688683 | 319,486 |
https://tex.stackexchange.com/questions/688673 | 2 | I'm trying to understand the error messages when using latex without having to google them all. The following example produces 10 errors when using TexpadTeX (based on TeX Version 3.14159265 with e-TeX extensions) running in extended mode embedded in Texpad 760 (preloaded format=latex 2021.3.29):
```
\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
1=1
\end{gather}
\end{document}
```
The problem with the code above (from a user perspective) is that there is a blank line within the gather environment, which isn't allowed. The generated error messages however are the following:
1. `! Paragraph ended before \gather was complete. <to be read again> \par l.6`
2. `! Missing $ inserted. <inserted text> $ l.6`
3. `! Missing \endgroup inserted. <inserted text> \endgroup l.6`
4. `! Display math should end with $$. <to be read again> \par l.6`
5. `! Misplaced \cr. \math@cr@@@ ->\cr l.7 \end{gather}`
6. `! Misplaced \noalign. \math@cr@@ ... \iffalse }\fi \math@cr@@@ \noalign {\vskip #1\relax } l.7 \end{gather}`
7. `! Misplaced \noalign. \black@ #1->\noalign {\ifdim #1>\displaywidth \dimen@ \prevdepth \nointerlin... l.7 \end{gather}`
8. `! Extra }, or forgotten \endgroup. \endgather ->\math@cr \black@ \totwidth@ \egroup $$\ignorespacesafterend l.7 \end{gather}`
9. `! Missing $ inserted. <inserted text> $ l.7 \end{gather}`
10. `! Display math should end with $$. <to be read again> \endgroup l.7 \end{gather}`
I don't quite understand how someone could deduce the action "remove the empty line inside the gather environment" from these error messages. Which of these error messages points me in that direction?
Thanks in advance!
| https://tex.stackexchange.com/users/296871 | understanding amsmath gather environment error messages | false | As a general rule, only the first in a series of error messages related to the same place is to be taken in consideration. The following ones are caused by the attempt at error recovery, but in this case even removing the offending `\par` (if in interactive mode) wouldn't solve the issue: this is a common problem when arguments to “short” commands contain the disallowed `\par`.
A macro can be either `\long` (accepting `\par` in its arguments) or not. Since `\par` can't work inside an `amsmath` alignment, all the related macros are not `\long`. Feeding `\par` to a non `\long` macro will stop the lookup for the argument and failure in error recovery is expected.
In this case the error message tells the user that a `\par` (or a blank line) is where it shouldn't be. The error mentions `\gather` and it should be common knowledge that `\begin{env}` executes at some point the command `\env`. The error message should be quite clear now: at line 6, inside a `gather` environment, there is a blank line or a spurious `\par` token. Remove it and rerun LaTeX.
| 3 | https://tex.stackexchange.com/users/4427 | 688684 | 319,487 |
https://tex.stackexchange.com/questions/604664 | 2 | The following problem is appearing in `TeX Live`, not in `MiKTeX`.
The structure of my MWE project directory:
```
articles
- article1.tex
main.tex
style.sty
fontfilename.ttf % For example: Patrick Hand.ttf (https://fonts.google.com/specimen/Patrick+Hand)
```
article1.tex
------------
```
% !TEX program = xelatex
\documentclass[12pt]{article}
\usepackage{../style}
\begin{document}
\qtext{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}
\end{document}
```
main.tex
--------
```
% !TEX program = xelatex
\documentclass[12pt]{book}
\usepackage{style}
\begin{document}
\input{articles/article1}
\end{document}
```
style.sty
---------
```
\RequirePackage{docmute}
\RequirePackage{fontspec}
\newfontfamily\quotefont{[fontfilename]}
% \newfontfamily\quotefont{[Patrick Hand]} % https://fonts.google.com/specimen/Patrick+Hand
\newcommand\qtext[1]{ \quotefont #1 }
```
The error "`Package fontspec Error: The font "[fontfilename]" cannot be found.`" is appearing when I compile the `article1.tex` with texlive. But the compilation of the `main.tex` doesn't give the error. On the other hand, no error shows up in miktex.
I have kept this MWE as a `Overleaf` project too. You can check it here: <https://www.overleaf.com/read/twqghjmybnxm>
What do I need to configure and fix so that my project's `article1.tex` and `main.tex` can be properly compiled both on miktex and texlive?
| https://tex.stackexchange.com/users/114006 | Font issue in TeX Live "Package fontspec Error: The font cannot be found." | false | I am facing the similar issue, you can try to load fonts like this:
```
\setmainfont[
Path = /your/font/path/,
Extension = .otf ,
BoldFont = HelveticaNeueLTPro-Md.otf ,
]{HelveticaNeueLTPro-Roman.otf}
```
| 1 | https://tex.stackexchange.com/users/69600 | 688685 | 319,488 |
https://tex.stackexchange.com/questions/487506 | 4 | I'm trying to use a foreach loop to draw a whole bunch of arrows in a tikzcd environment by using the foreach loop to specify coordinates but I can't get it to compile. Here's a minimal example of what I'm trying:
```
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A & B & C \\
\foreach \x in {2,3}{
\arrow[from=1-1, to=1-\x]
}
\end{tikzcd}
\end{document}
```
Which should appear as an arrow from A to B and another from A to C. Instead I'm recieving this error:
ERROR: Undefined control sequence.
--- TeX said ---
pgf@sh@ns@\tikzcdmatrixname -1-\x
l.12 \end{tikzcd}
I think I could get it to work in a plain tikz environment but I'd like to use tikzcd if possible. Thanks for any help.
| https://tex.stackexchange.com/users/187518 | Specifying coordinates in tikzcd arrows with a foreach loop | false | This is a classical expansion problem.
The `\arrow` macro just takes everything between `[` and `]` and stores it as-is in a long list which gets processed much later. At that point `\x` isn't `2` or `3` anymore.
I provide three solutions:
1. An `\arrowx[<opt1>][<opt2>]` macro that expands `<opt1>` before it processes it. The `<opt2>` will get forwarded as-is and *not* expanded. That will only be really necessary when you have to use fragile node content.
2. The `\arloop{<opt>}{<list>}` macro uses a `\foreach` loop (i.e. the `...` syntax is allowed) over `<list>` to construct `\arrow[<opt>]` statements where `#1` in `<opt>` is replaced by the elements of your list.
3. The `end arrows` key that executes its argument directly (after the nodes have been constructed, of course) when there's no expansion issue anymore.
(The PGFPlots package also provides various ungrouped and/or invoking loop constructs but these seem easy enough to implement just for TikZ-CD.)
Code
----
```
\documentclass{standalone}
\usepackage{tikz-cd}
\makeatletter
\tikzcdset{every diagram/.append code=\let\arrowx\tikzcd@arrowx\let\arloop\tikzcd@arloop}
\NewDocumentCommand{\tikzcd@arrowx}{O{}O{}}{%
\edef\tikzcd@temp{#1}%
\expandafter\arrow\expandafter[\expandafter{\tikzcd@temp,#2}]}
\NewDocumentCommand{\tikzcd@arloop}{mm}{%
\pgfkeys{/utils/temp/.code=\arrow[{#1}],/utils/temp/.list={#2}}}
\NewDocumentCommand{\tikzcd@arrowlate}{O{}}{%
\path[{/tikz/commutative diagrams/.cd,every arrow,#1}]
(\tikzcd@ar@start\tikzcd@startanchor)to(\tikzcd@ar@target\tikzcd@endanchor);}
\tikzcdset{
end arrows/.style={
/tikz/commutative diagrams/every matrix/.append style={
append after command=
\pgfextra{\pgfutil@g@addto@macro\tikzcd@savedpaths{\let\arrow\tikzcd@arrowlate#1}}}}}
\makeatother
\begin{document}
\begin{tikzcd}
A & B & C
\foreach \x in {2, 3}{
\arrowx[from=1-1, to=1-\x, bend right]
}
\end{tikzcd}
\begin{tikzcd}
A & B & C
\arloop{from=1-1, to=1-#1, bend left}{2,3}
\end{tikzcd}
\begin{tikzcd}[
end arrows={
\foreach \x in {2, 3}{
\arrow[from=1-1, to=1-\x, bend right]
}
}
]
A & B & C
\end{tikzcd}
\end{document}
```
Output
------
| 2 | https://tex.stackexchange.com/users/16595 | 688693 | 319,491 |
https://tex.stackexchange.com/questions/688686 | 3 | I want to add some custom font into my latex build process in macOS 13.3, this is the command I am using right now:
```
\setmainfont[
Path = { /Users/xiaoqiangjiang/.fonts/ },
Extension = .otf ,
BoldFont = HelveticaNeueLTPro-Md.otf ,
]{HelveticaNeueLTPro-Roman.otf}
```
when I using the full path like this `/Users/xiaoqiangjiang/.fonts/`, it works fine. But when I replace the path to `~/.fonts/`, the texstudio shows could not found the fonts. Does the setmainfont command path support the `~`? what should I do to fixed this issue?
| https://tex.stackexchange.com/users/69600 | does the setmainfont command path support ~ | true | No, you can't use `~` for home, but you can use `\string~`.
```
\documentclass{article}
\usepackage{fontspec}
\newfontface{\fell}{IMFePIit29C}[
Path=\string~/provaccia/conf-1.7b/fell/,
Extension=.otf,
]
\begin{document}
{\fell Hello}
\end{document}
```
I found a rarely used font in some working directory. Here's the console output about the font (username masked), with LuaLaTeX
```
</Users/*******/provaccia/conf-1.7b/fell/IMFePIit29C.otf>
```
So you see it works. I also tested XeLaTeX with success.
| 3 | https://tex.stackexchange.com/users/4427 | 688697 | 319,493 |
https://tex.stackexchange.com/questions/320255 | 5 | In this MWE, combining `newtxtext` and `microtype` leads to a compilation error (Extra `\else`). This particular example is inspired by the `svjour3` document class, but I reduced it to the `article` class and a simple redefinition of `\normalsize`. You would think that an `\iftrue ... \else\fi` construction should not change much compared to just `...`, yet it does:
```
\documentclass{article}
\let\oldnormalsize\normalsize
% this works!
%\let\normalsize\oldnormalsize
% this works!
%\renewcommand\normalsize{\oldnormalsize}
% this works!
%\renewcommand\normalsize{\iffalse\else\fi\oldnormalsize}
% inspired by svglov3.clo. Does not work!
%\renewcommand\normalsize{\iffalse\else\oldnormalsize\fi}
% Does not work, either!
\renewcommand\normalsize{\iftrue\oldnormalsize\else\fi}
\usepackage{newtxtext}
\usepackage{microtype}
\begin{document}
Anything
\end{document}
```
Is that a bug in `newtxtext` or `microtype`, or are the `svjour3` developers doing something that should be avoided? I cannot really see what that might be.
Inverting the order of `microtype` and `newtxtext` gets rid of that error, by the way. I have not found anything helpful on that topic, but I wonder whether `microtype` should be loaded only after all font packages have been loaded. A quick test suggests that in my longer document, the order of the two packages does not matter.
The problem can be isolated to this MWE (see my answer for details, I did not want to flood this question). Removing any of the three unneeded `iftrue`, `\iffalse` constructions fixes the problem, too, as does reordering the `\ifs` in `\ShowError`. (I can only reproduce this with `\iffalse` surrounded by an `\iftrue`.)
```
\documentclass{article}
\makeatletter
\newcommand{\CommandOne}[3]{#1,#2,#3}
\newcommand{\CommandTwo}{\iftrue\CommandOne{1}{2}{3}\else\fi}
% this works:
% \renewcommand{\CommandTwo}{\CommandOne{1}{2}{3}}
\def\ShowError{
\iftrue
\iffalse
\else
\begingroup
\def\CommandOne##1##2##3\@nil{\endgroup}
\CommandTwo\@nil
\fi
\else
\fi
}
\ShowError
\begin{document}
X
\end{document}
```
| https://tex.stackexchange.com/users/30810 | \begingroup\def trick vs. macro delimiters vs. conditionals | true | With only the small MWE you already produced this becomes quite explainable:
First lets take a look at the context this results in. The following is just the stuff this results in which I've replaced each macro with its replacement text indented by 6 additional spaces (in case of a macro inside of an `\if`-block this results in 8, as I indent those by 2 spaces):
```
\iftrue
\iffalse
\else
\iffalse
\else
\begingroup
\def\set@fontsize#1\@nil{\endgroup}%
\iftrue
\normalsize
\else
\fi
\@nil
\fi
\fi
\else
\fi
```
Now `\normalsize` expands to some checks and then `\set@fontsize`, so if we ignore the checks (and the usual arguments to `\set@fontsize` as they don't matter here) this becomes:
```
\iftrue
\iffalse
\else
\iffalse
\else
\begingroup
\def\set@fontsize#1\@nil{\endgroup}%
\iftrue
\set@fontsize
\else
\fi
\@nil
\fi
\fi
\else
\fi
```
If we now just expand our temporary definition of `\set@fontsize` without evaluating all the `\if`s and `\else`s before, it'll remove everything up to and including `\@nil` and instead leaves an `\endgroup`, so we get:
```
\iftrue
\iffalse
\else
\iffalse
\else
\begingroup
\def\set@fontsize#1\@nil{\endgroup}%
\iftrue
\endgroup
\fi
\fi
\else
\fi
```
Now lets remove the contents of `\begingroup...\endgroup` as they aren't interesting anymore except for the contained `\iftrue`:
```
\iftrue
\iffalse
\else
\iffalse
\else
\iftrue
\fi
\fi
\else
\fi
```
And now the issue becomes apparent. Let's just re-indent this to be more readable:
```
\iftrue
\iffalse
\else
\iffalse
\else
\iftrue
\fi
\fi
\else
\fi
```
Next, we'll remove matching pairs of `\if...\else...\fi` blocks, first the inner-most `\iftrue`:
```
\iftrue
\iffalse
\else
\iffalse
\else
\fi
\else
\fi
```
Now the inner-most `\iffalse`:
```
\iftrue
\iffalse
\else
\else
\fi
```
and we arrive at the `Extra \else`.
The issue is that your temporary `\set@fontsize`-definition will have removed important bits of an `\if`-construct and the result you get after this will be unbalanced `\if`-`\else`-`\fi` instructions.
| 3 | https://tex.stackexchange.com/users/117050 | 688703 | 319,497 |
https://tex.stackexchange.com/questions/193267 | 2 | I want to define a new environment whose implementation depends on another environment. The first environment should accept a list of key-value options. Some of these options are for use only on this first environment. All options not known to the first environment are to be passed to the other environment.
Is there any package for dealing with options filtering in LaTeX?
| https://tex.stackexchange.com/users/328 | Filtering key-value options | false | There are different key=value packages for which you can do the following (in essence, every key=value package that allows you to define unknown-handlers yourself). I'll show an example using `expkv` of this approach (disclaimer: I'm `expkv`'s author).
```
\documentclass{article}
\usepackage{tcolorbox}
\usepackage{expkv-def}
\ekvdefinekeys{myenv}
{
store blubb = \myenvBlubb
,store foo = \myenvFoo
,store bar = \myenvBar
% this implements the filtering, instead of throwing errors for unknown keys
% we store them in a list
,protected unknown noval =
\edef\myenvUnknown{\unexpanded\expandafter{\myenvUnknown,#1}}
,protected unknown code =
\edef\myenvUnknown{\unexpanded\expandafter{\myenvUnknown,#1= {#2}}}
% some auxiliary keys to restore the unknown list to empty
,protected noval clear-unknowns = \let\myenvUnknown\empty
% initialise the empty unknown-list
,initial clear-unknowns
}
\newenvironment{myenv}[1]
{%
\ekvset{myenv}{#1}%
\expanded{\unexpanded{\begin{tcolorbox}}\expandafter}%
\expandafter[\myenvUnknown]%
}
{%
\tcblower
blubb: \myenvBlubb\\
foo: \myenvFoo\\
bar: \myenvBar\\
\end{tcolorbox}%
}
\begin{document}
\begin{myenv}{colback=blue!30!white,bar=EC,title=example, foo=Foobar}
This is an example.
\end{myenv}
\end{document}
```
---
Another approach can be to use a key=value implementation that supports setting only known keys and storing the unknown keys in a list by using some special syntax (this doesn't require you to code the list-building yourself as done above). One such implementation is `l3keys` with its `\keys_set_known:nnN`.
```
\documentclass{article}
\usepackage{tcolorbox}
\ExplSyntaxOn
\tl_new:N \l__myenv_unknown_tl
\keys_define:nn { myenv }
{
blubb .tl_set:N = \l__myenv_blubb_tl
,foo .tl_set:N = \l__myenv_foo_tl
,bar .tl_set:N = \l__myenv_bar_tl
}
\newenvironment{myenv}[1]
{%
\keys_set_known:nnN { myenv } {#1} \l__myenv_unknown_tl
\exp_last_unbraced:NnNo \begin { tcolorbox } [ \l__myenv_unknown_tl ]
}
{%
\tcblower
blubb:~ \l__myenv_blubb_tl\\
foo:~ \l__myenv_foo_tl\\
bar:~ \l__myenv_bar_tl\\
\end{tcolorbox}%
}
\ExplSyntaxOff
\begin{document}
\begin{myenv}{colback=blue!30!white,bar=EC,title=example, foo=Foobar}
This is an example.
\end{myenv}
\end{document}
```
---
Both code blocks give identical results:
| 1 | https://tex.stackexchange.com/users/117050 | 688707 | 319,499 |
https://tex.stackexchange.com/questions/93990 | 5 | *UPDATED, see edit history for completeness*
I'm trying out the [keycommand package](http://www.ctan.org/tex-archive/macros/latex/contrib/keycommand) but it's not working as expected. There seems to be some incompatibility with tables, but I've read and re-read the documentation and I can't figure out what it is.
I've built a minimal example of what I'm doing. It's using `longtable`, since those seem to work a little better than regular ones and since that is what I need it to work with (for now):
```
\documentclass{article}
\usepackage{longtable}
\usepackage{keycommand}
\newkeycommand\mycommand[first=one,second=2][1]{%
#1 \\
First: \commandkey{first} & second: \commandkey{second}%
}
\begin{document}
\begin{longtable}{ll}
\mycommand{hello} \\
\mycommand[first=1,second=two]{world!}
\end{longtable}
\end{document}
```
The problem is that instead of outputting the parameter values, it outputs the parameter *names*:
```
EXPECTED OUTPUT ACTUAL OUTPUT
*************** *************
hello hello
First: one second: 2 first: first second: second
world! world!
First: 1 second: two first: first second: second
```
Why does it do this? What can I do about it?
| https://tex.stackexchange.com/users/223 | Keycommand package - \commandkey{mykey} doesn't expand | false | This is trivial and possible without any global assignments (any assignments for that matter) using `expkv-cs` (the following uses its `Hash` variant, as that is closer in syntax to `keycommand`, even though the example only needs two keys and it would be faster to set it up with the `Split` variant).
Disclaimer: I'm the author of `expkv`
```
\documentclass{article}
\usepackage{longtable}
\usepackage{expkv-cs}
% grabbing the argument as an optional argument
\newcommand\mycommand[1][]{\mycommandKV{#1}}
% parsing the keys "first" and "second"
\ekvcHashAndForward\mycommandKV\mycommandOUT{first=one,second=2}
% output
% #1 contains the parsed keys accessible via \ekvcValue
% #2 the mandatory argument
\newcommand\mycommandOUT[2]
{%
#2 \\
First: \ekvcValue{first}{#1} & second: \ekvcValue{second}{#1}%
}
\begin{document}
\begin{longtable}{ll}
\mycommand{hello} \\
\mycommand[first=1,second=two]{world!}
\end{longtable}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/117050 | 688711 | 319,501 |
https://tex.stackexchange.com/questions/672296 | 1 | I have a problem with animations in Tikz.
I get the following error message: Package pgf Warning: Your graphic driver pgfsys-pdftex.def does not support animations.
Here is a MWE:
```
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{animations}
\begin{document}
\tikz \draw :xshift = {0s = "0cm", 30s = "-3cm", repeats} (0,0) circle (5mm);
\end{document}
```
So if anyone can help me?
Here is the log:
```
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.12) (preloaded format=pdflatex 2023.1.16) 20 JAN 2023 09:35
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./essai2_tikz.tex
(essai2_tikz.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2022-12-17>
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/base\size10.clo
File: size10.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
\c@part=\count185
\c@section=\count186
\c@subsection=\count187
\c@subsubsection=\count188
\c@paragraph=\count189
\c@subparagraph=\count190
\c@figure=\count191
\c@table=\count192
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/base\inputenc.sty
Package: inputenc 2021/02/14 v1.3d Input encoding file
\inpenc@prehook=\toks16
\inpenc@posthook=\toks17
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/base\fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/frontendlayer\tikz.
sty
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgf.sty
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfrcs.st
y
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil
-common.tex
\pgfutil@everybye=\toks18
\pgfutil@tempdima=\dimen141
\pgfutil@tempdimb=\dimen142
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil
-common-lists.tex))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfutil
-latex.def
\pgfutil@abb=\box51
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfrcs.
code.tex
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf\pgf.revision.tex)
Package: pgfrcs 2021/05/15 v3.1.9a (3.1.9a)
))
Package: pgf 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/basiclayer\pgfcore.
sty
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/graphics\keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks19
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/graphics\graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/graphics\trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/graphics-cfg\graphics.c
fg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 107.
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/graphics-def\pdftex.def
File: pdftex.def 2022/09/22 v1.2b Graphics/color driver for pdftex
))
\Gin@req@height=\dimen143
\Gin@req@width=\dimen144
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/systemlayer\pgfsys.
sty
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy
s.code.tex
Package: pgfsys 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys
.code.tex
\pgfkeys@pathtoks=\toks20
\pgfkeys@temptoks=\toks21
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys
filtered.code.tex
\pgfkeys@tmptoks=\toks22
))
\pgf@x=\dimen145
\pgf@y=\dimen146
\pgf@xa=\dimen147
\pgf@ya=\dimen148
\pgf@xb=\dimen149
\pgf@yb=\dimen150
\pgf@xc=\dimen151
\pgf@yc=\dimen152
\pgf@xd=\dimen153
\pgf@yd=\dimen154
\w@pgf@writea=\write3
\r@pgf@reada=\read2
\c@pgf@counta=\count193
\c@pgf@countb=\count194
\c@pgf@countc=\count195
\c@pgf@countd=\count196
\t@pgf@toka=\toks23
\t@pgf@tokb=\toks24
\t@pgf@tokc=\toks25
\pgf@sys@id@count=\count197
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgf.c
fg
File: pgf.cfg 2021/05/15 v3.1.9a (3.1.9a)
)
Driver file for pgf: pgfsys-pdftex.def
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy
s-pdftex.def
File: pgfsys-pdftex.def 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy
s-common-pdf.def
File: pgfsys-common-pdf.def 2021/05/15 v3.1.9a (3.1.9a)
)))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy
ssoftpath.code.tex
File: pgfsyssoftpath.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgfsyssoftpath@smallbuffer@items=\count198
\pgfsyssoftpath@bigbuffer@items=\count199
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy
sprotocol.code.tex
File: pgfsysprotocol.code.tex 2021/05/15 v3.1.9a (3.1.9a)
))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/xcolor\xcolor.sty
Package: xcolor 2022/06/12 v2.14 LaTeX color extensions (UK)
(C:\Users\didie\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\didie\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\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
e.code.tex
Package: pgfcore 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code
.tex
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathcalc.
code.tex
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathutil.
code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathparse
r.code.tex
\pgfmath@dimen=\dimen155
\pgfmath@count=\count266
\pgfmath@box=\box52
\pgfmath@toks=\toks26
\pgfmath@stack@operand=\toks27
\pgfmath@stack@operation=\toks28
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.code.tex
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.basic.code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.trigonometric.code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.random.code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.comparison.code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.base.code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.round.code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.misc.code.tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfunct
ions.integerarithmetics.code.tex)))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmathfloat
.code.tex
\c@pgfmathroundto@lastzeros=\count267
))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfint.code.
tex)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
epoints.code.tex
File: pgfcorepoints.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgf@picminx=\dimen156
\pgf@picmaxx=\dimen157
\pgf@picminy=\dimen158
\pgf@picmaxy=\dimen159
\pgf@pathminx=\dimen160
\pgf@pathmaxx=\dimen161
\pgf@pathminy=\dimen162
\pgf@pathmaxy=\dimen163
\pgf@xx=\dimen164
\pgf@xy=\dimen165
\pgf@yx=\dimen166
\pgf@yy=\dimen167
\pgf@zx=\dimen168
\pgf@zy=\dimen169
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
epathconstruct.code.tex
File: pgfcorepathconstruct.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgf@path@lastx=\dimen170
\pgf@path@lasty=\dimen171
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
epathusage.code.tex
File: pgfcorepathusage.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgf@shorten@end@additional=\dimen172
\pgf@shorten@start@additional=\dimen173
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
escopes.code.tex
File: pgfcorescopes.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgfpic=\box53
\pgf@hbox=\box54
\pgf@layerbox@main=\box55
\pgf@picture@serial@count=\count268
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
egraphicstate.code.tex
File: pgfcoregraphicstate.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgflinewidth=\dimen174
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
etransformations.code.tex
File: pgfcoretransformations.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgf@pt@x=\dimen175
\pgf@pt@y=\dimen176
\pgf@pt@temp=\dimen177
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
equick.code.tex
File: pgfcorequick.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
eobjects.code.tex
File: pgfcoreobjects.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
epathprocessing.code.tex
File: pgfcorepathprocessing.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
earrows.code.tex
File: pgfcorearrows.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgfarrowsep=\dimen178
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
eshade.code.tex
File: pgfcoreshade.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgf@max=\dimen179
\pgf@sys@shading@range@num=\count269
\pgf@shadingcount=\count270
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
eimage.code.tex
File: pgfcoreimage.code.tex 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
eexternal.code.tex
File: pgfcoreexternal.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgfexternal@startupbox=\box56
))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
elayers.code.tex
File: pgfcorelayers.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
etransparency.code.tex
File: pgfcoretransparency.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
epatterns.code.tex
File: pgfcorepatterns.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/basiclayer\pgfcor
erdf.code.tex
File: pgfcorerdf.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule
shapes.code.tex
File: pgfmoduleshapes.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgfnodeparttextbox=\box57
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule
plot.code.tex
File: pgfmoduleplot.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco
mp-version-0-65.sty
Package: pgfcomp-version-0-65 2021/05/15 v3.1.9a (3.1.9a)
\pgf@nodesepstart=\dimen180
\pgf@nodesepend=\dimen181
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/compatibility\pgfco
mp-version-1-18.sty
Package: pgfcomp-version-1-18 2021/05/15 v3.1.9a (3.1.9a)
))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgffor.st
y
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/utilities\pgfkeys.s
ty
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgfkeys
.code.tex))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/pgf/math\pgfmath.sty
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code
.tex))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/utilities\pgffor.
code.tex
Package: pgffor 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/math\pgfmath.code
.tex)
\pgffor@iter=\dimen182
\pgffor@skip=\dimen183
\pgffor@stack=\toks29
\pgffor@toks=\toks30
))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik
z\tikz.code.tex
Package: tikz 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/libraries\pgflibr
aryplothandlers.code.tex
File: pgflibraryplothandlers.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgf@plot@mark@count=\count271
\pgfplotmarksize=\dimen184
)
\tikz@lastx=\dimen185
\tikz@lasty=\dimen186
\tikz@lastxsaved=\dimen187
\tikz@lastysaved=\dimen188
\tikz@lastmovetox=\dimen189
\tikz@lastmovetoy=\dimen190
\tikzleveldistance=\dimen191
\tikzsiblingdistance=\dimen192
\tikz@figbox=\box58
\tikz@figbox@bg=\box59
\tikz@tempbox=\box60
\tikz@tempbox@bg=\box61
\tikztreelevel=\count272
\tikznumberofchildren=\count273
\tikznumberofcurrentchild=\count274
\tikz@fig@count=\count275
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule
matrix.code.tex
File: pgfmodulematrix.code.tex 2021/05/15 v3.1.9a (3.1.9a)
\pgfmatrixcurrentrow=\count276
\pgfmatrixcurrentcolumn=\count277
\pgf@matrix@numberofcolumns=\count278
)
\tikz@expandcount=\count279
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik
z/libraries\tikzlibrarytopaths.code.tex
File: tikzlibrarytopaths.code.tex 2021/05/15 v3.1.9a (3.1.9a)
)))
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/frontendlayer/tik
z/libraries\tikzlibraryanimations.code.tex
File: tikzlibraryanimations.code.tex 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule
animations.code.tex
File: pgfmoduleanimations.code.tex 2021/05/15 v3.1.9a (3.1.9a)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/systemlayer\pgfsy
sanimations.code.tex
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/generic/pgf/modules\pgfmodule
decorations.code.tex
\pgfdecoratedcompleteddistance=\dimen193
\pgfdecoratedremainingdistance=\dimen194
\pgfdecoratedinputsegmentcompleteddistance=\dimen195
\pgfdecoratedinputsegmentremainingdistance=\dimen196
\pgf@decorate@distancetomove=\dimen197
\pgf@decorate@repeatstate=\count280
\pgfdecorationsegmentamplitude=\dimen198
\pgfdecorationsegmentlength=\dimen199
)
\pgfsysanim@snap@count=\count281
\pgfsysanim@lasttime=\dimen256
)
\pgf@anim@dim=\dimen257
)
\tikz@anim@once@count=\count282
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-pdf
tex.def
File: l3backend-pdftex.def 2022-10-26 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count283
\l__pdf_internal_box=\box62
)
No file essai2_tikz.aux.
\openout1 = `essai2_tikz.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8.
LaTeX Font Info: ... okay on input line 8.
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/context/base/mkii\supp-pdf.mk
ii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count284
\scratchdimen=\dimen258
\scratchbox=\box63
\nofMPsegments=\count285
\nofMParguments=\count286
\everyMPshowfont=\toks31
\MPscratchCnt=\count287
\MPscratchDim=\dimen259
\MPnumerator=\count288
\makeMPintoPDFobject=\count289
\everyMPtoPDFconversion=\toks32
)
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/epstopdf-pkg\epstopdf-b
ase.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.
(C:\Users\didie\AppData\Local\Programs\MiKTeX\tex/latex/00miktex\epstopdf-sys.c
fg
File: epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX
))
Package pgf Warning: Your graphic driver pgfsys-pdftex.def does not support ani
mations. This warning is given only once on input line 10.
[1
{C:/Users/didie/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}]
(essai2_tikz.aux) )
Here is how much of TeX's memory you used:
13364 strings out of 476406
293144 string characters out of 2789567
1849787 words of memory out of 3000000
33537 multiletter control sequences out of 15000+600000
513050 words of font info for 33 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
100i,5n,104p,444b,549s stack positions out of 10000i,1000n,20000p,200000b,80000s
<C:\Users\didie\AppData\Local\MiKTeX\fonts/pk/ljfour/jknapp
en/ec/dpi600\ecrm1000.pk>
Output written on essai2_tikz.pdf (1 page, 1939 bytes).
PDF statistics:
14 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
13 words of extra memory for PDF output out of 10000 (max. 10000000)
```
| https://tex.stackexchange.com/users/249670 | Tikz: Your graphic driver pgfsys-pdftex.def does not support animations | false | While the `animations` library is intended for creating animated SVG in the first place, it can still be used for other output formats, such as PDF.
The key `/tikz/make snapshot of=<time>` can be used to convert this kind of animation into a PDF animation. Typeset with `pdflatex` or `lualatex`:
```
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{animations}
\usepackage{animate}
\begin{document}
\begin{animateinline}[autoplay, loop]{25}
\multiframe{\inteval{30*25+1}}{rTime=0+\fpeval{1/25}}{ % total number of frames = duration * frames per second + 1
\tikz [make snapshot of = \rTime] {
\useasboundingbox (-3,0) circle (5mm) (0,0) circle (5mm);
\draw :xshift = {0s = "0cm", 30s = "-3cm", repeats} (0,0) circle (5mm);
}
}
\end{animateinline}
\end{document}
```
Another example taken from the Ti*k*Z documentation:
```
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{animations}
\usepackage{animate}
\begin{document}
\begin{animateinline}[autoplay, loop, controls, width=2in]{25}
\multiframe{\inteval{10*25+1}}{rTime=0+\fpeval{1/25}}{
\tikz [make snapshot of = \rTime]
\node :fill opacity = { 0s="0", 5s="1" }
:rotate = { 6s="0", 10s="360", repeats, restart=false}
[fill = blue!20, draw = blue, ultra thick, circle]
{Hello!};
}
\end{animateinline}
\end{document}
```
| 0 | https://tex.stackexchange.com/users/1053 | 688712 | 319,502 |
https://tex.stackexchange.com/questions/688710 | 2 | Loading beamer is slow, even on a fast processor, so I was wondering if I could make format with beamer preloaded. Now it's been decades since I last ran `initex` but I thought:
1. run `initex`
2. `input lplain`
3. eh, maybe `documentclass{beamer}`
4. `\dump`
but my texlive installation doesn't even have `lplain.tex`
Pdflatex says `preloaded format=pdflatex` so I tried
```
initex
This is TeX, Version 3.141592653 (TeX Live 2022/MacPorts 2022.62882_3) (INITEX)
**&pdflatex
```
and then maybe input beamer and dump, but this immediately runs to
```
No pages of output.
Transcript written on pdflatex.log.
mktexfmt [INFO]: log file copied to: /Users/eijkhout/.texlive2022/texmf-var/web2c/pdftex/pdflatex.log
mktexfmt [INFO]: /Users/eijkhout/.texlive2022/texmf-var/web2c/pdftex/pdflatex.fmt installed.
mktexfmt [INFO]: disabled formats: 5
mktexfmt [INFO]: successfully rebuilt formats: 1
mktexfmt [INFO]: not selected formats: 55
mktexfmt [INFO]: total formats: 61
mktexfmt [INFO]: exiting with status 0
(Fatal format file error; I'm stymied)
```
So, eh, I'm stymied too. Do TeX installations these days still come with enough tools to dump new formats?
| https://tex.stackexchange.com/users/38308 | How do I make a format with beamer preloaded | true | if `beamer10.tex` is
```
\documentclass{beamer}
\begin{document}
\end{document}
```
```
pdftex --ini \&pdflatex mylatex.ltx beamer10.tex
```
produces `mylatex.fmt`
```
pdftex \&mylatex beamer-doc
```
will process documents with the format.
You might need `&` rather than `\&` depending on your shell
| 1 | https://tex.stackexchange.com/users/1090 | 688717 | 319,506 |
https://tex.stackexchange.com/questions/440511 | 18 | I installed minted today as well as Python and Pygments, which I can run from the cmd. When I try this code:
```
\documentclass{article}
\usepackage{minted}
\begin{document}
\begin{minted}{c}
int main() {
printf("hello, world");
return 0;
}
\end{minted}
\end{document}
```
I get the following error message:
>
> ! Package minted Error: Missing Pygments output; \inputminted was
>
> probably given a file that does not exist--otherwise, you may need the
>
> outputdir package option, or may be using an incompatible build tool,
>
> or may be using frozencache with a missing file.
>
>
> See the minted package documentation for explanation.
>
> Type H for immediate help.
>
> ...
>
> \end{minted}
>
>
>
The other threads didn't help me and neither did Google. How do I solve this problem? I have set my option in pdfLatex to:
```
pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %filename.tex
```
Here is my [log file](https://pastebin.com/Zvgsza65).
My PATH is set so I can execute Python and pygmentize from the cmd without errors, and I can load the package as well. When it comes to using the minted package is when I receive the error.
| https://tex.stackexchange.com/users/166634 | Package minted Error: Missing Pygments output | false | I had properly used `-shell-escape` and installed `Pygments`. I was still getting the error.
The reason was I was using `\begin{minted}{txt}` and not `\begin{minted}{text}`.
Make sure you are using a [Pygments supported language](https://pygments.org/languages/). (There is only a short name entry for `text` not `txt`.)
| 0 | https://tex.stackexchange.com/users/214194 | 688719 | 319,507 |
https://tex.stackexchange.com/questions/688720 | 2 | How can we center the Updownarrow right after By Lemma 7?
```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
By Lemma 7: \begin{center}\(\Updownarrow\)\end{center}
By Lemma 7: \[\Updownarrow\]
\end{document}
```
| https://tex.stackexchange.com/users/24406 | Centered Updownarrow after By Lemma 7? | true | Two possibilities for indented and unindented lines:
```
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent\makebox[0pt][l]{By Lemma 7:}\hfil$\Updownarrow$
\noindent\makebox[0pt][l]{\indent By Lemma 7:}\hfil$\Updownarrow$
By Lemma 7: \[\Updownarrow\]
\end{document}
```
| 4 | https://tex.stackexchange.com/users/36296 | 688723 | 319,509 |
https://tex.stackexchange.com/questions/687693 | 1 | I use LaTeX on two machines, a Mac M1 laptop and an old desktop running Ubuntu 18.04.6. Yesterday I upgraded TeX Live on the Ubuntu machine to the 2023 version. I found that I had to change all references to the `LibreBaskerville` font to `Libre Baskerville`. I upgraded the Mac to MacTeX 2023 and found that now it can't find either `LibreBaskerville` or `Libre Baskerville`. (Both computers used this font without a hitch since the help I got on [this question](https://tex.stackexchange.com/q/660497/19109).) The error message on the Mac is:
```
! Package fontspec Error: The font "Libre Baskerville-Regular" cannot be
(fontspec) found.
```
The font appears to be available, because searching for Libre Baskerville on the Mac yields:
```
$ luaotfload-tool --find "Libre Baskerville" --fuzzy
luaotfload | resolve : Font "Libre Baskerville" found!
luaotfload | resolve : Resolved file name "/usr/local/texlive/2023/texmf-dist/fonts/truetype/impallari/librebaskerville/LibreBaskerville-Regular.ttf"
```
How can I get both computers to find the Libre Baskerville font?
---
Further details
---------------
The command that I run to typeset my .tex files is:
```
latexmk -xelatex
```
The LaTeX commands (in `Dissertate.sty`) that cause the error are:
```
\defaultfontfeatures[Libre Baskerville]{
Extension=.ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic,
SmallCapsFont = BaskervilleF-Regular.otf,
SmallCapsFeatures={Letters=SmallCaps,Scale=1.1},
Ligatures={Common,TeX}
}
\setmainfont{Libre Baskerville}
\newfontfamily\baskerville{Libre Baskerville}
```
The line number given for the error is that of the last line shown above.
The previous version of TeX Live on the Mac, from 2020, worked with the extension `.otf`. Changing to `.ttf` was necessary for version 2023 on Ubuntu. Both `.otf` and `.ttf` now fail on the Mac.
If I remove the space on the Mac, so that `Libre Baskerville` is consistently `LibreBaskerville` (the way that used to work on both computers), I get a slightly different error message:
```
! Package fontspec Error: The font "LibreBaskerville-BoldItalic" cannot be
(fontspec) found.
```
| https://tex.stackexchange.com/users/19109 | Can't find font after upgrading Tex Live to 2023 version | true | I found a fix, and it enables Tex Live 2023 to work with Libre Baskerville on both my Mac and and the Ubuntu machine, including *mathspec*, which requires XeTeX. It's very simple. First, the font name should stay `LibreBaskerville` (no space). Second, I had to change just two lines in `Dissertate.cls`, replacing the commented-out lines here:
```
\defaultfontfeatures[LibreBaskerville]{
%Extension=.otf,
Extension=.ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
%BoldItalicFont = *-BoldItalic,
BoldItalicFont = LibreBskvl-BoldItalic,
SmallCapsFont = BaskervilleF-Regular.otf,
SmallCapsFeatures={Letters=SmallCaps,Scale=1.1},
Ligatures={Common,TeX}
}
```
I figured this out by running this command:
```
luaotfload-tool --find "Libre Baskerville" --fuzzy
```
shown to me by [Davislor](https://tex.stackexchange.com/users/61644/davislor) in [this answer](https://tex.stackexchange.com/a/661103/19109), and then inspecting the files in the directory where the Regular font was. The BoldItalic had the peculiar name shown above and the files were .otf, not .ttf.
| 0 | https://tex.stackexchange.com/users/19109 | 688729 | 319,513 |
https://tex.stackexchange.com/questions/588082 | 3 | I used to solve the problem of typing Dutch letters by `$\acute{e}$`, `$\ddot{e}$` and so on. And I get by. But now that I need to type some French, I can't get away with œ and ç. What's the most handy way to type those French letters in LaTex and Markdown? Say, I'm using Overleaf and Joplin?
--------------------------------=
BTW, more than one comments mentioned typing the characters directly. I'm curious. How? Does it require some special type of keyboard?
| https://tex.stackexchange.com/users/205819 | How to type œ and ç in LaTex and Markdown? | false | I use this:
```
\c{c}
```
This is a simple and useful method.
| 0 | https://tex.stackexchange.com/users/299098 | 688731 | 319,514 |
https://tex.stackexchange.com/questions/688733 | 3 | How do I get the below code snippet output "Myword"?
```
\documentclass{article}
\newcommand{\mymacro}{myword}
\begin{document}
\mymacro
\end{document}
```
| https://tex.stackexchange.com/users/61804 | How do I capitalize the first letter of a macro? | true | Use `\uppercase` primitive and correct order of expansion
```
\def\myword{myword}
\def\capitalizefirst#1{\uppercase{#1}}
\expandafter\capitalizefirst\myword.
```
| 5 | https://tex.stackexchange.com/users/51799 | 688735 | 319,516 |
https://tex.stackexchange.com/questions/688733 | 3 | How do I get the below code snippet output "Myword"?
```
\documentclass{article}
\newcommand{\mymacro}{myword}
\begin{document}
\mymacro
\end{document}
```
| https://tex.stackexchange.com/users/61804 | How do I capitalize the first letter of a macro? | false | You can use [`mfirstuc`](//ctan.org/pkg/mfirstuc)'s `\makefirstuc`:
```
\documentclass{article}
\usepackage{mfirstuc}
\newcommand{\mymacro}{\makefirstuc{myword}}
\begin{document}
\mymacro
\end{document}
```
`mfirstuc` also provides `\emakefirstuc{<stuff>}` which expands `<stuff>` first, before capitalization. Your use would be `\emakefirstuc{\mymacro}`.
| 2 | https://tex.stackexchange.com/users/5764 | 688736 | 319,517 |
https://tex.stackexchange.com/questions/688734 | 1 | I'm creating a document where I need the `\frontmatter` to be enumerated with lowercase Roman numbers, but I'm getting uppercase numbers due to the command `\usepackage[spanish]{babel}`, can someone help me fix this?
| https://tex.stackexchange.com/users/299105 | Use Lowercase Roman Page Numbering with spanish babel | true | [`babel-spanish`](https://www.ctan.org/pkg/babel-spanish) defines modifiers for all the extended features, e.g., `es-lcroman` to switch of the upper case feature for Roman numbers:
```
\documentclass{book}
\usepackage[spanish,es-lcroman]{babel}
\usepackage{mwe}
\begin{document}
\frontmatter
\lipsum
\mainmatter
\lipsum
\end{document}
```
Note, using the options means, that no lowercase Roman numbers will be changed to uppercase any longer. It does not mean, that explicit uppercase Roman numbers using `\Roman` will be changed to lowercase.
See the [manual of `babel-spanish`](http://mirrors.ctan.org/macros/latex/contrib/babel-contrib/spanish/spanish.pdf) for more information. Unfortunately it is available in Spanish only, so I cannot read it myself.
| 1 | https://tex.stackexchange.com/users/277964 | 688737 | 319,518 |
https://tex.stackexchange.com/questions/688733 | 3 | How do I get the below code snippet output "Myword"?
```
\documentclass{article}
\newcommand{\mymacro}{myword}
\begin{document}
\mymacro
\end{document}
```
| https://tex.stackexchange.com/users/61804 | How do I capitalize the first letter of a macro? | false | With an up-to-date LaTeX kernel you can use `\MakeTitlecase`:
```
\documentclass{article}
\newcommand{\mymacro}{myword}
\begin{document}
\MakeTitlecase{\mymacro}
\end{document}
```
| 6 | https://tex.stackexchange.com/users/277964 | 688739 | 319,519 |
https://tex.stackexchange.com/questions/688730 | 0 | I made a customized document class called `note` and since I added a lot of additional features (e.g., fonts, tikz) so I feel that my file structure needs some modifications/improvements and I'd like some inputs.
Right now, my file strucute is as follows:
```
---- fonts
| |_ roman
| |_ mono
| |_ sans-serif
| |_ math
|
|- style
| |_ myfont.sty
| |_ mycolor.sty
| |_ ...
|
|- tikz
| |_ fig1.tex
| |_ fig2.tex
| |_ ...
| |_ mytikz.sty
|
|- figures
| |_ fig1.pdf
| |_ fig2.pdf
| |_ ...
|
|- notes
| |_ ch1.tex
| |_ ch2.tex
| |_ ...
|
|- main.tex
|
|- note.cls
```
* fonts: directory storing fonts
* style: directory storing multiple customized `.sty` files included by `\usepackage` in `note.cls`
* tikz: directory storing tikz figure source code
* figures: directory storing figures (including tikz figures in pdf) used in notes
* note: directory storing multiple `.tex` files (note pages) included by `\include` in main.tex
* `main.tex`: file includind all note pages
* `note.cls`: file including all packages needed for the note class
| https://tex.stackexchange.com/users/289729 | Advice for file structure | true | Just to demonstrate the nice features of package `subfiles`, using a subset of your intended directory structure; this is only one way to do it:
### Preparations
Create under your main directory directories `figures`, `notes`, `style` and `tikz`.
Store this as `/figures/img.png`:
Store this as `/tikz/triag.tex`:
```
\documentclass[10pt,border=0mm,tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill=yellow!30!orange!50] (0,0) -- (2,0) -- (1,1) -- cycle;
\end{tikzpicture}
\end{document}
```
Store this as `/style/showme.sty`: `\newcommand\showme[1]{\textbf{++: #1 :++}}`
Store this as `main.tex`:
```
\documentclass[10pt,a4paper]{article}
\usepackage{subfiles}% to ease your process
\usepackage{graphicx}% for figures
\include{style/showme.sty}% a simple style
\begin{document}
Ok, this all goes to your main.tex.
% you can build the \sections inside the notes ...
\subfile{notes/ch2}% see /notes/ch2.tex
% ... or explicitely here, whatever is more useful
\section{This will be chapter 3}
\end{document}
```
Store this as `/notes/ch2.tex`:
```
\documentclass[../main]{subfiles}% reusing said preamble
% next, just build regular document content
\begin{document}
\section{This will be chapter 2}
hello world.
Including a .png image:
\bigskip
% displaying figures/img.png
\includegraphics[scale=1]{figures/img}
\bigskip
And now including the pdf from the tikz-directory:\bigskip
% displaying tiks/triag.pdf
\includegraphics[scale=1]{tikz/triag}
\bigskip
% using self defined style, which is a simple macro here
And here's something defined somewhere else \showme{as style}.
\end{document}
```
### Some remarks
Using the `standalone` class for the tikz-drawings is useful, as it adjusts the "page size" as needed. You can include the generated pdf more easily later.
The `preamble` in main.tex is important: all your packages go there and only there. `subfiles` enables the magic, see *separate compiles* below. The demo-style is simple enough to just include it.
```
\documentclass[10pt,a4paper]{article}
\usepackage{subfiles}% to ease your process
\usepackage{graphicx}% for figures
\include{style/showme.sty}% a simple style
```
To make all your chapter-files `using said preamble`, just start with *(all paths relate to your main-directory, so viewed from* `/notes/ch2.tex` *the main document with the preamble is one level above)*:
```
\documentclass[../main]{subfiles}% reusing said preamble
% next, just build regular document content
\begin{document}
...
```
### Separate compiles
What is it all good for? It allows you to create and check ingredients separate from main. Here is `/tikz/tria.tex` compiled separately, where the outer lines come from copying it from the reader:
While you are working on `/notes/ch2.tex` it may be convenient to check its results from time to time. Just compile that file:
To check all your edits together, just compile `main.tex`; yes, there is a difference:
Please keep in mind that all references, section numbers etc. can only be correct when compiling main.tex.
Finally, this is what you'll find in the various directories of this demo. Most files are distributed, and with an editor like TexMaler and similar you probably will only see relecant .tex files ... so it will hardly be a problem:
| 0 | https://tex.stackexchange.com/users/245790 | 688740 | 319,520 |
https://tex.stackexchange.com/questions/688629 | 0 | What might cause the pdflatex output from a memoir class book to have two columns per page rather than one? Multiple columns can be used in some articles but not in a book.
| https://tex.stackexchange.com/users/117172 | Two columun pdflatex output from memoir class book | false | You must set the `twocolumn` document class option in this way:
`Documents`
→ `Settings...`
Or alternatively in:
`Documents`
→ `Settings...`
At the end, in the `View` → `☑ Code Preview Pane` you must see the option `twocolumn` (of course, only once. Do not set the same option in both places!).
Beside this, in one column document you can also set:
`Documents`
→ `Settings...`
To use the `multicol package via the `Insert`
`Custom insets`
. This make a box where you can set an arbitrary number of columns (now you should have also this option in the `Insert` menu):
(Note: `\lipsum[1]` is only a command to type dummy text that only work if you add the package `lipsum` the in LaTeX preamble. If you have no idea what I'm telling you, just forget the Evil Red Text (ERT) box with this command, and replace it for some long "bla bla bla" typed manually to check the result.). The output must be some like this:
| 2 | https://tex.stackexchange.com/users/11604 | 688743 | 319,522 |
https://tex.stackexchange.com/questions/688745 | 3 | I found a weird bug in the Elsevier (Automatica) template when I'm building it with pdflatex. If one of the authors has an accent (ó, or something). The building of the document yields an error. If the accent is removed, error is gone, and all is good. The problem is not occurring in the 2020 version, the 2022 and 2023 version both have this error...
pdfTeX Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.6.15) 16 JUN 2023 09:24
template source: <http://www.elsevier.com/__data/promis_misc/automatica_latex.zip>
M(W)E:
```
\documentclass[twocolumn]{elsart}
\usepackage{tikz}
\usepackage{color,cite}
\usepackage{url}
\usepackage{graphicx}
\usepackage{amssymb,amsmath,amsfonts,accents}
\begin{document}
\begin{frontmatter}
\title{Some title
\thanksref{footnoteinfo}}
\thanks[footnoteinfo]{This paper was not presented at any meeting.}
\author[bla]{someone}
\ead{someone@someone.com},\,
\author[bla]{someone}
\ead{someone@someone.com},\,
\author[bla,blo]{Some\'one}\ead{someone@someone.com} % remove the accent to get it working...
\address[bla]{Bla uni, blacity}
\address[blo]{Blo uni, blocity}
\begin{keyword}
Science
\end{keyword}
\begin{abstract}
In this paper,
\end{abstract}
\end{frontmatter}
\section{bla}
Lorem Ipsum
\end{document}
```
| https://tex.stackexchange.com/users/190968 | pdflatex bug(?) with Elsevier template and accents in authors name | true | The class does nasty things. But you can fix the wrongdoings.
It's curious that the macro that causes the main damages is called `\no@harm`…
The class uses `\edef` and `\xdef` where it shouldn't, and it should prefer `\protected@edef` and `\protected@xdef`.
```
\documentclass[twocolumn]{elsart}
\usepackage{tikz}
\usepackage{color,cite}
\usepackage{url}
\usepackage{graphicx}
\usepackage{amssymb,amsmath,amsfonts,accents}
\usepackage{xpatch}
\makeatletter % fix the wrong code in elsart.cls
\xpatchcmd{\runningauthor@fmt}{\global\edef}{\protected@xdef}{}{}
\xpatchcmd{\runningauthor@fmt}{\global\edef}{\protected@xdef}{}{}
\xpatchcmd{\author@fmt}{\edef}{\protected@edef}{}{}
\def\@xnamedef#1{\expandafter\protected@xdef\csname #1\endcsname}
\def\ead@au#1{\protected@edef\@ead@au{#1}}
\def\add@xtok#1#2{\begingroup
\protected@xdef\@act{\global\noexpand#1{\the#1#2}}\@act
\endgroup}
\def\no@harm{}
\makeatother
\begin{document}
\begin{frontmatter}
\title{Some title
\thanksref{footnoteinfo}}
\thanks[footnoteinfo]{This paper was not presented at any meeting.}
\author[bla]{someone}
\ead{someone@someone.com},
\author[bla]{someone}
\ead{someone@someone.com},
\author[bla,blo]{Sóme\'one}\ead{someone@someone.com} % remove the accent to get it working...
\address[bla]{Bla uni, blacity}
\address[blo]{Blo uni, blocity}
\begin{keyword}
Science
\end{keyword}
\begin{abstract}
In this paper,
\end{abstract}
\end{frontmatter}
\section{bla}
Lorem Ipsum
\end{document}
```
Note that you can use either `ó` or `\'o`, with no problem.
| 4 | https://tex.stackexchange.com/users/4427 | 688751 | 319,524 |
https://tex.stackexchange.com/questions/259185 | 2 | I have a little problem with SumatraPDF inverse search. I followed [this post](https://tex.stackexchange.com/questions/116981/how-to-configure-texniccenter-2-0-with-sumatra-2013-2014-2015-version) for configuration.
When I click "view output", Sumatra shows my PDF (which is a good start), but when I click on a word in the PDF to use the inverse search feature, it opens a new instance of TexnicCenter. Does someone know how to solve this? It should be a character to change in the command line but I can't figure it out.
I am using TexnicCenter 2.0 Beta 1 and Sumatra 3.0 and my command line is :
```
"C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" -inverse-search "\"C:\Program Files (x86)\TeXnicCenter\TeXnicCenter.exe"\ /ddecmd \"[goto('%f','%l')]\""
```
By the way, I tried to modify Windows 7 registry according to [this post](https://tex.stackexchange.com/questions/49705/texniccenter-multiple-tabs-in-one-window-instead-of-multiple-instances-multipl) and it does not solve the problem.
| https://tex.stackexchange.com/users/83362 | Sumatra inverse search opens a new instance of Texnic Center | false | I had the same issue, with using the **default configuration** that Texniccenter (2.02 x64) created automatically at the first start after installation.
The problem was that there were no Quotes `"` around the first part of the command in the field mentioned by the OP:
```
C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe -inverse-search "\"C:\Program Files (x86)\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\""
```
vs.
```
"C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" -inverse-search "\"C:\Program Files (x86)\TeXnicCenter\TeXnicCenter.exe\" /ddecmd \"[goto('%f','%l')]\""
```
The quotes fixed the issue.
| 0 | https://tex.stackexchange.com/users/121238 | 688754 | 319,526 |
https://tex.stackexchange.com/questions/688755 | 1 | I have several curves to show and i want to present them in synchronisation with a bullet list on the same slide.
the list is good, but the different curves do not follow the order i want, even when I switch the orders.
How to proceed? Thanks a lot
Below the code:
```
\documentclass{beamer}
% packages
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
% customisations
\def \calR{\mathcal{R}}
\definecolor{grayTelecom}{RGB}{188,189,188}
\definecolor{redTelecom}{RGB}{191,18,56}
\mode<presentation>{}
\begin{document}
\begin{frame}{Introduction: C-PPE and digital Dispersion Pre-Distortion (DPD)}
\begin{tikzpicture}[scale = 0.6]
\begin{axis}[
height = 10cm,
width = 10cm,
xlabel = {\Large $z$},
ylabel = {\Large Correlation profiles~(a.u.)},
xtick = {0,100,200,300,400,500},
ymin = 0.988,
ymax = 0.9942,
x tick label style = {font = \Large},
y tick label style = {font = \Large},
y tick label style={
/pgf/number format/precision=4
},
legend style = {draw=none, legend columns = 2, legend pos = north west, font = \Large},
legend entries = {$R$,$R^{(pd=5100)}$,$\calR$,$\calR^{(pd=5100)}$},
]
{\visible<1->{
\addplot [mark = none, color = gray] coordinates {
(0, 0.9901)
(100, 0.9882)
(100, 0.9901)
(200, 0.9882)
(200, 0.9901)
(300, 0.9882)
(300, 0.9901)
(400, 0.9882)
(400, 0.9901)
(500, 0.9882)
};}}
% {\visible<1->{
% addplot[
% line width = 2pt,
% color = black,
% ]
% table[x=d, y=PP17, col sep= comma]
% {./Figures/PPE/PPE_17_5100_5spans.txt} ;}}
{\visible<1->{
\addplot [mark = *, mark size = 4pt, dashdotted, color = black] coordinates {
(7, 0.99175)
(107, 0.99245)
(207, 0.99260)
(307, 0.99265)
(407, 0.99270)
};}}
{\visible<1->{
\addplot [mark = *, mark size = 4pt, dashdotted, color = black] coordinates {
(67, 0.99117)
(167, 0.99142)
(267, 0.99152)
(367, 0.99156)
};}}
% {\visible<2->{
% \addplot[
% line width = 2pt,
% color = redTelecom!50!white,
% ]
% table[x=d, y=PP5100, col sep= comma]
% {./Figures/PPE/PPE_17_5100_5spans.txt};}}
{\visible<2->{
\addplot [mark = pentagon*, mark size = 4pt, dashdotted, color = redTelecom] coordinates {
(7, 0.98964)
(107, 0.98972)
(207, 0.98972)
(308, 0.98980)
(407, 0.98976)
};}}
{\visible<2->{
\addplot [mark = pentagon*, mark size = 4pt, dashdotted, color = redTelecom] coordinates {
(67, 0.98858)
(167, 0.98865)
(267, 0.98868)
(368, 0.98865)
};}}
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
```
| https://tex.stackexchange.com/users/260816 | reversed display of plots in beamer with tikz and visible | false | I suggest to use the `visible on=<...>` option from the `overlay-beamer-styles` tikz library:
```
\documentclass{beamer}
% packages
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
% customisations
\def \calR{\mathcal{R}}
\definecolor{grayTelecom}{RGB}{188,189,188}
\definecolor{redTelecom}{RGB}{191,18,56}
\mode<presentation>{}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}{Introduction: C-PPE and digital Dispersion Pre-Distortion (DPD)}
\begin{tikzpicture}[scale = 0.6]
\begin{axis}[
height = 10cm,
width = 10cm,
xlabel = {\Large $z$},
ylabel = {\Large Correlation profiles~(a.u.)},
xtick = {0,100,200,300,400,500},
ymin = 0.988,
ymax = 0.9942,
x tick label style = {font = \Large},
y tick label style = {font = \Large},
y tick label style={
/pgf/number format/precision=4
},
legend style = {draw=none, legend columns = 2, legend pos = north west, font = \Large},
]
\addplot [mark = none, color = gray,visible on=<2->] coordinates {
(0, 0.9901)
(100, 0.9882)
(100, 0.9901)
(200, 0.9882)
(200, 0.9901)
(300, 0.9882)
(300, 0.9901)
(400, 0.9882)
(400, 0.9901)
(500, 0.9882)
};
\addlegendentry[visible on=<2->]{$R$}
\addplot [mark = *, mark size = 4pt, dashdotted, color = black,visible on=<1->] coordinates {
(7, 0.99175)
(107, 0.99245)
(207, 0.99260)
(307, 0.99265)
(407, 0.99270)
};
\addlegendentry{$R^{(pd=5100)}$}
\addplot [mark = *, mark size = 4pt, dashdotted, color = black,visible on=<1->] coordinates {
(67, 0.99117)
(167, 0.99142)
(267, 0.99152)
(367, 0.99156)
};
\addlegendentry{$\calR$}
\addplot [mark = pentagon*, mark size = 4pt, dashdotted, color = redTelecom,visible on=<2->] coordinates {
(7, 0.98964)
(107, 0.98972)
(207, 0.98972)
(308, 0.98980)
(407, 0.98976)
};
\addplot [mark = pentagon*, mark size = 4pt, dashdotted, color = redTelecom,visible on=<2->] coordinates {
(67, 0.98858)
(167, 0.98865)
(267, 0.98868)
(368, 0.98865)
};
\addlegendentry[visible on=<2->]{$\calR^{(pd=5100)}$}
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/36296 | 688756 | 319,527 |
https://tex.stackexchange.com/questions/688747 | 1 | According to ISO 80000, physical symbols should be written in italics and everything else in normal type. So I use for example
```
$q_{m,\text{ve}}$
```
to describe the mass flow due to ventilation. The `m` is in italics because it is a physical symbol representing mass, and `ve` is in normal type, because it is an abbreviation of ventilation.
However, it has been suggested to me that I should use `\mathrm` instead of `\text` in these cases. This is because if I insert a formula in italicised text, `ve` will be italic too. I did some research and `\mathrm` is said to not have a proper letter spacing, so it is not really a good solution.
So another possible solution would be to define a special function for **every** single text that appears in any formula anywhere, which is extremely annoying.
Is there an appropriate/canonical solution to this problem? In principle, I have never had a problem because I never insert formulas in italicised text (I find it stylistically inappropriate), but I would still like to do it in an appropriate way.
| https://tex.stackexchange.com/users/3450 | Proper way to include text in formulas | true | In pdflatex `\mathrm` uses correct letterspacing and ligatures in the roman font specifed for math (eg as used by `\cos` or `\log`) `\text` uses whatever font is current outside the math so may be a completely different font family, so the problem is not just for italic text.
So `\mathrm` ought to be unequivocally the correct command to use, except that history is complicated, and for various legacy compatibility reasons even when the text is set in T1 encoding, math roman is set (usually) in the 7 bit OT1 encoding.
So practically speaking if using non-ascii letters I would use `\textrm`, making sure to use `amsmath` so that `\textrm` gets smaller in subscripts.
| 2 | https://tex.stackexchange.com/users/1090 | 688760 | 319,528 |
https://tex.stackexchange.com/questions/688757 | 2 | I would like to use the \x and \y variables of the two nested \foreach loops in my tikz script to reference the elements of a list. The code looks like this :
```
\documentclass{minimal}
\usepackage{tikz}
\usepackage{calc}
\RequirePackage{etoolbox} % defines lists and their operations
\pgfsetxvec{\pgfpoint{.866cm}{.5cm}}
\pgfsetyvec{\pgfpoint{.866cm}{-.5cm}}
\pgfsetzvec{\pgfpoint{0cm}{-1cm}}
\begin{document}
\begin{tikzpicture}
\newcount\tmpnum
\def\storedata#1#2{\tmpnum=0 \edef\tmp{\string#1}\storedataA#2\end}
\def\storedataA#1{\advance\tmpnum by1
\ifx\end#1\else
\expandafter\def\csname data:\tmp:\the\tmpnum\endcsname{#1}%
\expandafter\storedataA\fi
}
\def\getdata[#1]#2{\csname data:\string#2:#1\endcsname}
\storedata\List{{$0$}{$1$}{$\ast$}{$\times$}
{$0$}{$1$}{$\ast$}{$\times$}
{$0$}{$1$}{$\ast$}{$\times$}
{$0$}{$1$}{$\ast$}{$\times$}}
\foreach \x in {1,...,4}
\foreach \y in {1,...,4}
\draw (\x,\y,0) -- (\x+1,\y,0) --(\x+1,\y+1,0)--(\x,\y+1,0) -- (\x,\y,0) node [midway,sloped,above,xslant=0.5]{\getdata[\x+\y]\List};
\end{tikzpicture}
\end{document}
```
I have some troubles understanding why it actually does not perform the addition of the two variables. Furthermore I tried printing just the \x+y value and it looked like it was doing a string concatenation e.g. :
\x+\y = "x + y" as
I am sorry for this dumb question, I hope some tikz-ninjas and TeX-samurais can help.
| https://tex.stackexchange.com/users/299121 | Operation with counter values of two \foreach loops to reference element of array in tikz | true | I am *very* unsure what you want to achieve, but you probably only need Ti*k*Z for it:
```
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[
x=({.866cm,.5cm}),
y=({.866cm,-.5cm})
]
\newcommand{\mylist}{
1/1/*/$\times$,
2/2/+/$+$,
3/3/-/$-$,
4/4/{/}/$\div$%
}
\foreach \va/\vb/\oc/\op [count=\x] in \mylist {
\foreach \y in {0,...,3} {
\draw (-\x,\y) -- ({-\x+1},\y) --
({-\x+1},{\y+1}) -- (-\x,{\y+1}) -- cycle;
\path ({-\x+0.5},\y) -- ({-\x+0.5},{\y+1})
node[midway, sloped, xslant=0.5] {%
\ifcase\y\relax
\va\or
\op\or
\vb\or
\pgfmathparse{int(\va \oc \vb)}\pgfmathresult
\fi%
};
}
}
\end{tikzpicture}
\end{document}
```
| 2 | https://tex.stackexchange.com/users/47927 | 688763 | 319,530 |
https://tex.stackexchange.com/questions/536638 | 0 | I want to have diagonal/beveled corners in my table frame, which would look something like this:
```
_____________________
/ \
/ \
| |
| |
| |
| Dummy content |
| |
| |
\ /
\_____________________/
```
Here is the code I have so far (which just generates a table):
```
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{hhline}
\begin{document}
\begin{center}
\begin{tabular}{|ccc|}
\hhline{~-~}
/&&\textbackslash\\
&Dummy content&\\
\textbackslash&&/
\hhline{~-~}
\end{tabular}
\end{center}
\end{document}
```
This just outputs a table with slashes in the corners.
| https://tex.stackexchange.com/users/207645 | Beveled table frame | true | Instead of changing the outline of the table, you could place the table in a `chamfered` shape from TikZ:
```
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{hhline}
\usepackage{tikz}
\usetikzlibrary{shapes.misc}
\begin{document}
\begin{center}
\begin{tikzpicture}
\node[draw,chamfered rectangle,inner sep=-3pt] {\begin{tabular}{ccc}
a & b & c \\
a & b & c \\
a & b & c \\
\end{tabular}};
\end{tikzpicture}
\end{center}
\end{document}
```
| 4 | https://tex.stackexchange.com/users/36296 | 688779 | 319,535 |
https://tex.stackexchange.com/questions/688780 | 3 | I have a word count command in Latex that works well, based on the code [here](https://www.overleaf.com/learn/how-to/Is_there_a_way_to_run_a_word_count_that_doesn%27t_include_LaTeX_commands%3F#Using_the_%5Cimport_command_with_texcount). However, I want the output number to be comma separated for thousands (e.g., 1,000 instead of 1000). I have tried using `\numprint` and `\siunitx` but they give me errors, presumably because they can only be applied to a number and not a command. Here is my code:
```
\documentclass{article}
\usepackage{verbatim}
\usepackage{lipsum}
\newcommand{\quickwordcount}[1]{%
\immediate\write18{texcount -0 -sum -merge -q #1.tex > #1-words.sum}%
\input{#1-words.sum}%
}
\begin{document}
There are \quickwordcount{main}words in this document.
\end{document}
```
Of course, in this example there are only 6 words, but I didn't want to add 1,000 words just to show that it says "1000". How can I show the output with comma separators for thousands?
| https://tex.stackexchange.com/users/299138 | How can I include comma separator in Latex word count? | true | I think you should be able to use a solution as suggested [here](https://tex.stackexchange.com/q/645104/47927):
```
\documentclass{article}
\usepackage{siunitx}
\ExplSyntaxOn
\NewDocumentCommand { \quickwordcount } { O{} m } {
\immediate\write18{texcount ~ -0 ~ -sum ~ -merge ~ -q ~ #2.tex ~ > ~ #2-words.sum}
\file_get:nnN { #2-words.sum } { } \l_tmpa_tl
\num[#1]{ \l_tmpa_tl }
}
\ExplSyntaxOff
\begin{document}
There are \quickwordcount[group-separator={,}, group-minimum-digits=4]{main} words in this document.
\end{document}
```
The following solution should also work:
```
\documentclass{article}
\usepackage{siunitx}
\ExplSyntaxOn
\NewDocumentCommand { \quickwordcount } { O{} m } {
\immediate\write18{texcount ~ -0 ~ -sum ~ -merge ~ -q ~ #2.tex ~ > ~ #2-words.sum}
\ior_open:Nn \g_tmpa_ior { #2-words.sum }
\ior_str_get:NN \g_tmpa_ior \l_tmpa_tl
\num[#1]{ \l_tmpa_tl }
\ior_close:N \g_tmpa_ior
}
\ExplSyntaxOff
\begin{document}
There are \quickwordcount[group-separator={,}, group-minimum-digits=4]{main} words in this document.
\end{document}
```
Note that you would not count words generated with something like `\lipsum`, because `texcount` is not able to expand TeX macros.
| 3 | https://tex.stackexchange.com/users/47927 | 688785 | 319,538 |
https://tex.stackexchange.com/questions/56486 | 8 | Is there a simple way to allow spaces in the options of a package using `pgfopts` to process them, which is local to that package i.e. I don't have to include some package in the main document before `\documentclass`. What I'm trying to do is pass font names to `fontspec` inside the package using `pgfopts`.
| https://tex.stackexchange.com/users/13520 | Spaces in pfgopts options | false | 11 years have passed and things changed.
Recent versions of the LaTeX kernel provide the option list once as the processed list with spaces removed, and once as a raw list in which no such changes were made.
Unfortunately, most packages don't support processing those raw options in which spaces haven't been zapped. The solutions I'm currently aware of are:
* the LaTeX kernel itself supports key=value options by using `\DeclareKeys[<module>]{<key-definitions>}` to define the keys, `\SetKeys[<module>]{<key=val-list>}` to set keys to values, and `\ProcessKeyOptions[<module>]` to process options for the current package or class file. In all those `<module>` defaults to the current file name (with the file extension stripped).
* the package `expkv-opt` (part of the `expkv-bundle`), to get a key-defining frontend comparable to `pgfkeys` or `\DeclareKeys` you'll have to also load `expkv-def`, then you get `\ekvdefinekeys{<set>}{<key-definitions>}` to define keys, `\ekvset{<set>}{<key=val-list>}` to set keys to values, and `\ekvoProcessOptions{<set>}` to process options for the current package or class file.
With both of these solutions you can just use
```
\documentclass[foo=bar baz]{mycls}
```
and things work.
Here a very small example for both solutions:
Document file
-------------
This file works for both class files below.
```
\documentclass[foo=bar baz]{mycls}
\begin{document}
The value was \texttt{\myfoo}.
\end{document}
```
Class file for `expkv-opt`
--------------------------
```
\ProvidesClass{mycls}[adhoc class for an example]
\LoadClass{article}
\RequirePackage{expkv-opt,expkv-def}
\ekvdefinekeys{mycls}{store foo = \myfoo}
\ekvoProcessOptions{mycls}
```
Class file to use LaTeX's built in mechanism
--------------------------------------------
```
\ProvidesClass{mycls}[adhoc class for an example]
\LoadClass{article}
\DeclareKeys{foo .store = \myfoo}
\ProcessKeyOptions\relax
```
---
In both cases the output looks like this:
| 0 | https://tex.stackexchange.com/users/117050 | 688788 | 319,539 |
https://tex.stackexchange.com/questions/688585 | 1 | `\ShowHook` and its L3 counterpart `\hook_show:n` provided by `lthooks` are documented to print in the terminal a number of pieces of information about a given hook, including "the code chunks (and their labels) added to it".
Is there a way to show only the code chunk(s) for a given label?
(If that matters, the use case is that I want to inspect the code a package adds to a hook in a regression test, and would really prefer not to test everything that goes into the hook, just what the package adds).
| https://tex.stackexchange.com/users/105447 | \ShowHook, but only the code for a specific label | true | Answered by @UlrikeFischer in the comments: no, there's no user interface to show only the code chunks of selected labels.
| 1 | https://tex.stackexchange.com/users/105447 | 688797 | 319,543 |
https://tex.stackexchange.com/questions/688795 | 1 | I would really like is to get a row from a CSV, format it, and then put it in my text.
Say for example I have a spreadsheet that has data about cities, for example "Montreal, 1000, Victoria, Bananas" is line 5.
I would like to be able to call on line 5 and automatically format it into:
***Montreal***. *Population*: 1000. The mayor's name is Victoria and the primary export is bananas.
Is this possible? How might one do it?
Bonus: It would be even more useful if I could do it in such a way that I instead call on Montreal directly instead of line 5, but I'm not sure if that's possible.
| https://tex.stackexchange.com/users/299147 | Macros that directly reference spreadsheet/csv | false | Here is an option using [`datatool`](//ctan.org/pkg/datatool):
```
\documentclass{article}
\begin{filecontents*}[overwrite]{mydata.csv}
Vancouver, 2000, Ivan, Avocados
Edmonton, 3000, Scarlet, Mangos
Saskatoon, 4000, Hilbert, Strawberries
Halifax, 12, Dilbert, Kiwis
Montreal, 1000, Victoria, Bananas
Toronto, 5000, Edward, Blueberries
\end{filecontents*}
\usepackage{datatool}
% Load CSV file
\DTLloaddb[
noheader,
keys={city,population,mayor,export}
]{names}{mydata.csv}
\NewDocumentCommand{\printcity}{ m }{%
\textbf{#1}. % Print city
\textit{Population}: \DTLfetch{names}{city}{#1}{population}. % Print population
\textit{Export}: \DTLfetch{names}{city}{#1}{export}.
}
\begin{document}
\printcity{Toronto}
\printcity{Edmonton}
\printcity{Montreal}
\end{document}
```
You can add conditionals for existence of content, if need be. However, since you're creating the database, there's probably no need for that.
| 1 | https://tex.stackexchange.com/users/5764 | 688798 | 319,544 |
https://tex.stackexchange.com/questions/688810 | 1 | I'm doing a presentation (on overleaf). From what I read, using the commands
```
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
```
change the fonts for article type documents. While the command ebgaramond-maths worked, the text font remains the standard one. How can I change it ?
| https://tex.stackexchange.com/users/299160 | \usepackage{ebgaramond} in beamer doesn't change font | true | Beamer is a bit special with regards to fonts. It uses sans serif font by default and uses most of the text font for math.
If you want to use a serif font, like `ebgaramond`, you can use the `serif` font theme.
To make sure that your math font is used and not substituted with glyphs from the text font, you can combine this with the `professionalfonts` fonts theme.
```
\documentclass{beamer}
\usefonttheme{serif}
\usefonttheme{professionalfonts}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\begin{document}
\begin{frame}
abc
\[
abc
\]
\end{frame}
\end{document}
```
| 1 | https://tex.stackexchange.com/users/36296 | 688811 | 319,545 |
https://tex.stackexchange.com/questions/688814 | 0 | For some reason Georg Kreisel is listed before Stephen Kleene in my bibliography. I use
```
\usepackage[backend=biber,style=authoryear,sorting=nty]{biblatex}
\renewbibmacro{in:}{}%To remove "In:" in front of journals etc, in bibliography.
\addbibresource{LIBCLASS.bib}.
```
Is there an obvious way to sort this out, or do I need the method of elimination?
Here are the entries in question:
```
@book{Kleene1952,
author = {Kleene, S.~C.},
title = {Mathematical Logic},
date = {1952},
OPTeditor = {editor},
OPTeditora = {editora},
OPTeditorb = {editorb},
OPTeditorc = {editorc},
OPTtranslator = {translator},
OPTannotator = {annotator},
OPTcommentator = {commentator},
OPTintroduction = {introduction},
OPTforeword = {foreword},
OPTafterword = {afterword},
OPTsubtitle = {subtitle},
OPTtitleaddon = {titleaddon},
OPTmaintitle = {maintitle},
OPTmainsubtitle = {mainsubtitle},
OPTmaintitleaddon = {maintitleaddon},
OPTlanguage = {language},
OPToriglanguage = {origlanguage},
OPTvolume = {volume},
OPTpart = {part},
OPTedition = {edition},
OPTvolumes = {volumes},
OPTseries = {series},
OPTnumber = {number},
OPTnote = {note},
publisher = {North-Holland Publishing Company},
OPTlocation = {location},
OPTisbn = {isbn},
OPTchapter = {chapter},
OPTpages = {pages},
OPTpagetotal = {pagetotal},
OPTaddendum = {addendum},
OPTpubstate = {pubstate},
OPTdoi = {doi},
OPTeprint = {eprint},
OPTeprintclass = {eprintclass},
OPTeprinttype = {eprinttype},
OPTurl = {url},
OPTurldate = {urldate},
}
@Article{Kreisel1963a,
author = {Kreisel, G.},
title = {Subformula Prop. and Reflection Principles},
journal = {J. Symb. Log.},
year = {1963},
key = {key},
volume = {28},
OPTnumber = {4},
pages = {305-306},
OPTmonth = {month},
note = {Abstract for 28th Annual Meeting of Assoc. for Symbolic Logic},
OPTannote = {annote},
}
@Article{Kreisel1963b,
author = {Kreisel, G.},
title = {Reflection Principle for {H}eyting's arithmetic},
journal = {J. Symb. Log.},
year = {1963},
key = {key},
volume = {28},
OPTnumber = {4},
pages = {306-307},
OPTmonth = {month},
note = {Abstract for 28th Annual Meeting of Assoc. for Symbolic Logic},
OPTannote = {annote},
}
@Article{Kreisel1963c,
author = {Kreisel, G.},
title = {Reflection Principles and Omega-inconsistency},
journal = {J. Symb. Log.},
year = {1963},
key = {key},
volume = {28},
OPTnumber = {4},
pages = {307-308},
OPTmonth = {month},
note = {Abstract for 28th Annual Meeting of Assoc. for Symbolic Logic},
OPTannote = {annote},
}
```
| https://tex.stackexchange.com/users/24406 | Kreisel before Kleene | true | The `key` field is an alias for `sortkey`, which influences the sorting of the entries. With `key = {key}`, all `Kriesel, G.` author entries are now sorted based on the value `key`, which comes before `Kleene, S.~C.`.
The remedy is to remove all `key` or `sortkey` fields and let the sorting occur naturally via your `sorting = nty` (the default) option.
```
\documentclass{article}
\begin{filecontents*}[overwrite]{\jobname.bib}
@book{Kleene1952,
author = {Kleene, S.~C.},
title = {Mathematical Logic},
year = {1952},
publisher = {North-Holland Publishing Company},
}
@Article{Kreisel1963a,
author = {Kreisel, G.},
title = {Subformula Prop. and Reflection Principles},
journal = {J. Symb. Log.},
year = {1963},
volume = {28},
OPTnumber = {4},
pages = {305-306},
}
@Article{Kreisel1963b,
author = {Kreisel, G.},
title = {Reflection Principle for {H}eyting's arithmetic},
journal = {J. Symb. Log.},
year = {1963},
volume = {28},
OPTnumber = {4},
pages = {306-307},
}
@Article{Kreisel1963c,
author = {Kreisel, G.},
title = {Reflection Principles and Omega-inconsistency},
journal = {J. Symb. Log.},
year = {1963},
volume = {28},
OPTnumber = {4},
pages = {307-308},
}
\end{filecontents*}
\usepackage[
backend = biber,
style = authoryear,
sorting = nty
]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
```
| 6 | https://tex.stackexchange.com/users/5764 | 688816 | 319,547 |
https://tex.stackexchange.com/questions/688790 | 3 | A referee suggests that
>
> The style of numbering of results in the paper make them hard to find.
> I would suggest at least numbering by section and also probably using the same
> counter for theorems, lemmas, definitions etc.
>
>
>
My code in overleaf is as follows, use the springer template, but I can not figure out how to make it as the referee expected. Very much appreciate the help!
```
\begin{filecontents*}{example.eps}
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 19 19 221 221
%%CreationDate: Mon Sep 29 1997
%%Creator: programmed by hand (JK)
%%EndComments
gsave
newpath
20 20 moveto
20 220 lineto
220 220 lineto
220 20 lineto
closepath
2 setlinewidth
gsave
.4 setgray fill
grestore
stroke
grestore
\end{filecontents*}
%
\RequirePackage{fix-cm}
%
%\documentclass{svjour3} % onecolumn (standard format)
%\documentclass[smallcondensed]{svjour3} % onecolumn (ditto)
\documentclass[smallextended]{svjour3} % onecolumn (second format)
%\documentclass[twocolumn]{svjour3} % twocolumn
%
\smartqed % flush right qed marks, e.g. at end of proof
%
\usepackage{graphicx}
%
% \usepackage{mathptmx} % use Times fonts if available on your TeX system
%
% insert here the call for the packages your document requires
%\usepackage{latexsym}
% etc.
%
% please place your own definitions here and don't use \def but
% \newcommand{}{}
%
% Insert the name of "your journal" with
% \journalname{myjournal}
%
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{bbm}
%Includes "References" in the table of contents
\usepackage[nottoc]{tocbibind}
\usepackage{mathrsfs,amsfonts,amssymb,amsmath}
\let\proof\relax\let\endproof\relax
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{graphicx,cite}
\usepackage{romannum}
\usepackage{hyperref}
\usepackage{authblk}
\usepackage{graphicx}
\newcommand\sbullet[1][.5]{\mathbin{\vcenter{\hbox{\scalebox{#1}{$\bullet$}}}}}
\allowdisplaybreaks
\hypersetup{colorlinks=true, linkcolor=blue, citecolor=red}
\textwidth=15.0cm \textheight=21.0cm \hoffset=-1.1cm \voffset=-0.5cm
%\textwidth=13.8cm \textheight=21.7cm \topmargin=0.0cm
%\oddsidemargin=1.0cm \evensidemargin=1.0cm
%\usepackage{amsmath, amsthm, amssymb}
%\usepackage{graphicx}
%\usepackage{float}
\iffalse
\setlength{\textwidth}{170mm}
\setlength{\textheight}{215mm}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\setlength{\topmargin}{-10mm}
\setlength{\headheight}{10mm}
\setlength{\headsep}{0mm}
\setlength{\footskip}{10mm}
\setlength{\parindent}{0mm}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathOperator{\diam}{diam}
\DeclareMathOperator{\Leb}{Leb}
\DeclareMathOperator{\Cor}{Cor}
\DeclareMathOperator{\interior}{int}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\Emb}{Emb}
\newcommand{\cqfd}{{\nobreak\hfil\penalty50\hskip2em\hbox{}
\nobreak\hfil $\square$\qquad\parfillskip=0pt\finalhyphendemerits=0\par\medskip}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\RNum}[1]{\uppercase\expandafter{\romannumeral #1\relax}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\p}{\partial}
\newcommand{\dt}{\partial_t}
\newcommand{\dx}{\partial_x}
\newcommand{\de}{\delta}
\newcommand{\ds}{\displaystyle}
\newcommand{\eps}{ \varepsilon}
\newcommand{\Lip}{\mbox{\rm Lip}}
\newcommand{\pr}{{\bf \textit{Proof : }}}
\newcommand{\ph}{ \varphi}
\numberwithin{equation}{section}
\def\bR{\mathbf{R}}
\def\bS{\mathbf{S}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheorem{notation}[theorem]{Notation}
\newtheorem{convention}[theorem]{Convention}
\newtheorem{assumption}{Assumption}
% for article
%Import the natbib package and sets a bibliography style
\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}
\begin{document}
\pagenumbering{arabic}
\setlength{\belowdisplayskip}{0pt}
content
\bibliography{bibtext}
\end{document}
```
| https://tex.stackexchange.com/users/189879 | numbering section lemma theorem etc | true | Since you're using a template, it's best to stick to their setup. And for this Springer class (`svjour3`), it already defines a number of theorem-like structures.
The class provides an option to have all theorem-like structures use the same counter: `envcountsame`
```
\documentclass[smallextended,envcountsame]{svjour3} % onecolumn (second format)
\usepackage{amsmath}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\numberwithin{theorem}{section}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{convention}[theorem]{Convention}
\newtheorem{assumption}[theorem]{Assumption}
\begin{document}
\setcounter{section}{6}
\section{A section}
\begin{theorem} A theorem \end{theorem}
\begin{corollary} A corollary \end{corollary}
\begin{proposition} A proposition \end{proposition}
\begin{lemma} A lemma \end{lemma}
\begin{definition} A definition \end{definition}
\begin{remark} A remark \end{remark}
\begin{notation} A notation \end{notation}
\begin{convention} A convention \end{convention}
\begin{assumption} An assumption \end{assumption}
\end{document}
```
---
A more crude way to achieve this would be to revoke the counters associated with already-defined theorem-like structures, and re-establish them as aliases of the `theorem` counter.
```
\documentclass[smallextended]{svjour3} % onecolumn (second format)
\smartqed % flush right qed marks, e.g. at end of proof
\usepackage{amsmath}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\numberwithin{theorem}{section}% Number theorems within sections: <section>.<theorem>
\makeatletter
% Remove existing theorem-like counters
\let\c@corollary\relax% Corollary
\let\c@proposition\relax% Proposition
\let\c@lemma\relax% Lemma
\let\c@definition\relax% Definition
\let\c@remark\relax% Remark
\makeatother
% Slave duplicate counter (https://tex.stackexchange.com/a/65827/5764)
\usepackage{aliascnt}
\newaliascnt{corollary}{theorem}% Corollary numbering: <section>.<theorem>
\newaliascnt{proposition}{theorem}% Proposition numbering: <section>.<theorem>
\newaliascnt{lemma}{theorem}% Lemma numbering: <section>.<theorem>
\newaliascnt{definition}{theorem}% Definition numbering: <section>.<theorem>
\newaliascnt{remark}{theorem}% Remark numbering: <section>.<theorem>
\newtheorem{notation}[theorem]{Notation}% Notation numbering: <section>.<theorem>
\newtheorem{convention}[theorem]{Convention}% Convention numbering: <section>.<theorem>
\newtheorem{assumption}[theorem]{Assumption}% Assumption numbering: <section>.<theorem>
\begin{document}
\setcounter{section}{6}
\section{A section}
\begin{theorem} A theorem \end{theorem}
\begin{corollary} A corollary \end{corollary}
\begin{proposition} A proposition \end{proposition}
\begin{lemma} A lemma \end{lemma}
\begin{definition} A definition \end{definition}
\begin{remark} A remark \end{remark}
\begin{notation} A notation \end{notation}
\begin{convention} A convention \end{convention}
\begin{assumption} An assumption \end{assumption}
\end{document}
```
| 4 | https://tex.stackexchange.com/users/5764 | 688818 | 319,548 |
https://tex.stackexchange.com/questions/688837 | 2 | I'd like to use `\citeauthor` as a way of mentioning the author when the work *per se* is not being referenced, while automatically indexing each time it's mentioned. I've experimented redefining it with `\DeclareCiteCommand` and didn't get the wanted result.
```
\documentclass{article}
\usepackage[style=verbose]{biblatex}
\ExecuteBibliographyOptions{
hyperref = true,
indexing = cite,
autocite = footnote
}
\begin{filecontents*}{test.bib}
@book{aristotle:physics,
author = {Aristotle},
title = {Physics},
publisher = {G. P. Putnam},
location = {New York},
date = 1929
}
}
\end{filecontents*}
\addbibresource{test.bib}
\usepackage{imakeidx}
\makeindex[title={Authors Index}, columns=2]
\usepackage[hidelinks]{hyperref}
\begin{document}
\noindent \citeauthor{aristotle:physics} [...]
\printbibliography
\printindex
\end{document}
```
| https://tex.stackexchange.com/users/297525 | How to make \citeauthor to not add entries to \printbibliography | false | One way is to put it in a special refsection that you never show a bibliography for:
```
\newcommand\mentionauthor[1]{\begin{refsection}\citeauthor{#1}\end{refsection}}
\begin{document}
\noindent \mentionauthor{aristotle:physics} [...]
\printbibliography
\printindex
\end{document}
```
| 3 | https://tex.stackexchange.com/users/48251 | 688838 | 319,554 |
https://tex.stackexchange.com/questions/688835 | 10 | The [LaTeX3 project website](https://www.latex-project.org/latex3/) explains:
>
> A while ago we made the decision to drop the idea of a separate LaTeX3 format that would exist in parallel to LaTeX2e, but instead decided to gradually modernize LaTeX to keep it competitive in today’s world while maintaining compatibility methods for older documents.
>
>
>
My understanding of the long term plans is that the kernel internals will over time be rewritten in `expl3` and new features (e.g. native color and hyperlinking support) will be added bit by bit. What is rather unclear to me are the plans for adapting the interface and defaults for document authors and the degree to which backwards-incompatible changes are planned (or if this is even decided yet). For example:
* The recommended macro naming scheme, to my knowledge, is `\snake_case`/`\snake_case_with_signature:Nn` for programming layer macros, `\CamelCase` for package/kernel interface commands and `\lowercase` for document level commands. Since all of the LaTeX2e interface is in the `\lowercase` form, I assume that those macros will be aliased in the new `\CamelCase` convention (e.g. `\UsePackage`) and the old names will be kept as a deprecated alias? Or are there other plans?
* The [`expl3`](https://ctan.org/pkg/expl3) manual acknowledges that many TeX primitives "have names that could be very useful as document mark-up tags were they not pre-empted as primitives (e.g. `\box` or `\special`)". Now that all of the primitives have `expl3` aliases, their original names could in principle be reused for other things once the kernel is rewritten (as well as used packages). Is this considered an eventual feature, i.e. users / package authors should expect to be able to use those names, or will the use of these names remain "officially" discouraged indefinitely?
* One thing I have always been annoyed by is that environments and macros cannot have the same name due to the environment `foo` being implemented by the macros `\foo` and `\endfoo`. I realize that this was considered a feature when it was designed this way, but in my experience it is much more common to need different implementations for equivalent block and inline functionality than not, leading to the necessity for macro names like `listinline`. There may be other similarly unfortunate design decisions, though I am not aware of any. Are there plans to change such interfaces, in this case hiding the implementation of environments in macros like `\env_foo_begin:` and `\env_foo_end:`?
* The [`xtemplate`](https://ctan.org/pkg/xtemplate) manual mentions that "the standard LaTeX 2ε classes look somewhat dated now in terms of their visual design". Are there plans to modernize this default look, moving closer to what KOMA-Script or `memoir` offer (or even a different direction)?
* In [this answer](https://tex.stackexchange.com/a/118015/48973) from 2013 Frank Mittelbach expresses an intention to move away from the template concept (back) towards a CSS-like *LDB* implementation. Is this still on the roadmap?
* Feel free to add more relevant comments.
* Is there a dedicated place where I can read about the current state of these plans? I have read many documents published by the LaTeX3 project but I find it challenging to keep an overview of what's where and what's outdated, especially since many of the documents outlining the goals of the project (like [ltx3info.pdf](https://www.latex-project.org/help/documentation/ltx3info.pdf)) seem to predate the decision to not make it a new, separate format.
| https://tex.stackexchange.com/users/48973 | What are the document/design interface layer plans for the LaTeX3 project? | false | * "*I assume that those macros will be aliased in the new \CamelCase convention*"
The conventions here haven't really changed. latex2e has always had `\RequirePackage` as the package level command with `\usepackage` being a document level alias for that. However commands in the preamble can reasonably be considered as document level or package level, and it's hard to avoid a mix there.
* "*Now that all of the primitives have expl3 aliases, their original names could in principle be reused for other things*"
The original LaTeX3 format undefined all primitives, as does optex. I suspect that can't be done in 2e.
* "*One thing I have always been annoyed by is that environments and macros cannot have the same name due to the environment*"
It would be possible in theory to make `\begin` and `\end` look for a different csname and use that if defined, but I don't think there are specific plans
* "*Are there plans to modernize this default look*"
Probably can't change the look of `article` but probably newer classes will emerge (not just from the core team) that are written using these features, which may have different, more customisable designs
* "*Is this still on the roadmap?*"
There are plans to do something....
* "*Is there a dedicated place where I can read about the current state of these plans?*"
Almost all development happens in public on github. In practice current work is driven by the tagging project, which is described at <https://www.latex-project.org/publications/indexbytopic/pdf/>
| 10 | https://tex.stackexchange.com/users/1090 | 688841 | 319,555 |
https://tex.stackexchange.com/questions/688844 | 3 | I have a following code
```
\documentclass[parskip=half]{scrbook}
\usepackage{tikz,lipsum}
\input{insbox}
\begin{document}
\InsertBoxR{0}{%
\begin{tikzpicture}
\draw (0,0) rectangle(3,3);
\end{tikzpicture}}
\lipsum
\end{document}
```
and it returns Overfull \hbox. I figured out that `parskip` option is the culprit. And yes, I know there was a similar question posted, but I do not know how to apply the solution, because my problem is not related to `tcolorbox`:
["Overfull \hbox" when using tcolorbox with parskip=half KOMA-option](https://tex.stackexchange.com/questions/187339/overfull-hbox-when-using-tcolorbox-with-parskip-half-koma-option)
Can you help me with this one?
| https://tex.stackexchange.com/users/3450 | Overfull \hbox with parskip option | false | You could use [`wrapfig2`](https://www.ctan.org/pkg/wrapfig2) instead of `insbox`:
```
\documentclass[parskip=half]{scrbook}
\usepackage{tikz,lipsum}
\usepackage{wrapfig2}
\begin{document}
\begin{wrapfigure}{r}
\begin{tikzpicture}
\draw (0,0) rectangle(3,3);
\end{tikzpicture}
\end{wrapfigure}
\lipsum
\end{document}
```
This also results in
but without `Overfull \hbox`.
As an alternative you can also try [`wrapfig`](https://www.ctan.org/pkg/wrapfig):
```
\documentclass[parskip=half]{scrbook}
\usepackage{tikz,lipsum}
\usepackage{wrapfig}
\begin{document}
\begin{wrapfigure}{r}{0pt}
\begin{tikzpicture}
\draw (0,0) rectangle(3,3);
\end{tikzpicture}
\end{wrapfigure}
\lipsum
\end{document}
```
result in:
also without `Overfull \hbox`.
To get the same result as with `wrapfig2` you need the optional narrow lines argument:
```
\documentclass[parskip=half]{scrbook}
\usepackage{tikz,lipsum}
\usepackage{wrapfig}
\begin{document}
\begin{wrapfigure}[7]{r}{0pt}
\begin{tikzpicture}
\draw (0,0) rectangle(3,3);
\end{tikzpicture}
\end{wrapfigure}
\lipsum
\end{document}
```
or
```
\documentclass[parskip=half]{scrbook}
\usepackage{tikz,lipsum}
\usepackage{wrapfig}
\begin{document}
\begin{wrapfigure}[\dimexpr (3cm+.5\baselineskip)/\baselineskip\relax]{r}{0pt}
\begin{tikzpicture}
\draw (0,0) rectangle(3,3);
\end{tikzpicture}
\end{wrapfigure}
\lipsum
\end{document}
```
| 2 | https://tex.stackexchange.com/users/277964 | 688845 | 319,556 |
https://tex.stackexchange.com/questions/688837 | 2 | I'd like to use `\citeauthor` as a way of mentioning the author when the work *per se* is not being referenced, while automatically indexing each time it's mentioned. I've experimented redefining it with `\DeclareCiteCommand` and didn't get the wanted result.
```
\documentclass{article}
\usepackage[style=verbose]{biblatex}
\ExecuteBibliographyOptions{
hyperref = true,
indexing = cite,
autocite = footnote
}
\begin{filecontents*}{test.bib}
@book{aristotle:physics,
author = {Aristotle},
title = {Physics},
publisher = {G. P. Putnam},
location = {New York},
date = 1929
}
}
\end{filecontents*}
\addbibresource{test.bib}
\usepackage{imakeidx}
\makeindex[title={Authors Index}, columns=2]
\usepackage[hidelinks]{hyperref}
\begin{document}
\noindent \citeauthor{aristotle:physics} [...]
\printbibliography
\printindex
\end{document}
```
| https://tex.stackexchange.com/users/297525 | How to make \citeauthor to not add entries to \printbibliography | false | Generally, once you call a `biblatex` `\...cite...` macro on an entry the data of that entry is requested from the `.bib` file and added to the `.bbl`, which means it gets included in a bibliography if one is printed. With `biblatex` you cannot obtain the data of an entry without sending it to the `.bbl` and once an entry is in the `.bbl` it is added to a bibliography (if the bibliography is printed unrestricted).
There are some tricks around that that either involve several `refsection`s or filtering by categories or other data.
`refsection`s are one way to keep citations and the corresponding bibliography in one part of your document completely separate from citations and the corresponding bibliography in another part. One way to do that is shown in [pst](https://tex.stackexchange.com/users/48251/pst)'s [answer](https://tex.stackexchange.com/a/688838/35864) and a similar strategy can be found in <https://tex.stackexchange.com/a/403928/35864>. The advantage of this approach is that it completely separates your "`\citeauthor`" call from the rest of the document citations: A work only cited here will not be added to the global bibliography and will not influence sorting or uniqueness calculations. The disadvantage is a processing overhead: Each "`\citeauthor`" call creates a new `refsection`, which causes helper macros to be written and read from aux files. Biber needs to process each `refsection` separately.
The alternative approach adds a `category` marker to an entry if it is only used in `\citeauthor` and then later skips those entries. Some thought is needed to get the logic right, but you can find an approach in [gusbrs](https://tex.stackexchange.com/users/105447/gusbrs)'s [answer](https://tex.stackexchange.com/a/403982/35864) to [How to omit one specific citation in \printbibliography, with BibLaTeX?](https://tex.stackexchange.com/q/403900/35864). (I'm simplifying the code to ignore `refsegment`s for now. If you need them, the linked answer shows how to get them back in.)
```
\documentclass{article}
\usepackage[style=authoryear-comp]{biblatex}
\newtoggle{includeentry}
\toggletrue{includeentry}
\DeclareBibliographyCategory{entriesinbib}
\AtEveryCitekey{%
\iftoggle{includeentry}
{\addtocategory{entriesinbib}{\thefield{entrykey}}}%
{}}
\newcommand{\DontIncludeNextCite}{\AtNextCite{\togglefalse{includeentry}}}
\newcommand\mentionauthor{\DontIncludeNextCite\citeauthor}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson}
ipsum \autocite{worman}
Lorem \mentionauthor{worman}
ipsum \mentionauthor{nussbaum}
\printbibliography[category=entriesinbib]
\end{document}
```
The disadvantage of this approach is that for most intents and purposes the `\citeauthor`'d entries are still part of the bibliography: they influence sorting and uniqueness data. (Try `\mentionauthor{knuth:ct:c} \autocite{knuth:ct:b}` in the MWE above.)
| 4 | https://tex.stackexchange.com/users/35864 | 688853 | 319,558 |
https://tex.stackexchange.com/questions/688834 | 0 | I would like to position the Feynman diagram at the center of the page and have it spread out. The code for the diagram is provided below. Could you please guide me on how to achieve this?
```
\documentclass[tikz]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\usepackage{feynmp}
\usepackage{feynmp-auto}
\begin{document}
\unitlength = 3mm
\begin{fmffile}{simple}
\begin{fmfgraph}(40,25)
\fmfleft{i1,i2}
\fmfright{o1,o2}
\fmf{fermion}{i1,v1,o1}
\fmf{fermion}{i2,v2,o2}
\fmf{photon}{v1,v2}
\end{fmfgraph}
\end{fmffile}
\end{document}
```
| https://tex.stackexchange.com/users/149108 | Centering a Tikz Feynman diagram in the standalone document | true |
```
\documentclass[margin=10mm]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\usepackage{feynmp-auto}
\begin{document}
\hspace{-10mm}
\centering
\unitlength = 2.5mm
\begin{fmffile}{simple}
\begin{fmfgraph}(40,25)
\fmfleft{i1,i2}
\fmfright{o1,o2}
\fmf{fermion}{i1,v1,o1}
\fmf{fermion}{i2,v2,o2}
\fmf{photon}{v1,v2}
\end{fmfgraph}
\end{fmffile}
\end{document}
```
output :
| 0 | https://tex.stackexchange.com/users/149108 | 688856 | 319,559 |
https://tex.stackexchange.com/questions/688842 | 1 | I am using this command in latex to specify the font path:
```
\setmainfont[Color=primary, Path = fonts/source-han-serif/,BoldItalicFont=SourceHanSerifSC-Bold,BoldFont=SourceHanSerifSC-Bold,ItalicFont=SourceHanSerifSC-Bold]{SourceHanSerifSC-Regular}
```
now I have a issue that, I have many cls files that contains the font path, if I want to change the file path, I have to open each cls file and edit one by one. is it possible to make setmainfont to read the environment that I can specify the font path in one place? my possible operation system is Ubuntu and macOS.
| https://tex.stackexchange.com/users/69600 | is it possible to make setmainfont read environment variable to specify the font path in one place | true | Yes, you can use my code at <https://tex.stackexchange.com/a/62032/4427>
Here I use a variant of a previous answer to your question about `HOME`, just by way of example.
```
\documentclass{article}
\usepackage{fontspec}
\ExplSyntaxOn
\NewDocumentCommand{\getenv}{om}
{
\sys_get_shell:nnN { kpsewhich ~ --var-value ~ #2 } { } \l_tmpa_tl
\tl_trim_spaces:N \l_tmpa_tl
\IfNoValueTF { #1 }
{
\tl_use:N \l_tmpa_tl
}
{
\tl_set_eq:NN #1 \l_tmpa_tl
}
}
\ExplSyntaxOff
\getenv[\HOME]{HOME}
\getenv[\TEST]{TEST}
\newfontface{\fell}{IMFePIit29C}[
Path=\HOME/provaccia/conf-1.7b/fell/,
Extension=.otf,
]
\begin{document}
\texttt{TEST is \TEST}
\texttt{TEST is \getenv{TEST}}
{\fell Hello}
\end{document}
```
I run this on `bash` as
```
TEST=foo xelatex dolphin
```
and the output is
Of course you're responsible for correctly defining and exporting the environment variable you need on each system.
| 1 | https://tex.stackexchange.com/users/4427 | 688860 | 319,563 |
https://tex.stackexchange.com/questions/688815 | 1 | I have tried to describe my problem before ([Footnotetext jumps back to Forepage for the second paragraph](https://tex.stackexchange.com/questions/688770/footnotetext-jumps-back-to-forepage-for-the-second-paragraph)). There for delivering a "MWE" Ulrike Fischer gave me the valuable tip, that normally such mistakes only need a few pages to be reproducible in an MWE -- although changes in the text 100 pages away might let the mistake vanish, as in my attempts before to generate an MWE.
I didn't believe her, as I had tried before -- nevertheless she was right. I still feel ashamed, to call the following an MWE -- but instead of 1020 pages the resulting PDF now only takes 5...
```
\documentclass[12pt,fleqn,twoside,draft]{report}%
\RequirePackage{xfloat}%
\RequirePackage{xcolor}%
\RequirePackage[ngerman]{babel}%
\RequirePackage{booktabs}%
\RequirePackage{paralist}%
\RequirePackage{mathpazo}%
\newif\ifquotations\quotationstrue%
% Neues Float für Rezepte:
\makeatletter
\newcounter{recipe}% the counter
\renewcommand*\therecipe{\arabic{recipe}}% the default format for the counter
\newcommand*\fps@recipe{tbp}% default floating options
\newcommand*\ftype@recipe{4}% float type number, needs to be a power of 2;
\newcommand*\ext@recipe{lor}% extension of file for the list of recipes
\newcommand*\fnum@recipe{\recipename\nobreakspace\therecipe}% used in caption
\newcommand*\recipename{Rezept}% the name
\newcommand*\listrecipename{Rezepte}% the name of the list
\newenvironment{recipe}{\setlength{\tabcolsep}{0.17em}% Halber Spaltenabstand
\let\fcolorboxold\fcolorbox%
\renewcommand\fcolorbox{\setlength{\fboxsep}{8pt}\fcolorboxold}%
\footnotesize%
\@float{recipe}%
}%
{\end@float}% the environment
\makeatother
\definecolor{shadecolor}{cmyk}{0,0,0.3,0} % Gelber Hintergrund
\setlength\footnotesep{10pt}%
% Weitgehend nach https://tex.stackexchange.com/questions/310103/format-footnotes: Fußnote formatiert als ein \item einer list-Umgebung
\newif\iffootn\footnfalse% Wir befinden uns normalerweise außerhalb einer Fußnote
\makeatletter%
\renewcommand{\@makefntext}[1]{%
\footntrue% Jetzt befinden wir uns innerhalb einer Fußnote
\begin{list}{}{\footnotesize}%
\item[\@makefnmark\hfil]%
\RaggedRight% Rechts Flattersatz
#1%
\end{list}%
}%
\makeatother%
% replaces \markleft, I normally take from a package
\makeatletter%
\providecommand{\markleft}[1]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
\expandafter\@markleft\@themark {#1}%
\@temptokena \expandafter{\@themark}%
\mark{\the\@temptokena}%
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}
\providecommand{\@markleft}[3]{\@temptokena {#2}%
\unrestored@protected@xdef\@themark{{#3}{\the\@temptokena}}}
\makeatother%
%DINA 4:
\setlength{\paperwidth}{210mm}
\setlength{\paperheight}{297mm}
%Satzspiegel
\textwidth 13.5cm
\textheight 21.4cm
% \textheight an ganzzahlige Zeilenanzahl anpassen
\setlength{\dimen0}{\textheight}%
\addtolength{\dimen0}{-\topskip}%
\divide\dimen0\baselineskip%
\setlength{\textheight}{\number\dimen0 \baselineskip}%
\addtolength{\textheight}{\topskip}%
%Position auf dem Blatt
\setlength{\topmargin}{-0.5cm}
%Zeilenabstand
\renewcommand{\baselinestretch}{1.2}
%kompaktere Form der Auflistung:
\newif\ifitemize\itemizefalse% Normalerweise nicht in itemize-Umgebung
\renewenvironment{itemize}%
{\pagebreak[1]%
\smallskip%
\itemizetrue% Jetzt in itemize-Umgebung
\begin{compactitem}}%
{\end{compactitem}\smallskip\pagebreak[1]}%
\begin{document}
\section{Nothing}
\newpage
letztlich lohnte sich der Aufwand, denn sie wohnte in der Wohnung über viele Jahrzehnte bis zu ihrem Tod.
Sie bekam wegen ihres Mannes Tod im Krieg eine Hinterbliebenenrente, allerdings bitter wenig. Deswegen arbeitete sie immer wieder, die letzten Jahre in der Uni"=Mensa.
Nachdem sie einen Schlaganfall erlitten hatte, war sie pflegebedürftig. Ihre Tochter Mausi, die abgesehen von einem Engagement als Tänzerin in sehr jungen Jahren und sporadischen Beschäftigungen als Serviererin in ihrem Leben kaum je gearbeitet hatte, übernahm die Pflege und die ihr dafür zustehende staatliche Bezahlung. Leider war Tante Thea eigentlich Frühaufsteherin, kam aber nicht mehr allein aus dem Bett, Mausi dagegen stand normalerweise erst nachmittags auf.
Tante Thea hatte bereits seit den Dreißigerjahren einen Führerschein, nach dem Tod ihres Mannes Karl aber kein Fahrzeug mehr und nutzte daher auch ihren Führerschein nicht mehr. Als Gisela 1982 ihren Führerschein machte, erklärte sie: Nein, angesichts des dichten heutigen Verkehrs würde sie sich nicht mehr trauen zu fahren.
Wie meine Großmutter Emilie kochte auch ihre Schwester Thea noch diverse althergebrachte Gerichte. Ihre Tochter Marion berichtet von
\begin{itemize}
\item Rhabarbergrütze mit Grießklößen (Rezept~\ref{rec_rhabarber}),
\item Hamburger Aalsuppe (Rezept~\ref{rec_aal}),
\item Buchweizengrütze (Rezept~\ref{rec_buchweizen}),
\item Haferbrei (Rezept~\ref{rec_haferbrei}),
\item Süßkartoffeln mit Gemüse und Dörrfleisch,
\item Matjes mit Pellkartoffeln oder Bratkartoffeln,
\item Kalbsleber mit gebratenen Apfelscheiben und Kartoffelmus,
\item Schnauze und Pfoten vom Schwein in Sülze mit Bratkartoffeln,
\end{itemize}
\begin{recipe}(caption=outer, align=bottom, width=normal)%
\fcolorbox{black}{shadecolor}{%
\begin{tabular}{rlp{0.05\textwidth}rl}
500\,g & Rhabarber && 0,25\,l & Johannisbeersaft \\
2\,EL & Speisestärke && 3\,EL & Zucker \\
\midrule
\multicolumn{5}{p{0.52\textwidth}}{\emph{%
Rhabarber putzen, waschen, klein schneiden, 0,375\,l Wasser mit Saft aufkochen, Rhabarber dazu, etwa 4 Minuten bei kleiner Hitze köcheln. Stärke und 3\,EL Wasser verrühren und zum Rhabarber geben. Mit Zucker abschmecken (etwa 3\,EL) , abkühlen lassen. Grießklößchen nach Rezept~\ref{rec_fliederbeersuppe} auf Seite~\pageref{rec_fliederbeersuppe} hinzugeben. Variationsmöglichkeiten: Zusätzlich Schlagsahne oder Vanillepudding statt Grieß.}}\\
\end{tabular}
}% Ende \fcolorbox
\caption{Rhabarbergrütze mit Grießklößchen oder Vanillepudding (Marion).\label{rec_rhabarber}}
\end{recipe}
%
\begin{recipe}(caption=outer, align=bottom, width=wide)
\fcolorbox{black}{shadecolor}{%
\begin{tabular}{rlp{0.05\textwidth}rl}
2\,l & Fleischbrühe && 1\,kg & Schinkenknochen o. \\
& o. Wasser && & geräuch. Rippchen \\
200\,g & Schinkenschwarte && 350\,g & Dörrobst (Äpfel, \\
1\,gr. o. 2\,kl. & Bund Suppengrün && & Birnen o. Pflaumen) \\
300\,g & grüne Erbsen && 200\,g & grüne Bohnen \\
1 Spritzer & Essig && 1 Prise & Zucker \\
1 Bund & Bohnenkraut && 1 Msp. & gem. Muskat \\
2 & Lorbeerblätter && nach Wahl & Kräuter (Thymian, \\
2 & ganze Gewürznelken && & Salbei, Basilikum, \\
& Salz && & Majoran, Kerbel) \\
& Pfeffer && & \\
\midrule
\multicolumn{5}{p{0.83\textwidth}}{\emph{%
Vorbereitung: Dörrobst über Nacht in Wasser quellen lassen. Am nächsten Tag: Suppengrün waschen/putzen, Karotten/Sellerie schälen. Schale zusammen mit dunkelgrünen Porreeteilen aufbewahren. In gr. Topf: Schinkenknochen, Schinkenschwarte, Fleischbrühe/Wasser, Bohnenkraut, Nelken, Lorbeerblätter, Petersilie, die aufbewahrten Schalen/dunkelgrünen von Sellerie/Karotte und Porree-Enden anderthalb Stunden bei milder Hitze zu Brühe kochen, durch Sieb in anderen Topf gießen.}}\\
\multicolumn{5}{p{0.83\textwidth}}{\emph{%
Restliches Suppengrün, Bohnen, Erbsen und Kräuter klein schneiden/hacken, mit dem Backobst in die Suppe geben, weitere halbe Stunde garen lassen. Fleisch vom Schinkenknochen dazu, mit Salz und Pfeffer, Zucker, Essig, Muskatnuss, Salz und Pfeffer würzen. Damit wäre eine Aalsuppe ohne Aal bereits fertig, in unserer Familie kam zuletzt noch Aal hinein, 200\,g mundgerechte Stücke geschnitten, geräuchert oder frisch, der dann noch zehn Minuten in der Suppe ziehen durfte.%
}}\\
\end{tabular}
}% Ende \fcolorbox
\caption{Hamburger Aalsuppe mit und ohne Aal (Marion).\label{rec_aal}}
\end{recipe}
%
\begin{recipe}(caption=outer, align=bottom, width=normal)%
\fcolorbox{black}{shadecolor}{%
\begin{tabular}{rlp{0.05\textwidth}rl}
1\,l & Buttermilch && 200\,g & Buchweizengrütze \\
& Milch && & Zucker \\
\midrule
\multicolumn{5}{p{0.52\textwidth}}{\emph{%
Buttermilch (in der \glqq schlechten Zeit\grqq\ ersatzweise Wasser) in hohem Topf erwärmen. Buchweizengrütze unter ständigem Umrühren hinzugeben und halbe Stunde quellen lassen. Reichlich Zucker nach Geschmack hinzufügen. Wenn die Grütze fest wird, in Schüssel umfüllen und mit ein wenig Zucker bestreuen, um Hautbildung zu vermindern. Nach zwei Stunden zum weiteren Abkühlen bis zur Mahlzeit (Frühstück, als Nachtisch oder zum Abendbrot) in den Kühlschrank. Mit kalter Milch darüber servieren.}}\\
\end{tabular}
}% Ende \fcolorbox
\caption{Buchweizengrütze mit Milch (Marion).\label{rec_buchweizen}}
\end{recipe}
%
\begin{recipe}(caption=outer, align=bottom, width=normal)%
\fcolorbox{black}{shadecolor}{%
\begin{tabular}{rlp{0.05\textwidth}rl}
0,25\,l & Milch && 50\,g & feine Haferflocken \\
1 Prise & Salz && 2\,TL & Zucker \\
0,5 TL & Zimt (nach Wahl) && & \\
\midrule
\multicolumn{5}{p{0.64\textwidth}}{\emph{%
Haferflocken, Salz und Zucker unter ständigem Rühren in der Milch (ersatzweise Wasser) aufkochen, drei Minuten ziehen lassen, in eine Schüssel umfüllen, mit Zimt bestreuen, mit zusätzlicher kalter Milch darüber servieren.}}\\
\end{tabular}
}% Ende \fcolorbox
\caption{Haferbrei mit Milch (Marion).\label{rec_haferbrei}}
\end{recipe}
%
Marion wurde in Hamburg eingeschult, wechselte kurz darauf für zwei Jahre nach Wien. Anschließend ging sie in Bayern ein Jahr zur Schule, ab da in Travemünde. 1949 verließ sie die Schule vorzeitig vor dem Ende des letzten Schuljahrs, weil sie Geld verdienen sollte: In den nächsten beiden Jahren arbeitet sie in einer Eisdiele, als Kindermädchen und als Mädchen für alles. Ihre Schwester Ingrid machte eine Lehre zum Einzelhandelskaufmann in einem Lebensmittelgeschäft.
Ab September 1951 wohnte Marion bei ihrer Tante Emilie, die ihr eine Lehrstelle in dem kleinen Friseurgeschäft hatte vermitteln können, in dem sie ihre Haare frisieren ließ. Leider musste sie die Lehre abbrechen: Ihre Lehrherrin wollte auch ihre eigene Tochter als Lehrling aufnehmen, es sei aber unerwarteterweise nur ein Lehrling zulässig gewesen.\footnote{Die Lehrherrin scheint hier einem eigentlich unerklärlichen Irrtum erlegen zu sein, falls es sich nicht um eine Schutzbehauptung handelte: Herr Dr. Thomas Felleckner von der Handwerkskammer Braunschweig-Lüneburg-Stade teilte dazu am 3.\,3.\,2022 per E-Mail mit:
\leavevmode
\begin{itshape}
$\lbrack $In der britischen Besatzungszone$\rbrack $ galt bereits seit dem 6. Dezember 1946 eine Aufbauverordnung der britischen Militärregierung für das Handwerk, die nahezu vollständig das deutsche Handwerksrecht von vor 1933 wieder in Kraft gesetzt hatte. Demnach gab es in deren Wirkungsbereich keinerlei quantitative Beschränkungen für die Beschäftigung von Mitarbeitern oder Lehrlingen in Handwerksbetrieben. Ein Verbot für die Aufnahme von mehr als einem Lehrling hat daher für ordnungsgemäß in die Handwerksrolle der jeweiligen Kammer eingetragene Handwerksbetriebe im Bereich der ehemaligen britischen Besatzungszone im Jahr 1951 nicht bestanden.
\end{itshape}}
Nun besorgte Emilie eine Stelle im Haushalt in Hamburg, bis Marion erneut eine Lehrstelle bei einer Friseurin außerhalb Hamburgs fand, zu der sie jeden Morgen mit dem Bus fahren musste. Doch auch diesmal endete die Lehre nach drei Monaten: Es stellte sich heraus, dass Marion das Dauerwellenwasser nicht vertrug, damit war eine Friseurlehre generell gescheitert. 1953 verschaffte Uromi Jaja ihr eine Stelle im Haushalt an der Elbchaussee mit Kost und Logis, deshalb konnte sie nun am Glashütter Damm ausziehen. Dort blieb sie zwei Jahre bis Mitte 1955, anschließend wechselte sie in das Hotelgewerbe und arbeitete ein Dreivierteljahr als Anlernling im Hotel zum Stern in Siegburg.
Doch sie träumte von einem Leben in der Schweiz und einer Arbeit als Podologin. Irgendwann hatte sie genug Geld gespart, um für diesen Beruf über einen Kurs die begehrte Zulassung zu erwerben. Doch als sie damit 1956 nach Zürich zog, wurde zu ihrem Entsetzen ihr deutsches Diplom von der Schweiz nicht anerkannt. Ihr blieb nur die Rückkehr ins Hotelgewerbe. Während der kommenden zwei Jahre wechselte ihr Wohnsitz zweimal zurück nach Deutschland, wo sie bei ihrer Mutter in der Parkallee 26$^{II}$ in Hamburg wohnte, und wieder in die Schweiz. Ab 1959 blieb sie -- abgesehen von einem viermonatigen Zwischenspiel auf der Isle of Wight 1961 -- bis 1963 in der Schweiz, lernte dort 1960/61 ihren späteren Mann Wilfried kennen, den sie 1964 heiratete.
Mit ihm zog sie 1963 für zehn Jahre in die USA, baute mit ihm ein eigenes Restaurant in San Francisco auf. Nach einer Fehlgeburt im siebten Schwangerschaftsmonat 1967 (Zwillingsmädchen) kam 1968 Sohn Albert gesund zur Welt. 1972 kehrten sie in die Schweiz zurück, um dort wieder eine eigene Wirtschaft zu gründen, stießen aber wegen Marions deutscher Staatsbürgerschaft auf Schwierigkeiten. Wenige Jahre später gab es Streit: Marion war mit 41 Jahren wieder schwanger, ihr Mann Wilfried wünschte kein weiteres Kind, Marion aber trug Iris aus, die 1975 zur
\end{document}
```
The resulting PDF doesn't deliver "exactly" the original mistake but at least it didn't vanish again as with my tries before.
**My first problem:**
If you compile the text, at the bottom of page 4 you will find \footnotemark No. 1 and the corresponding \footnotetext No. 1 starts at the foot of the page. But place there is not sufficient, so the \footnotetext is continued at the foot of page 5. So far everything as it should be ...
But now things start to become strange: Although in my eyes at page 5 there is enough space to finish the \footnotetext -- as that only needs 3 further lines -- the \footnotetext is continued on still another page foot. And not on page 6, as one would expect, but back on page 4, above the start of the very same footnote!
Has anybody an idea, how I can stop this strange behavior without changing the look of the rest?
**My second problem:**
For compilation you need my self-written file "xfloat.sty" -- but that is more than the allowed 30.000 characters. So now following the tip of Ulrike Fischer I uploaded it to <https://workupload.com/file/JHA2xpWVt6X> . The error may very well be inside that file ...
(And still another question: Is it possible, to delete my old attempt of a question about this, as it is of help for nobody?)
| https://tex.stackexchange.com/users/202047 | Footnotetext jumps to next page and back again | false | You are using the fewerfloatpages package and the afterpage package. The first sometimes unravels pages to redistribute floats, while the other inserts something on the next page and unravels it partially too and both clash.
Do not use `\afterpage` lightly. That is a very fragile command. In your case you seem to want to pass an information to the page after the float. Use a `\label` to store such informations about pages and query their value in the next compilation. That is much safer.
A smaller example is this here. You can switch between the bad and the good by uncommenting the marked line.
```
\documentclass[12pt,fleqn,twoside,draft]{report}%
\RequirePackage[trace]{fewerfloatpages}
\RequirePackage{afterpage}%
\usepackage{lipsum}
%Satzspiegel
\textwidth 13.5cm
\textheight 21.4cm
%Zeilenabstand
\renewcommand{\baselinestretch}{1.2}
\begin{document}
\vspace*{26\baselineskip}
blub
\begin{figure}
\fbox{%
\rule{1cm}{10\baselineskip}
}%
\end{figure}
%
\begin{figure}
\afterpage{\typeout{blub}} % <=============== comment this
\fbox{%
\rule{1cm}{22\baselineskip}
}%
\end{figure}
%
\begin{figure}
\fbox{%
\rule{1cm}{11\baselineskip}
}%
\end{figure}
%
\begin{figure}
\fbox{%
\rule{1cm}{8\baselineskip}
}%
\end{figure}
%
x\\x\\x\\x\\x\\x\\x
Ab September 1951 wohnte Marion bei ihrer Tante Emilie, die ihr eine
Lehrstelle in dem kleinen Friseurgeschäft hatte vermitteln können, in dem sie
ihre Haare frisieren ließ. Leider musste sie die Lehre abbrechen: Ihre
Lehrherrin wollte auch ihre eigene Tochter als Lehrling aufnehmen, es sei
aber unerwarteterweise nur ein Lehrling zulässig gewesen.\footnote{START
\lipsum[1-2]}
\lipsum[1-5]
\end{document}
```
| 3 | https://tex.stackexchange.com/users/2388 | 688861 | 319,564 |
https://tex.stackexchange.com/questions/688844 | 3 | I have a following code
```
\documentclass[parskip=half]{scrbook}
\usepackage{tikz,lipsum}
\input{insbox}
\begin{document}
\InsertBoxR{0}{%
\begin{tikzpicture}
\draw (0,0) rectangle(3,3);
\end{tikzpicture}}
\lipsum
\end{document}
```
and it returns Overfull \hbox. I figured out that `parskip` option is the culprit. And yes, I know there was a similar question posted, but I do not know how to apply the solution, because my problem is not related to `tcolorbox`:
["Overfull \hbox" when using tcolorbox with parskip=half KOMA-option](https://tex.stackexchange.com/questions/187339/overfull-hbox-when-using-tcolorbox-with-parskip-half-koma-option)
Can you help me with this one?
| https://tex.stackexchange.com/users/3450 | Overfull \hbox with parskip option | false | It's a standard problem with `parskip=half` in KoMa classes: this option adds some natural width to `\parfillskip`.
Solution: don't use `parskip`. But if you *really* want to produce a bad looking document , do
```
\documentclass[parskip=half-]{scrbook}
```
| 2 | https://tex.stackexchange.com/users/4427 | 688865 | 319,567 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.