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/535851
0
`TexWorks` (Windows 10, `MiKTeX` latest version, fully updated) does not underline misspelled words. This worked fine until a few days ago. The dictionary files can be found in `C:\Program Files\MiKTeX 2.9\hunspell\dicts`. I did check en\_US in the menu.
https://tex.stackexchange.com/users/32025
TexWorks (coming with MiKTeX) does not underline misspelled words
false
This is a bit late, but for others to see ... Try zooming in on the script window. The red underlines won't appear when the texts are too small, at least in my environment.
0
https://tex.stackexchange.com/users/299569
689388
319,815
https://tex.stackexchange.com/questions/689394
0
Coming from [Don't number first frame with allowframebreaks](https://tex.stackexchange.com/questions/426832/dont-number-first-frame-with-allowframebreaks), I wondered, whether it is also possible to not display a number for frame breaks *only* when there are no frame breaks required. That way, the frame behaves like a normal frame when no frame break is needed and numbering will be used only when frame breaks occur.
https://tex.stackexchange.com/users/194783
Don't number first frame of beamer with `allowframebreaks` when there is only one frame (no frame breack needed)
true
For beamer v3.64 or newer, you can use `\setbeamertemplate{frametitle continuation}[singleframecheck]` which will only insert the continuation count if the frame has more than one page: ``` \documentclass{beamer} \setbeamertemplate{frametitle continuation}[singleframecheck] \begin{document} \begin{frame}[allowframebreaks] \frametitle{allowframebreaks title} frame 1 \end{frame} \begin{frame}[allowframebreaks] \frametitle{allowframebreaks title} frame 1 \framebreak frame 2 \framebreak frame 3 \framebreak \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
689395
319,817
https://tex.stackexchange.com/questions/689366
1
I'd like to print the remainder of the Euclidean division by `4` of a latex counter. How do I do this?
https://tex.stackexchange.com/users/107458
Euclidean division of two counters
false
In OpTeX, you can use `\expr` macro: ``` \def\remainderofdiv#1#2{\expr[0]{#1\%#2}} \remainderofdiv{12}{5} \bye ``` or, you can use `\directlua` directly: ``` \def\remainderofdiv#1#2{\directlua{tex.print(#1\%#2)}} ``` If you want to implement `\mycountermodfour` then you can use the previously defined macro: ``` \newcount\mycounter \def\mycountermodfour{\remainderofdiv{\the\mycounter}{4}} \mycounter=7 \mycountermodfour \bye ```
5
https://tex.stackexchange.com/users/51799
689401
319,820
https://tex.stackexchange.com/questions/22854
24
How do I allow long URLs to have line breaks at any point. This is in the bibliography not the main text. I am trying to save space so don't want extra spaces to be added to make it only break at slashes, for example, as it does by default. I am using `biblatex`+`biber`.
https://tex.stackexchange.com/users/5283
URL line breaks with biblatex
false
Even for website references, my Zotero didn't export a `url = ...` line for .bib files, but just `howpublished = {https://...}`. This caused some URLs in the bibliography (I had to use multibib, not bibtex) to cause overful hboxes, and the URLs shoot out of the document without a line break. Apparently, behind the hood, there was no \url, but (I think?) a \href from the hyperref package, which has different behavior. Out of the MANY options I tried, I ended up manually replacing the `howpublished = {https://...}` with a `howpublished = {\url{https://...}}` for the broken links. The URLs might look ugly then, this can be fixed with `\urlstyle{rm}` after `\usepackage[hyphens]{url}`.
1
https://tex.stackexchange.com/users/178758
689403
319,821
https://tex.stackexchange.com/questions/689391
0
I need to change the below code found on another page of this site, so as to display the chapter title (e.g. `\chapter{Intro}`) above the horizontal line to the left: ``` \documentclass{report} \usepackage{lmodern} \usepackage{titlesec} \usepackage{microtype} \usepackage{tikz} \definecolor{myblue}{RGB}{0,82,155} \titleformat{\chapter}[display] {\normalfont\bfseries\color{myblue}} {\filleft% \begin{tikzpicture} \node[ outer sep=0pt, text width=2.5cm, minimum height=3cm, fill=myblue, font=\color{white}\fontsize{80}{90}\selectfont, align=center ] (num) {\thechapter}; \node[ rotate=90, anchor=south, font=\color{black}\Large\normalfont ] at ([xshift=-5pt]num.west) {\textls[180]{\textsc{\chaptertitlename}}}; \node[ font=\color{white}\Large\normalfont, anchor=north, inner sep=0pt ] at ([yshift=2.5cm]num.north) {\chaptertitlename}; \end{tikzpicture}% } {10pt} {\titlerule[2.5pt]\vskip3pt\titlerule\vskip4pt\LARGE\rmfamily} \begin{document} \chapter{Introduction} ```
https://tex.stackexchange.com/users/299571
Change the chapter heading style
false
*UPDATE* You could try using the explicit option of `titlesec` and this code: ``` \documentclass{report} \usepackage{lmodern} \usepackage[explicit]{titlesec}% use option explicit \usepackage{microtype} \usepackage{tikz} \definecolor{myblue}{RGB}{0,82,155} \titleformat{\chapter}[display] {\normalfont\bfseries\color{myblue} } {% \parbox[b]{\dimexpr \textwidth-4cm}{\LARGE\rmfamily\raggedright#1}\hfill % use a parbox for longer titles \begin{tikzpicture} \node[ outer sep=0pt, text width=3cm, minimum height=3cm,% expanded to accommodate two digits fill=myblue, font=\color{white}\fontsize{80}{90}\selectfont, align=center ] (num) {\thechapter}; \node[ rotate=90, anchor=south, font=\color{black}\Large\normalfont ] at ([xshift=-5pt]num.west) {\textls[180]{\textsc{\chaptertitlename}}}; \end{tikzpicture}% } {4pt} {\titlerule[2.5pt]\vskip3pt\titlerule} \begin{document} \setcounter{chapter}{9} % test two digits \chapter{This is a bigger chapter title that needs to be adjusted here} \end{document} ```
0
https://tex.stackexchange.com/users/288435
689405
319,822
https://tex.stackexchange.com/questions/30791
16
Is there an intelligent way to label (or name) columns in a matrix? I would like to have something like ``` \[M=\left[\begin{array}{c|cc} 1 & 2 & 3\\ 4 & 5 & 6 \end{array}\right],N=\left[\begin{array}{c|cc} 7 & 8 & 9\\ 10 & 11 & 12 \end{array}\right]\] \[A \ B \ C \ D \ E \ F\] ``` where A, B,..., F are the labels (or rather names) of the first, second, ..., sixth columns, respectively. What I want is to label A be exactly below the first column, label B be below the second column, etc., of course, nicely aligned. So far I have forced some extra spaces before the labels manually, and also experimented with the `\phantom` command.
https://tex.stackexchange.com/users/7964
Array with labeling columns
false
Here is a solution with the environments of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \NiceMatrixOptions { code-for-first-row = \scriptstyle , code-for-first-col = \scriptstyle , } $M = \begin{bNiceArray}{c|cc}[first-col,first-row] & A & B & C \\ 1 & 1 & 2 & 3 \\ 2 & 4 & 5 & 6 \end{bNiceArray}$,\qquad $N = \begin{bNiceArray}{c|cc}[first-row] D & E & F \\ 7 & 8 & 9 \\ 10 & 11 & 12 \end{bNiceArray}$ \end{document} ```
0
https://tex.stackexchange.com/users/163000
689408
319,824
https://tex.stackexchange.com/questions/689382
0
so I'm quite new to Tex and writing my bachelor thesis with it. Until today I only had a main.tex which had everything I coded in it. For several reasons i decided to split every section into a separate file to make it easier to compile and so on. Since I did this, my title page just vanished, but only if I try to include it on the titlepage. If the code for it is in the main.tex, everything works just fine... Maybe someone has an idea... Thanks everyone in advance. ``` \documentclass[ngerman]{article} \input{Packages} \input{Meta} \begin{document} \include{Inhalt/Deckblatt} \end{document} ``` The packages I use, that might be responsible, are: ``` \usepackage[a4paper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry} \usepackage[colorlinks=true, allcolors=blue]{hyperref} ``` And the Meta.tex includes: ``` \title{Title} \author{ Name1\\ \texttt{Email1} \and Betreuer: Name2\\ \texttt{Email2} } \date{10.07.2023} ``` In the Deckblatt.tex is only the following code: ``` \begin{titlepage} \maketitle \end{titlepage} ``` Feel free to ask any questions!
https://tex.stackexchange.com/users/299566
Title page disappears when put into seperate .tex-file
false
I'm sorry everyone: I did a minor spelling mistake I just noticed. Now the code works just fine. The `\include{Inhalt/Deckblatt}` was outdatet, I renamed the file a while ago and I didn't notice.
2
https://tex.stackexchange.com/users/299566
689411
319,826
https://tex.stackexchange.com/questions/689363
0
I'm writing a discussion document where contributors get their own pages and I want to mention these pages in the general text So I have this which seems to do the trick ``` % usage: create printed page space for artist and the short form reference % \artist{Jo Blow}{JoBl} \newcommand{\artist}[2]{ \newpage \subsection{#1} Lorem ipsum \newpage Et tu quoque! #2\label{artist:#2} % page reserved for artwork by #1 } % obtain page numbering for artist image page given shortform reference % \mention{JoBl} \newcommand{ \mention}[1] { \emph{[p.\pageref{artist:#1}]}} ``` but I wanted to extend mention{} to take a variable length list of arguments I found this [iterating-through-comma-separated-arguments](https://tex.stackexchange.com/questions/87407/iterating-through-comma-separated-arguments) A case of running before I can walk, but bear with me I'm only a stupid artist, I tried this ``` %!TEX TS-program = lualatex %!TEX encoding = UTF-8 Unicode \documentclass{article} \newcommand{\artist}[2]{ \newpage \subsection{#1} Lorem ipsum \newpage Et tu quoque! #2\label{artist:#2} % page reserved for artwork by #1 } % obtain page numbering for artist image page given short form reference % \mention{HoBu} \newcommand{ \mention}[1] { \emph{[p.\pageref{artist:#1}]}} \makeatletter \newcommand{\lmention}[2][$,$]{% \def\nextitem{\def\nextitem{#1}}% \@for \el:=#2\do{\nextitem\el}% } \makeatother \begin{document} \artist{Arty Blow}{Arty} \artist{Jo Blow}{Jo} What I want is the stylised \mention{Arty} What would be nice would be an arg count to say p.18 or pp.18,23,24 A list of mentions is \lmention{Arty,Jo,Fred} tho we havent talked about Fred Did I forget \lmention{Bart} who is yet to be referenced \artist{Bart Beast}{Bart} \artist{Fred Geest}{Fred} \end{document} ``` Long story, short question? How can I get it to do the \pageref lookup on an arg by arg basis I try ``` \newcommand{\lmention}[2][$:$]{% \def\nextitem{\def\nextitem{#1}}% \@for \el:=#2\do{\pageref{artist:#2}\nextitem\el}% } ``` but get ``` A list of mentions is ??Arty??:Jo??:Fred tho we havent talked about Fred ``` Well out of my depth here
https://tex.stackexchange.com/users/240033
handling a variable number of pagerefs
false
The first thing to realize is that the current element of the list is not `#2` but `\el`. The argument `#2` is the full list. Therefore you need `\pageref{artist:\el}`. The second thing relates to the position of the separator. Normally when constructing a comma separated list you might be inclined to do something like: ``` for each element { print element print separator } ``` Note that the above is pseudocode, not actual LaTeX or TeX. However, by doing that you would get the list `element1,element2,element3,` which has an unwanted comma at the end. Therefore the code in the other question uses a trick: it puts the separator *before* each element but makes sure that the first separator is not printed. This is easier than to ensure that the last separator is not printed, because in the loop you don't know what the last element is. The trick is that the command `\nextitem` is originally defined to print nothing and instead perform the definition `\def\nextitem{#1}`. Argument `#1` is a comma, so from the second call onwards, `\nextitem` prints a comma. Therefore you need the same structure as in the referenced question, i.e., `\do{\nextitem\el}` but instead of printing just `\el` you want to print `\pageref{artist:\el}`, so in full it becomes `\do{\nextitem\pageref{artist:\el}}`. For counting the arguments you can loop the list first and increment a counter for each element, then test the value of that counter. If it is 1, print `p.`, otherwise print `pp.`. Afterwards you loop the list again for the actual `\pageref` calls. Side remark is that you don't need `$,$` as the separator, this was only needed in the original question because the separator used there was a math command (`\triangleright`) which requires math mode with `$`. A comma is a regular character so there math mode is not needed. Full code: ``` \documentclass{article} \newcommand{\artist}[2]{ \newpage \subsection{#1} Lorem ipsum \newpage Et tu quoque! #2\label{artist:#2} % page reserved for artwork by #1 } % obtain page numbering for artist image page given short form reference % \mention{HoBu} \newcommand{ \mention}[1] { \emph{[p.\pageref{artist:#1}]}} \makeatletter \newcounter{mentionargs} \newcommand{\lmention}[2][,]{% \setcounter{mentionargs}{0}% \@for \el:=#2\do{\stepcounter{mentionargs}}% \ifnum\value{mentionargs}=1% p.% \else% pp.% \fi% \def\nextitem{\def\nextitem{#1}}% \@for \el:=#2\do{\nextitem\pageref{artist:\el}}% } \makeatother \begin{document} \artist{Arty Blow}{Arty} \artist{Jo Blow}{Jo} What I want is the stylised \mention{Arty}, \mention{Jo}, \mention{Fred} What would be nice would be an arg count to say p.2 or pp.18,23,24 A list of mentions is \lmention{Arty,Jo,Fred} tho we havent talked about Fred Did I forget \lmention{Bart} who is yet to be referenced \artist{Bart Beast}{Bart} \artist{Fred Geest}{Fred} \end{document} ``` Result:
0
https://tex.stackexchange.com/users/89417
689417
319,828
https://tex.stackexchange.com/questions/689418
2
I am trying to add text above and below an arrow, but I can't seem to figure out a way to do this without creating two arrows on top of each other, which looks awkward. What I currently have looks a bit like this: ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{automata, arrows.meta, positioning} \begin{document} \begin{tikzpicture} [node distance = 4cm, auto] \node (0) [state, initial] {$q_0$}; \node (1) [state, right = of 0] {$q_1$}; \node (2) [state, right = of 1] {$q_2$}; \path [-stealth] (0) edge node {A} (1) (1) edge [loop above] node {B} (1) (1) edge node {sample text above arrow} (2); \end{tikzpicture} \end{document} \end{tikzpicture} ``` I would like to be also able to add some `sample text below arrow` in that same edge betweeen `(1)` and `(2)`.
https://tex.stackexchange.com/users/299589
How do I add text above and below an arrow using TikZ?
false
A very simple solution (tested before your code) like this: Code: ``` \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[-latex,line width=2pt] (1,0)--(5,0) node[midway,above] () {above}; \draw[-latex,line width=2pt] (1,0)--(5,0) node[midway,below] () {below}; \draw[red,-latex,line width=2pt] (1,0)--(5,4) node[midway,above,sloped] () {above}; \draw[red,-latex,line width=2pt] (1,0)--(5,4) node[midway,below,sloped] () {below}; \draw[cyan,-latex,line width=2pt] (1,0) arc (-180:0:2) node[pos=.25,below,sloped] () {below}; \draw[cyan,-latex,line width=2pt] (1,0) arc (-180:0:2) node[pos=.75,above,sloped] () {above}; \end{tikzpicture} \end{document} ``` **EDIT**: You can also consider this solution: ``` \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[-latex,line width=2pt] (1,0)--(5,0) node[midway,above] {above} node[midway,below] {below}; \draw[red,-latex,line width=2pt] (1,0)--(5,4) node[midway,above,sloped] {above} node[midway,below,sloped] {below}; \draw[cyan,-latex,line width=2pt] (1,0) arc (-180:0:2) node[midway,below,sloped] {below} node[midway,above,sloped] {above}; \end{tikzpicture} \end{document} ``` The output is:
1
https://tex.stackexchange.com/users/24644
689419
319,829
https://tex.stackexchange.com/questions/340852
6
I am beginning in TexMaker and I want to change into the dark mod (direct request of my eyes). In the configurations, I clicked on the dark theme button but nothing changed, even by restarting the program. Any indication guys ? Moreover I tried to change the .init file, but after a restart, the file turned like it was before. Thanks a lot for your help !
https://tex.stackexchange.com/users/119563
How can I have the dark theme in TexMaker?
false
I usually try not to mess with the settings. Instead of this on my Windows computer, I use color filter settings. Select inverted filter and use the "win + ctrl + C" shortcut to invert the colors.
0
https://tex.stackexchange.com/users/299591
689422
319,830
https://tex.stackexchange.com/questions/672438
0
How would I write a line that is longer than the formula, even when the next formula is the same size, so that the line is apparently longer. For example, I want to write: ``` a -- b -- c ---- a -- c ``` However, the best I could do was use an empty formula with 3 `\quad`'s and use `\vspace`, but the `\vspace` seemed to have no effect, no matter where I put it in the proof tree - in the braces, or outside them. Changing `\vspace` size also did not help. The code I wrote is: ``` \begin{prooftree} \AXC{ $ A $ } \UIC{ $ B $ } \UIC{ $ C $ } \UIC{ $ \quad\quad\quad $ } \vspace{-1em} \UIC{ $ A $ } \UIC{ $ C $ } \end{prooftree} ```
https://tex.stackexchange.com/users/285184
bussproofs.sty single longer line?
false
It's not entirely clear what format you want or what your code does. Assuming that `\AXC` and `\UIC` are defined as `\AxiomC` and `\UnaryInfC` respectively, you might be looking for something like this ``` \documentclass{article} \usepackage{bussproofs} \begin{document} \begin{prooftree} \AxiomC{ $ A $ } \UnaryInfC{ $ B $ } \UnaryInfC{ $ C $ } \AxiomC{ } \BinaryInfC{ $ A $ } \UnaryInfC{ $ C $ } \end{prooftree} \end{document} ```
1
https://tex.stackexchange.com/users/39222
689424
319,831
https://tex.stackexchange.com/questions/689412
2
My MWE: ``` \documentclass[twoside]{book}% \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \newcounter{totalnumberold} \newcounter{topnumberold} \newcounter{bottomnumberold} \newcommand\adaptplacement{% \setcounter{totalnumber}{1} \setcounter{topnumber}{1} \setcounter{bottomnumber}{1} \renewcommand{\topfraction}{.99} \renewcommand{\bottomfraction}{.99} \renewcommand{\textfraction}{.01} \renewcommand\floatpagefraction{1.0}% This makes it nearly impossible to generate a page of floats }% \begin{document} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} % Control: \typeout{Before group:} \typeout{topfraction: \topfraction , bottomfraction: \bottomfraction , textfraction: \textfraction , floatpagefraction: \floatpagefraction}% \typeout{totalnumber: \arabic{totalnumber} , topnumber: \arabic{topnumber}, bottomnumber: \arabic{bottomnumber}}% {% \adaptplacement \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} % Control: \typeout{Inside group:} \typeout{topfraction: \topfraction , bottomfraction: \bottomfraction , textfraction: \textfraction , floatpagefraction: \floatpagefraction}% \typeout{totalnumber: \arabic{totalnumber} , topnumber: \arabic{topnumber}, bottomnumber: \arabic{bottomnumber}}% }% % Control: \typeout{After group:} \typeout{topfraction: \topfraction , bottomfraction: \bottomfraction , textfraction: \textfraction , floatpagefraction: \floatpagefraction}% \typeout{totalnumber: \arabic{totalnumber} , topnumber: \arabic{topnumber}, bottomnumber: \arabic{bottomnumber}}% \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \lipsum \end{document} ``` I have 9 floating figures and I try to position them such, that the third and the fourth should appear alone on a text page, while the others before and after should appear in bigger numbers per text page. As one can see after compiling, that doesn't work: There are two groups of placement parameters: counters and macros, which behave differently. The macros are only valid inside the group of the third and fourth figures, which I marked by brackets {}. One can control that via the \typeout inside the logfile. The behavior even doesn't change, if I make much use of \global. On the other hand, counters are generally changed globally, so they stay changed even after leaving the group, as the \typeout into the logfile shows. But they only achieve their aim for the eighth and ninth figures -- not for the third and fourth, as intended. So my question: How can I change placement macros and counters especially and only for the two figures, while leaving the parameters of the other figures unchanged?
https://tex.stackexchange.com/users/202047
How to do individual float placement?
false
Like this? ``` \documentclass[twoside]{book}% \usepackage{graphicx} \usepackage{lipsum}% Delivers blind text \setcounter{totalnumber}{1} \begin{document} \begin{figure}[!t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure}[!t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck2} \end{figure} \begin{figure}[t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck3} \end{figure} \begin{figure}[t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck4} \end{figure} \begin{figure}[t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck5} \end{figure} \begin{figure}[t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure}[!t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure} \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \begin{figure}[!t] \includegraphics[width=0.5\textwidth]{example-image-duck} \caption{A duck} \end{figure} \lipsum \end{document} ```
3
https://tex.stackexchange.com/users/1090
689426
319,832
https://tex.stackexchange.com/questions/689423
2
I am having trouble getting the href's to automatically wrap at the appropriate spot within my \longtable. I tried using the \ltablex package, but that made no difference. Any guidance is much appreciated! Please see my MWE below. ``` \RequirePackage[hyphens]{xurl} \documentclass[12pt,a4paper]{article} \usepackage{lipsum} \usepackage{xcolor} \usepackage{longtable} \usepackage{array} \usepackage{booktabs} \usepackage{libertinus} \usepackage{silence} \WarningsOff[everypage] \usepackage{everypage} \pagenumbering{gobble} \sloppy \usepackage[hidelinks, breaklinks=true]{hyperref} \hypersetup{pdfhighlight=/N} \usepackage[margin=1cm, top=0cm, bottom=0cm]{geometry} \usepackage{seqsplit} \newcommand\wrap[2]{ \begin{minipage}{#1} \seqsplit{#2} \end{minipage} } \newcommand{\myorg}{\textbf{myorg}} \newcommand{\mypublishingcompany}{\href{https://myorg.org}{myorg.org}} \newcommand{\mycompany}{\href{https://myorg.com}{myorg.com}} \newcommand{\ethaddressrawlink}[1]{\href{https://etherscan.io/address/#1}{#1}} \newcommand{\ipfsrawlink}[1]{\href{https://ipfs.io/ipfs/#1}{#1}} \newcommand{\nftaddress}{0x47fc890be8b1070c114bdff796915e4952fcf6a7} \newcommand{\cidaddress}{QmUduh3i1YVgWd7bbjcvnFgnbF48uD7rJ6er2ogcA6gyrj} \begin{document} \color{blue} \footnotesize \begin{longtable}[l]{@{}p{1.5cm} >{\raggedright\arraybackslash}p{1.5cm} >{\raggedright\arraybackslash}p{3.5cm} >{\raggedright\arraybackslash}p{3.5cm}@{}} \toprule \textbf{URL} & \textbf{Version} & \textbf{NFT} & \textbf{CID} \\ \midrule \textit{\mycompany} & $1.0i$ & \textcolor{red}{\textsl{\ethaddressrawlink{\nftaddress}}} & \textcolor{teal}{\textsl{{\ipfsrawlink{\cidaddress}}}}\\ \\ \textit{\mypublishingcompany} & $1.1o$ & \wrap{2.5cm}{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} & \wrap{3cm}{zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz}\\ \\ \textit{\mypublishingcompany} & $1.0o$ & \lipsum[1] & \lipsum[1]\\ \\ \bottomrule \end{longtable} \end{document} ```
https://tex.stackexchange.com/users/262003
using xurl package with \href and a long \url within the longtable package
false
you have to use \nolinkurl to see the effects of xurl ``` \RequirePackage[hyphens]{xurl} \documentclass[12pt,a4paper]{article} \usepackage{lipsum} \usepackage{xcolor} \usepackage{longtable} \usepackage{array} \usepackage{booktabs} \usepackage{libertinus} \usepackage{silence} \WarningsOff[everypage] \usepackage{everypage} \pagenumbering{gobble} \sloppy \usepackage[hidelinks, breaklinks=true]{hyperref} \hypersetup{pdfhighlight=/N} \usepackage[margin=1cm, top=0cm, bottom=0cm]{geometry} \usepackage{seqsplit} \newcommand\wrap[2]{%<<<< \begin{minipage}{#1} \seqsplit{#2} \end{minipage}%<<<< } \newcommand{\myorg}{\textbf{myorg}} \newcommand{\mypublishingcompany}{\href{https://myorg.org}{myorg.org}} \newcommand{\mycompany}{\href{https://myorg.com}{myorg.com}} \newcommand{\ethaddressrawlink}[1]{\href{https://etherscan.io/address/#1}{\nolinkurl{#1}}} \newcommand{\ipfsrawlink}[1]{\href{https://ipfs.io/ipfs/#1}{\nolinkurl{#1}}} \newcommand{\nftaddress}{0x47fc890be8b1070c114bdff796915e4952fcf6a7} \newcommand{\cidaddress}{QmUduh3i1YVgWd7bbjcvnFgnbF48uD7rJ6er2ogcA6gyrj} \begin{document} \color{blue} \footnotesize \begin{longtable}[l]{@{}p{1.5cm} >{\raggedright\arraybackslash}p{1.5cm} >{\raggedright\arraybackslash}p{3.5cm} >{\raggedright\arraybackslash}p{3.5cm}@{}} \toprule \textbf{URL} & \textbf{Version} & \textbf{NFT} & \textbf{CID} \\ \midrule \textit{\mycompany} & $1.0i$ & \textcolor{red}{\textsl{\ethaddressrawlink{\nftaddress}}} & \textcolor{teal}{\textsl{{\ipfsrawlink{\cidaddress}}}}\\ \\ \textit{\mypublishingcompany} & $1.1o$ & \wrap{2.5cm}{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} & \wrap{3cm}{zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz}\\ \\ \textit{\mypublishingcompany} & $1.0o$ & \lipsum[1] & \lipsum[1]\\ \\ \bottomrule \end{longtable} \end{document} ```
4
https://tex.stackexchange.com/users/1090
689428
319,833
https://tex.stackexchange.com/questions/689420
1
Hi I'd like to change Rome numbers of parts into letters, for instance: ``` \documentclass{beamer} \usetheme{Madrid} \usecolortheme{whale} \usecolortheme{orchid} \setbeamertemplate{blocks}[rounded][shadow=true] \title{This is a title} \author{Author} \date{ } \begin{document} \part{Review of Previous Lecture} \frame{\partpage} \frame{...} \part{Today's Lecture} \frame{\partpage} \frame{...} \end{document} ``` And I want to have Part A instead of Part I, etc. Do you know how to do it?
https://tex.stackexchange.com/users/279350
Beamer changing part numbers to letter
true
``` \makeatletter \renewrobustcmd*\insertromanpartnumber{\@Alph\c@part} \makeatother ``` Maybe you can redefine the content of `\insertromanpartnumber`, beacuse the default part number in part page is `\insertromanpartnumber`.
2
https://tex.stackexchange.com/users/238422
689429
319,834
https://tex.stackexchange.com/questions/102460
10
How to put underbraces, inside the parenthesis of a matrix, to name both sides of the blocks? ``` \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{array} \begin{document} . . . \[ \left ( \begin{array}{rrr|rrr} 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ \end{array} \right ) \] \end{document} ``` I'm compiling the code in my university server, where I can't install new packages.
https://tex.stackexchange.com/users/10988
Underbraces in Matrix Divided in Blocks
false
Here is a solution with `{pNiceArray}` of `nicematrix`. ``` \documentclass{article} \usepackage{nicematrix} \begin{document} \[ \begin{pNiceArray}{rrr|rrr}[margin=1pt] 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 25 & 0 \\ \CodeAfter \UnderBrace{3-1}{3-3}{A}[shorten] \UnderBrace{3-4}{3-6}{B}[shorten] \end{pNiceArray} \] \end{document} ```
0
https://tex.stackexchange.com/users/163000
689442
319,839
https://tex.stackexchange.com/questions/689444
1
In this MWE I'm not getting the author's name in the header.. ``` \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amssymb} \usepackage{amsmath} \usepackage{txfonts} \usepackage{mathdots} \usepackage{lipsum} \usepackage{bmpsize} \usepackage[classicReIm]{kpfonts} \usepackage{scrextend} \usepackage{graphicx} \usepackage[affil-it]{authblk} \usepackage{fancyhdr} \usepackage{hyperref} \usepackage{titling} \setlength\headheight{20pt} \pagestyle{fancy} \fancyhf{} \fancyhead[LE,RO]{\textit{\thepage}} \fancyhead[LO]{\textit{\nouppercase{\leftmark}}} \renewcommand{\headrulewidth}{0.4pt} % Custom command to set running head for odd and even pages \newcommand{\oddhead}{\markright{Running Head}} \begin{document} \title{Relative Advantage of Latex} \date{} \author{Rui de S. Cxx\thanks{Polytechnic of Porto: \texttt{rdc@xxx.pt}}} \maketitle \thispagestyle{empty} \fancyhead[RE]{R.Camps} % Move this line after \author command \begin{small} \textbf{Abstract} \\ \noindent bla bla. \end{small} \newpage \section{Introduction} \textbf{1st paragraph}\\ \lipsum[1] \textbf{2nd paragraph}\\ \lipsum[2] \lipsum[2] \lipsum[3] \lipsum[3] \newpage \lipsum[5] \lipsum[6] \lipsum[7] \end{document} ```
https://tex.stackexchange.com/users/299605
Author's name in header not displaying
false
Your document is single-sided, because this is the default of class `article`. So you never have left pages. All pages are right pages, which are called *odd* pages in LaTeX. So your ``` \fancyhead[LE]{R.Camps} % Move this line after \author command ``` that defines a (left aligned) page head element for *even* pages only, cannot result in any output. Either replace it by something like ``` \fancyhead[CO]{R.Camps} % Move this line after \author command ``` which would show the author centered at the page header of *odd* (and therefore all) pages ``` \documentclass{article} \usepackage[utf8]{inputenc}% Not needed any longer from LaTeX 2018/10/04. %\usepackage{amssymb}% Not needed so show the problem or solution. %\usepackage{amsmath}% Not needed so show the problem or solution. %\usepackage{txfonts}% Not needed so show the problem or solution. %\usepackage{mathdots}% Not needed so show the problem or solution. \usepackage{lipsum} %\usepackage{bmpsize}% Not needed so show the problem or solution. %\usepackage[classicReIm]{kpfonts}% Not needed so show the problem or solution. %\usepackage{scrextend}% Not needed so show the problem or solution. %\usepackage{graphicx}% Not needed so show the problem or solution. %\usepackage[affil-it]{authblk}% Not needed so show the problem or solution. \usepackage{fancyhdr} %\usepackage{hyperref}% Not needed so show the problem or solution. %\usepackage{titling}% Not needed so show the problem or solution. %\setlength\headheight{20pt}% Not needed so show the problem or solution. \pagestyle{fancy} \fancyhf{} \fancyhead[LE,RO]{\textit{\thepage}} \fancyhead[LO]{\textit{\nouppercase{\leftmark}}} \renewcommand{\headrulewidth}{0.4pt} % Custom command to set running head for odd and even pages %\newcommand{\oddhead}{\markright{Running Head}}% Not needed so show the problem or solution. \begin{document} \title{Relative Advantage of Latex} \date{} \author{Rui de S. Cxx\thanks{Polytechnic of Porto: \texttt{rdc@xxx.pt}}} \maketitle \thispagestyle{empty} \fancyhead[CO]{R.Camps} % Move this line after \author command \begin{small} \textbf{Abstract} \\ \noindent bla bla. \end{small} \newpage \section{Introduction} \textbf{1st paragraph}\\ \lipsum[1] \textbf{2nd paragraph}\\ \lipsum[2] \lipsum[2] \lipsum[3] \lipsum[3] \newpage \lipsum[5] \lipsum[6] \lipsum[7] \end{document} ``` or replace ``` \documentclass{article} ``` by ``` \documentclass[twoside]{article} ``` to have a double-sided document with the author on left (= *even*) pages: ``` \documentclass[twoside]{article} % All preamble code not related to the problem removed \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[LE,RO]{\textit{\thepage}} \fancyhead[LO]{\textit{\nouppercase{\leftmark}}} \renewcommand{\headrulewidth}{0.4pt} \begin{document} \title{Relative Advantage of Latex} \date{} \author{Rui de S. Cxx\thanks{Polytechnic of Porto: \texttt{rdc@xxx.pt}}} \maketitle \thispagestyle{empty} \fancyhead[RE]{R.Camps} % Move this line after \author command \begin{small} \textbf{Abstract} \\ \noindent bla bla. \end{small} \newpage \section{Introduction} \textbf{1st paragraph}\\ \lipsum[1] \textbf{2nd paragraph}\\ \lipsum[2] \lipsum[2] \lipsum[3] \lipsum[3] \newpage \lipsum[5] \lipsum[6] \lipsum[7] \end{document} ```
2
https://tex.stackexchange.com/users/277964
689445
319,841
https://tex.stackexchange.com/questions/689432
1
I'm using CircuiTikZ and I came across this issue frequently: every time I want to tweak some options using `tikzset`, there is no documentation for the available key-value pairs. For example, if I want to change the voltage direction, in the documentation, only value (i.e., `RPvoltages`) is provided. However, I prefer to use key-value pair in my code for future reference so I was wondering how can I find the respective key name given value name or the other way around.
https://tex.stackexchange.com/users/289729
How to find out available key-value pair for CircuiTikZ
true
Hmmm... which manual did you read? Page 187, Currents and Voltages: As often happens, `RPvoltages` is a package options, and a style, and `voltage dir` is the key storing it. Anyway, let me say that it's a bad idea to use a non-global `voltage dir`. This thing is cultural --- if the book uses EF style, all must be in EF style, or the other way around. `old` and `noold` should have been removed, but I do not *ever* make changes that can result in *wrong* circuits... Anyway, it's quite possible that the documentation is lacking or can be made better. You are welcome to make an enhancement request (even better if a PR!) at <https://github.com/circuitikz/circuitikz/issues/new/choose>! For example, I'd really like to add a second index with all the keys pointing to where they are described. But it's a lot of work, so either someone steps in, or it is one of my "retirement project" (not so far away, but don't hold your breath).
3
https://tex.stackexchange.com/users/38080
689450
319,844
https://tex.stackexchange.com/questions/689449
3
I am using Luatex and KOMA-script. I have the issue that the italic font is consistently set to size 10pt it seems, and I don't understand it. In my M(not)WE below, the issue is present, but it isn't when removing the line that loads the scrlayer-scrpage package or removing the \clearpage. I'm not using the package in this example to keep it simple, but in my main document I want to use it. What is going on here? Also, this issue doesn't happen for most other fonts. ``` \documentclass[a4paper, 12pt]{scrreprt} %%%%%%%%%%%%%%% load packages %%%%%%%%%%%%%%% \usepackage{fontspec} \setmainfont{Latin Modern Roman} %%%%% Head and Footnotes %%%%% \usepackage[]{scrlayer-scrpage} %%%%%%%%%%%%%%% begin of document %%%%%%%%%%%%%%% \begin{document} Some Text \clearpage % or cleardoublepage or newpage, all produce the problem This is a text in normalsize. \emph{This appears smaller than it should. }\textit{This appears too small as well.}\\ Look at the size of Letters: u\emph{u}\textit{u} \end{document} ```
https://tex.stackexchange.com/users/223852
Italic text is smaller than regular text when using clearpage and the scrlayer-scrpage package
false
Fonts with optical sizes are sometimes a bit complicated. Declare the slanted font explicitly: ``` \documentclass[a4paper, 12pt]{scrreprt} %%%%%%%%%%%%%%% load packages %%%%%%%%%%%%%%% \usepackage{fontspec} \setmainfont{Latin Modern Roman}[SlantedFont=LatinModernRoman/I] %%%%% Head and Footnotes %%%%% \usepackage[]{scrlayer-scrpage} %%%%%%%%%%%%%%% begin of document %%%%%%%%%%%%%%% \begin{document} Some Text \clearpage % or cleardoublepage or newpage, all produce the problem This is a text in normalsize. \emph{This appears smaller than it should. }\textit{This appears too small as well.}\\ Look at the size of Letters: u\emph{u}\textit{u} \end{document} ```
6
https://tex.stackexchange.com/users/2388
689456
319,846
https://tex.stackexchange.com/questions/689457
0
I would like to use IEEEabrv for my IEEE submission. However, this function does not work at all, as no journal names generated by bibtex are abbreviated. I would like to ask for a solution to this problem. Thank you! ``` \documentclass[journal]{IEEEtran} \usepackage{cite} \usepackage{etoolbox,iftex} \usepackage{amssymb,mathtools,nicefrac,amsthm} \usepackage{stmaryrd,enumitem} \usepackage{scalerel,cmll,trsym} \usepackage{graphicx,tcolorbox} \usepackage{float,threeparttable,tikz-cd} \usepackage{mathrsfs} \usepackage{xurl} \allowdisplaybreaks \usepackage[OT2,T1]{fontenc} \usepackage[justification=centering,font=small,labelfont=bf]{caption} \usepackage{footnote,subfigure} \makesavenoteenv{tabular} \makeatletter \def\th@newremark{\th@remark\thm@headfont{\bfseries}} \makeatletter \setcounter{MaxMatrixCols}{20} \newcommand{\floor}[1]{\lfloor #1 \rfloor} \usepackage[ruled]{algorithm2e} \usepackage{bm} \usepackage[hidelinks]{hyperref} \usepackage{cleveref} \bibliographystyle{IEEEtran} \bibliography{IEEEabrv,mybib} ```
https://tex.stackexchange.com/users/104839
IEEEabrv does not abbreviate the journal names properly
false
I suggest you to read `IEEEabrv.bib`: > > USAGE: > > > \bibliographystyle{mybstfile} > > > \bibliography{IEEEabrv,mybibfile} > > > where the IEEE titles in the .bib database entries use the strings > > > defined here. e.g., > > > journal = IEEE\_J\_AC, > > > to yield "{IEEE} Trans. Automat. Contr." > > >
0
https://tex.stackexchange.com/users/238422
689458
319,847
https://tex.stackexchange.com/questions/689452
5
I'm trying to switch from `pdflatex` to `lualatex`. When I use `polyglossia` using Spanish with `\sen` it does not work well. Several tries, no success. MWE: ``` \documentclass[12pt,letterpaper]{book} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{spanish} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} %\makeatletter %\appto\inlineextras@spanish{\renewcommand\sin{\qopname \relax m{sen}}} %\appto\blockextras@spanish{\renewcommand\sin{\qopname \relax m{sen}}} %\makeatother %\DeclareMathOperator{\sen}{sen} %\renewcommand{\sin}{\operatorname{sen}} %\renewcommand{\sen}{\operatorname{sen}} \begin{document} \begin{align*} \cos^2 + \sin^2x&=1\\ \cos^2 + \sen^2x&=1\\ \end{align*} \end{document} ```
https://tex.stackexchange.com/users/299611
Error with polyglossia using spanish and \sen
false
If using [babel](https://www.ctan.org/pkg/babel) instead of [polyglossia](https://www.ctan.org/pkg/polyglossia) is an option for you, the following code should be of interest. Note that both `\sin` and `\sen` now output "sen" in upright (aka "roman") letters. ``` % !TEX TS-program = lualatex \documentclass[12pt,letterpaper]{book} \usepackage{amsmath} % for '\DeclareMathOperator' macro \usepackage{unicode-math} % optional \usepackage[spanish]{babel} % defines '\sen' macro \let\sin\relax % undefine '\sin' first \DeclareMathOperator{\sin}{sen} % redefine '\sin' \begin{document} $\sin x$, $\sen x$ \end{document} ```
4
https://tex.stackexchange.com/users/5001
689459
319,848
https://tex.stackexchange.com/questions/689454
3
I am doing a specific pgfmath calculation involving logs and trig functions. Pgfmath evaluates: log10(-cot(97.1)) = -0.90466. My calculator gives the "true" answer of −0.904633, which is close enough. Pgfmath evaluates: log10(-cot(97.2)) = −0.88753. My calculator gives the "true" answer of −0.898495, which is quite different. I assume this is some kind of weird rounding error- can I do something to fix this? (I am using these values to draw a diagram, and I can see visually that something is wrong with the values.) MWE: ``` \documentclass{article} \usepackage{pgfmath} \begin{document} \pgfmathparse{log10(-cot(97.1))} $\log(-\cot 97.1) = \pgfmathresult$ (true answer: $-0.904633$) \pgfmathparse{log10(-cot(97.2))} $\log(-\cot 97.2)= \pgfmathresult$ (true answer: $-0.898495$) \end{document} ```
https://tex.stackexchange.com/users/299612
pgfmath rounding error?
true
`pgfmath` is inherently very approximate, by default; it uses fixed point arithmetic, as explained/suggested in the manual (this is around page 1027 of the Ti*k*Z manual): If you want a more precise (IEEE precise) computation, you can use the new latex3 math engine, available in any recentish LaTeX: ``` \documentclass{article} \usepackage{pgfmath} \begin{document} \pgfmathparse{log10(-cot(97.1))} $\log(-\cot 97.1) = \pgfmathresult$ fpeval: \fpeval{ln(-cotd(97.1))/ln(10)} (true answer: $-0.904633$) \pgfmathparse{log10(-cot(97.2))} $\log(-\cot 97.2)= \pgfmathresult$ fpeval: \fpeval{ln(-cotd(97.2))/ln(10)} (true answer: $-0.898495$) \end{document} ``` (your second result has a ~~wrong~~funny rounding) You can also use the nice (although "stopgap" in its author's word) [package `pgfmath-xfp`](https://ctan.org/pkg/pgfmath-xfp?lang=en): ``` \documentclass{article} \usepackage{pgfmath} \usepackage{pgfmath-xfp} \pgfmxfpdeclarefunction{myfun}{1}{ln(-cotd(#1))/ln(10)} \begin{document} \pgfmathparse{myfun(97.1)} $\log(-\cot 97.1) = \pgfmathresult$ (true answer: $-0.904633$) \pgfmathparse{myfun(97.2)} $\log(-\cot 97.2)= \pgfmathresult$ (true answer: $-0.898495$) \end{document} ```
1
https://tex.stackexchange.com/users/38080
689461
319,850
https://tex.stackexchange.com/questions/689452
5
I'm trying to switch from `pdflatex` to `lualatex`. When I use `polyglossia` using Spanish with `\sen` it does not work well. Several tries, no success. MWE: ``` \documentclass[12pt,letterpaper]{book} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{spanish} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} %\makeatletter %\appto\inlineextras@spanish{\renewcommand\sin{\qopname \relax m{sen}}} %\appto\blockextras@spanish{\renewcommand\sin{\qopname \relax m{sen}}} %\makeatother %\DeclareMathOperator{\sen}{sen} %\renewcommand{\sin}{\operatorname{sen}} %\renewcommand{\sen}{\operatorname{sen}} \begin{document} \begin{align*} \cos^2 + \sin^2x&=1\\ \cos^2 + \sen^2x&=1\\ \end{align*} \end{document} ```
https://tex.stackexchange.com/users/299611
Error with polyglossia using spanish and \sen
true
You want to use the `spanishoperators` option, but also make `\sen` the same as `\sin`. ``` \documentclass[12pt,letterpaper]{book} \usepackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage[spanishoperators=all]{spanish} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \makeatletter \appto\inlineextras@spanish{\NewCommandCopy\sen\sin} \appto\blockextras@spanish{\NewCommandCopy\sen\sin} \makeatother \begin{document} \begin{align*} \cos^2x + \sin^2x&=1\\ \cos^2x + \sen^2x&=1\\ \end{align*} \end{document} ```
5
https://tex.stackexchange.com/users/4427
689471
319,856
https://tex.stackexchange.com/questions/689473
1
I'm trying to draw a simple line with some markings at designated points, the code I always use to draw something like this doesn't seem to work and I don't know why. In particular, what I obtain is the line with no markings on it. I would be grateful of any help, the code is the following: ``` \begin{tikzpicture} \begin{axis}[ axis line style={draw=none}, ticks=none, xmin=-5.5, xmax=5.5, ymax=-5, ymin=5, anchor=origin ] \addplot[]coordinates{(-5,0)(5,0)}; \addplot[dotted]coordinates{(-5.5,0)(-5,0)}; \addplot[dotted]coordinates{(5.5,0)(5,0)}; \foreach \k in {-4,-1,...,4}{ \addplot[mark=diamond*]coordinates{(\k,0)}; } \end{axis} \end{tikzpicture} ```
https://tex.stackexchange.com/users/296571
Marks not showing in pgfplots
true
Once you correct the values for `ymin` and `ymax` so that the value for `ymin` is lower than that for `ymax`, the marks will show. But you might want to change the value list of the `\foreach` loop. If you say `{-4,-1,...,4}`, this will result in the list `{-4, -1, 2}`. Why? Well, with the first number, you set the starting value for the loop list, which is -4. With the second number you set the second value and the step size, that is, the second value being -4 and the step size being 3. With the number after the three dots, you set the last value of the value list, 4. But with your first two numbers being -4 and -1 and (therefore) the step size being 3, 4 will never be reached and, thus, the loop will stop at 2 as the next value, 6, is already larger than the value you defined as last value. In the following example, I changed the loop list to a step size of 1: ``` \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ axis line style={draw=none}, ticks=none, xmin=-5.5, xmax=5.5, ymin=-5, ymax=5, anchor=origin ] \addplot[]coordinates{(-5,0)(5,0)}; \addplot[dotted]coordinates{(-5.5,0)(-5,0)}; \addplot[dotted]coordinates{(5.5,0)(5,0)}; \foreach \k in {-4,-3,...,4} { \addplot[mark=diamond*]coordinates{(\k,0)}; } \end{axis} \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/47927
689479
319,859
https://tex.stackexchange.com/questions/689480
3
This MWE makes lualatex (and also pdflatex) go into infinite loop at 100% CPU ``` \documentclass[12pt]{book} \usepackage{amsmath} \usepackage{breqn} \begin{document} test \begin{dmath*} \end{dmath*} \end{document} ``` Now `lualatex index.tex` goes into infinite loop at the line: ``` (/usr/local/texlive/2022/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) ``` with CPU running 100%. It is stays like this forever. Is this expected? or is it a bug? If I change to ``` \begin{align*} \end{align*} ``` Then no problem. The first output was a bug in my program which generated empty equation so it was not intentional. But the question is, should it go into infinite loop due an empty environment? TL 2022. I will try to test it on TL 2023 also now. Just finishing installation. ps. it also hangs in TL 2023: ``` >lualatex main.tex This is LuaHBTeX, Version 1.17.0 (TeX Live 2023) restricted system commands enabled. (./main.tex LaTeX2e <2023-06-01> patch level 1 L3 programming layer <2023-06-16> (/usr/local/texlive/2023/texmf-dist/tex/latex/base/book.cls Document Class: book 2023/05/17 v1.4n Standard LaTeX document class (/usr/local/texlive/2023/texmf-dist/tex/latex/base/bk12.clo luaotfload | db : Font names database not found, generating new one. luaotfload | db : This can take several minutes; please be patient.)) (/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2023/texmf-dist/tex/latex/breqn/breqn.sty (/usr/local/texlive/2023/texmf-dist/tex/latex/l3kernel/expl3.sty (/usr/local/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)) (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-def/luatex.def))) (/usr/local/texlive/2023/texmf-dist/tex/latex/breqn/flexisym.sty (/usr/local/texlive/2023/texmf-dist/tex/latex/breqn/cmbase.sym) (/usr/local/texlive/2023/texmf-dist/tex/latex/breqn/mathstyle.sty)) (/usr/local/texlive/2023/texmf-dist/tex/latex/tools/calc.sty)) (./main.aux) (/usr/local/texlive/2023/texmf-dist/tex/latex/base/ts1cmr.fd) (/usr/local/texlive/2023/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/local/texlive/2023/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/local/texlive/2023/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) ```
https://tex.stackexchange.com/users/14594
lualatex and pdflatex go into infinite loop on empty dmath environment
true
Possibly: ``` \documentclass[12pt]{book} \usepackage{amsmath} \usepackage{breqn} \makeatletter \def\eq@repack{% \ifcase\lastpenalty % case 0: normal case \setbox\tw@\lastbox \ifvoid\tw@ \PackageError{breqn}{???}{???}% \setbox\tw@\hbox{??}% \penalty\@ne \fi \eq@repacka\EQ@copy \eq@repacka\EQ@box \unskip \or % case 1: finished recursing \unpenalty \setbox\tw@\lastbox \eq@repacka\EQ@copy \eq@repacka\EQ@box \@xp\@gobble \or % case 2: save box width = LHS width \unpenalty \setbox\tw@\lastbox \setbox\z@\copy\tw@ \setbox\z@\hbox{\unhbox\z@\unskip\unpenalty}% \addtolength\eq@wdL{\wd\z@} \setlength\eq@wdR{\wd\EQ@box}% BRM: eq@wdL patch \xdef\EQ@setwdL{\eq@wdL\the\eq@wdL\relax}% \global\setbox\EQ@copy\hbox{% \hbox{\unhcopy\tw@\unskip\unpenalty\unskip}% \box\EQ@copy }% \global\setbox\EQ@box\hbox{% \hbox{\unhbox\tw@\unskip\unpenalty\unskip}% \box\EQ@box }% \unskip \or % case 3: unpack left-right box \unpenalty \eq@lrunpack \else \breqn@repack@err \fi \eq@repack % RECURSE } \makeatother \begin{document} test \begin{dmath*} \end{dmath*} \end{document} ```
4
https://tex.stackexchange.com/users/1090
689488
319,860
https://tex.stackexchange.com/questions/689494
4
Consider the following MWE: ``` \documentclass{toptesi} \usepackage{lipsum} % just for dummy text \begin{document} \sommario \lipsum[1-3] \end{document} ``` Typically, the “sommario” (or “abstract” in English) should not exceed half a page. **How can I create a warning message to appear when the sommario exceeds this limit?** Thank you for your help!
https://tex.stackexchange.com/users/274163
How to generate a warning message when the contents of a specific page exceeds half a page in length?
true
this logs: ``` Warning:abstract too long! 418.0pt/607.50787pt ``` --- ``` \documentclass{toptesi} \usepackage{lipsum} % just for dummy text \begin{document} \sommario % \lipsum[1-2]% OK \lipsum[1-3]% warning \ifdim\pagetotal>0.6\pagegoal % a bit spare adjust as needed \typeout{^^JWarning:abstract too long!} \fi \typeout{\the\pagetotal/\the\pagegoal^^J} \end{document} ```
5
https://tex.stackexchange.com/users/1090
689500
319,868
https://tex.stackexchange.com/questions/689478
0
I want to write 4 equations in a single line with one equation number. I wrote ``` \begin{equation} t=\gamma({t^'} +\frac{v}{c^2}{z^'}) \text{, } z=\gamma({z{^'} + v {t^'}) \text{, } x ={x^'} \text{, } y ={y^'} \end{equation} ``` and the equation number is right after the final equation rather than at the right margin as usual.
https://tex.stackexchange.com/users/299636
How do I get the equation number to be in the normal position
false
``` \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} t=\gamma({t^'} +\frac{v}{c^2}{z^'}) \text{, } z=\gamma({z{^'} + v {t^'}) \text{, } x ={x^'} \text{, } y ={y^'} \end{equation} \end{document} ``` produces the error ``` ! Missing { inserted. <to be read again> ^ l.5 t=\gamma({t^' } +\frac{v}{c^2}{z^'}) ? ``` after any error, any pdf output is not intended to be usable, just a debuging aid. Use `t'` never `t^'` once that is fixed, the equation typesets as expected. Note multiple spaces only make one space, I replaced by `\quad` ``` \documentclass{article} \usepackage{amsmath} \begin{document} \hrule % just to see page size \begin{equation} t=\gamma(t' +\frac{v}{c^2}z') \text{,}\quad z=\gamma(z' + v t') \text{,}\quad x =x' \text{,}\quad y =y' \end{equation} \hrule \end{document} ```
2
https://tex.stackexchange.com/users/1090
689502
319,869
https://tex.stackexchange.com/questions/689499
0
I am writing a PhD thesis in the `book` class, and using the `fncychap` package to format chapter titles. The MWE is attached below. The problem I am encountering is that I want the dedication and frontmatter (i.e., `\chapter*{}` and `\chapter*{Abstract}` etc.) without `fncychap` formatting. I have tried all available resources in stack to no avail. Can someone please guide me on how to achieve this? Below is the MWE (any other useful tips regarding any issues also appreciated, thanks in advance!): ``` \documentclass[12pt, a4paper, openright]{book} %\usepackage{emptypage} \usepackage[Glenn]{fncychap} %Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup \let\origdoublepage\cleardoublepage \newcommand{\clearemptydoublepage}{\clearpage{\pagestyle{empty}\origdoublepage}} \let\cleardoublepage\clearemptydoublepage \usepackage{mathptmx} \usepackage{amscd} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{lipsum} \usepackage{float} \usepackage{tabularx} \usepackage{multirow} \usepackage{makecell} \usepackage{verbatim} \usepackage{enumitem} \usepackage{mathpazo} \usepackage[utf8]{inputenc} \usepackage[bindingoffset=0.5in, left=3cm, right=3cm, top=3cm, bottom=3cm]{geometry} \geometry{a4paper} \usepackage{fancyhdr} \pagestyle{plain} \usepackage[dvipsnames]{xcolor} \setcounter{tocdepth}{4} \setcounter{secnumdepth}{4} % \setcounter{secumdepth}{0} \usepackage[backend=biber,bibencoding=utf8, style=numeric-comp, sorting=none]{biblatex} \bibliography{Bibliography} \usepackage{hyperref} \hypersetup{ pdftoolbar=true, pdfmenubar=true, pdffitwindow=false, pdfstartview={FitH}, pdfauthor={AB}, colorlinks=true, linkcolor=MidnightBlue, citecolor=MidnightBlue, } \usepackage[acronym]{glossaries} \glsdisablehyper \setglossarystyle{listgroup} \makeglossaries \newacronym{cmb}{CMB}{cosmic microwave background} \usepackage[pdftex]{graphicx} \usepackage{setspace} \doublespacing \usepackage{physics} \usepackage[font=small,labelfont=bf]{caption} \usepackage{subcaption} \usepackage{pdfpages} \usepackage{bm} \usepackage{wrapfig} \usepackage{adjustbox} \usepackage{dcolumn} \newtheorem{theorem}{Theorem} \DeclareUnicodeCharacter{0301}{\'{e}} \setlength{\headheight}{14.49998pt} \begin{document} \begin{titlepage} \begin{center} {\huge My thesis title} \noindent \rule{\textwidth}{0.4pt} \begin{center} \small{A dissertation submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Physics} \end{center} \vspace{1cm} \includegraphics[width=.2\textwidth,keepaspectratio]{AUSLogo.png} \\ \vspace{0.7cm} {By \\ \large \textbf{Author Name}}\\ Unique Enrolment No.: XXX dated 27/01/2017\\ University Registration No.: XXX of 2016--17 \vspace{0.7cm} {Under the supervision of \\\textbf{Dr. XXX} \\ Professor} \vspace*{0.5cm} Department of Physics\\ XXX School of Physical Sciences \\ XXX University\\ XXX--788011, XXX, India \end{center} \end{titlepage} %\let\cleardoublepage\clearpage \chapter*{} \input{Chapters/Dedication} \frontmatter \chapter*{Acknowledgements} \input{Chapters/Acknowledgements} \chapter*{Abstract} \input{Chapters/Abstract} \tableofcontents \listoffigures \listoftables \printglossary[type=\acronymtype, nonumberlist, title=List of Abbreviations, toctitle=List of Abbreviations] \mainmatter \chapter{Chapter 1}\chaptermark{Introduction} \label{chap:one} \input{Chapters/Chapter1} \backmatter \pagestyle{plain} \end{document} ```
https://tex.stackexchange.com/users/180837
Problem with \chapter* and fncychap in book class
false
Your MWE is hardly minimal and not working, but after commenting out all the bad bits I was able to get the following to work. BTW, you can replace `\\ \vspace(0.7cm)` with `\\[0.7cm]`, at least inside `center` and certain other environments. ``` \documentclass[12pt, a4paper, openright]{book} %\usepackage{emptypage} \makeatletter \let\normalshead=\@makeschapterhead \usepackage[Glenn]{fncychap} %Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup \let\@makeschapterhead=\normalshead \makeatother \let\origdoublepage\cleardoublepage \newcommand{\clearemptydoublepage}{\clearpage{\pagestyle{empty}\origdoublepage}} \let\cleardoublepage\clearemptydoublepage \usepackage{mathptmx} \usepackage{amscd} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{lipsum} \usepackage{float} \usepackage{tabularx} \usepackage{multirow} \usepackage{makecell} \usepackage{verbatim} \usepackage{enumitem} \usepackage{mathpazo} \usepackage[utf8]{inputenc} \usepackage[bindingoffset=0.5in, left=3cm, right=3cm, top=3cm, bottom=3cm]{geometry} \geometry{a4paper} \usepackage{fancyhdr} \pagestyle{plain} \usepackage[dvipsnames]{xcolor} \setcounter{tocdepth}{4} \setcounter{secnumdepth}{4} % \setcounter{secumdepth}{0} \usepackage[backend=biber,bibencoding=utf8, style=numeric-comp, sorting=none]{biblatex} \bibliography{Bibliography} \usepackage{hyperref} \hypersetup{ pdftoolbar=true, pdfmenubar=true, pdffitwindow=false, pdfstartview={FitH}, pdfauthor={AB}, colorlinks=true, linkcolor=MidnightBlue, citecolor=MidnightBlue, } \usepackage[acronym]{glossaries} \glsdisablehyper \setglossarystyle{listgroup} \makeglossaries \newacronym{cmb}{CMB}{cosmic microwave background} \usepackage[pdftex]{graphicx} \usepackage{setspace} \doublespacing \usepackage{physics} \usepackage[font=small,labelfont=bf]{caption} \usepackage{subcaption} \usepackage{pdfpages} \usepackage{bm} \usepackage{wrapfig} \usepackage{adjustbox} \usepackage{dcolumn} \newtheorem{theorem}{Theorem} \DeclareUnicodeCharacter{0301}{\'{e}} \setlength{\headheight}{14.49998pt} \begin{document} \begin{titlepage} \begin{center} {\huge My thesis title} \noindent \rule{\textwidth}{0.4pt} \begin{center} \small{A dissertation submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Physics} \end{center} \vspace{1cm} \includegraphics[width=.2\textwidth,keepaspectratio]{AUSLogo.png} \\ \vspace{0.7cm} {By \\ \large \textbf{Author Name}}\\ Unique Enrolment No.: XXX dated 27/01/2017\\ University Registration No.: XXX of 2016--17 \vspace{0.7cm} {Under the supervision of \\\textbf{Dr. XXX} \\ Professor} \vspace*{0.5cm} Department of Physics\\ XXX School of Physical Sciences \\ XXX University\\ XXX--788011, XXX, India \end{center} \end{titlepage} %\let\cleardoublepage\clearpage \chapter*{} %\input{Chapters/Dedication} \frontmatter \chapter*{Acknowledgements} %\input{Chapters/Acknowledgements} \chapter*{Abstract} %\input{Chapters/Abstract} \tableofcontents \listoffigures \listoftables \printglossary[type=\acronymtype, nonumberlist, title=List of Abbreviations, toctitle=List of Abbreviations] \mainmatter \chapter{Chapter 1}\chaptermark{Introduction} \label{chap:one} %\input{Chapters/Chapter1} \backmatter \pagestyle{plain} \end{document} ```
1
https://tex.stackexchange.com/users/34505
689507
319,870
https://tex.stackexchange.com/questions/689506
1
I am using `XeLaTeX`. I am aware of [The LaTeX Font Catalogue](https://tug.org/FontCatalogue/). Is there anything similar for Xe(La)TeX? Also, is there a way to tell whether a font (say, one listed in the *LaTeX* Font Catalogue) will work in XeLaTeX without just trying it?
https://tex.stackexchange.com/users/277990
What fonts are available in XeLaTeX?
false
``` luafindfont -x "*" ``` lists all available fonts in the TeX and system dirs and does a check for XeTeX. ``` voss >luafindfont -x "*" No. Filename Symbolic name Path X 1. Aboensis-Regular.otf aboensis /usr/local/texlive/2023/texmf-dist/fonts/opentype/public/aboensis/ 1 2. academicons.ttf academicons /usr/local/texlive/2023/texmf-dist/fonts/truetype/public/academicons/ 1 3. Academy Engraved LET Fonts.ttf academyengravedlet /System/Library/Fonts/Supplemental/ 0 4. ACaslonPro-Bold.otf adobecaslonpro /Users/voss/Library/Fonts/Caslon/ 0 5. ACaslonPro-BoldItalic.otf adobecaslonpro [...] ``` The last column has a 0 or 1. * 1: it will definitely be found by XeTeX * 0: it will only be available for XeTeX if it is in a system font directory
4
https://tex.stackexchange.com/users/187802
689510
319,871
https://tex.stackexchange.com/questions/35043
294
For example, I want to make footnotes both at Sentence 1 and Sentence 2 (which are on the same page) to the same footnote. Wikipedia's "References" have this effect.
https://tex.stackexchange.com/users/3970
Reference different places to the same footnote
false
The solution for OpTeX: ``` \def\flabel[#1]{\label[#1]\wlabel{\_printfnotemark}} Text with first footnote\fnote{This is the labeled footnote}\flabel[note1] and more text with a second footnote\fnote{here}. In this new paragraph we have a reference to the first footnote\ref[note1]. \bye ```
2
https://tex.stackexchange.com/users/51799
689512
319,873
https://tex.stackexchange.com/questions/689499
0
I am writing a PhD thesis in the `book` class, and using the `fncychap` package to format chapter titles. The MWE is attached below. The problem I am encountering is that I want the dedication and frontmatter (i.e., `\chapter*{}` and `\chapter*{Abstract}` etc.) without `fncychap` formatting. I have tried all available resources in stack to no avail. Can someone please guide me on how to achieve this? Below is the MWE (any other useful tips regarding any issues also appreciated, thanks in advance!): ``` \documentclass[12pt, a4paper, openright]{book} %\usepackage{emptypage} \usepackage[Glenn]{fncychap} %Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup \let\origdoublepage\cleardoublepage \newcommand{\clearemptydoublepage}{\clearpage{\pagestyle{empty}\origdoublepage}} \let\cleardoublepage\clearemptydoublepage \usepackage{mathptmx} \usepackage{amscd} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{lipsum} \usepackage{float} \usepackage{tabularx} \usepackage{multirow} \usepackage{makecell} \usepackage{verbatim} \usepackage{enumitem} \usepackage{mathpazo} \usepackage[utf8]{inputenc} \usepackage[bindingoffset=0.5in, left=3cm, right=3cm, top=3cm, bottom=3cm]{geometry} \geometry{a4paper} \usepackage{fancyhdr} \pagestyle{plain} \usepackage[dvipsnames]{xcolor} \setcounter{tocdepth}{4} \setcounter{secnumdepth}{4} % \setcounter{secumdepth}{0} \usepackage[backend=biber,bibencoding=utf8, style=numeric-comp, sorting=none]{biblatex} \bibliography{Bibliography} \usepackage{hyperref} \hypersetup{ pdftoolbar=true, pdfmenubar=true, pdffitwindow=false, pdfstartview={FitH}, pdfauthor={AB}, colorlinks=true, linkcolor=MidnightBlue, citecolor=MidnightBlue, } \usepackage[acronym]{glossaries} \glsdisablehyper \setglossarystyle{listgroup} \makeglossaries \newacronym{cmb}{CMB}{cosmic microwave background} \usepackage[pdftex]{graphicx} \usepackage{setspace} \doublespacing \usepackage{physics} \usepackage[font=small,labelfont=bf]{caption} \usepackage{subcaption} \usepackage{pdfpages} \usepackage{bm} \usepackage{wrapfig} \usepackage{adjustbox} \usepackage{dcolumn} \newtheorem{theorem}{Theorem} \DeclareUnicodeCharacter{0301}{\'{e}} \setlength{\headheight}{14.49998pt} \begin{document} \begin{titlepage} \begin{center} {\huge My thesis title} \noindent \rule{\textwidth}{0.4pt} \begin{center} \small{A dissertation submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Physics} \end{center} \vspace{1cm} \includegraphics[width=.2\textwidth,keepaspectratio]{AUSLogo.png} \\ \vspace{0.7cm} {By \\ \large \textbf{Author Name}}\\ Unique Enrolment No.: XXX dated 27/01/2017\\ University Registration No.: XXX of 2016--17 \vspace{0.7cm} {Under the supervision of \\\textbf{Dr. XXX} \\ Professor} \vspace*{0.5cm} Department of Physics\\ XXX School of Physical Sciences \\ XXX University\\ XXX--788011, XXX, India \end{center} \end{titlepage} %\let\cleardoublepage\clearpage \chapter*{} \input{Chapters/Dedication} \frontmatter \chapter*{Acknowledgements} \input{Chapters/Acknowledgements} \chapter*{Abstract} \input{Chapters/Abstract} \tableofcontents \listoffigures \listoftables \printglossary[type=\acronymtype, nonumberlist, title=List of Abbreviations, toctitle=List of Abbreviations] \mainmatter \chapter{Chapter 1}\chaptermark{Introduction} \label{chap:one} \input{Chapters/Chapter1} \backmatter \pagestyle{plain} \end{document} ```
https://tex.stackexchange.com/users/180837
Problem with \chapter* and fncychap in book class
true
### Introduction First of all, since you show a very long document preamble, organize it in a sensible way, so you will discover several inconsistencies. Load packages first, maybe grouped by action type. Only after it do your settings: your preamble will become maintainable, which it currently isn't. First major inconsistency: `mathptmx` and `mathpazo` aren't to be loaded together. It's common that loading font packages (especially if they act on math fonts) leads to weird problems. Do you really need `amscd`? When it appeared it was a welcome addition, but the diagrams it produces don't stand against `tikz-cd` or Xy-pic. Loading `fancyhdr` and then stating `\pagestyle{plain}` is just losing time. The `\bibliography` command is deprecated by `biblatex`. The `pdftex` option should not be used for `graphicx`. The instruction ``` \DeclareUnicodeCharacter{0301}{\'{e}} ``` is very wrong, I'm afraid. If you have problems with the combining acute appearing here and there, fix them; with that code a sequence “e+combining acute” would produce “eé”, which is definitely not what you want. Finally, why commenting out `emptypage` and manually do exactly what the package does? ### The main problem Now the main problem. Since you want to use the Glenn chapter style (I wouldn't even under physical threat), I see no reason for the unnumbered chapters not to share it. The package has no tool for deselecting chapter styles for them. But you can do it “manually”: ``` % chapter header % first save the unnumbered chapter style \ExpandArgs{cc}\NewCommandCopy{latex@makeschapterhead}{@makeschapterhead} \usepackage[Glenn]{fncychap}% are you really sure? % revert \ExpandArgs{cc}\RenewCommandCopy{@makeschapterhead}{latex@makeschapterhead} ``` An alias is made for the command that takes care of unnumbered chapter headers; then the dreadful package is loaded and the alias is used to restore the previous meaning. I also add ``` % fncychap \ChNameVar{\Large} ``` in the settings section: sans serif for the chapter name and number is really out of place. ### The reformatted code I also simplified the title page format. ``` \documentclass[12pt, a4paper, openright]{book} %%% Packages %\usepackage[utf8]{inputenc}% no longer needed % pagination related \usepackage{geometry} \usepackage{emptypage} \usepackage{fancyhdr} \usepackage{setspace} % math \usepackage{amsmath} \usepackage{bm} \usepackage{amsthm} \usepackage{physics} % fonts %\usepackage{mathpazo} %\usepackage{amssymb} \usepackage{newpxtext,newpxmath} % general utilities \usepackage[dvipsnames]{xcolor} \usepackage{graphicx} \usepackage{verbatim} \usepackage{enumitem} \usepackage{pdfpages} \usepackage{wrapfig} \usepackage{adjustbox} % chapter header % first save the unnumbered chapter style \ExpandArgs{cc}\NewCommandCopy{latex@makeschapterhead}{@makeschapterhead} \usepackage[Glenn]{fncychap}% are you really sure? % revert \ExpandArgs{cc}\RenewCommandCopy{@makeschapterhead}{latex@makeschapterhead} % captions \usepackage[font=small,labelfont=bf]{caption} \usepackage{subcaption} % tables \usepackage{tabularx} \usepackage{multirow} \usepackage{makecell} \usepackage{dcolumn} % bibliography \usepackage[backend=biber,bibencoding=utf8, style=numeric-comp, sorting=none]{biblatex} % glossaries and indices \usepackage[acronym]{glossaries} % miscellaneous %\usepackage{lipsum} %\usepackage{float} % HYPERREF (last!) \usepackage{hyperref} %%% Settings related to packages % geometry \geometry{ %a4paper, bindingoffset=0.5in, headheight=14.5pt, left=3cm, right=3cm, top=3cm, bottom=3cm, heightrounded, } % fancyhdr %%% do something here % fncychap \ChNameVar{\Large} % glossaries \glsdisablehyper \setglossarystyle{listgroup} \makeglossaries % hyperref \hypersetup{ pdftoolbar=true, pdfmenubar=true, pdffitwindow=false, pdfstartview={FitH}, pdfauthor={AB}, colorlinks=true, linkcolor=MidnightBlue, citecolor=MidnightBlue, } %%% FINAL TOUCHES \doublespacing \setcounter{tocdepth}{4} \setcounter{secnumdepth}{4} %%% Bib data \addbibresource{Bibliography.bib} % theorems \newtheorem{theorem}{Theorem} % acronyms \newacronym{cmb}{CMB}{cosmic microwave background} \begin{document} \begin{titlepage} \centering {\huge My thesis title\par} \rule{\textwidth}{0.4pt} {\small A dissertation submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Physics\par} \vspace{1cm} \includegraphics[width=.2\textwidth,keepaspectratio]{AUSLogo.png} \vspace{0.7cm} {By \\ \large \textbf{Author Name}}\\ Unique Enrolment No.: XXX dated 27/01/2017\\ University Registration No.: XXX of 2016--17 \vspace{0.7cm} Under the supervision of \\\textbf{Dr. XXX} \\ Professor \vspace*{0.5cm} Department of Physics\\ XXX School of Physical Sciences \\ XXX University\\ XXX--788011, XXX, India \end{titlepage} \chapter*{Dedication} %\input{Chapters/Dedication} \frontmatter \chapter*{Acknowledgements} %\input{Chapters/Acknowledgements} \chapter*{Abstract} %\input{Chapters/Abstract} \tableofcontents \listoffigures \listoftables \printglossary[ type=\acronymtype, nonumberlist, title=List of Abbreviations, toctitle=List of Abbreviations ] \mainmatter \chapter{Introduction} \label{chap:one} %\input{Chapters/Chapter1} %\backmatter \end{document} ```
1
https://tex.stackexchange.com/users/4427
689514
319,874
https://tex.stackexchange.com/questions/689504
1
can someone help me adjust my TOC with the MWE code which I am going to provide. I am trying to add dots between the titles and the page number. The title for the section 2.1, chapter 3 and subsection 3.1.1 is so long that the page number is shown on the second line. What do i need to do in order for the page number to be right aligned on the second line and also be connected with dots. The last thing I am trying to change is the following, i want the space between 3.1.2 and 3.2 to tbe the same as 3.1 and 3.1.1 ``` \documentclass[12pt]{book} \usepackage{etoc} \usepackage{textcase} \etocsetlevel{section}{1} \etocsetlevel{subsection}{2} \etocsettocdepth{subsection} \newlength{\tocleft} \setlength{\tocleft}{2.5cm} % adjust to fit the inner margin defined in geometry \newlength{\tocsep} \setlength{\tocsep}{2em} \etocsetstyle{chapter} {} {} {\etocifnumbered {\makebox[0pt][r]{\textbf{\etocnumber}\hspace{\tocsep}}% \textbf{\etocname}\hfill\etocpage\par} {\textbf{\etocname}\hfill\etocpage}% \par\vspace{3ex}} {} \etocsetstyle{section} {\vspace{-2ex}} {} {\makebox[0pt][r]{\etocnumber\hspace{\tocsep}}% \etocname\hfill\etocpage\par} {\addvspace{3ex}} \etocsetstyle{subsection} {\vspace{0ex}} {} {\makebox[0pt][r]{\etocnumber\hspace{\tocsep}}% \etocname\hfill\etocpage\par} {\addvspace{2ex}} \etocsettocstyle{\chapter*{\contentsname} \thispagestyle{plain}% \leftskip\tocleft\parindent0pt} \begin{document} \tableofcontents \chapter{test} \section{test} \subsection{test} \chapter{test} \section{very long titleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee} \subsection{test} \chapter{very long titleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee} \section{test} \subsection{very long titleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee} \subsection{test} \section{test} \subsection{test} \end{document} ``` Thank you very much.
https://tex.stackexchange.com/users/293330
Can some one help me adjust my MWE for my TOC?
true
I used `\allowbreak\mbox{}\nobreak\dotfill` in place of `\hfill`. As per vertical spaces I replaced original code by something different altogether which add spaces for the first section (only) and for the not-first chapters only. (I also modified a bit the titles to be more realistic) ``` \documentclass[12pt]{book} \usepackage{etoc} \usepackage{textcase} % this is already default so is unneeded %\etocsetlevel{section}{1} %\etocsetlevel{subsection}{2} \etocsettocdepth{subsection} \newlength{\tocleft} \setlength{\tocleft}{2.5cm} % adjust to fit the inner margin defined in geometry \newlength{\tocsep} \setlength{\tocsep}{2em} \etocsetstyle{chapter} {} {\etociffirst{}{\vspace{3ex}}} {\etocifnumbered {\makebox[0pt][r]{\textbf{\etocnumber}\hspace{\tocsep}}% \textbf{\etocname}\allowbreak\mbox{}\nobreak\dotfill\etocpage\par} {\textbf{\etocname}\allowbreak\mbox{}\nobreak\dotfill\etocpage}% \par } {} \etocsetstyle{section} {} {\etociffirst{\vspace{1ex}}{}} {\makebox[0pt][r]{\etocnumber\hspace{\tocsep}}% \etocname\allowbreak\mbox{}\nobreak\dotfill\etocpage\par} {} \etocsetstyle{subsection} {} {} {\makebox[0pt][r]{\etocnumber\hspace{\tocsep}}% \etocname\allowbreak\mbox{}\nobreak\dotfill\etocpage\par} {} \etocsettocstyle{\chapter*{\contentsname} \thispagestyle{plain}% \leftskip\tocleft\parindent0pt} \begin{document} \tableofcontents \chapter{test} \section{test} \subsection{test} \chapter{test} \section{very long titl eee eeee eeeee eee eeee eeeee eee eeee eeeeeeeeeeeeeeee} \subsection{test} \chapter{very long titl eee eeee eeeee eee eeee eeeee eee eeee eeeeeeeeeee} \section{test} \subsection{very long titl eee eeee eeeee eee eeee eeeee eee eeee eeeee eee eeee eeeee} \subsection{test} \section{test} \subsection{test} \end{document} ```
1
https://tex.stackexchange.com/users/293669
689520
319,875
https://tex.stackexchange.com/questions/147077
83
here's my thesis Latex files: <http://www.mediafire.com/download/c7q8z4v6gv864rk/triet_thesis_clean.rar> Please help me to fix the error, I've tried all the things I can find with Google :( : ``` ! Missing \endcsname inserted. <to be read again> \begingroup l.52 ...}intopreamble]Deobfuscation}{{4.1.1}{xii}} The control sequence marked <to be read again> should not appear between \csname and \endcsname. (D:\DH\Luan_Van_Tot_Nghiep\Latex\triet_thesis_test\LVTN.aux ```
https://tex.stackexchange.com/users/19108
Compilation Error "! Missing \endcsname inserted" The control sequence marked <to be read again> should not appear between \csname and \endcsname
false
In some cases, malformed options in `\includegraphics` (from the graphicx package) will cause this error (`! Missing \endcsname inserted.`). One example is forgetting `width=`, thus `\includegraphics[1.0\textwidth]{filename}` instead of `\includegraphics[width=1.0\textwidth]{filename}`. I am uncertain if this occurs in every case or just with particular documentclasses (beamer here) and in the presence of particular other packages.
0
https://tex.stackexchange.com/users/166599
689523
319,877
https://tex.stackexchange.com/questions/689529
4
My MWE ``` \documentclass[twoside]{book}% % 2 Packages only for demonstration purposes: \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \begin{document} %\pushfiguretopage{16}% Push figure to page 16 \begin{figure}[b]% \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \end{document} ``` I would like a figure, now appearing on page 1, to appear exactly on page 16. I could do that with a nonfloating environment -- but that only holds, if I don't alter the text before the figure. Or I could do it with \afterpage -- but then I would have to use \afterpage 16 times and in the past then I got some problems with footnotes ... Is there another possibility, a macro `\pushfiguretopage{16}`, as I called it in my MWE?
https://tex.stackexchange.com/users/202047
How to let a figure appear exactly on page 16?
false
My MWE: ``` \documentclass[twoside]{book}% \RequirePackage{refcount}% For \getpagerefnumber{} %\RequirePackage[maxfloats=256]{morefloats}% For not getting the error "too many unprocessed floats" %\maxdeadcycles=200% % 2 Packages only for demonstration purposes: \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \newcount\invisiblefloat% \invisiblefloat=0 \newcount\safety% \safety=0 \makeatletter% \def\pushfloattopage#1#2{% #1: page to reach \setlength\textfloatsep{0pt}% no distance between text and float makes empty float unvisible \loop\ifnum\safety<40% \advance\invisiblefloat by 1\relax \ifnum\numexpr#1-1\relax < \getpagerefnumber{invisiblefloat\number\invisiblefloat}% \let\iterate\relax \fi \begin{@float}{#2}[b]% No \caption, so \counter{figure} is not increased \label{invisiblefloat\number\invisiblefloat}% test label: where are we? \end{@float}% \advance\safety by 1\relax \repeat }% End \pushfloattopage \makeatother \begin{document} \pushfloattopage{16}{figure}% Push figure to page 16 \begin{figure}[!b]% Place it there, even if the float placement restrictions are not allowing it, as there is already the invisible float \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \end{document} ``` The macro `\pushfloattopage` pushes the figure (or a table) forward by filling up the pages with "invisible figures" (or tables), till the page (16) is reached, where the figure is to be placed. These "invisible figures" don't step up the figure counter, as they don't have a caption. Problems may occur if you want to push the figure forward by an excessive number of pages. Then you should enlarge the maximal number for the counter `\safety` from 40 to something more and perhaps the counter `\maxdeadcycles` as well. And in this case as well as when you want to use this trick several times, you might need to enlarge the maximum number of floats in the queue with the package morefloats. You might use the same macro for tables as well.
0
https://tex.stackexchange.com/users/202047
689531
319,880
https://tex.stackexchange.com/questions/689532
4
I am trying to follow the guidance from this answer to a previous question: [How to draw a ellipse sector from focus](https://tex.stackexchange.com/questions/635389/how-to-draw-a-ellipse-sector-from-focus) In my own code I have written: ``` \begin{tikzpicture} \draw[variable=\t, domain=0:360] plot ({8*(cos(\t))}, {4*sin(\t)}); \fill ({8*cos(30)},{4*sin(30}) circle (.05); \fill ({8*cos(60)},{4*sin(60}) circle (.05); \fill ({-sqrt(12)},0) -- ({8*cos(30)},{4*sin(30)}) arc[start angle = 30, end angle = 60, x radius = 4, y radius = 2] -- cycle; \end{tikzpicture} ``` The perimeter of the ellipse isn't lining up with filled sector, and I'm not sure what I'm doing wrong. I suspect that I'm not sure how `arc` works out the center of the ellipse, but I thought that I was basically doing whatever that answer is doing. It's also possible that I'm misunderstanding or miscalculating some of the relevant geometry.
https://tex.stackexchange.com/users/62274
Drawing a filled arc of an ellipse -- not aligning the ellipses
true
The last line must be: ``` \fill ({-sqrt(12)},0) -- ({8*cos(30)},{4*sin(30)}) arc[start angle = 30, end angle = 60, x radius = 8, y radius = 4]; ``` Result:
5
https://tex.stackexchange.com/users/24644
689534
319,881
https://tex.stackexchange.com/questions/689529
4
My MWE ``` \documentclass[twoside]{book}% % 2 Packages only for demonstration purposes: \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \begin{document} %\pushfiguretopage{16}% Push figure to page 16 \begin{figure}[b]% \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \end{document} ``` I would like a figure, now appearing on page 1, to appear exactly on page 16. I could do that with a nonfloating environment -- but that only holds, if I don't alter the text before the figure. Or I could do it with \afterpage -- but then I would have to use \afterpage 16 times and in the past then I got some problems with footnotes ... Is there another possibility, a macro `\pushfiguretopage{16}`, as I called it in my MWE?
https://tex.stackexchange.com/users/202047
How to let a figure appear exactly on page 16?
false
This uses `\AddToHook` (standarad LaTeX) to reset the `totalnumber` counter. Note that this will not affect `[!]` floats, except that they must stay in order. Also note that you cannot reuse `\pushfiguretopage` until the current one is done (page 16). ``` \documentclass[twoside]{book}% % 2 Packages only for demonstration purposes: \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \newcounter{pushtopage} \makeatletter \newcommand{\pushfiguretopage}[1]{% #1 = page number \setcounter{pushtopage}{#1}% \addtocounter{pushtopage}{-1}% activate on previous page \setcounter{totalnumber}{0}% turn off all floats \global\@colnum=\c@totalnumber% this page too \AddToHook{shipout/after}[myhookid]{\ifnum\value{page}=\value{pushtopage}\relax \setcounter{totalnumber}{3}% default \RemoveFromHook{shipout/after}[myhookid]% \fi}} \makeatother \begin{document} \pushfiguretopage{16}% Push figure to page 16 \begin{figure}[b]% will not work if [!]. \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \lipsum[1-100] \end{document} ``` --- This version uses a barrier float, a float too big to ever print (except for `\clearpage`). It is simply removed from the queue in order to allow the next float to print. This doesn't check to see if the float removed is in fact the barrier float, although it could (`\ht\@id>\textheight`). ``` \documentclass[twoside]{book}% % 2 Packages only for demonstration purposes: \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \newcounter{pushtopage} \makeatletter \newcommand{\pushfiguretopage}[1]{% #1 = page number \begin{figure}[ht]% create barrier float \rule{1.2\linewidth}{1.2\textheight} \end{figure} \setcounter{pushtopage}{#1}% \addtocounter{pushtopage}{-1}% activate on previous page \AddToHook{shipout/after}[myhookid]{\ifnum\value{page}=\value{pushtopage}\relax \@next\@id\@deferlist{}{}% remove next float from queue \@cons\@freelist\@id \RemoveFromHook{shipout/after}[myhookid]% \fi}} \makeatother \begin{document} \pushfiguretopage{16}% Push figure to page 16 \begin{figure}[b]% will not work if [!]. \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \lipsum[1-100] \end{document} ```
6
https://tex.stackexchange.com/users/34505
689540
319,887
https://tex.stackexchange.com/questions/689532
4
I am trying to follow the guidance from this answer to a previous question: [How to draw a ellipse sector from focus](https://tex.stackexchange.com/questions/635389/how-to-draw-a-ellipse-sector-from-focus) In my own code I have written: ``` \begin{tikzpicture} \draw[variable=\t, domain=0:360] plot ({8*(cos(\t))}, {4*sin(\t)}); \fill ({8*cos(30)},{4*sin(30}) circle (.05); \fill ({8*cos(60)},{4*sin(60}) circle (.05); \fill ({-sqrt(12)},0) -- ({8*cos(30)},{4*sin(30)}) arc[start angle = 30, end angle = 60, x radius = 4, y radius = 2] -- cycle; \end{tikzpicture} ``` The perimeter of the ellipse isn't lining up with filled sector, and I'm not sure what I'm doing wrong. I suspect that I'm not sure how `arc` works out the center of the ellipse, but I thought that I was basically doing whatever that answer is doing. It's also possible that I'm misunderstanding or miscalculating some of the relevant geometry.
https://tex.stackexchange.com/users/62274
Drawing a filled arc of an ellipse -- not aligning the ellipses
false
Using `plot` needs bigger number of `sample` to get a smoother curve. Below is a simple way using avaiable smooth curves `ellipse` and `arc`. To get a point on an ellipse, we take polar coordinates, for instance, ``` (30:a and b) ``` where `30` is the angle, `a` and `b` are the major and minor semi-axes. ``` \documentclass[tikz,border=5mm]{standalone} \begin{document} \begin{tikzpicture}[declare function={a=4;b=2;}] \fill[cyan,opacity=.5] (0,0)--(30:a and b) arc(30:60:a and b)--cycle; \draw (0,0) ellipse(a and b); \draw[fill=white] (30:a and b) circle(1pt) (60:a and b) circle(1pt); \end{tikzpicture} \end{document} ```
2
https://tex.stackexchange.com/users/140722
689547
319,892
https://tex.stackexchange.com/questions/689532
4
I am trying to follow the guidance from this answer to a previous question: [How to draw a ellipse sector from focus](https://tex.stackexchange.com/questions/635389/how-to-draw-a-ellipse-sector-from-focus) In my own code I have written: ``` \begin{tikzpicture} \draw[variable=\t, domain=0:360] plot ({8*(cos(\t))}, {4*sin(\t)}); \fill ({8*cos(30)},{4*sin(30}) circle (.05); \fill ({8*cos(60)},{4*sin(60}) circle (.05); \fill ({-sqrt(12)},0) -- ({8*cos(30)},{4*sin(30)}) arc[start angle = 30, end angle = 60, x radius = 4, y radius = 2] -- cycle; \end{tikzpicture} ``` The perimeter of the ellipse isn't lining up with filled sector, and I'm not sure what I'm doing wrong. I suspect that I'm not sure how `arc` works out the center of the ellipse, but I thought that I was basically doing whatever that answer is doing. It's also possible that I'm misunderstanding or miscalculating some of the relevant geometry.
https://tex.stackexchange.com/users/62274
Drawing a filled arc of an ellipse -- not aligning the ellipses
false
While [Raffaele Santoro](https://tex.stackexchange.com/a/689534/16595) found the actual problem, TikZ can draw ellipses and has polar coordinates that can be used with two different radii: ``` \draw circle [x radius=8, y radius=4]; \draw ellipse[x radius=8, y radius=4]; \draw ({-sqrt(12)},0) -- (30:8 and 4) arc[start angle=30, end angle=60, x radius=8, y radius=4] -- cycle; ``` (There is no difference between the path operations `circle` and `ellipse`, it just comes down to the values of `x radius` and `y radius`.) The key system also allows you to specify both *x* and *y* radius for a whole scope and it will be used for all circles, ellipses and arcs unless they're specified again: ``` \begin{tikzpicture}[x radius=8, y radius=4] \draw circle[]; \fill[radius=1pt] (30:8 and 4) coordinate (30) circle [] (60:8 and 4) circle []; \fill ({-sqrt(12)},0) -- (30) arc[start angle = 30, end angle = 60] -- cycle; \end{tikzpicture} ``` --- But this still needs you to specify the radii more than once for the polar coordinates. You can use, of course, always TeX macros, say `\newcommand*\radiusX{8}`: ``` \begin{tikzpicture}[x radius=\xRadius, y radius=\yRadius] \newcommand*\xRadius{8} \newcommand*\yRadius{4} \draw circle[]; \fill[radius=1pt] (30:{\xRadius} and \yRadius) coordinate (30) circle [] (60:{\xRadius} and \yRadius) circle []; \fill ({-sqrt(12)},0) -- (30) arc[start angle = 30, end angle = 60] -- cycle; \end{tikzpicture} ``` Or special PGFMath functions that access those values (of course, this could also just be TeX macros again): ``` \pgfset{declare function={xR=\pgfkeysvalueof{/tikz/x radius}; yR=\pgfkeysvalueof{/tikz/y radius};}} \begin{tikzpicture}[x radius=8, y radius=4] \draw circle[]; \fill (30:xR and yR) coordinate (30) circle [radius=1pt] (60:xR and yR) circle [radius=1pt]; \fill ({-sqrt(12)},0) -- (30) arc[start angle = 30, end angle = 60] -- cycle; \end{tikzpicture} ``` Or you just declare your own PGFMath functions which is the most convenient way to me: ``` \begin{tikzpicture}[declare function={a=8; b=4;}, x radius=a, y radius=b] \draw circle[]; \fill[radius=1pt] (30:a and b) coordinate (30) circle [] (60:a and b) circle []; \fill ({-sqrt(12)},0) -- (30) arc[start angle = 30, end angle = 60] -- cycle; \end{tikzpicture} ```
3
https://tex.stackexchange.com/users/16595
689548
319,893
https://tex.stackexchange.com/questions/689551
2
Metapost can treat Metafont sources with mfplain. Example: ``` mpost -mem=mfplain cmr10.mf ``` Then each glyph is output in separate file like this: ``` cmr10.0 cmr10.1 cmr10.2 ... ``` I cannot find any tutorial how to use these files. How can I import them into FontForge? Can someone tell me what to do?
https://tex.stackexchange.com/users/125730
How to treat files generated by mfplain?
true
metapost output is PostScript. You can look at the files in any text editor, eg `cmr.65` starts ``` %!PS %%BoundingBox: -1 -90 270 270 %%HiResBoundingBox: -0.2 -89.86356 269.1912 269.19066 %%Creator: MetaPost 2.02 %%CreationDate: 2023.06.25:1932 %%Pages: 1 %*Font: cmr10 9.96265 9.96265 30:fe000000000078082 %%BeginProlog %%EndProlog %%Page: 1 1 0.7 0.7 0.7 setrgbcolor newpath 123.94922 209.95695 moveto ... ``` and looking at in `gv` (ghostscript)
3
https://tex.stackexchange.com/users/1090
689553
319,894
https://tex.stackexchange.com/questions/689522
1
Whenever I try to introduce arbitrary cut points with tex4ebook, I'm getting the pages returned in a strange, incorrectly ordered way. Here's my MWE: ``` \newcommand{\mycut}{} \begin{document} A \mycut{} B \mycut{} C \chapter{First} D \mycut{} E \end{document} ``` And my config file: ``` \Preamble{xhtml,svg,no-cut} \NewSection\mycut{} \CutAt{chapter,chapter,mycut} \CutAt{mycut,mycut,chapter} ``` I expected to see my MWE cut into 5 pages, with the pages being ordered like so: A -> B -> C -> Chapter "First" + D (same page) -> E. Instead, I get: A -> Chapter "First" + D (same page) -> B -> C -> E. Does anyone know why this is happening, and how I could instead introduce arbitrary cuts that will cut the way I described above?(In reality, outside my MWE, I would like arbitrary cuts to respect not just chapters correctly, but also sections and parts)
https://tex.stackexchange.com/users/297210
Introducing Arbitrary book cuts for Tex4Ebook
true
TeX4ebook needs that all generated pages are recorded in the reading order using the `\OpfRegisterFile` command. You `\mycut` command doesn't do this, so the resulting pages are placed at the end of the Epub file, after the page produced by the `\chapter` command. The following configuration file should fix that: ``` \Preamble{xhtml,svg,no-cut} \NewSection\mycut{} \csgappto{c:mycut}{\OpfRegisterFile}% \csgappto{c:chapter}{\OpfRegisterFile}% \CutAt{chapter,chapter,mycut} \CutAt{mycut,mycut,chapter} \begin{document} \EndPreamble ``` The important code is this: ``` \csgappto{c:mycut}{\OpfRegisterFile}% \csgappto{c:chapter}{\OpfRegisterFile}% ``` This code adds the `\OpfRegisterFile` to the hook used by TeX4ht before the section title. It should ensure that the `\OpfRegisterFile` is called on the correct file.
1
https://tex.stackexchange.com/users/2891
689557
319,895
https://tex.stackexchange.com/questions/571954
21
Has anyone had the chance to test the compatibility of MacTeX on the new M1 Macs (Mac Mini, Macbook Air and Macbook Pro)? What is the performance like?
https://tex.stackexchange.com/users/136988
Apple Silicon M1 Mac compatibility for MacTeX, and performance
false
According to <https://tug.org/texlive/doc/texlive-en/texlive-en.html#news>, **binaries** for nativ support on ARM and Intel are provided since **MacTeX 2021** (see the link for more details). This is compatible with <https://isapplesiliconready.com/> and <https://doesitarm.com/app/mactex>.
0
https://tex.stackexchange.com/users/128553
689571
319,901
https://tex.stackexchange.com/questions/689574
10
I'm learning **plain** TeX as a nerdy *hobby*. My current project involves trying to divide the page into unequal columns. I only want to use boxes and glue, with *no external* dependencies, e.g. `eplain`. Before diving the page I wanted to learn how to frame a box, to assist my learning through visualisation. My attempt to visualise the writing area i.e. `vsize` and `hsize` produced an overfull `hbox`. My minimal working example is: ``` \hrule \hbox to \hsize{ \vrule \vbox to \vsize{ \vfill \hfill } \vrule } \hrule \bye ``` The output was: ``` Overfull \hbox (5.24442pt too wide) detected at line 9 Overfull \vbox (10.4pt too high) ``` Can someone please explain to me what is causing the boxes to overflow given that I am only using glue. My hunch is that I am placing my box inside an existing "default" box, which it is overflowing. I am using `ubuntu 22.04` and `pdftex --version` outputs the following: ``` pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) kpathsea version 6.3.4/dev Copyright 2021 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.37; using libpng 1.6.37 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with xpdf version 4.03 ``` Thanks.
https://tex.stackexchange.com/users/295127
Understanding boxes at the primitive level
true
Your `\hbox to\hsize` includes space from the the end of line 2, `\vrule` (width 0.4pt), `\vbox` (width `\hsize` because of `\hfill` inside it), space from the end of line 7, `\vrule` (width 0.4pt). The sum of this material has its width greater than `\hsize` by 5.24442pt. The height of this box is equal to height of `\vbox` inside it. The first `\hrule` is inserted to the first baseline (its distance is `\topskip`=10pt for the upper boundary of the `\box255` propagated to the output routine. Then there is the box of `\vsize` height and then the second `\hrule` (0.4pt). So the `\box255` has its height: 10pt+`\vsize`+0.4pt. So, the output routine reports `\vbox` 10.4pt too high.
10
https://tex.stackexchange.com/users/51799
689578
319,904
https://tex.stackexchange.com/questions/689453
0
I have this path "~/Library/Mobile Documents/com~apple~CloudDocs/Sync/160329\_3DPP.bib". I cannot change that since the .bib file is synced through iCloud and updated frequently. I read that it is advised to use filename without spaces & special characters in latex. Isn't there any workaround yet (including packages that might handle this)? I found some old & related topics that cannot provide a working solution, such as - * [How to include graphics with spaces in their path?](https://tex.stackexchange.com/q/8422/162893) **MRE:** .[tex](/questions/tagged/tex "show questions tagged 'tex'") file ``` \documentclass[11pt]{article} % use "amsart" instead of "article" for AMSLaTeX format %\geometry{a4paper} % ... or a4paper or a5paper or letterpaper or... \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent \usepackage[sort&compress]{natbib} \usepackage[sectionbib]{chapterbib}%bibliography after each chapter \usepackage{hyperref} \title{Title} \author{massisenergy} %\date{} % Activate to display a given date or no date \begin{document} Lorem Ipsum Odor \cite{2020FutomaThe-myth} \bibliographystyle{unsrt} \bibliography{/Users/massisenergy/Library/Mobile Documents/com~apple~CloudDocs/Sync/160329_3DPP.bib} ``` 1. After running [xelatex](/questions/tagged/xelatex "show questions tagged 'xelatex'") > > . > . > . > (/usr/local/texlive/2023/texmf-dist/tex/latex/base/ts1cmr.fd) > > > Package chapterbib Warning: The sectionbib option changes "\section \*" to "\sec > tion \*" in \thebibliography on input line 285. > (./2023\_RS\_AI.out) (./2023\_RS\_AI.out) [1] (./2023\_RS\_AI.bbl > > > Package natbib Warning: Empty `thebibliography' environment on input line 3. > ) [2] (./2023\_RS\_AI.aux) ) > Output written on 2023\_RS\_AI.pdf (2 pages). > SyncTeX written on 2023\_RS\_AI.synctex.gz. > Transcript written on 2023\_RS\_AI.log. > > > 2. After doing running [bibtex](/questions/tagged/bibtex "show questions tagged 'bibtex'") > > This is BibTeX, Version 0.99d (TeX Live 2023) > The top-level auxiliary file: 2023\_RS\_AI.aux > The style file: unsrt.bst > White space in argument---line 18 of file 2023\_RS\_AI.aux > : \bibdata{/Users/massisenergy/Library/Mobile > : Documents/com\protect \unhbox \voidb@x \protect \penalty @M \ {}apple\protect \unhbox \voidb@x \protect \penalty @M \ {}CloudDocs/Sync/160329\_3DPP.bib} > I'm skipping whatever remains of this command > I found no database files---while reading file 2023\_RS\_AI.aux > Warning--I didn't find a database entry for "2020FutomaThe-myth" > (There were 2 error messages) > > >
https://tex.stackexchange.com/users/162893
Include a file path (.bib) containing spaces & special characters
false
I wondered that this must be fairly common situation, like using multiple machines or using files which are updated & synced frequently. I'm just posting the answer from the comment by @Marijin in my question, using the following links - * [Centralised .bib file on Mac](https://tex.stackexchange.com/a/337969/162893) * [How do I add a .sty file to my MacTeX/TeXShop installation?](https://tex.stackexchange.com/a/10256/162893) This is an elegant solution, which not only solves my problem, but also provides ways to use other types of 'custom' files with LaTeX. 1. Install & use the package: [make-local-texmf](https://github.com/amunn/make-local-texmf/tree/master) 2. Copy the directory/folder structure into my sync folder: `rsync -avh ~/Library/texmf ~/Library/Mobile\ Documents/com~apple~CloudDocs/Sync/texmf` 3. Move my bibliography file named `160329_MASTER.bib` in the `~/Library/Mobile\ Documents/com~apple~CloudDocs/Sync/texmf/bibtex/bib/` folder. 4. Delete the original folder created by `make-local-texmf` (otherwise running the following command will create another alias inside the `~/Library/texmf` directory, like this `~/Library/texmf/texmf/`) 5. Symlink it using: `ln -s /Users/massisenergy/Library/Mobile\ Documents/com~apple~CloudDocs/Sync/texmf ~/Library/texmf` 6. MRE: [xelatex](/questions/tagged/xelatex "show questions tagged 'xelatex'") + then [bibtex](/questions/tagged/bibtex "show questions tagged 'bibtex'") + then twice [xelatex](/questions/tagged/xelatex "show questions tagged 'xelatex'") this file: ``` \documentclass[11pt]{article} % use "amsart" instead of "article" for AMSLaTeX format %\geometry{a4paper} % ... or a4paper or a5paper or letterpaper or... \usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent \usepackage[sort&compress]{natbib} \usepackage[sectionbib]{chapterbib}%bibliography after each chapter \usepackage{hyperref} \title{Title} \author{massisenergy} %\date{} % Activate to display a given date or no date \begin{document} Lorem Ipsum Odor \cite{2020FutomaThe-myth} \bibliographystyle{unsrt} \bibliography{MASTER_since160329.bib} ``` **BONUS:** I was pleasantly surprised to find that even I changed my bib file name (from to `160329_3DPP.bib` to `MASTER_since160329.bib`), still [bibdesk](/questions/tagged/bibdesk "show questions tagged 'bibdesk'") opened the right file without any error when I relaunched it! Placing the `.bib` file in particular directory or symlinking it must be the reason I'm going to move my (.sty) files also to benefit from this... Works like a charm Thanks to all the folks for your active participation & help
0
https://tex.stackexchange.com/users/162893
689586
319,906
https://tex.stackexchange.com/questions/689588
4
The source below compiles successfully ``` \documentclass{article} \begin{document} \let\lbrace={ \let\rbrace=} \def\hello#1{[Hello, #1!]} \hello{Amy} \hello\lbrace Bob \def\hellol{\hello\lbrace} \def\hellor{\rbrace} \hellol David \hellor \end{document} ``` with output as follows: ``` [Hello, Amy!] [Hello, !]Bob [Hello, !]David ``` Obviously, `Bob` and `David` aren't evaluated as arguments of macro `\Hello`, which sugguests that implicit characters `\lbrace` and `\rbrace` don't work as group, even though they have been let to begingroup `{` and endgroup `}` respectively. Moreover, note that `\hello\lbrace Bob` is not in balance in form since there is no `\rbrace` to match, but I confuse why it does work with no error, though the result differs from what I expect originally. I think TeX absorbs control sequences like `\lbrace` and `\rbrace` into token list, and when TeX finds them useless, TeX discards them from list. Is that true?
https://tex.stackexchange.com/users/299648
Is implicit character to be discarded from token list silently when TeX finds it useless?
true
You can't use `\lbrace` and `\rbrace` in order to delimit the argument to a macro. But they work for grouping (which is a distinct concept from macro argument). There is no “discarding”. If you do ``` \def\foo#1{X#1X} ``` and call ``` \foo\lbrace a\rbrace ``` TeX will take `\lbrace` as `#1` and will replace ``` X\lbrace Xa\rbrace ``` Here's a full plain TeX example, where I use `\bgroup` and `\egroup` that are defined in the format by ``` \let\bgroup={ \let\egroup=} ``` so they're the same as your `\lbrace` and `\rbrace` (by the way, you're so redefining existing macros). ``` \def\foo#1{X#1X} \foo\bgroup a\egroup b \foo\bgroup \it a\egroup b \bye ``` You see that `\it` is confined to the group `\bgroup \it a\egroup` that is the result of macro expansion according to what I wrote at the beginning.
4
https://tex.stackexchange.com/users/4427
689589
319,907
https://tex.stackexchange.com/questions/689582
3
sometimes I like to use `-a warning` with make4ht to reduce the amount of information printed. The big problem is that it does not stop at first error. It keeps running. When I change to `-a debug` it stops at the error. How can one use `-a warning` but make it stop at the first error? Here is an example of `a.tex` which loads image `ZZZ` which does not exist. This is run using the command ``` make4ht -ulm default -a warning a.tex "htm,mathjax" ``` Here is MWE ``` \documentclass[12pt]{book} \usepackage{graphicx} \begin{document} My document \includegraphics[width=\textwidth]{ZZZ} \end{document} ``` Notice now what happens when I use `-a warning` ``` >make4ht -ulm default -a warning a.tex "htm,mathjax" [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. ``` Those are 3 passes it did. It did not stop at first error but kept going. Compare to what happens when using `-a debug` ``` make4ht -ulm default -a debug a.tex "htm,mathjax" [INFO] mkparams: Output dir: [INFO] mkparams: Compiler: dvilualatex etc... (./a.aux) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd) ! LaTeX Error: File `ZZZ' not found. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.15 \includegraphics[width=\textwidth]{ZZZ} ? ``` And compilation stops and does not go to next phase. This is what I want. I just want the same with `-a warning`. How to do that? In my builds, one tex4ht pass can take hrs. I do not want to wait many hrs only to find later that there was an error and I did not see it. I want my makefile to stop at the first error to save time. ps. I did try all `a` [options](https://mirror.las.iastate.edu/tex-archive/support/make4ht/make4ht-doc.pdf) ``` debug, info, status, warning, error, fatal ``` And only `-a debug` stops at first error. `fatal` does not display anything. So I have no idea where it stops as nothing at all is printed on screen (maybe because there was no FATAL error?) ``` >make4ht -ulm default -a status a.tex "htm,mathjax" [STATUS] make4ht: Conversion started [STATUS] make4ht: Input file: a.tex [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. [STATUS] make4ht: Conversion finished ``` And ``` >make4ht -ulm default -a error a.tex "htm,mathjax" [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename Line Message [ERROR] htlatex: ./a.tex 15 LaTeX Error: File `ZZZ' not found. ``` And ``` >make4ht -ulm default -a fatal a.tex "htm,mathjax" > ``` **It will be great if there is an option that shows same level of output as -a warning but also stops on error just -a debug does** TL 2022
https://tex.stackexchange.com/users/14594
Using -a warning in make4ht does not stop at first error
true
This is by design. The `-a debug` option uses the default LaTeX behaviour, so it prints all terminal output, and also stops on errors, like LaTeX does by default. In all other `make4ht` log levels, LaTeX runs in the non stop mode and the terminal output is read by `make4ht` and then parsed for errors or warnings. In theory, you could try to run something like this: ``` $ make4ht -m warning -m draft sample.tex "" "" "" "-interaction=errorstopmode ``` It passes the `-interaction=errorstopmode` to the underlying LaTeX compiler. It stops on errors, but as the output is suppressed by `make4ht`, you don't see any error messages, the compilation just stops and waits for your input. So this isn't really useful. What I think could be useful in your case, is to stop the compilation on the first error. TeX compiler has an option for that, `-halt-on-error`. You can use the following build file to use this option with `make4ht`: ``` Make:htlatex { latex_par="-halt-on-error"} ``` When you now compile your file with: ``` $ make4ht -a warning -e build.lua sample.tex ``` Now, `make4ht` will stop processing your file on the first error, which will result in faster compilation.
2
https://tex.stackexchange.com/users/2891
689590
319,908
https://tex.stackexchange.com/questions/689556
1
I am compiling a fillable PDF from TeX with pdfLaTeX. It works fine when looking at the PDF on a Laptop or PC, however, when opening the document from my cellphone with Acrobat Reader or similar PDF readers it is awful. Especially, it is not possible to use the dropdown menus, neither is it possible to choose the birth date appropriately and the choice boxes display inappropriate symbols. Does anyone have any advice? It is urgent and I have no idea what to do. Thanks in advance. ``` \documentclass[a4paper,12pt]{article} \usepackage{amssymb} % needed for math \usepackage{amsmath} % needed for math \usepackage[utf8]{inputenc} % this is needed for german umlauts \usepackage[ngerman]{babel} % this is needed for german umlauts \usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf \usepackage[margin=2.5cm]{geometry} %layout \usepackage{xcolor} \usepackage{eurosym} \usepackage{hyperref} % this is needed for forms and links within the text \begin{document} \title{NEUKUNDEN-FORMULAR} \author{Oliver Kristen} \date{\today} \section{NEUKUNDEN-FORMULAR\\FÜR PERSONENBETREUER:INNEN} \vspace{1.cm} %\TextField[format ={AFDate_FormatEx("dd.mm.yyyy");}, % keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");},bordercolor=black]{Geburtsdatum} \begin{Form}[action=mailto:o.kristen@wp-kristen.at,encoding=html,method=post] \subsection{\textbf{Persönliche Daten:}} \vspace{0.3cm} \begin{tabbing} \def\labelline#1#2{\lbl{#1}\vbox{\hbox{\TextField[name=vor,width=#2,bordercolor=black]{\null}}\kern2pt\hrule}} xxxxxxxxxx: \= \kill % This is needed for the right tab width Nachname(n): \> \TextField[bordercolor=black,name=name,width=5cm,charsize=12pt] {\mbox{}} Vorname(n): \hspace{0.25cm} \TextField[bordercolor=black,name=vor,width=5cm,charsize=12pt] {\mbox{}} \\[6pt]\\ SV-Nr.: \> \TextField[bordercolor=black,,maxlen=11,value=xxxx-ddmmyy,name=sv,width=5cm,charsize=12pt,calculate={this.getField('text').value=Number(this.getField('text').value)}] {\mbox{}} Geburtsdatum: \TextField[format ={AFDate_FormatEx("dd.mm.yyyy");}, keystroke={AFDate_KeystrokeEx("dd.mm.yyyy");},bordercolor=black,name=date,maxlen=10,value=dd.mm.yyyy,width=5cm,charsize=12pt] {\mbox{}} \\[6pt]\\ Heimatland: \> \ChoiceMenu[bordercolor=black,combo,name=city,width=5cm,charsize=12pt,default=Karlsruhe]{\mbox{}} {Bulgarien, Rumänien, Slowakei, Tschechien, Ungarn} {\mbox{}} Geschlecht: \hspace{0.52cm} \ChoiceMenu[bordercolor=black,radio,radiosymbol=, default=,name=sex,charsize=12pt]{\mbox{}}{Mann=m,Frau=f} \\[6pt] {\mbox{}} \\[6pt] Telefon-Nr.: \> \TextField[bordercolor=black,,maxlen=25,value=00-Country-Code-xxxxx,name=telefon,width=5cm,charsize=12pt,calculate={this.getField('text').value=Number(this.getField('text').value)}] {\mbox{}} Email-Adresse: \TextField[bordercolor=black,name=email,maxlen=40,width=7cm,charsize=12pt] {\mbox{}} \\[6pt]\\ Kommunikations-Modus\\ \underline{Sprache}: \> \ChoiceMenu[bordercolor=black,combo,name=Sprache,width=3.5cm,charsize=12pt,default=Karlsruhe]{\mbox{}} {Deutsch, Muttersprache (mit Google-Translate), Englisch} {\mbox{}} \underline{Form}: \ChoiceMenu[bordercolor=black,radio,radiosymbol=\ding{54}, default=f,name=medium,charsize=12pt]{\mbox{}}{Email=Email,Whatsapp/Viber=Whatsapp} \\[6pt] {\mbox{}} \\[6pt]\\ \end{tabbing} %\begin{Form} % \TextField[width=6em,charsize=12pt,maxlen=4,name=text,calculate={this.getField('text').value=Number(this.getField('text').value)}]{Text} %\end{Form} \subsection{\textbf{Angefragte Leistungen (Services):}} %\CheckBox[name=Steuer,charsize=10pt]{Aktuelle Steuererklärung (\euro 150)} %\CheckBox[name=Steuerkorr,charsize=10pt]{Korrektur Steuerbescheid} \\ %\CheckBox[name=SVS:Korr,charsize=10pt]{SVS-Korrektur (\euro 40-\euro 50) } %\CheckBox[name=FB,charsize=10pt]{Familienbeihilfe (\euro 40-\euro 50) } \def\LayoutCheckField#1#2{% label, field #2 #1% } Wir überprüfen grundsätzlich immer die Voraussetzungen und Möglichkeiten .... \vspace{1cm} \begin{tabular}{ p{9cm}p{7.5cm}} \textbf{Erstmalige Abgabe} & \textbf{Korrekturen}\\ \mbox{\CheckBox[name=Steuer,bordercolor=black]{Aktuelle Steuererklärung (\euro 150,00/Jahr)}}& \mbox{\CheckBox[name=KorrSteuer]{Korrektur Steuerbescheid (\euro 150,00/Jahr)}}\\ \\ \\ Jahr(e): \ChoiceMenu[bordercolor=black,combo,name=JahreSteuer,width=5cm,charsize=12pt,default=Karlsruhe]{\mbox{}} {2022, 2021, 2020, 2019, 2018,2021-2022,2020-2022,2019-2022,2018-2022, 2020-2021,2019-2021,2018-2021,2019-2020,2018-2020,2018-2019} & Jahr(e): \ChoiceMenu[combo,name=KorrJahreSteuer,width=5cm,charsize=12pt,default=Karlsruhe]{\mbox{}} {2022, 2021, 2020, 2019, 2018,2021-2022,2020-2022,2019-2022,2018-2022, 2020-2021,2019-2021,2018-2021,2019-2020,2018-2020,2018-2019}\\ \\ \\ \scriptsize Die Korrektur der SVS-Beiträge von alten Jahren ist nur durch die Korrektur der alten Steuerbescheide oder durch Abgabe der Steuererklärungen möglich. Nur das aktuelle Jahr (z.B. 2023 in 2023) kann teilweise direkt bei der SVS korrigiert werden (links ''SVS-Korrektur''). \\\scriptsize Daher sind oft verschiedene Korrekturen gleichzeitig notwendig.& \mbox{\CheckBox[name=korrsvs]{SVS-Korrektur aktuelles Jahr (\euro 40,00)}} \\ \\ \mbox{\CheckBox[name=FBneu,,bordercolor=black]{Familienbeihilfe-Erstantrag (\euro)}} & \mbox{\CheckBox[name=FB,bordercolor=black]{Familienbeihilfe-Folgeantrag (\euro)}}\\ \mbox{\CheckBox[name=Pension,,bordercolor=black]{Pensionsanträge (\euro)}} & \mbox{\CheckBox[name=Fragebogen,bordercolor=black]{Fragebogen Finanzamt (\euro)}} \\ \end{tabular} \Submit{Submit} \Reset{\textbf{Löschen}} \hfill ~\\ \end{Form} \end{document} ```
https://tex.stackexchange.com/users/299684
Visibility of fillable PDF from TeX in Android PDF viewer
false
Thank you very much for your answer! Sorry, but I do not quite know how to execute your changes, would you mind posting the entire code with your changes, if you have a minute? Thanks in advance.
0
https://tex.stackexchange.com/users/299684
689591
319,909
https://tex.stackexchange.com/questions/689594
0
I'm trying to draw a simple graph using tikz datavisualisation but I run into a "Dimension too large". ``` \documentclass[a4paper,10pt]{book} \usepackage{tikz} \usetikzlibrary{datavisualization.formats.functions} \begin{document} \tikz \datavisualization [scientific axes=clean, visualize as smooth line] data [format=function] { var x : interval [1338:5500] samples 100; func y = (1000000 / \value{x} - 28 - 137.4) * 64 * 1.25; }; \end{document} ``` Any idea on how I can fix this ?
https://tex.stackexchange.com/users/170313
TikZ datavisualization and Dimension too large
false
Here is an alternative with `pgfplots` ``` \documentclass[a4paper]{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ domain =1338:5000, samples=100, ] \addplot[smooth] {1000000 / x - 28 - 137.4) * 64 * 1.25}; \end{axis} \end{tikzpicture} \end{document} ```
0
https://tex.stackexchange.com/users/216067
689596
319,912
https://tex.stackexchange.com/questions/689594
0
I'm trying to draw a simple graph using tikz datavisualisation but I run into a "Dimension too large". ``` \documentclass[a4paper,10pt]{book} \usepackage{tikz} \usetikzlibrary{datavisualization.formats.functions} \begin{document} \tikz \datavisualization [scientific axes=clean, visualize as smooth line] data [format=function] { var x : interval [1338:5500] samples 100; func y = (1000000 / \value{x} - 28 - 137.4) * 64 * 1.25; }; \end{document} ``` Any idea on how I can fix this ?
https://tex.stackexchange.com/users/170313
TikZ datavisualization and Dimension too large
true
Literally copied from tex.stackexchange.com/a/518311. ``` \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{datavisualization.formats.functions} \newcommand{\pgfmathparseFPU}[1]{\begingroup% \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}% \pgfmathparse{#1}% \pgfmathsmuggle\pgfmathresult\endgroup} \begin{document} \begin{tikzpicture} \datavisualization [scientific axes=clean, visualize as smooth line, /pgf/data/evaluator=\pgfmathparseFPU] data [format=function] { var x : interval [1338:5500] samples 100; func y = (1000000 / \value{x} - 28 - 137.4) * 64 * 1.25; }; \end{tikzpicture} \end{document} ```
2
https://tex.stackexchange.com/users/nan
689597
319,913
https://tex.stackexchange.com/questions/687380
2
I need to make the edge (2,4') curvy so that it doesn't overlap with (2,2'). How can I do that? ``` \documentclass[10pt]{article} \usepackage{amstext} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{tikz} \usepackage{filecontents} \usepackage{graphicx} \usetikzlibrary{arrows} \usetikzlibrary{shapes.geometric} \usetikzlibrary{positioning,arrows.meta,patterns,shadows} \usetikzlibrary{graphs,graphs.standard,quotes} \usetikzlibrary{shapes.arrows,patterns} \usetikzlibrary{positioning,shapes,calc,decorations.pathmorphing} \begin{document} \begin{tikzpicture}[scale = 0.6] \tikzset{% This is the style settings for nodes cli/.style={circle,ball color=black,inner sep=0pt,minimum size=5pt],draw, general shadow={fill=gray!60,shadow xshift=1pt,shadow yshift=-1pt}}, c1/.style={very thick,green}, c2/.style={very thick,blue}} \node[cli] (v1) at (-2,-2) {}; \node[cli] (v2) at (-2,2) {}; \node[cli] (v3) at (2,2) {}; \node[cli] (v1p) at (1,-3) {}; \node[cli] (v2p) at (1,-1) {}; \node[cli] (v3p) at (3,-1) {}; \node[cli] (v4p) at (3,-3) {}; \node (l1) at (-2.75,-2) {$1$}; \node (l2) at (-2.75,2) {$2$}; \node (l3) at (2.75,2) {$3$}; \node (l1p) at (0.85,-0.25) {$2'$}; \node (l2p) at (0.85,-3.75) {$1'$}; \node (l3p) at (3.15,-0.25) {$3'$}; \node (l4p) at (3.15,-3.75) {$4'$}; \draw[c1] (v2) -- (v1); \draw[c1] (v2) -- (v3); \draw[c2] (v1) -- (v3); \draw[c1] (v2p) -- (v1p); \draw[c1] (v2p) -- (v3p); \draw[c2] (v1p) -- (v4p); \draw[c1] (v4p) -- (v3p); \draw[c2] (v4p) -- (v2p); \draw[c2] (v1p) -- (v3p); \draw[c2] (v2) -- (v1p); \draw[c2] (v2) -- (v2p); \draw[c2] (v2) -- (v3p); \draw[c2] (v2) -- (v4p); \draw[c1] (v3) -- (v1p); \draw[c1] (v3) -- (v2p); \draw[c1] (v3) -- (v3p); \draw[c1] (v3) -- (v4p); \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/239907
Making an edge curvy
false
You want to use the `bend right` options for the `to` path operations like so: ``` \draw[c2] (v2) to[bend right] (v4p); \draw[c2] (v2) to[bend right=90, looseness=2] (v4p); ``` For more information about how to use them, refer to the manual on the always loaded [`topaths` library](https://tikz.dev/library-edges). Of course, you can always use the [`.. controls` path operations](https://tikz.dev/tikz-paths#sec-14.3) but the keys of `topaths` library makes things usually much easier. Since you're loading the `graphs` library let me use it in your example. Code ---- ``` \documentclass[tikz]{standalone} \usetikzlibrary{graphs, positioning, quotes, shadows} \tikzset{ graphs/tikz/.code=\tikzset{#1}, math nodes/.style={execute at begin node=$, execute at end node=$}} \begin{document} \begin{tikzpicture}[ cli/.style={ circle, ball color=black, inner sep=0pt, minimum size=5pt, draw, general shadow={fill=gray!60, shadow xshift=1pt, shadow yshift=-1pt}}, c1/.style={very thick, green}, c2/.style={very thick, blue}, every label quotes/.append style={math nodes}, on grid, node distance=42mm, new set=primes, ] \graph[no placement, nodes=cli, typeset=]{ 1["1" left], 2["2" left, above=of 1], 3["3" right, right=of 2], @[coordinate, below=of 3], {[tikz={node distance=10.5mm and 10.5mm, label distance=4pt}, nodes={set=primes}] 1'["1'" below, below left=of @], 2'["2'" above, above left=of @], 3'["3'" above, above right=of @], 4'["4'" below, below right=of @] }, {[edges=c1] 1 -- 2 -- 3 -- (primes), 1' -- 2' -- 3' -- 4' }, {[edges=c2] 1 -- 3, 1' -- 4', 4'[> bend right=10], 2 -- (primes) } }; \end{tikzpicture} \end{document} ``` Output ------
2
https://tex.stackexchange.com/users/16595
689600
319,914
https://tex.stackexchange.com/questions/689603
1
I've noticed that I have wrong links in the ToC when I use a command to reset the section counter within a part in a report document (I haven't tried with another document). Links go to the first "part" of the document, and ignore the rest. Clearly, `\xpretocmd` is messing with some internal counter. I've read plenty on the `\phantomsection`, but it applies to unnumbered sections. I want the "sections" within "part" to be numbered without referring to the part (it's too long), and starting from the beginning when entering a new "part". Any idea how I can achieve that behaviour ? Here's a minimal example that has the weird behaviour mentionned. ``` \documentclass[a4paper, 11pt]{report} %% define usepackage \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} % "Computer Modern" modern font \usepackage{graphicx} % Include images \usepackage[english]{babel} % Handling english. \usepackage{hyperref} \usepackage{xpatch} %% --- end define usepackage --- %% Changing The naming of the parts, section, subsections and subsubsections \renewcommand{\thepart}{\Roman{part}} % \part as roman numerals \renewcommand{\thesection}{\arabic{section}} % Removing part name from section and subsection \xpretocmd{\part}{\setcounter{section}{0}}{}{} %Setting section counter to zero when entering a part %% Infos \title{A good title} \author{Some Guy} \begin{document} \maketitle \tableofcontents \newpage \part{The first part} \section{The first section} \subsection{A subsection} Foo \subsection{Another one} Bar \part{The second part} \section{A first section} \subsection{My mind is blown} FooBar \subsection{So is mine !} BarFoo \end{document} ```
https://tex.stackexchange.com/users/298813
Wrong links in ToC when using \xpretocmd command
true
You don't need `xpatch` for this, but ``` \counterwithin*{section}{part} ``` which will also fix the problem with links, because it modifies `\theHsection` for you (see the manual of `hyperref`). Thanks to Ulrike for pointing it out. You might do it with `\xpretocmd`, but it's overkill and would also need `\renewcommand{\theHsection}{\thepart.\arabic{section}}` in order to get unique anchors. I also recommend to load `bookmark` and to modify the page numbering for the title page, or there would be a duplicate page link. ``` \documentclass[a4paper, 11pt]{report} %% define usepackage \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} %\usepackage[utf8]{inputenc}% no longer needed \usepackage[T1]{fontenc} \usepackage{lmodern} % "Computer Modern" modern font \usepackage{graphicx} % Include images %\usepackage[english]{babel} % Handling english. (not needed) \usepackage{hyperref} \usepackage[numbered]{bookmark} %% --- end define usepackage --- %% Changing The naming of the parts, section, subsections and subsubsections %\renewcommand{\thepart}{\Roman{part}} % \part as roman numerals (is default) \renewcommand{\thesection}{\arabic{section}} % Removing chapter number from section and subsection \counterwithin*{section}{part} %% Infos \title{A good title} \author{Some Guy} \begin{document} \pagenumbering{alph} \maketitle \cleardoublepage \pagenumbering{arabic} \tableofcontents \part{The first part} \section{The first section} \subsection{A subsection} Foo \subsection{Another one} Bar \part{The second part} \section{A first section} \subsection{My mind is blown} FooBar \subsection{So is mine!} BarFoo \end{document} ``` Note that parts use Roman numerals by default. Instead `\thesection` uses `\thechapter` which is what you want to remove. If you want that the table of contents is page 2, remove `\pagenumbering{alph}` and `\pagenumbering{arabic}`, replacing the latter with `\setcounter{page}{2}`.
1
https://tex.stackexchange.com/users/4427
689606
319,917
https://tex.stackexchange.com/questions/686903
0
Here is the code: ``` \documentclass[a4paper,twoside,12pt]{article} \usepackage[margin=1.5cm]{geometry} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb,fge,stackengine,scalerel} \usepackage{mathtools} \usepackage{parskip} \usepackage{xcolor} \usepackage{enumitem} \usepackage{graphicx} \usepackage{ushort} \usepackage{colortbl} \usepackage{csquotes} \usepackage{xfrac} \usepackage{BOONDOX-calo} \usepackage[mathscr]{eucal} \usepackage{upgreek} \usepackage{fourier} \DeclareMathAlphabet\mathrsf{U}{rsfso}{m}{n} \pagestyle{empty} \appto\normalsize{\belowdisplayshortskip=\belowdisplayskip} \renewcommand{\vec}{\boldsymbol} \begin{document} $\vec f(\vec x)\vec\cdot\vec f(\vec y)=\vec x\vec\cdot\vec y$ \end{document} ``` If I don’t include the fourier package, \cdot gets bolded. However I really want to use the fourier package, as well as have bolded \cdot’s. Can anybody help?
https://tex.stackexchange.com/users/297887
\boldsymbol does not boldify \cdot
false
You're out of luck, because `fourier` doesn't offer a bold math symbol font. You can use `erewhon` for the text and `newtxmath` with the `utopia` option for math. ``` \documentclass[a4paper,twoside,12pt]{article} \usepackage{amsmath} \usepackage{erewhon} \usepackage[utopia]{newtxmath} \usepackage{bm} \renewcommand{\vec}{\boldsymbol} \newcommand{\bcdot}{\bm{\cdot}} \begin{document} $\vec{f}(\vec{x})\bcdot\vec{f}(\vec{y})=\vec{x}\bcdot\vec{y}$ $f(x)\cdot f(y)=x\cdot y$ \end{document} ```
2
https://tex.stackexchange.com/users/4427
689612
319,920
https://tex.stackexchange.com/questions/689567
1
I'm trying to create a similar command as `\qty` from `physics package`. To understand, I have the following code as example: ``` \documentclass{article} \usepackage{physics} \RenewDocumentCommand{\grad}{sm}{% \IfBooleanTF{#1}{\nabla#2} {\nabla\biggl[ #2 \biggl]} } \begin{document} The command $\backslash\text{qty}$ produces \begin{gather*} \qty(x+y), \qquad \qty[x+y], \qquad \qty{x+y} \end{gather*} All I have now is the command $\backslash\text{grad}$ that only accepts braces \{\}: \begin{gather*} \grad{x+y} \end{gather*} \end{document} ``` The command I want to adapt is this `\grad` to be able to write: `\grad()`, `\grad[]` or `\grad{}`.
https://tex.stackexchange.com/users/262923
Choose delimiters in the command according the case
true
Not sure where's the problem. ``` \documentclass{article} \usepackage{physics} \RenewDocumentCommand{\grad}{s}{% \nabla \IfBooleanF{#1}{\qty}% } \begin{document} \[ \qty{x+y}, \qquad \qty(x+y), \qquad \qty[x+y], \qquad \qty{x+y}, \qquad \qty\Big(x) \] \begin{gather*} \grad{x+y} \qquad \grad(x+y) \qquad \grad[x+y] \qquad \grad|x+y| \\ \grad\Big(x+y) \qquad \grad\Big[x+y] \qquad \grad* \qquad \grad*x \qquad \grad*(x+y) \end{gather*} \end{document} ``` This assuming that you really want to use `physics` with its weird syntax. I'd keep at arm's length from it.
4
https://tex.stackexchange.com/users/4427
689616
319,922
https://tex.stackexchange.com/questions/689608
0
I am using this in my `.tex` file: ``` %Bibliography \usepackage[sorting=none,citestyle=authoryear,backend=biber]{biblatex} \bibliography{expose} ``` And it gives a `(author year)` output for `\parencite{reference}` and `author (year)` for `\cite{reference}`. \parencite gives me what I want, but I'd like \cite to give me `[number]` as output with number = index number in references. How can I accomplish that? Further explanation: I have the sections "Scientific Background and Motivation", "Related Work", "Literature" and "References". An easy Example: ``` "Scientific Background and Motivation": ("Chocolate can be dangerous." as an indirect citation) Chocolate can be dangerous.[1] "Related Work": The article (Willy Wonka et. al. 2022) has made a significant contribution to chocolate research. "Literature": The book from (Charlie et. al. 2023) is a good source for understanding the science behind chocolate poisoning. "References" (automatically generated by using \printbibliography) [1] Lonkas et. al. "The danger of chocolate"..... [2] Willy Wonka et. al. "The way to not dangerous chocolate"... [3] Charlie et. al. "Why chocolate poisons people"... ```
https://tex.stackexchange.com/users/299719
Biblatex set specific citationstyle for \cite only
false
I don't think it is a good idea to mix an author-year style with a numeric style in this way. The author-year labels can't easily be resolved in a numeric bibliography (especially one that is sorted by appearance). Plus, I don't think the parenthetical citations make sense as shown in the question: The sentence should still scan if you ignore the parentheses, but in the example sentences the parenthetical citations are integral parts of the sentence structure. I suggest you go for `style=numeric,` exclusively and then use * `\autocite` (or `\parencite`) for "direct" citations and * `\textcite` for "indirect" citations (making sure that the name is subject/object) in the sentence. Your example would then become ``` \documentclass[british]{article} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{csquotes} \usepackage[backend=biber, style=numeric, sorting=none]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} \section{Scientific background} Chocolate can be dangerous. \autocite{sigfridsson} \section{Related work} Recently \textcite{worman} has made a significant contribution to chocolate research. \section{Literature} The book by \textcite{nussbaum} is a good source for understanding the science behind chocolate poisoning. \printbibliography \end{document} ```
1
https://tex.stackexchange.com/users/35864
689622
319,924
https://tex.stackexchange.com/questions/28730
59
I am a big fan of `latexmk` and lately I have been looking a bit towards LuaTeX. However I am yet to find a way to get the functionality of latexmk (mainly recompilation on changes and automatic rerun an appropriate number of times to resolve cross references and such) for LuaTex. Is there something similar and if not how do you LuaTeX people survive without it? :)
https://tex.stackexchange.com/users/298
Is there latexmk functionality for LuaTeX?
false
The following syntax is valid, as of `latexmk` 4.80. To have `latexmk` use LuaLaTeX to build a PDF file (the usual choice), just do ``` latexmk -pdflua foo.tex ``` Alternatively you could use the seemingly equivalent `-lualatex` option instead of `-pdflua`. To add the `-shell-escape` option, since this was asked about in a comment, just do ``` latexmk -pdflua -shell-escape foo.tex ``` This is directly from the documentation one obtains from `texdoc latexmk`, namely the `latexmk` manual. One can get a shorter help summary from `latexmk -h` or `latexmk --help`. There is also some additional documentation in the `latexmk` source file, which is a Perl script, specifically about how `latexmk` detects build dependencies. Additional comment. The current manual says the following > > -lualatex > > > > > Use lualatex. That is, use lualatex to process the source file(s) to pdf. The generation of dvi and postscript files is turned off. This option is equivalent to using the following set of options > > > > > -pdflua -dvi- -ps- > > > This appears to be incorrect or out of date. Perhaps it was correct once. But just using `-pdflua` does not generate any DVI or PostScript files. It would be surprising if it did. So I presume the `-lualatex` and the `-pdflua` options are the same. At any rate, I cannot see any differences between them.
5
https://tex.stackexchange.com/users/3406
689628
319,925
https://tex.stackexchange.com/questions/689623
0
I'm at the last stages of this text, and my goal is to insert a footnote inside a user-defined enumerate environment that is in two-column text. The footnote should appear as a red asterisk and the footnote text should span both columns. In the MWE below, I've managed to get part of the way there. My two-column text works and the footnote spans both columns. The footnote counter behaves as expected (see solution presented [here](https://tex.stackexchange.com/questions/30602/change-footnote-numbering-temporarily?noredirect=1&lq=1)), but it refuses to change to symbols (or letters - I've tried everything I can think of) or colors. In fact, in this MWE, the color of both footnotes is red (the new color); in my actual file, the color of both is blue (the original color). Additionally, the last paragraph of the footnote has something that looks like 1.5 or double spacing - and I can't correct it. ``` \documentclass[fontsize=9pt, twoside, final, openright, c6paper]{book} \usepackage{amsmath} \usepackage{amssymb} \usepackage{scrextend} \usepackage{moresize} \usepackage{calc} \usepackage[inner=0.3in, outer=0.3in, top=0.50in, bottom=0.35in, bindingoffset=0.25in, foot = 0.20in, includefoot, footskip = 10pt, textheight = 5.4in, headsep=0.05in]{geometry} \usepackage{parskip} \usepackage[flushmargin, splitrule, symbol*]{footmisc} \usepackage{enumitem} \usepackage{multicol} \usepackage{ragged2e} \usepackage[dvipsnames]{xcolor} \usepackage[colorlinks=true, hyperindex=true]{hyperref} % For footnotes: \makeatletter \def\@makefnmark{\hbox{\raisebox{0.30\baselineskip}{\ensuremath{\scriptstyle(\@arabic\c@footnote)}}}} \makeatother \setlength{\dimen\footins}{0.85\textheight}% \interfootnotelinepenalty=10000 \definecolor{darkred}{HTML}{AE0000} \newcommand{\cdr}{\color{darkred}} %% For the rubrics that are double-numbered \newlist{bienumerate}{enumerate}{1} \setlistdepth{4} \setlist[bienumerate, 1]{% label=\arabic*\additionallabel., wide, } \NewDocumentCommand{\additionallabel}{}{} \NewDocumentCommand{\biitem}{o}{% \IfNoValueTF{#1}{% \renewcommand{\additionallabel}{}% }{% \renewcommand{\additionallabel}{ (#1)}% }% \item } \begin{document} \begin{multicols*}{2} \justifying Previous text\footnote{With a footnote}. \begin{bienumerate}[itemsep=-0.75ex, leftmargin=0ex, itemindent=1em, parsep=3pt, resume] \biitem[156] \newcounter{tempfootnote} \setcounter{tempfootnote}{\value{footnote}} \setcounter{footnote}{0} \renewcommand{\thefootnote}{\cdr \fnsymbol{footnote}} In domibus interprovincialibus, nationalibus, et internationalibus Ordinis, pro absolutione divini Officii in choro vel in communi, adhibendum est calendarium proprium Ordinis universi, additis tantum festis propri\ae\ ecclesi\ae\ (n.~42) necnon festis de quibus n.\ 50.\footnote{{\tiny{ (154). In seminariis et collegiis clericorum di\oe cesanis, Religiosisi commissis, pro absolutione divini Officii in communi, sive a clericis sive a Religiosis qui una cum clericis Officium in communi dicunt, adhibendum est calendarium loci, additis festis ecclesi\ae\ seminarii vel collegii (n.~45 codicis rubricarum), data insuper facultate adiungendi festa Tituli necnon sancti Fundatoris Religiosorum quibus regimen seminarii commissum est. (155). In seminariis et collegiis clericorum interdi\oe cesanis, regionalibus, nationalibus, et internationalibus, pro absolutione divini Officii in communi, adhibendum est calendarium Ecclesi\ae\ univers\ae, additis festis Patroni principalis nationis, regionis seu provinci\ae\ sive ecclesiastic\ae\ sive civilis, di\oe cesis, oppidi seu civitatis, anniversario Dedicationis ecclesi\ae\ cathedralis di\oe cesis et aliis festis actu feriatis, si qu\ae\ sint, necnon festis ecclesi\ae\ seminarii vel collegii (n.~45 codicis rubricarum). Si autem huiusmodi seminariorum regimen Religiosis commissum sit, calendarium Ecclesi\ae\ univers\ae\ adhibendum est etiam a Religiosis qui una cum clericis Officium in communi absolvunt, data tamen facultate addendi festa tituli Ordinis seu Congregationis necnon sancti Fundatoris Religiosorum quibus regimen seminarii commissum est. % }}} \setcounter{footnote}{\value{tempfootnote}} \renewcommand{\thefootnote}{\arabic{footnote}} \end{bienumerate} \end{multicols*} \end{document} ```
https://tex.stackexchange.com/users/213262
LaTeX footnotes won't change
true
something like this? ``` \documentclass[fontsize=9pt, twoside, final, openright, c6paper]{book} \usepackage{amsmath} \usepackage{amssymb} \usepackage{scrextend} \usepackage{moresize} \usepackage{calc} \usepackage[inner=0.3in, outer=0.3in, top=0.50in, bottom=0.35in, bindingoffset=0.25in, foot = 0.20in, includefoot, footskip = 10pt, textheight = 5.4in, headsep=0.05in]{geometry} \usepackage{parskip} \usepackage[flushmargin, splitrule, symbol*]{footmisc} \usepackage{enumitem} \usepackage{multicol} \usepackage{ragged2e} \usepackage[dvipsnames]{xcolor} \usepackage[colorlinks=true, hyperindex=true]{hyperref} % For footnotes: \makeatletter \def\@makefnmark{\hbox{\raisebox{0.30\baselineskip}{\ensuremath{\scriptstyle\textcolor{footnotemark}{(\thefootnote)}}}}} \makeatother \setlength{\dimen\footins}{0.85\textheight}% \interfootnotelinepenalty=10000 \definecolor{darkred}{HTML}{AE0000} \newcommand{\cdr}{\color{darkred}} \colorlet{footnotemark}{darkred} %% For the rubrics that are double-numbered \newlist{bienumerate}{enumerate}{1} \setlistdepth{4} \setlist[bienumerate, 1]{% label=\arabic*\additionallabel., wide, } \NewDocumentCommand{\additionallabel}{}{} \NewDocumentCommand{\biitem}{o}{% \IfNoValueTF{#1}{% \renewcommand{\additionallabel}{}% }{% \renewcommand{\additionallabel}{ (#1)}% }% \item } \renewcommand{\thefootnote}{\arabic{footnote}} \begin{document} \begin{multicols*}{2} \justifying Previous text\footnote{With a footnote}. \begin{bienumerate}[itemsep=-0.75ex, leftmargin=0ex, itemindent=1em, parsep=3pt, resume] \biitem[156] \newcounter{tempfootnote} \setcounter{tempfootnote}{\value{footnote}} \setcounter{footnote}{0} \colorlet{footnotemark}{green} \renewcommand{\thefootnote}{\fnsymbol{footnote}} In domibus interprovincialibus, nationalibus, et internationalibus Ordinis, pro absolutione divini Officii in choro vel in communi, adhibendum est calendarium proprium Ordinis universi, additis tantum festis propri\ae\ ecclesi\ae\ (n.~42) necnon festis de quibus n.\ 50.\footnote{{\tiny{ (154). In seminariis et collegiis clericorum di\oe cesanis, Religiosisi commissis, pro absolutione divini Officii in communi, sive a clericis sive a Religiosis qui una cum clericis Officium in communi dicunt, adhibendum est calendarium loci, additis festis ecclesi\ae\ seminarii vel collegii (n.~45 codicis rubricarum), data insuper facultate adiungendi festa Tituli necnon sancti Fundatoris Religiosorum quibus regimen seminarii commissum est. (155). In seminariis et collegiis clericorum interdi\oe cesanis, regionalibus, nationalibus, et internationalibus, pro absolutione divini Officii in communi, adhibendum est calendarium Ecclesi\ae\ univers\ae, additis festis Patroni principalis nationis, regionis seu provinci\ae\ sive ecclesiastic\ae\ sive civilis, di\oe cesis, oppidi seu civitatis, anniversario Dedicationis ecclesi\ae\ cathedralis di\oe cesis et aliis festis actu feriatis, si qu\ae\ sint, necnon festis ecclesi\ae\ seminarii vel collegii (n.~45 codicis rubricarum). Si autem huiusmodi seminariorum regimen Religiosis commissum sit, calendarium Ecclesi\ae\ univers\ae\ adhibendum est etiam a Religiosis qui una cum clericis Officium in communi absolvunt, data tamen facultate addendi festa tituli Ordinis seu Congregationis necnon sancti Fundatoris Religiosorum quibus regimen seminarii commissum est. \par% }}} \setcounter{footnote}{\value{tempfootnote}} \renewcommand{\thefootnote}{\arabic{footnote}} \end{bienumerate} \end{multicols*} \end{document} ```
2
https://tex.stackexchange.com/users/2388
689631
319,927
https://tex.stackexchange.com/questions/689619
2
I need to use the character at the code point 0x021C in a document typeset on a Times New Roman-like typeface, but those available to me have the corresponding Unicode slot empty. The Junicode typeface fills the gap, though. I would like to use the advantages of the `newtxtext` package compiling with the `xetex` engine. The following MWE works, but uncommenting the line loading `newtxtext` while commenting out the `\setmainfont` line breaks down the compilation: ``` \documentclass{memoir} %\usepackage{newtxtext} \usepackage{fontspec} \setmainfont{TeX Gyre Termes} \newfontfamily\juno{Junicode Two Beta} %\newcommand\zeh{\juno \char"021C} \newcommand\zeh{{\juno\symbol{"021C}}} %<- as per egreg's observation in comment below. \begin{document} \zeh \end{document} ``` How can this issue be solved so as to both load `newtxtext` and use the Junicode font? I am on Windows 10 with a recently updated MikTeX distribution.
https://tex.stackexchange.com/users/15952
Trouble at loading package newtxtext and introducing a font family through fontspec's \newfontfamily
true
newtxtext sets default font features and that disturbs following font selections. You can reset them after loading the package: ``` \usepackage{newtxtext} \defaultfontfeatures{Ligatures = TeX} ``` Or load the package later.
4
https://tex.stackexchange.com/users/2388
689633
319,928
https://tex.stackexchange.com/questions/689529
4
My MWE ``` \documentclass[twoside]{book}% % 2 Packages only for demonstration purposes: \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \begin{document} %\pushfiguretopage{16}% Push figure to page 16 \begin{figure}[b]% \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \lipsum \end{document} ``` I would like a figure, now appearing on page 1, to appear exactly on page 16. I could do that with a nonfloating environment -- but that only holds, if I don't alter the text before the figure. Or I could do it with \afterpage -- but then I would have to use \afterpage 16 times and in the past then I got some problems with footnotes ... Is there another possibility, a macro `\pushfiguretopage{16}`, as I called it in my MWE?
https://tex.stackexchange.com/users/202047
How to let a figure appear exactly on page 16?
false
When I tried to use my own algorithm from my own answer, it didn't always work completely reliably, but sometimes push the figure to page 17 instead. So I tried to enhance John Kormylos answer thus that one could place as many figures before \pushfiguretopage as possible without reaching page 16. For that inside \pushfiguretopage an "invisible figure" is issued at the end of all other figures, whichs label reduces totalnumber to 0 via Johns hook. ``` \documentclass[twoside]{book}% \RequirePackage{zref-abspage,zref-user}% Needed for zlabel{} % 2 Packages only for demonstration purposes: \usepackage{tikzducks}% Delivers figures for testing purposes \usepackage{lipsum}% Delivers blind text \newcounter{pushtopage} \makeatletter \newcommand{\pushfiguretopage}[1]{% #1 = page number \setcounter{pushtopage}{#1}% \addtocounter{pushtopage}{-1}% activate on previous page % Invisible figure \setlength\textfloatsep{0pt}% no distance between text and float \begin{figure}[!htb]% \zlabel{testfloat}% This will be the last figure before ours % for more than one figure we need unique labels here \end{figure}% \AddToHook{shipout/after}[myhookid]{% \ifnum\value{page}=\zref@extractdefault{testfloat}{abspage}{-1}% \setcounter{totalnumber}{0}% \fi% \ifnum\value{page}=\value{pushtopage}\relax \setcounter{totalnumber}{3}% default \RemoveFromHook{shipout/after}[myhookid]% \fi}} \makeatother \begin{document} \begin{figure}[b]% will not work if [!]. \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \begin{figure}[b]% will not work if [!]. \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \begin{figure}[b]% will not work if [!]. \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \begin{figure}[b]% will not work if [!]. \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{A duck} \end{figure} \pushfiguretopage{16}% Push following figure to page 16 \begin{figure}[b]% will not work if [!]. \begin{center} \includegraphics[width=0.5\textwidth]{example-image-duck} \end{center} \caption{This one should be placed at page 16} \end{figure} \lipsum[1-100] \end{document} ``` Now the counter totalnumber, controlling the total number of floats on a page, is now not set to 0 from the beginning, but only when the "invisible figure" at the end of all other figures is printed. So, if you put \pushfiguretopage{} now exactly before the figure you want to push, all other figures before are printed just as normal.
2
https://tex.stackexchange.com/users/202047
689637
319,929
https://tex.stackexchange.com/questions/689632
1
How do I create an APA 7 indirect citation in LaTeX using the `biblatex` citation package? Output should look like this: > > (Hørland, 2014, as cited in Chiu & Lu, 2016, p. 1) > > >
https://tex.stackexchange.com/users/294532
How do I write an indirect citation in APA style using biblatex?
true
Nested citations aren't possible in `biblatex`, but there are commands to string together multiple citations and this can be used to achieve what you want. Since the default delimiter between citations in parentheses is `;`, but in this use case you need `,` we temporarily redefine the multicite delimiter (surrounded by `{...}` to limit its scope) before using the `\parencites` command. ``` \documentclass{article} \usepackage[style=apa]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} {\renewcommand*{\multicitedelim}{\addcomma\space}\parencites{knuth:ct:a}[as cited in][p.1]{companion}} \parencite{knuth:ct:a,companion} \end{document} ```
2
https://tex.stackexchange.com/users/2693
689643
319,931
https://tex.stackexchange.com/questions/689642
1
I'm trying to change the way ticks are display in tikz datavisualization (ideally with prefix unit), but for now I'm stuck as specifying a tick typesetter fails when used in a beamer document ``` \documentclass{beamer} \usepackage{tikz} \usetikzlibrary {datavisualization.formats.functions} \begin{document} \begin{frame} \tikz \datavisualization [ scientific axes, x axis={logarithmic}, y axis={logarithmic, ticks={ tick typesetter/.code={% \pgfmathprintnumber[sci, retain unit mantissa=false]{##1} } } }, visualize as line ] data [format=function] { var x : interval [0.01:100]; func y = \value x * \value x; }; \end{frame} \end{document} ```
https://tex.stackexchange.com/users/170313
tick typesetter fails with Illegal parameter number when used with beamer
true
Use a `fragile` frame: ``` \documentclass{beamer} \usepackage{tikz} \usetikzlibrary {datavisualization.formats.functions} \begin{document} \begin{frame}[fragile] \tikz \datavisualization [ scientific axes, x axis={logarithmic}, y axis={logarithmic, ticks={ tick typesetter/.code={% \pgfmathprintnumber[sci, retain unit mantissa=false]{##1} } } }, visualize as line ] data [format=function] { var x : interval [0.01:100]; func y = \value x * \value x; }; \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/36296
689644
319,932
https://tex.stackexchange.com/questions/28730
59
I am a big fan of `latexmk` and lately I have been looking a bit towards LuaTeX. However I am yet to find a way to get the functionality of latexmk (mainly recompilation on changes and automatic rerun an appropriate number of times to resolve cross references and such) for LuaTex. Is there something similar and if not how do you LuaTeX people survive without it? :)
https://tex.stackexchange.com/users/298
Is there latexmk functionality for LuaTeX?
false
I currently run MacTeX under macOS Ventura, and I use `lualatex` as my default engine for everything nowadays. This is my current `.latexmkrc` file, which I keep in my home directory. ``` # Custom .latexmkrc file. # Always create PDFs and set default engine to LuaLaTeX. $pdf_mode = 4; # Set the lualatex variable. $lualatex = 'lualatex --file-line-error %O %S'; # The next two preview variables are mutually exclusive! # Preview after each build. # Equivalent to -pv on command line. # $preview_mode = 1; # Preview continuously. # Equivalent to -pvc on command line. # $preview_continuous_mode = 1; # Comment out to use Preview.app. # Give -pv on the command line. $pdf_previewer = 'open -a Skim.app %S'; # Special latexmk makeindex line for .dtx files. $makeindex = "makeindex -s gind.ist %O -o %D %S"; # Files to be cleaned. $clean_ext = "deriv equ glo gls gsprogs hd listing lol" . " _minted-%R/* _minted-%R nav snm synctex.gz tcbtemp vpprogs"; ``` The very last line is treated as having a comment by the code formatting here, but it is not a comment in the `.latexmkrc` file.
1
https://tex.stackexchange.com/users/218142
689645
319,933
https://tex.stackexchange.com/questions/689549
3
How to wrap lines automatically for scriptio continua (contexts in which there are no devices whereby to separate distinct words)? I am using XeLaTeX. For example, the following code does not produce a PDF due to an error that reads **Overfull \hbox (11856.81178pt too wide) in paragraph at lines 14--15**. ``` \documentclass{book} \usepackage{geometry} \usepackage[skip=0pt, indent=20pt]{parskip} \usepackage{microtype} \usepackage[english,greek]{babel} \usepackage{fontspec} \setmainfont{Times New Roman} \emergencystretch 30pt \begin{document} ΑΜΕΝΑΡΤΑΣΤΟΥΒΑΣΙΛΙΚΟΥΓΕΝΟΥΣΤΟΥΑΙΓΥΠΤΙΟΥΗΤΟΥΚΑΛΛΙΚΡΑΤΟΥΣΙΣΙΔΟΣΙΕΡΕΩΣΗΝΟΙΜΕΝΘΕΟΙΤΡΕΦΟΥΣΙΤΑΔΕΔΑΙΜΟΝΙΑΥΠΟΤΑΣΣΕΤΑΙΗΔΗΤΕΛΕΥΤΩΣΑΤΙΣΙΣΘΕΝΕΙΤΩΠΑΙΔΙΕΠΙΣΤΕΛΛΕΙΤΑΔΕΣΥΝΕΦΥΓΟΝΓΑΡΠΟΤΕΕΚΤΗΣΑΙΓΥΠΤΙΑΣΕΠΙΝΕΚΤΑΝΕΒΟΥΜΕΤΑΤΟΥΣΟΥΠΑΤΡΟΣΔΙΑΤΟΝΕΡΩΤΑΤΟΝΕΜΟΝΕΠΙΟΡΚΗΣΑΝΤΟΣΦΥΓΟΝΤΕΣΔΕΠΡΟΣΝΟΤΟΝΔΙΑΠΟΝΤΙΟΙΚΑΙΚΔΜΗΝΑΣΚΑΤΑΤΑΠΑΡΑΘΑΛΑΣΣΙΑΤΗΣΛΙΒΥΗΣΤΑΠΡΟΣΗΛΙΟΥΑΝΑΤΟΛΑΣΠΛΑΝΗΘΕΝΤΕΣΕΝΘΑΠΕΡΠΕΤΡΑΤΙΣΜΕΓΑΛΗΓΛΥΠΤΟΝΟΜΟΙΩΜΑΑΙΘΙΟΠΟΣΚΕΦΑΛΗΣΕΙΤΑΗΜΕΡΑΣΔΑΠΟΣΤΟΜΑΤΟΣΠΟΤΑΜΟΥΜΕΓΑΛΟΥΕΚΠΕΣΟΝΤΕΣΟΙΜΕΝΚΑΤΕΠΟΝΤΙΣΘΗΜΕΝΟΙΔΕΝΟΣΩΙΑΠΕΘΑΝΟΜΕΝΤΕΛΟΣΔΕΥΠΑΓΡΙΩΝΑΝΘΡΩΠΩΝΕΦΕΡΟΜΕΘΑΔΙΑΕΛΕΩΝΤΕΚΑΙΤΕΝΑΓΕΩΝΕΝΘΑΠΕΡΠΤΗΝΩΝΠΛΗΘΟΣΑΠΟΚΡΥΠΤΕΙΤΟΝΟΥΡΑΝΟΝΗΜΕΡΑΣΙΕΩΣΗΛΘΟΜΕΝΕΙΣΚΟΙΛΟΝΤΙΟΡΟΣΕΝΘΑΠΟΤΕΜΕΓΑΛΗΜΕΝΠΟΛΙΣΗΝΑΝΤΡΑΔΕΑΠΕΙΡΟΝΑΗΓΑΓΟΝΔΕΩΣΒΑΣΙΛΕΙΑΝΤΗΝΤΩΝΞΕΝΟΥΣΧΥΤΡΑΙΣΣΤΕΦΑΝΟΥΝΤΩΝΗΤΙΣΜΑΓΕΙΑΜΕΝΕΧΡΗΤΟΕΠΙΣΤΗΜΗΔΕΠΑΝΤΩΝΚΑΙΔΗΚΑΙΚΑΛΛΟΣΚΑΙΡΩΜΗΝΑΓΗΡΩΣΗΝΗΔΕΚΑΛΛΙΚΡΑΤΟΥΣΤΟΥΣΟΥΠΑΤΡΟΣΕΡΑΣΘΕΙΣΑΤΟΜΕΝΠΡΩΤΟΝΣΥΝΟΙΚΕΙΝΕΒΟΥΛΕΤΟΕΜΕΔΕΑΝΕΛΕΙΝΕΠΕΙΤΑΩΣΟΥΚΑΝΕΠΕΙΘΕΝΕΜΕΓΑΡΥΠΕΡΕΦΙΛΕΙΚΑΙΤΗΝΞΕΝΗΝΕΦΟΒΕΙΤΟΑΠΗΓΑΓΕΝΗΜΑΣΥΠΟΜΑΓΕΙΑΣΚΑΘΟΔΟΥΣΣΦΑΛΕΡΑΣΕΝΘΑΤΟΒΑΡΑΘΡΟΝΤΟΜΕΓΑΟΥΚΑΤΑΣΤΟΜΑΕΚΕΙΤΟΟΓΕΡΩΝΟΦΙΛΟΣΟΦΟΣΤΕΘΝΕΩΣΑΦΙΚΟΜΕΝΟΙΣΔΕΔΕΙΞΕΦΩΣΤΟΥΒΙΟΥΕΥΘΥΟΙΟΝΚΙΟΝΑΕΛΙΣΣΟΜΕΝΟΝΦΩΝΗΝΙΕΝΤΑΚΑΘΑΠΕΡΒΡΟΝΤΗΣΕΙΤΑΔΙΑΠΥΡΟΣΒΕΒΗΚΥΙΑΑΒΛΑΒΗΣΚΑΙΕΤΙΚΑΛΛΙΩΝΑΥΤΗΕΑΥΤΗΣΕΞΕΦΑΝΗΕΚΔΕΤΟΥΤΩΝΩΜΟΣΕΚΑΙΤΟΝΣΟΝΠΑΤΕΡΑΑΘΑΝΑΤΟΝΑΠΟΔΕΙΞΕΙΝΕΙΣΥΝΟΙΚΕΙΝΟΙΒΟΥΛΟΙΤΟΕΜΕΔΕΑΝΕΛΕΙΝΟΥΓΑΡΟΥΝΑΥΤΗΑΝΕΛΕΙΝΙΣΧΥΕΝΥΠΟΤΩΝΗΜΕΔΑΠΩΝΗΝΚΑΙΑΥΤΗΕΧΩΜΑΓΕΙΑΣΟΔΟΥΔΕΝΤΙΜΑΛΛΟΝΗΘΕΛΕΤΩΧΕΙΡΕΤΩΝΟΜΜΑΤΩΝΠΡΟΙΣΧΩΝΙΝΑΔΗΤΟΤΗΣΓΥΝΑΙΚΟΣΚΑΛΛΟΣΜΗΟΡΩΗΕΠΕΙΤΑΟΡΓΙΣΘΕΙΣΑΚΑΤΕΓΟΗΤΕΥΣΕΜΕΝΑΥΤΟΝΑΠΟΛΟΜΕΝΟΝΜΕΝΤΟΙΚΛΑΟΥΣΑΚΑΙΟΔΥΡΟΜΕΝΗΕΚΕΙΘΕΝΑΠΗΝΕΓΚΕΝΕΜΕΔΕΦΟΒΩΙΑΦΗΚΕΝΕΙΣΣΤΟΜΑΤΟΥΜΕΓΑΛΟΥΠΟΤΑΜΟΥΤΟΥΝΑΥΣΙΠΟΡΟΥΠΟΡΡΩΔΕΝΑΥΣΙΝΕΦΩΝΠΕΡΠΛΕΟΥΣΑΕΤΕΚΟΝΣΕΑΠΟΠΛΕΥΣΑΣΑΜΟΛΙΣΠΟΤΕΔΕΥΡΟΑΘΗΝΑΖΕΚΑΤΗΓΑΓΟΜΗΝΣΥΔΕΩΤΙΣΙΣΘΕΝΕΣΩΝΕΠΙΣΤΕΛΛΩΜΗΟΛΙΓΩΡΕΙΔΕΙΓΑΡΤΗΝΓΥΝΑΙΚΑΑΝΑΖΗΤΕΙΝΗΝΠΩΣΤΟΤΟΥΒΙΟΥΜΥΣΤΗΡΙΟΝΑΝΕΥΡΗΣΚΑΙΑΝΑΙΡΕΙΝΗΝΠΟΥΠΑΡΑΣΧΗΔΙΑΤΟΝΣΟΝΠΑΤΕΡΑΚΑΛΛΙΚΡΑΤΗΝΕΙΔΕΦΟΒΟΥΜΕΝΟΣΗΔΙΑΑΛΛΟΤΙΑΥΤΟΣΛΕΙΠΕΙΤΟΥΕΡΓΟΥΠΑΣΙΤΟΙΣΥΣΤΕΡΟΝΑΥΤΟΤΟΥΤΟΕΠΙΣΤΕΛΛΩΕΩΣΠΟΤΕΑΓΑΘΟΣΤΙΣΓΕΝΟΜΕΝΟΣΤΩΠΥΡΙΛΟΥΣΑΣΘΑΙΤΟΛΜΗΣΕΙΚΑΙΤΑΑΡΙΣΤΕΙΑΕΧΩΝΒΑΣΙΛΕΥΣΑΙΤΩΝΑΝΘΡΩΠΩΝΑΠΙΣΤΑΜΕΝΔΗΤΑΤΟΙΑΥΤΑΛΕΓΩΟΜΩΣΔΕΑΑΥΤΗΕΓΝΩΚΑΟΥΚΕΨΕΥΣΑΜΗΝ \end{document} ```
https://tex.stackexchange.com/users/277990
How to automatically wrap lines in scriptio continua
false
This adds `\allowbreak` between every charater in the string. `\par` is used to mark the end of the string. ``` \documentclass{book} \usepackage{geometry} \usepackage[skip=0pt, indent=20pt]{parskip} \usepackage{microtype} \usepackage[english,greek]{babel} \usepackage{fontspec} \setmainfont{Times New Roman} \emergencystretch 30pt \def\foo{} \def\parse#1#2\par{\edef\foo{\foo #1\allowbreak}% \ifcat\empty#2\relax \else \parse#2\par \fi} \begin{document} \parse ΑΜΕΝΑΡΤΑΣΤΟΥΒΑΣΙΛΙΚΟΥΓΕΝΟΥΣΤΟΥΑΙΓΥΠΤΙΟΥΗΤΟΥΚΑΛΛΙΚΡΑΤΟΥΣΙΣΙΔΟΣΙΕΡΕΩΣΗΝΟΙΜΕΝΘΕΟΙΤΡΕΦΟΥΣΙΤΑΔΕΔΑΙΜΟΝΙΑΥΠΟΤΑΣΣΕΤΑΙΗΔΗΤΕΛΕΥΤΩΣΑΤΙΣΙΣΘΕΝΕΙΤΩΠΑΙΔΙΕΠΙΣΤΕΛΛΕΙΤΑΔΕΣΥΝΕΦΥΓΟΝΓΑΡΠΟΤΕΕΚΤΗΣΑΙΓΥΠΤΙΑΣΕΠΙΝΕΚΤΑΝΕΒΟΥΜΕΤΑΤΟΥΣΟΥΠΑΤΡΟΣΔΙΑΤΟΝΕΡΩΤΑΤΟΝΕΜΟΝΕΠΙΟΡΚΗΣΑΝΤΟΣΦΥΓΟΝΤΕΣΔΕΠΡΟΣΝΟΤΟΝΔΙΑΠΟΝΤΙΟΙΚΑΙΚΔΜΗΝΑΣΚΑΤΑΤΑΠΑΡΑΘΑΛΑΣΣΙΑΤΗΣΛΙΒΥΗΣΤΑΠΡΟΣΗΛΙΟΥΑΝΑΤΟΛΑΣΠΛΑΝΗΘΕΝΤΕΣΕΝΘΑΠΕΡΠΕΤΡΑΤΙΣΜΕΓΑΛΗΓΛΥΠΤΟΝΟΜΟΙΩΜΑΑΙΘΙΟΠΟΣΚΕΦΑΛΗΣΕΙΤΑΗΜΕΡΑΣΔΑΠΟΣΤΟΜΑΤΟΣΠΟΤΑΜΟΥΜΕΓΑΛΟΥΕΚΠΕΣΟΝΤΕΣΟΙΜΕΝΚΑΤΕΠΟΝΤΙΣΘΗΜΕΝΟΙΔΕΝΟΣΩΙΑΠΕΘΑΝΟΜΕΝΤΕΛΟΣΔΕΥΠΑΓΡΙΩΝΑΝΘΡΩΠΩΝΕΦΕΡΟΜΕΘΑΔΙΑΕΛΕΩΝΤΕΚΑΙΤΕΝΑΓΕΩΝΕΝΘΑΠΕΡΠΤΗΝΩΝΠΛΗΘΟΣΑΠΟΚΡΥΠΤΕΙΤΟΝΟΥΡΑΝΟΝΗΜΕΡΑΣΙΕΩΣΗΛΘΟΜΕΝΕΙΣΚΟΙΛΟΝΤΙΟΡΟΣΕΝΘΑΠΟΤΕΜΕΓΑΛΗΜΕΝΠΟΛΙΣΗΝΑΝΤΡΑΔΕΑΠΕΙΡΟΝΑΗΓΑΓΟΝΔΕΩΣΒΑΣΙΛΕΙΑΝΤΗΝΤΩΝΞΕΝΟΥΣΧΥΤΡΑΙΣΣΤΕΦΑΝΟΥΝΤΩΝΗΤΙΣΜΑΓΕΙΑΜΕΝΕΧΡΗΤΟΕΠΙΣΤΗΜΗΔΕΠΑΝΤΩΝΚΑΙΔΗΚΑΙΚΑΛΛΟΣΚΑΙΡΩΜΗΝΑΓΗΡΩΣΗΝΗΔΕΚΑΛΛΙΚΡΑΤΟΥΣΤΟΥΣΟΥΠΑΤΡΟΣΕΡΑΣΘΕΙΣΑΤΟΜΕΝΠΡΩΤΟΝΣΥΝΟΙΚΕΙΝΕΒΟΥΛΕΤΟΕΜΕΔΕΑΝΕΛΕΙΝΕΠΕΙΤΑΩΣΟΥΚΑΝΕΠΕΙΘΕΝΕΜΕΓΑΡΥΠΕΡΕΦΙΛΕΙΚΑΙΤΗΝΞΕΝΗΝΕΦΟΒΕΙΤΟΑΠΗΓΑΓΕΝΗΜΑΣΥΠΟΜΑΓΕΙΑΣΚΑΘΟΔΟΥΣΣΦΑΛΕΡΑΣΕΝΘΑΤΟΒΑΡΑΘΡΟΝΤΟΜΕΓΑΟΥΚΑΤΑΣΤΟΜΑΕΚΕΙΤΟΟΓΕΡΩΝΟΦΙΛΟΣΟΦΟΣΤΕΘΝΕΩΣΑΦΙΚΟΜΕΝΟΙΣΔΕΔΕΙΞΕΦΩΣΤΟΥΒΙΟΥΕΥΘΥΟΙΟΝΚΙΟΝΑΕΛΙΣΣΟΜΕΝΟΝΦΩΝΗΝΙΕΝΤΑΚΑΘΑΠΕΡΒΡΟΝΤΗΣΕΙΤΑΔΙΑΠΥΡΟΣΒΕΒΗΚΥΙΑΑΒΛΑΒΗΣΚΑΙΕΤΙΚΑΛΛΙΩΝΑΥΤΗΕΑΥΤΗΣΕΞΕΦΑΝΗΕΚΔΕΤΟΥΤΩΝΩΜΟΣΕΚΑΙΤΟΝΣΟΝΠΑΤΕΡΑΑΘΑΝΑΤΟΝΑΠΟΔΕΙΞΕΙΝΕΙΣΥΝΟΙΚΕΙΝΟΙΒΟΥΛΟΙΤΟΕΜΕΔΕΑΝΕΛΕΙΝΟΥΓΑΡΟΥΝΑΥΤΗΑΝΕΛΕΙΝΙΣΧΥΕΝΥΠΟΤΩΝΗΜΕΔΑΠΩΝΗΝΚΑΙΑΥΤΗΕΧΩΜΑΓΕΙΑΣΟΔΟΥΔΕΝΤΙΜΑΛΛΟΝΗΘΕΛΕΤΩΧΕΙΡΕΤΩΝΟΜΜΑΤΩΝΠΡΟΙΣΧΩΝΙΝΑΔΗΤΟΤΗΣΓΥΝΑΙΚΟΣΚΑΛΛΟΣΜΗΟΡΩΗΕΠΕΙΤΑΟΡΓΙΣΘΕΙΣΑΚΑΤΕΓΟΗΤΕΥΣΕΜΕΝΑΥΤΟΝΑΠΟΛΟΜΕΝΟΝΜΕΝΤΟΙΚΛΑΟΥΣΑΚΑΙΟΔΥΡΟΜΕΝΗΕΚΕΙΘΕΝΑΠΗΝΕΓΚΕΝΕΜΕΔΕΦΟΒΩΙΑΦΗΚΕΝΕΙΣΣΤΟΜΑΤΟΥΜΕΓΑΛΟΥΠΟΤΑΜΟΥΤΟΥΝΑΥΣΙΠΟΡΟΥΠΟΡΡΩΔΕΝΑΥΣΙΝΕΦΩΝΠΕΡΠΛΕΟΥΣΑΕΤΕΚΟΝΣΕΑΠΟΠΛΕΥΣΑΣΑΜΟΛΙΣΠΟΤΕΔΕΥΡΟΑΘΗΝΑΖΕΚΑΤΗΓΑΓΟΜΗΝΣΥΔΕΩΤΙΣΙΣΘΕΝΕΣΩΝΕΠΙΣΤΕΛΛΩΜΗΟΛΙΓΩΡΕΙΔΕΙΓΑΡΤΗΝΓΥΝΑΙΚΑΑΝΑΖΗΤΕΙΝΗΝΠΩΣΤΟΤΟΥΒΙΟΥΜΥΣΤΗΡΙΟΝΑΝΕΥΡΗΣΚΑΙΑΝΑΙΡΕΙΝΗΝΠΟΥΠΑΡΑΣΧΗΔΙΑΤΟΝΣΟΝΠΑΤΕΡΑΚΑΛΛΙΚΡΑΤΗΝΕΙΔΕΦΟΒΟΥΜΕΝΟΣΗΔΙΑΑΛΛΟΤΙΑΥΤΟΣΛΕΙΠΕΙΤΟΥΕΡΓΟΥΠΑΣΙΤΟΙΣΥΣΤΕΡΟΝΑΥΤΟΤΟΥΤΟΕΠΙΣΤΕΛΛΩΕΩΣΠΟΤΕΑΓΑΘΟΣΤΙΣΓΕΝΟΜΕΝΟΣΤΩΠΥΡΙΛΟΥΣΑΣΘΑΙΤΟΛΜΗΣΕΙΚΑΙΤΑΑΡΙΣΤΕΙΑΕΧΩΝΒΑΣΙΛΕΥΣΑΙΤΩΝΑΝΘΡΩΠΩΝΑΠΙΣΤΑΜΕΝΔΗΤΑΤΟΙΑΥΤΑΛΕΓΩΟΜΩΣΔΕΑΑΥΤΗΕΓΝΩΚΑΟΥΚΕΨΕΥΣΑΜΗΝ \noindent\foo \end{document} ``` --- This should be more efficient (as well as expandable). Here `\end` is used as a delimiter. `\par` was problematic, but any token which will not appear in the text can be used. (Such as a `\quark`.) ``` \documentclass{book} \usepackage{geometry} \usepackage[skip=0pt, indent=20pt]{parskip} \usepackage{microtype} \usepackage[english,greek]{babel} \usepackage{fontspec} \setmainfont{Times New Roman} \emergencystretch 30pt \makeatletter \def\parse#1\par{\@parse#1\end} \def\@parse#1{\ifx\end#1\relax \par \else #1\allowbreak \expandafter\@parse \fi} \makeatother \begin{document} \parse ΑΜΕΝΑΡΤΑΣΤΟΥΒΑΣΙΛΙΚΟΥΓΕΝΟΥΣΤΟΥΑΙΓΥΠΤΙΟΥΗΤΟΥΚΑΛΛΙΚΡΑΤΟΥΣΙΣΙΔΟΣΙΕΡΕΩΣΗΝΟΙΜΕΝΘΕΟΙΤΡΕΦΟΥΣΙΤΑΔΕΔΑΙΜΟΝΙΑΥΠΟΤΑΣΣΕΤΑΙΗΔΗΤΕΛΕΥΤΩΣΑΤΙΣΙΣΘΕΝΕΙΤΩΠΑΙΔΙΕΠΙΣΤΕΛΛΕΙΤΑΔΕΣΥΝΕΦΥΓΟΝΓΑΡΠΟΤΕΕΚΤΗΣΑΙΓΥΠΤΙΑΣΕΠΙΝΕΚΤΑΝΕΒΟΥΜΕΤΑΤΟΥΣΟΥΠΑΤΡΟΣΔΙΑΤΟΝΕΡΩΤΑΤΟΝΕΜΟΝΕΠΙΟΡΚΗΣΑΝΤΟΣΦΥΓΟΝΤΕΣΔΕΠΡΟΣΝΟΤΟΝΔΙΑΠΟΝΤΙΟΙΚΑΙΚΔΜΗΝΑΣΚΑΤΑΤΑΠΑΡΑΘΑΛΑΣΣΙΑΤΗΣΛΙΒΥΗΣΤΑΠΡΟΣΗΛΙΟΥΑΝΑΤΟΛΑΣΠΛΑΝΗΘΕΝΤΕΣΕΝΘΑΠΕΡΠΕΤΡΑΤΙΣΜΕΓΑΛΗΓΛΥΠΤΟΝΟΜΟΙΩΜΑΑΙΘΙΟΠΟΣΚΕΦΑΛΗΣΕΙΤΑΗΜΕΡΑΣΔΑΠΟΣΤΟΜΑΤΟΣΠΟΤΑΜΟΥΜΕΓΑΛΟΥΕΚΠΕΣΟΝΤΕΣΟΙΜΕΝΚΑΤΕΠΟΝΤΙΣΘΗΜΕΝΟΙΔΕΝΟΣΩΙΑΠΕΘΑΝΟΜΕΝΤΕΛΟΣΔΕΥΠΑΓΡΙΩΝΑΝΘΡΩΠΩΝΕΦΕΡΟΜΕΘΑΔΙΑΕΛΕΩΝΤΕΚΑΙΤΕΝΑΓΕΩΝΕΝΘΑΠΕΡΠΤΗΝΩΝΠΛΗΘΟΣΑΠΟΚΡΥΠΤΕΙΤΟΝΟΥΡΑΝΟΝΗΜΕΡΑΣΙΕΩΣΗΛΘΟΜΕΝΕΙΣΚΟΙΛΟΝΤΙΟΡΟΣΕΝΘΑΠΟΤΕΜΕΓΑΛΗΜΕΝΠΟΛΙΣΗΝΑΝΤΡΑΔΕΑΠΕΙΡΟΝΑΗΓΑΓΟΝΔΕΩΣΒΑΣΙΛΕΙΑΝΤΗΝΤΩΝΞΕΝΟΥΣΧΥΤΡΑΙΣΣΤΕΦΑΝΟΥΝΤΩΝΗΤΙΣΜΑΓΕΙΑΜΕΝΕΧΡΗΤΟΕΠΙΣΤΗΜΗΔΕΠΑΝΤΩΝΚΑΙΔΗΚΑΙΚΑΛΛΟΣΚΑΙΡΩΜΗΝΑΓΗΡΩΣΗΝΗΔΕΚΑΛΛΙΚΡΑΤΟΥΣΤΟΥΣΟΥΠΑΤΡΟΣΕΡΑΣΘΕΙΣΑΤΟΜΕΝΠΡΩΤΟΝΣΥΝΟΙΚΕΙΝΕΒΟΥΛΕΤΟΕΜΕΔΕΑΝΕΛΕΙΝΕΠΕΙΤΑΩΣΟΥΚΑΝΕΠΕΙΘΕΝΕΜΕΓΑΡΥΠΕΡΕΦΙΛΕΙΚΑΙΤΗΝΞΕΝΗΝΕΦΟΒΕΙΤΟΑΠΗΓΑΓΕΝΗΜΑΣΥΠΟΜΑΓΕΙΑΣΚΑΘΟΔΟΥΣΣΦΑΛΕΡΑΣΕΝΘΑΤΟΒΑΡΑΘΡΟΝΤΟΜΕΓΑΟΥΚΑΤΑΣΤΟΜΑΕΚΕΙΤΟΟΓΕΡΩΝΟΦΙΛΟΣΟΦΟΣΤΕΘΝΕΩΣΑΦΙΚΟΜΕΝΟΙΣΔΕΔΕΙΞΕΦΩΣΤΟΥΒΙΟΥΕΥΘΥΟΙΟΝΚΙΟΝΑΕΛΙΣΣΟΜΕΝΟΝΦΩΝΗΝΙΕΝΤΑΚΑΘΑΠΕΡΒΡΟΝΤΗΣΕΙΤΑΔΙΑΠΥΡΟΣΒΕΒΗΚΥΙΑΑΒΛΑΒΗΣΚΑΙΕΤΙΚΑΛΛΙΩΝΑΥΤΗΕΑΥΤΗΣΕΞΕΦΑΝΗΕΚΔΕΤΟΥΤΩΝΩΜΟΣΕΚΑΙΤΟΝΣΟΝΠΑΤΕΡΑΑΘΑΝΑΤΟΝΑΠΟΔΕΙΞΕΙΝΕΙΣΥΝΟΙΚΕΙΝΟΙΒΟΥΛΟΙΤΟΕΜΕΔΕΑΝΕΛΕΙΝΟΥΓΑΡΟΥΝΑΥΤΗΑΝΕΛΕΙΝΙΣΧΥΕΝΥΠΟΤΩΝΗΜΕΔΑΠΩΝΗΝΚΑΙΑΥΤΗΕΧΩΜΑΓΕΙΑΣΟΔΟΥΔΕΝΤΙΜΑΛΛΟΝΗΘΕΛΕΤΩΧΕΙΡΕΤΩΝΟΜΜΑΤΩΝΠΡΟΙΣΧΩΝΙΝΑΔΗΤΟΤΗΣΓΥΝΑΙΚΟΣΚΑΛΛΟΣΜΗΟΡΩΗΕΠΕΙΤΑΟΡΓΙΣΘΕΙΣΑΚΑΤΕΓΟΗΤΕΥΣΕΜΕΝΑΥΤΟΝΑΠΟΛΟΜΕΝΟΝΜΕΝΤΟΙΚΛΑΟΥΣΑΚΑΙΟΔΥΡΟΜΕΝΗΕΚΕΙΘΕΝΑΠΗΝΕΓΚΕΝΕΜΕΔΕΦΟΒΩΙΑΦΗΚΕΝΕΙΣΣΤΟΜΑΤΟΥΜΕΓΑΛΟΥΠΟΤΑΜΟΥΤΟΥΝΑΥΣΙΠΟΡΟΥΠΟΡΡΩΔΕΝΑΥΣΙΝΕΦΩΝΠΕΡΠΛΕΟΥΣΑΕΤΕΚΟΝΣΕΑΠΟΠΛΕΥΣΑΣΑΜΟΛΙΣΠΟΤΕΔΕΥΡΟΑΘΗΝΑΖΕΚΑΤΗΓΑΓΟΜΗΝΣΥΔΕΩΤΙΣΙΣΘΕΝΕΣΩΝΕΠΙΣΤΕΛΛΩΜΗΟΛΙΓΩΡΕΙΔΕΙΓΑΡΤΗΝΓΥΝΑΙΚΑΑΝΑΖΗΤΕΙΝΗΝΠΩΣΤΟΤΟΥΒΙΟΥΜΥΣΤΗΡΙΟΝΑΝΕΥΡΗΣΚΑΙΑΝΑΙΡΕΙΝΗΝΠΟΥΠΑΡΑΣΧΗΔΙΑΤΟΝΣΟΝΠΑΤΕΡΑΚΑΛΛΙΚΡΑΤΗΝΕΙΔΕΦΟΒΟΥΜΕΝΟΣΗΔΙΑΑΛΛΟΤΙΑΥΤΟΣΛΕΙΠΕΙΤΟΥΕΡΓΟΥΠΑΣΙΤΟΙΣΥΣΤΕΡΟΝΑΥΤΟΤΟΥΤΟΕΠΙΣΤΕΛΛΩΕΩΣΠΟΤΕΑΓΑΘΟΣΤΙΣΓΕΝΟΜΕΝΟΣΤΩΠΥΡΙΛΟΥΣΑΣΘΑΙΤΟΛΜΗΣΕΙΚΑΙΤΑΑΡΙΣΤΕΙΑΕΧΩΝΒΑΣΙΛΕΥΣΑΙΤΩΝΑΝΘΡΩΠΩΝΑΠΙΣΤΑΜΕΝΔΗΤΑΤΟΙΑΥΤΑΛΕΓΩΟΜΩΣΔΕΑΑΥΤΗΕΓΝΩΚΑΟΥΚΕΨΕΥΣΑΜΗΝ \end{document} ```
2
https://tex.stackexchange.com/users/34505
689646
319,934
https://tex.stackexchange.com/questions/689641
1
I'd like to add a plural sign (say a 's') when needed. My current use case is for pluralizing a noun based on the number of pages in a document but I could also count oranges and bananas down the road. Based on this [question](https://tex.stackexchange.com/questions/681062/whats-the-correct-way-to-impliment-a-pluralize-command-in-latex "pluralize command LaTeX question"), I tried to write the following somewhat simplified command: ``` \documentclass{article} \usepackage{ifthen} \usepackage{pageslts} \newcommand{\pls}[1]{\ifnum#1>1 s\fi} \begin{document} \pagenumbering{arabic} There are currently \lastpageref{LastPages} page\pls{\value{LastPages}} in this manuscript. \end{document} ``` Unfortunately, I have a `! Missing number, treated as zero.` error. Any idea?
https://tex.stackexchange.com/users/18786
Add a plural sign depending on the number of items
true
Use `refcount`. ``` \documentclass{article} \usepackage{pageslts} \usepackage{refcount} \usepackage{lipsum} \newcommand{\pls}{% There \ifnum\getpagerefnumber{LastPages}>1 are \else is \fi currently \lastpageref{LastPages} page\ifnum\getpagerefnumber{LastPages}>1 s\fi \ in this manuscript. } \begin{document} \pagenumbering{arabic} \pls \lipsum[1-20] \end{document} ``` Note that `\pagenumbering` is necessary as stated in the manual of `pageslts`. If you remove the `\lipsum[1-20]` line you get For a generic “add ‘a’ for plural” command, I suggest ``` \newcommand{\pls}[1]{% \ifnum#1>1 s\fi } ``` which you can call as ``` \pls{\getpagerefnumber{LastPages}} ```
2
https://tex.stackexchange.com/users/4427
689651
319,936
https://tex.stackexchange.com/questions/689652
0
I see that TeX when render a faction they add some space before and after nominator and demoninator, so the fraction bar have width more than nominator and denominator width. The following TeX show this behaviour `\textstyle \frac 1 {\textstyle \frac 1 {\textstyle \frac 1 1}}`. How many space TeX added and/or what constant used for it? I aslo see this behaviour in MS Word and can not find MATH table const that used to determinate this space size.
https://tex.stackexchange.com/users/118473
Size added to fraction bar
true
The space does not come from the font metrics, it is `\nulldelimiterspace` ``` $$ {\textstyle {1 \over {\textstyle {1 \over {\textstyle {1 \over 1}}}}}} $$ \nulldelimiterspace=0pt $$ {\textstyle {1 \over {\textstyle {1 \over {\textstyle {1 \over 1}}}}}} $$ \bye ```
2
https://tex.stackexchange.com/users/1090
689654
319,937
https://tex.stackexchange.com/questions/644389
2
When longer paragraphs have no line breaks in the middle, I get the warning: `chktex: WARNING -- ChkTeX does not handle lines over 509 bytes correctly. Some errors and line numbers may be wrong in this file.` I've found a report of a similar issue at [ChkTeX: warn of lines that are too long and therefore generate erroneous warnings](https://github.com/James-Yu/LaTeX-Workshop/issues/2795). In their case, they used LaTeX-Workshop and also went quite far in other research. It seems likely ChkTeX is not geared for (some?) Windows environments. The OP of that post knocked up some code to identify which lines are too long. One workaround is to manually add line breaks, but that is a pain and adds inconvenience for colleagues. My environment: * Windows 11 * VS Code version 1.67.1 (LaTeX extension version 1.2.0) * One MiKTeX Utility 1.2 (MiKTeX 22.3) * ChkTeX v1.7.6 So, my question: is there a fix or better workaround for this?
https://tex.stackexchange.com/users/270111
ChkTeX does not handle lines over 509 bytes correctly
false
Add this line in "settings.json": ``` "latex.linter.enabled": false ```
0
https://tex.stackexchange.com/users/244016
689657
319,940
https://tex.stackexchange.com/questions/689549
3
How to wrap lines automatically for scriptio continua (contexts in which there are no devices whereby to separate distinct words)? I am using XeLaTeX. For example, the following code does not produce a PDF due to an error that reads **Overfull \hbox (11856.81178pt too wide) in paragraph at lines 14--15**. ``` \documentclass{book} \usepackage{geometry} \usepackage[skip=0pt, indent=20pt]{parskip} \usepackage{microtype} \usepackage[english,greek]{babel} \usepackage{fontspec} \setmainfont{Times New Roman} \emergencystretch 30pt \begin{document} ΑΜΕΝΑΡΤΑΣΤΟΥΒΑΣΙΛΙΚΟΥΓΕΝΟΥΣΤΟΥΑΙΓΥΠΤΙΟΥΗΤΟΥΚΑΛΛΙΚΡΑΤΟΥΣΙΣΙΔΟΣΙΕΡΕΩΣΗΝΟΙΜΕΝΘΕΟΙΤΡΕΦΟΥΣΙΤΑΔΕΔΑΙΜΟΝΙΑΥΠΟΤΑΣΣΕΤΑΙΗΔΗΤΕΛΕΥΤΩΣΑΤΙΣΙΣΘΕΝΕΙΤΩΠΑΙΔΙΕΠΙΣΤΕΛΛΕΙΤΑΔΕΣΥΝΕΦΥΓΟΝΓΑΡΠΟΤΕΕΚΤΗΣΑΙΓΥΠΤΙΑΣΕΠΙΝΕΚΤΑΝΕΒΟΥΜΕΤΑΤΟΥΣΟΥΠΑΤΡΟΣΔΙΑΤΟΝΕΡΩΤΑΤΟΝΕΜΟΝΕΠΙΟΡΚΗΣΑΝΤΟΣΦΥΓΟΝΤΕΣΔΕΠΡΟΣΝΟΤΟΝΔΙΑΠΟΝΤΙΟΙΚΑΙΚΔΜΗΝΑΣΚΑΤΑΤΑΠΑΡΑΘΑΛΑΣΣΙΑΤΗΣΛΙΒΥΗΣΤΑΠΡΟΣΗΛΙΟΥΑΝΑΤΟΛΑΣΠΛΑΝΗΘΕΝΤΕΣΕΝΘΑΠΕΡΠΕΤΡΑΤΙΣΜΕΓΑΛΗΓΛΥΠΤΟΝΟΜΟΙΩΜΑΑΙΘΙΟΠΟΣΚΕΦΑΛΗΣΕΙΤΑΗΜΕΡΑΣΔΑΠΟΣΤΟΜΑΤΟΣΠΟΤΑΜΟΥΜΕΓΑΛΟΥΕΚΠΕΣΟΝΤΕΣΟΙΜΕΝΚΑΤΕΠΟΝΤΙΣΘΗΜΕΝΟΙΔΕΝΟΣΩΙΑΠΕΘΑΝΟΜΕΝΤΕΛΟΣΔΕΥΠΑΓΡΙΩΝΑΝΘΡΩΠΩΝΕΦΕΡΟΜΕΘΑΔΙΑΕΛΕΩΝΤΕΚΑΙΤΕΝΑΓΕΩΝΕΝΘΑΠΕΡΠΤΗΝΩΝΠΛΗΘΟΣΑΠΟΚΡΥΠΤΕΙΤΟΝΟΥΡΑΝΟΝΗΜΕΡΑΣΙΕΩΣΗΛΘΟΜΕΝΕΙΣΚΟΙΛΟΝΤΙΟΡΟΣΕΝΘΑΠΟΤΕΜΕΓΑΛΗΜΕΝΠΟΛΙΣΗΝΑΝΤΡΑΔΕΑΠΕΙΡΟΝΑΗΓΑΓΟΝΔΕΩΣΒΑΣΙΛΕΙΑΝΤΗΝΤΩΝΞΕΝΟΥΣΧΥΤΡΑΙΣΣΤΕΦΑΝΟΥΝΤΩΝΗΤΙΣΜΑΓΕΙΑΜΕΝΕΧΡΗΤΟΕΠΙΣΤΗΜΗΔΕΠΑΝΤΩΝΚΑΙΔΗΚΑΙΚΑΛΛΟΣΚΑΙΡΩΜΗΝΑΓΗΡΩΣΗΝΗΔΕΚΑΛΛΙΚΡΑΤΟΥΣΤΟΥΣΟΥΠΑΤΡΟΣΕΡΑΣΘΕΙΣΑΤΟΜΕΝΠΡΩΤΟΝΣΥΝΟΙΚΕΙΝΕΒΟΥΛΕΤΟΕΜΕΔΕΑΝΕΛΕΙΝΕΠΕΙΤΑΩΣΟΥΚΑΝΕΠΕΙΘΕΝΕΜΕΓΑΡΥΠΕΡΕΦΙΛΕΙΚΑΙΤΗΝΞΕΝΗΝΕΦΟΒΕΙΤΟΑΠΗΓΑΓΕΝΗΜΑΣΥΠΟΜΑΓΕΙΑΣΚΑΘΟΔΟΥΣΣΦΑΛΕΡΑΣΕΝΘΑΤΟΒΑΡΑΘΡΟΝΤΟΜΕΓΑΟΥΚΑΤΑΣΤΟΜΑΕΚΕΙΤΟΟΓΕΡΩΝΟΦΙΛΟΣΟΦΟΣΤΕΘΝΕΩΣΑΦΙΚΟΜΕΝΟΙΣΔΕΔΕΙΞΕΦΩΣΤΟΥΒΙΟΥΕΥΘΥΟΙΟΝΚΙΟΝΑΕΛΙΣΣΟΜΕΝΟΝΦΩΝΗΝΙΕΝΤΑΚΑΘΑΠΕΡΒΡΟΝΤΗΣΕΙΤΑΔΙΑΠΥΡΟΣΒΕΒΗΚΥΙΑΑΒΛΑΒΗΣΚΑΙΕΤΙΚΑΛΛΙΩΝΑΥΤΗΕΑΥΤΗΣΕΞΕΦΑΝΗΕΚΔΕΤΟΥΤΩΝΩΜΟΣΕΚΑΙΤΟΝΣΟΝΠΑΤΕΡΑΑΘΑΝΑΤΟΝΑΠΟΔΕΙΞΕΙΝΕΙΣΥΝΟΙΚΕΙΝΟΙΒΟΥΛΟΙΤΟΕΜΕΔΕΑΝΕΛΕΙΝΟΥΓΑΡΟΥΝΑΥΤΗΑΝΕΛΕΙΝΙΣΧΥΕΝΥΠΟΤΩΝΗΜΕΔΑΠΩΝΗΝΚΑΙΑΥΤΗΕΧΩΜΑΓΕΙΑΣΟΔΟΥΔΕΝΤΙΜΑΛΛΟΝΗΘΕΛΕΤΩΧΕΙΡΕΤΩΝΟΜΜΑΤΩΝΠΡΟΙΣΧΩΝΙΝΑΔΗΤΟΤΗΣΓΥΝΑΙΚΟΣΚΑΛΛΟΣΜΗΟΡΩΗΕΠΕΙΤΑΟΡΓΙΣΘΕΙΣΑΚΑΤΕΓΟΗΤΕΥΣΕΜΕΝΑΥΤΟΝΑΠΟΛΟΜΕΝΟΝΜΕΝΤΟΙΚΛΑΟΥΣΑΚΑΙΟΔΥΡΟΜΕΝΗΕΚΕΙΘΕΝΑΠΗΝΕΓΚΕΝΕΜΕΔΕΦΟΒΩΙΑΦΗΚΕΝΕΙΣΣΤΟΜΑΤΟΥΜΕΓΑΛΟΥΠΟΤΑΜΟΥΤΟΥΝΑΥΣΙΠΟΡΟΥΠΟΡΡΩΔΕΝΑΥΣΙΝΕΦΩΝΠΕΡΠΛΕΟΥΣΑΕΤΕΚΟΝΣΕΑΠΟΠΛΕΥΣΑΣΑΜΟΛΙΣΠΟΤΕΔΕΥΡΟΑΘΗΝΑΖΕΚΑΤΗΓΑΓΟΜΗΝΣΥΔΕΩΤΙΣΙΣΘΕΝΕΣΩΝΕΠΙΣΤΕΛΛΩΜΗΟΛΙΓΩΡΕΙΔΕΙΓΑΡΤΗΝΓΥΝΑΙΚΑΑΝΑΖΗΤΕΙΝΗΝΠΩΣΤΟΤΟΥΒΙΟΥΜΥΣΤΗΡΙΟΝΑΝΕΥΡΗΣΚΑΙΑΝΑΙΡΕΙΝΗΝΠΟΥΠΑΡΑΣΧΗΔΙΑΤΟΝΣΟΝΠΑΤΕΡΑΚΑΛΛΙΚΡΑΤΗΝΕΙΔΕΦΟΒΟΥΜΕΝΟΣΗΔΙΑΑΛΛΟΤΙΑΥΤΟΣΛΕΙΠΕΙΤΟΥΕΡΓΟΥΠΑΣΙΤΟΙΣΥΣΤΕΡΟΝΑΥΤΟΤΟΥΤΟΕΠΙΣΤΕΛΛΩΕΩΣΠΟΤΕΑΓΑΘΟΣΤΙΣΓΕΝΟΜΕΝΟΣΤΩΠΥΡΙΛΟΥΣΑΣΘΑΙΤΟΛΜΗΣΕΙΚΑΙΤΑΑΡΙΣΤΕΙΑΕΧΩΝΒΑΣΙΛΕΥΣΑΙΤΩΝΑΝΘΡΩΠΩΝΑΠΙΣΤΑΜΕΝΔΗΤΑΤΟΙΑΥΤΑΛΕΓΩΟΜΩΣΔΕΑΑΥΤΗΕΓΝΩΚΑΟΥΚΕΨΕΥΣΑΜΗΝ \end{document} ```
https://tex.stackexchange.com/users/277990
How to automatically wrap lines in scriptio continua
true
I would use `\XeTeXinterchartoks` which allows you to automatically insert things between characters which allow for breaks. ``` % TeX Program = xelatex \documentclass{book} \usepackage{geometry} \usepackage[skip=0pt, indent=20pt]{parskip} \usepackage{microtype} \usepackage[english,greek]{babel} \usepackage{fontspec} \setmainfont{Times New Roman} \newenvironment{scriptiocontinua}{% \XeTeXinterchartokenstate=1% \XeTeXinterchartoks 0 0 = {\penalty0\hskip0pt plus 1em\relax}% }{} \begin{document} \begin{scriptiocontinua} ΑΜΕΝΑΡΤΑΣΤΟΥΒΑΣΙΛΙΚΟΥΓΕΝΟΥΣΤΟΥΑΙΓΥΠΤΙΟΥΗΤΟΥΚΑΛΛΙΚΡΑΤΟΥΣΙΣΙΔΟΣΙΕΡΕΩΣΗΝΟΙΜΕΝΘΕΟΙΤΡΕΦΟΥΣΙΤΑΔΕΔΑΙΜΟΝΙΑΥΠΟΤΑΣΣΕΤΑΙΗΔΗΤΕΛΕΥΤΩΣΑΤΙΣΙΣΘΕΝΕΙΤΩΠΑΙΔΙΕΠΙΣΤΕΛΛΕΙΤΑΔΕΣΥΝΕΦΥΓΟΝΓΑΡΠΟΤΕΕΚΤΗΣΑΙΓΥΠΤΙΑΣΕΠΙΝΕΚΤΑΝΕΒΟΥΜΕΤΑΤΟΥΣΟΥΠΑΤΡΟΣΔΙΑΤΟΝΕΡΩΤΑΤΟΝΕΜΟΝΕΠΙΟΡΚΗΣΑΝΤΟΣΦΥΓΟΝΤΕΣΔΕΠΡΟΣΝΟΤΟΝΔΙΑΠΟΝΤΙΟΙΚΑΙΚΔΜΗΝΑΣΚΑΤΑΤΑΠΑΡΑΘΑΛΑΣΣΙΑΤΗΣΛΙΒΥΗΣΤΑΠΡΟΣΗΛΙΟΥΑΝΑΤΟΛΑΣΠΛΑΝΗΘΕΝΤΕΣΕΝΘΑΠΕΡΠΕΤΡΑΤΙΣΜΕΓΑΛΗΓΛΥΠΤΟΝΟΜΟΙΩΜΑΑΙΘΙΟΠΟΣΚΕΦΑΛΗΣΕΙΤΑΗΜΕΡΑΣΔΑΠΟΣΤΟΜΑΤΟΣΠΟΤΑΜΟΥΜΕΓΑΛΟΥΕΚΠΕΣΟΝΤΕΣΟΙΜΕΝΚΑΤΕΠΟΝΤΙΣΘΗΜΕΝΟΙΔΕΝΟΣΩΙΑΠΕΘΑΝΟΜΕΝΤΕΛΟΣΔΕΥΠΑΓΡΙΩΝΑΝΘΡΩΠΩΝΕΦΕΡΟΜΕΘΑΔΙΑΕΛΕΩΝΤΕΚΑΙΤΕΝΑΓΕΩΝΕΝΘΑΠΕΡΠΤΗΝΩΝΠΛΗΘΟΣΑΠΟΚΡΥΠΤΕΙΤΟΝΟΥΡΑΝΟΝΗΜΕΡΑΣΙΕΩΣΗΛΘΟΜΕΝΕΙΣΚΟΙΛΟΝΤΙΟΡΟΣΕΝΘΑΠΟΤΕΜΕΓΑΛΗΜΕΝΠΟΛΙΣΗΝΑΝΤΡΑΔΕΑΠΕΙΡΟΝΑΗΓΑΓΟΝΔΕΩΣΒΑΣΙΛΕΙΑΝΤΗΝΤΩΝΞΕΝΟΥΣΧΥΤΡΑΙΣΣΤΕΦΑΝΟΥΝΤΩΝΗΤΙΣΜΑΓΕΙΑΜΕΝΕΧΡΗΤΟΕΠΙΣΤΗΜΗΔΕΠΑΝΤΩΝΚΑΙΔΗΚΑΙΚΑΛΛΟΣΚΑΙΡΩΜΗΝΑΓΗΡΩΣΗΝΗΔΕΚΑΛΛΙΚΡΑΤΟΥΣΤΟΥΣΟΥΠΑΤΡΟΣΕΡΑΣΘΕΙΣΑΤΟΜΕΝΠΡΩΤΟΝΣΥΝΟΙΚΕΙΝΕΒΟΥΛΕΤΟΕΜΕΔΕΑΝΕΛΕΙΝΕΠΕΙΤΑΩΣΟΥΚΑΝΕΠΕΙΘΕΝΕΜΕΓΑΡΥΠΕΡΕΦΙΛΕΙΚΑΙΤΗΝΞΕΝΗΝΕΦΟΒΕΙΤΟΑΠΗΓΑΓΕΝΗΜΑΣΥΠΟΜΑΓΕΙΑΣΚΑΘΟΔΟΥΣΣΦΑΛΕΡΑΣΕΝΘΑΤΟΒΑΡΑΘΡΟΝΤΟΜΕΓΑΟΥΚΑΤΑΣΤΟΜΑΕΚΕΙΤΟΟΓΕΡΩΝΟΦΙΛΟΣΟΦΟΣΤΕΘΝΕΩΣΑΦΙΚΟΜΕΝΟΙΣΔΕΔΕΙΞΕΦΩΣΤΟΥΒΙΟΥΕΥΘΥΟΙΟΝΚΙΟΝΑΕΛΙΣΣΟΜΕΝΟΝΦΩΝΗΝΙΕΝΤΑΚΑΘΑΠΕΡΒΡΟΝΤΗΣΕΙΤΑΔΙΑΠΥΡΟΣΒΕΒΗΚΥΙΑΑΒΛΑΒΗΣΚΑΙΕΤΙΚΑΛΛΙΩΝΑΥΤΗΕΑΥΤΗΣΕΞΕΦΑΝΗΕΚΔΕΤΟΥΤΩΝΩΜΟΣΕΚΑΙΤΟΝΣΟΝΠΑΤΕΡΑΑΘΑΝΑΤΟΝΑΠΟΔΕΙΞΕΙΝΕΙΣΥΝΟΙΚΕΙΝΟΙΒΟΥΛΟΙΤΟΕΜΕΔΕΑΝΕΛΕΙΝΟΥΓΑΡΟΥΝΑΥΤΗΑΝΕΛΕΙΝΙΣΧΥΕΝΥΠΟΤΩΝΗΜΕΔΑΠΩΝΗΝΚΑΙΑΥΤΗΕΧΩΜΑΓΕΙΑΣΟΔΟΥΔΕΝΤΙΜΑΛΛΟΝΗΘΕΛΕΤΩΧΕΙΡΕΤΩΝΟΜΜΑΤΩΝΠΡΟΙΣΧΩΝΙΝΑΔΗΤΟΤΗΣΓΥΝΑΙΚΟΣΚΑΛΛΟΣΜΗΟΡΩΗΕΠΕΙΤΑΟΡΓΙΣΘΕΙΣΑΚΑΤΕΓΟΗΤΕΥΣΕΜΕΝΑΥΤΟΝΑΠΟΛΟΜΕΝΟΝΜΕΝΤΟΙΚΛΑΟΥΣΑΚΑΙΟΔΥΡΟΜΕΝΗΕΚΕΙΘΕΝΑΠΗΝΕΓΚΕΝΕΜΕΔΕΦΟΒΩΙΑΦΗΚΕΝΕΙΣΣΤΟΜΑΤΟΥΜΕΓΑΛΟΥΠΟΤΑΜΟΥΤΟΥΝΑΥΣΙΠΟΡΟΥΠΟΡΡΩΔΕΝΑΥΣΙΝΕΦΩΝΠΕΡΠΛΕΟΥΣΑΕΤΕΚΟΝΣΕΑΠΟΠΛΕΥΣΑΣΑΜΟΛΙΣΠΟΤΕΔΕΥΡΟΑΘΗΝΑΖΕΚΑΤΗΓΑΓΟΜΗΝΣΥΔΕΩΤΙΣΙΣΘΕΝΕΣΩΝΕΠΙΣΤΕΛΛΩΜΗΟΛΙΓΩΡΕΙΔΕΙΓΑΡΤΗΝΓΥΝΑΙΚΑΑΝΑΖΗΤΕΙΝΗΝΠΩΣΤΟΤΟΥΒΙΟΥΜΥΣΤΗΡΙΟΝΑΝΕΥΡΗΣΚΑΙΑΝΑΙΡΕΙΝΗΝΠΟΥΠΑΡΑΣΧΗΔΙΑΤΟΝΣΟΝΠΑΤΕΡΑΚΑΛΛΙΚΡΑΤΗΝΕΙΔΕΦΟΒΟΥΜΕΝΟΣΗΔΙΑΑΛΛΟΤΙΑΥΤΟΣΛΕΙΠΕΙΤΟΥΕΡΓΟΥΠΑΣΙΤΟΙΣΥΣΤΕΡΟΝΑΥΤΟΤΟΥΤΟΕΠΙΣΤΕΛΛΩΕΩΣΠΟΤΕΑΓΑΘΟΣΤΙΣΓΕΝΟΜΕΝΟΣΤΩΠΥΡΙΛΟΥΣΑΣΘΑΙΤΟΛΜΗΣΕΙΚΑΙΤΑΑΡΙΣΤΕΙΑΕΧΩΝΒΑΣΙΛΕΥΣΑΙΤΩΝΑΝΘΡΩΠΩΝΑΠΙΣΤΑΜΕΝΔΗΤΑΤΟΙΑΥΤΑΛΕΓΩΟΜΩΣΔΕΑΑΥΤΗΕΓΝΩΚΑΟΥΚΕΨΕΥΣΑΜΗΝ \end{scriptiocontinua} \end{document} ```
4
https://tex.stackexchange.com/users/87678
689658
319,941
https://tex.stackexchange.com/questions/689647
0
I have a general question. If I'm writing a .cls file (or a package file, as well), what's the best way to edit standard commands like `\section` which are defined by the used standard class or latex.ltx? In this hypothetic case, for example, I could use a package like `titlesec`, or the `\patchcmd` from `etoolbox`, or do a complete redefinition with `RenewDocumentCommand`/`renewcmand`. Which of these possibilities is the most robust respectively most save way to alter such a command, and why? If I had to guess, I would say its the most simplistic way with renewing, because it needs less additional packages, but I may be wrong. **Edit** Because my question may have been a little bit to unspecific, I try to make it clearer. Assuming I'm writing a class file which provides the layout of a specific journal and, in best case, can be added to CTAN. If I want to change the styling of sectioning commands in such a case, but of course preserve aspects like numbering, ToC etc. What would be the most robust/savest way in such a scenario? Thanks in advance!
https://tex.stackexchange.com/users/297560
Which way to alter commands is more robust/sustainable
false
As Alan Munn notes in his comment, "It depends." For a style (`.sty`) I would suggest using a package, since your `.sty` could be used with almost any class, and redefining a "standard" command will lead to many things not behaving in a way that the document author may expect. The `\section` command does far more than set the font to a larger size, make it bold, and make it sanserif. If you `\renewcommand` or `\RenewDocumentCommand` the `\section` command to (for example) `{\Large \textbf{\textsf{#1}}}`, you lose all ability to make a Table of Contents (and internal references to headings, and section numbers, and ...). If you are writing your own class for your own use, and never intend to release it, choose the easiest option for you that does what you want. If you are writing your own class (`.cls` file) to be released for the public to use, make the `\section` command at least comparable to the standard one (that is, numbering as needed, style as you want it, table of contents, references). There are packages which handle all of this complex detail for you, which means that you don't need to consider all of the edge-cases and bits *you* don't use, but others might. ### TLDR: There are many edge cases and uses that you may not notice because you don't use them. Others might (and probably do). A well-written existing package takes care of that so you don't have to.
1
https://tex.stackexchange.com/users/244233
689661
319,942
https://tex.stackexchange.com/questions/689660
8
Any reason to prefer one over the other? Or are they exactly the same?
https://tex.stackexchange.com/users/nan
Any difference between \binom vs \choose?
true
* `\choose` is a plain-TeX math-mode macro. Syntax: `{n-k\choose k}`. Note that the macro uses TeX's (in)famous infix syntax. * `\binom` is a LaTeX math-mode macro provided by the [amsmath](https://www.ctan.org/pkg/amsmath) package. Syntax: `\binom{n-k}{k}`. No infix syntax here; instead, two explicit arguments. * A comparable distinction arises between plain-TeX's `\over` directive, to be used as `{a+b\over c+d}`, versus LaTeX's `\frac` macro, to be used as `\frac{a+b}{c+d}`. If you're not used to TeX's infix notation syntax, you're probably better off sticking with the LaTeX macros. * Just like the `amsmath` package provides `\dfrac` and `\tfrac` as display-style and text-style companions to `\frac`, the package also provides the macros `\dbinom` and `\tbinom` as companions to `\binom`. There is no equivalent one-letter modifier for `\choose` or, for that matter, `\over`. * When used appropriately, both `\choose` and `\binom` should give exactly the same result. Emphasis on *appropriately*. As always, if you know what you're doing, there's no real downside to using `\choose` along with its infix syntax. In contrast, if you're not in that group, using `\binom` (or `\tbinom` or `\dbinom`) is probably the way to go.
18
https://tex.stackexchange.com/users/5001
689662
319,943
https://tex.stackexchange.com/questions/689343
0
I am trying to compile a tex file in overleaf, I am using IEEEAccess template to write the manuscript. When I compile the latex throws the error on the given algorithm script. I am showing the initial page too with the environments. Environments: ``` \documentclass{ieeeaccess} \usepackage{cite} \usepackage[ruled,lined,linesnumbered]{algorithm2e} \usepackage{amsmath,amssymb,amsfonts} \usepackage{graphicx} \usepackage{textcomp} \usepackage{csquotes} \usepackage{color} \newcommand{\cb}{\textcolor{blue}} \newcommand{\cred}{\textcolor{red}} \newcommand{\cg}{\textcolor{green}} \usepackage{amsthm} \newtheorem{lem}{Lemma} \newtheorem{definition}{Definition} ``` The script for the algorithm. ``` \begin{algorithm}[h!] \SetAlgoLined \SetKwInOut{Input}{Input} \SetKwInOut{Output}{Output} \Input{$G =\left \langle N,E,W \right \rangle:$ graph network, $B\left(G_{i}\right):$ Set of boundary nodes, $E_{b}:$ Set of boundary edges} \Output{$G_{emb}:$ Embedded Graph Network} %initialize $Dist_{mat}\left(k,v\right) \leftarrow \emptyset$\; \protect Step-1: Compute the shortest path from each boundary node to another boundary node\\ \ForEach{boundary node $n^{b}_{i} \in B\left(G_{i}\right)$}{ \emph{SPList} $\left(B_{spf}\right) \leftarrow YenAlgorithm.runSP\left(G, srcVertex, destVertex\right)$ } \KwRet{$\emph{SPList} \left(B_{sp}\right)$} \protect Step-2: Create an Embedded network by unifying the shortest-path list\\ $G_{emb} \leftarrow \emptyset$ \tcp*{Create a new empty graph} \ForEach{$e_{ij} \in E_{b}$}{ $G_{emb} \leftarrow \emph{addEdge}\left(e_{ij}\right)$ } \ForEach{\emph{shortest-path} $\left(B_{sp}\right) \in \emph{SPList} \left(B_{sp}\right)$}{ \If{$e_{ij} \in E_{b}$}{ \If{$n^{b}_{i}.partitionId = n^{b}_{j}.partitionId$}{ $G_{emb} \leftarrow \emph{addEdge}\left(e_{ij}\right)$}} } \KwRet{$G_{emb}$} \caption{Embedded Graph Construction} \label{alg:embGraph} \end{algorithm} ``` The file compiles however, the algorithm adds negative -2 in front of the line numbers. [![The output of the algorithm][1]][1] The errors are: Argument of \relsize has an extra }. Argument of \relsize has an extra }. Argument of \relsize has an extra }. Runaway argument? Argument of @algocf@endoption has an extra }. The errors are in the following lines: [![Overleaf Script][2]][2] How do I solve this issue? The tex file compiles completely fine if I remove the algorithm part. [1]: <https://i.stack.imgur.com/vE5Gl.png> [2]: <https://i.stack.imgur.com/GYlyv.png>
https://tex.stackexchange.com/users/299540
Latex "algorithm2e" giving error while writing an algorithm in IEEEAccess template
false
Solution: Just add these 3 lines of code in the latex file. ``` \RequirePackage{letltxmacro} \LetLtxMacro{\LaTeXtextbf}{\textbf} \LetLtxMacro{\textbf}{\LaTeXtextbf} \documentclass{ieeeaccess} ``` Once I added these lines and compiled them, the algorithms were back to normal with the correct line numbers.
0
https://tex.stackexchange.com/users/299540
689663
319,944
https://tex.stackexchange.com/questions/689549
3
How to wrap lines automatically for scriptio continua (contexts in which there are no devices whereby to separate distinct words)? I am using XeLaTeX. For example, the following code does not produce a PDF due to an error that reads **Overfull \hbox (11856.81178pt too wide) in paragraph at lines 14--15**. ``` \documentclass{book} \usepackage{geometry} \usepackage[skip=0pt, indent=20pt]{parskip} \usepackage{microtype} \usepackage[english,greek]{babel} \usepackage{fontspec} \setmainfont{Times New Roman} \emergencystretch 30pt \begin{document} ΑΜΕΝΑΡΤΑΣΤΟΥΒΑΣΙΛΙΚΟΥΓΕΝΟΥΣΤΟΥΑΙΓΥΠΤΙΟΥΗΤΟΥΚΑΛΛΙΚΡΑΤΟΥΣΙΣΙΔΟΣΙΕΡΕΩΣΗΝΟΙΜΕΝΘΕΟΙΤΡΕΦΟΥΣΙΤΑΔΕΔΑΙΜΟΝΙΑΥΠΟΤΑΣΣΕΤΑΙΗΔΗΤΕΛΕΥΤΩΣΑΤΙΣΙΣΘΕΝΕΙΤΩΠΑΙΔΙΕΠΙΣΤΕΛΛΕΙΤΑΔΕΣΥΝΕΦΥΓΟΝΓΑΡΠΟΤΕΕΚΤΗΣΑΙΓΥΠΤΙΑΣΕΠΙΝΕΚΤΑΝΕΒΟΥΜΕΤΑΤΟΥΣΟΥΠΑΤΡΟΣΔΙΑΤΟΝΕΡΩΤΑΤΟΝΕΜΟΝΕΠΙΟΡΚΗΣΑΝΤΟΣΦΥΓΟΝΤΕΣΔΕΠΡΟΣΝΟΤΟΝΔΙΑΠΟΝΤΙΟΙΚΑΙΚΔΜΗΝΑΣΚΑΤΑΤΑΠΑΡΑΘΑΛΑΣΣΙΑΤΗΣΛΙΒΥΗΣΤΑΠΡΟΣΗΛΙΟΥΑΝΑΤΟΛΑΣΠΛΑΝΗΘΕΝΤΕΣΕΝΘΑΠΕΡΠΕΤΡΑΤΙΣΜΕΓΑΛΗΓΛΥΠΤΟΝΟΜΟΙΩΜΑΑΙΘΙΟΠΟΣΚΕΦΑΛΗΣΕΙΤΑΗΜΕΡΑΣΔΑΠΟΣΤΟΜΑΤΟΣΠΟΤΑΜΟΥΜΕΓΑΛΟΥΕΚΠΕΣΟΝΤΕΣΟΙΜΕΝΚΑΤΕΠΟΝΤΙΣΘΗΜΕΝΟΙΔΕΝΟΣΩΙΑΠΕΘΑΝΟΜΕΝΤΕΛΟΣΔΕΥΠΑΓΡΙΩΝΑΝΘΡΩΠΩΝΕΦΕΡΟΜΕΘΑΔΙΑΕΛΕΩΝΤΕΚΑΙΤΕΝΑΓΕΩΝΕΝΘΑΠΕΡΠΤΗΝΩΝΠΛΗΘΟΣΑΠΟΚΡΥΠΤΕΙΤΟΝΟΥΡΑΝΟΝΗΜΕΡΑΣΙΕΩΣΗΛΘΟΜΕΝΕΙΣΚΟΙΛΟΝΤΙΟΡΟΣΕΝΘΑΠΟΤΕΜΕΓΑΛΗΜΕΝΠΟΛΙΣΗΝΑΝΤΡΑΔΕΑΠΕΙΡΟΝΑΗΓΑΓΟΝΔΕΩΣΒΑΣΙΛΕΙΑΝΤΗΝΤΩΝΞΕΝΟΥΣΧΥΤΡΑΙΣΣΤΕΦΑΝΟΥΝΤΩΝΗΤΙΣΜΑΓΕΙΑΜΕΝΕΧΡΗΤΟΕΠΙΣΤΗΜΗΔΕΠΑΝΤΩΝΚΑΙΔΗΚΑΙΚΑΛΛΟΣΚΑΙΡΩΜΗΝΑΓΗΡΩΣΗΝΗΔΕΚΑΛΛΙΚΡΑΤΟΥΣΤΟΥΣΟΥΠΑΤΡΟΣΕΡΑΣΘΕΙΣΑΤΟΜΕΝΠΡΩΤΟΝΣΥΝΟΙΚΕΙΝΕΒΟΥΛΕΤΟΕΜΕΔΕΑΝΕΛΕΙΝΕΠΕΙΤΑΩΣΟΥΚΑΝΕΠΕΙΘΕΝΕΜΕΓΑΡΥΠΕΡΕΦΙΛΕΙΚΑΙΤΗΝΞΕΝΗΝΕΦΟΒΕΙΤΟΑΠΗΓΑΓΕΝΗΜΑΣΥΠΟΜΑΓΕΙΑΣΚΑΘΟΔΟΥΣΣΦΑΛΕΡΑΣΕΝΘΑΤΟΒΑΡΑΘΡΟΝΤΟΜΕΓΑΟΥΚΑΤΑΣΤΟΜΑΕΚΕΙΤΟΟΓΕΡΩΝΟΦΙΛΟΣΟΦΟΣΤΕΘΝΕΩΣΑΦΙΚΟΜΕΝΟΙΣΔΕΔΕΙΞΕΦΩΣΤΟΥΒΙΟΥΕΥΘΥΟΙΟΝΚΙΟΝΑΕΛΙΣΣΟΜΕΝΟΝΦΩΝΗΝΙΕΝΤΑΚΑΘΑΠΕΡΒΡΟΝΤΗΣΕΙΤΑΔΙΑΠΥΡΟΣΒΕΒΗΚΥΙΑΑΒΛΑΒΗΣΚΑΙΕΤΙΚΑΛΛΙΩΝΑΥΤΗΕΑΥΤΗΣΕΞΕΦΑΝΗΕΚΔΕΤΟΥΤΩΝΩΜΟΣΕΚΑΙΤΟΝΣΟΝΠΑΤΕΡΑΑΘΑΝΑΤΟΝΑΠΟΔΕΙΞΕΙΝΕΙΣΥΝΟΙΚΕΙΝΟΙΒΟΥΛΟΙΤΟΕΜΕΔΕΑΝΕΛΕΙΝΟΥΓΑΡΟΥΝΑΥΤΗΑΝΕΛΕΙΝΙΣΧΥΕΝΥΠΟΤΩΝΗΜΕΔΑΠΩΝΗΝΚΑΙΑΥΤΗΕΧΩΜΑΓΕΙΑΣΟΔΟΥΔΕΝΤΙΜΑΛΛΟΝΗΘΕΛΕΤΩΧΕΙΡΕΤΩΝΟΜΜΑΤΩΝΠΡΟΙΣΧΩΝΙΝΑΔΗΤΟΤΗΣΓΥΝΑΙΚΟΣΚΑΛΛΟΣΜΗΟΡΩΗΕΠΕΙΤΑΟΡΓΙΣΘΕΙΣΑΚΑΤΕΓΟΗΤΕΥΣΕΜΕΝΑΥΤΟΝΑΠΟΛΟΜΕΝΟΝΜΕΝΤΟΙΚΛΑΟΥΣΑΚΑΙΟΔΥΡΟΜΕΝΗΕΚΕΙΘΕΝΑΠΗΝΕΓΚΕΝΕΜΕΔΕΦΟΒΩΙΑΦΗΚΕΝΕΙΣΣΤΟΜΑΤΟΥΜΕΓΑΛΟΥΠΟΤΑΜΟΥΤΟΥΝΑΥΣΙΠΟΡΟΥΠΟΡΡΩΔΕΝΑΥΣΙΝΕΦΩΝΠΕΡΠΛΕΟΥΣΑΕΤΕΚΟΝΣΕΑΠΟΠΛΕΥΣΑΣΑΜΟΛΙΣΠΟΤΕΔΕΥΡΟΑΘΗΝΑΖΕΚΑΤΗΓΑΓΟΜΗΝΣΥΔΕΩΤΙΣΙΣΘΕΝΕΣΩΝΕΠΙΣΤΕΛΛΩΜΗΟΛΙΓΩΡΕΙΔΕΙΓΑΡΤΗΝΓΥΝΑΙΚΑΑΝΑΖΗΤΕΙΝΗΝΠΩΣΤΟΤΟΥΒΙΟΥΜΥΣΤΗΡΙΟΝΑΝΕΥΡΗΣΚΑΙΑΝΑΙΡΕΙΝΗΝΠΟΥΠΑΡΑΣΧΗΔΙΑΤΟΝΣΟΝΠΑΤΕΡΑΚΑΛΛΙΚΡΑΤΗΝΕΙΔΕΦΟΒΟΥΜΕΝΟΣΗΔΙΑΑΛΛΟΤΙΑΥΤΟΣΛΕΙΠΕΙΤΟΥΕΡΓΟΥΠΑΣΙΤΟΙΣΥΣΤΕΡΟΝΑΥΤΟΤΟΥΤΟΕΠΙΣΤΕΛΛΩΕΩΣΠΟΤΕΑΓΑΘΟΣΤΙΣΓΕΝΟΜΕΝΟΣΤΩΠΥΡΙΛΟΥΣΑΣΘΑΙΤΟΛΜΗΣΕΙΚΑΙΤΑΑΡΙΣΤΕΙΑΕΧΩΝΒΑΣΙΛΕΥΣΑΙΤΩΝΑΝΘΡΩΠΩΝΑΠΙΣΤΑΜΕΝΔΗΤΑΤΟΙΑΥΤΑΛΕΓΩΟΜΩΣΔΕΑΑΥΤΗΕΓΝΩΚΑΟΥΚΕΨΕΥΣΑΜΗΝ \end{document} ```
https://tex.stackexchange.com/users/277990
How to automatically wrap lines in scriptio continua
false
You can add `\hskip0pt plus 1em` after each printed character in a recursive loop. This solution works in each TeX engines (no only XeTeX). For example in OpTeX: ``` \fontfam[newcm] \long\def\scriptiocontinua#1{#1% \unless\ifcat#1\relax \hskip0pt plus1em\relax \expandafter\scriptiocontinua\fi } \scriptiocontinua ΑΜΕΝΑΡΤΑΣΤΟΥΒΑΣΙΛΙΚΟΥΓΕΝΟΥΣΤΟΥΑΙΓΥΠΤΙΟΥΗΤΟΥΚΑΛΛΙΚΡΑΤΟΥΣΙΣΙΔΟΣΙΕΡΕΩΣΗΝΟΙΜΕΝΘΕΟΙΤΡΕΦΟΥΣΙΤΑΔΕΔΑΙΜΟΝΙΑΥΠΟΤΑΣΣΕΤΑΙΗΔΗΤΕΛΕΥΤΩΣΑΤΙΣΙΣΘΕΝΕΙΤΩΠΑΙΔΙΕΠΙΣΤΕΛΛΕΙΤΑΔΕΣΥΝΕΦΥΓΟΝΓΑΡΠΟΤΕΕΚΤΗΣΑΙΓΥΠΤΙΑΣΕΠΙΝΕΚΤΑΝΕΒΟΥΜΕΤΑΤΟΥΣΟΥΠΑΤΡΟΣΔΙΑΤΟΝΕΡΩΤΑΤΟΝΕΜΟΝΕΠΙΟΡΚΗΣΑΝΤΟΣΦΥΓΟΝΤΕΣΔΕΠΡΟΣΝΟΤΟΝΔΙΑΠΟΝΤΙΟΙΚΑΙΚΔΜΗΝΑΣΚΑΤΑΤΑΠΑΡΑΘΑΛΑΣΣΙΑΤΗΣΛΙΒΥΗΣΤΑΠΡΟΣΗΛΙΟΥΑΝΑΤΟΛΑΣΠΛΑΝΗΘΕΝΤΕΣΕΝΘΑΠΕΡΠΕΤΡΑΤΙΣΜΕΓΑΛΗΓΛΥΠΤΟΝΟΜΟΙΩΜΑΑΙΘΙΟΠΟΣΚΕΦΑΛΗΣΕΙΤΑΗΜΕΡΑΣΔΑΠΟΣΤΟΜΑΤΟΣΠΟΤΑΜΟΥΜΕΓΑΛΟΥΕΚΠΕΣΟΝΤΕΣΟΙΜΕΝΚΑΤΕΠΟΝΤΙΣΘΗΜΕΝΟΙΔΕΝΟΣΩΙΑΠΕΘΑΝΟΜΕΝΤΕΛΟΣΔΕΥΠΑΓΡΙΩΝΑΝΘΡΩΠΩΝΕΦΕΡΟΜΕΘΑΔΙΑΕΛΕΩΝΤΕΚΑΙΤΕΝΑΓΕΩΝΕΝΘΑΠΕΡΠΤΗΝΩΝΠΛΗΘΟΣΑΠΟΚΡΥΠΤΕΙΤΟΝΟΥΡΑΝΟΝΗΜΕΡΑΣΙΕΩΣΗΛΘΟΜΕΝΕΙΣΚΟΙΛΟΝΤΙΟΡΟΣΕΝΘΑΠΟΤΕΜΕΓΑΛΗΜΕΝΠΟΛΙΣΗΝΑΝΤΡΑΔΕΑΠΕΙΡΟΝΑΗΓΑΓΟΝΔΕΩΣΒΑΣΙΛΕΙΑΝΤΗΝΤΩΝΞΕΝΟΥΣΧΥΤΡΑΙΣΣΤΕΦΑΝΟΥΝΤΩΝΗΤΙΣΜΑΓΕΙΑΜΕΝΕΧΡΗΤΟΕΠΙΣΤΗΜΗΔΕΠΑΝΤΩΝΚΑΙΔΗΚΑΙΚΑΛΛΟΣΚΑΙΡΩΜΗΝΑΓΗΡΩΣΗΝΗΔΕΚΑΛΛΙΚΡΑΤΟΥΣΤΟΥΣΟΥΠΑΤΡΟΣΕΡΑΣΘΕΙΣΑΤΟΜΕΝΠΡΩΤΟΝΣΥΝΟΙΚΕΙΝΕΒΟΥΛΕΤΟΕΜΕΔΕΑΝΕΛΕΙΝΕΠΕΙΤΑΩΣΟΥΚΑΝΕΠΕΙΘΕΝΕΜΕΓΑΡΥΠΕΡΕΦΙΛΕΙΚΑΙΤΗΝΞΕΝΗΝΕΦΟΒΕΙΤΟΑΠΗΓΑΓΕΝΗΜΑΣΥΠΟΜΑΓΕΙΑΣΚΑΘΟΔΟΥΣΣΦΑΛΕΡΑΣΕΝΘΑΤΟΒΑΡΑΘΡΟΝΤΟΜΕΓΑΟΥΚΑΤΑΣΤΟΜΑΕΚΕΙΤΟΟΓΕΡΩΝΟΦΙΛΟΣΟΦΟΣΤΕΘΝΕΩΣΑΦΙΚΟΜΕΝΟΙΣΔΕΔΕΙΞΕΦΩΣΤΟΥΒΙΟΥΕΥΘΥΟΙΟΝΚΙΟΝΑΕΛΙΣΣΟΜΕΝΟΝΦΩΝΗΝΙΕΝΤΑΚΑΘΑΠΕΡΒΡΟΝΤΗΣΕΙΤΑΔΙΑΠΥΡΟΣΒΕΒΗΚΥΙΑΑΒΛΑΒΗΣΚΑΙΕΤΙΚΑΛΛΙΩΝΑΥΤΗΕΑΥΤΗΣΕΞΕΦΑΝΗΕΚΔΕΤΟΥΤΩΝΩΜΟΣΕΚΑΙΤΟΝΣΟΝΠΑΤΕΡΑΑΘΑΝΑΤΟΝΑΠΟΔΕΙΞΕΙΝΕΙΣΥΝΟΙΚΕΙΝΟΙΒΟΥΛΟΙΤΟΕΜΕΔΕΑΝΕΛΕΙΝΟΥΓΑΡΟΥΝΑΥΤΗΑΝΕΛΕΙΝΙΣΧΥΕΝΥΠΟΤΩΝΗΜΕΔΑΠΩΝΗΝΚΑΙΑΥΤΗΕΧΩΜΑΓΕΙΑΣΟΔΟΥΔΕΝΤΙΜΑΛΛΟΝΗΘΕΛΕΤΩΧΕΙΡΕΤΩΝΟΜΜΑΤΩΝΠΡΟΙΣΧΩΝΙΝΑΔΗΤΟΤΗΣΓΥΝΑΙΚΟΣΚΑΛΛΟΣΜΗΟΡΩΗΕΠΕΙΤΑΟΡΓΙΣΘΕΙΣΑΚΑΤΕΓΟΗΤΕΥΣΕΜΕΝΑΥΤΟΝΑΠΟΛΟΜΕΝΟΝΜΕΝΤΟΙΚΛΑΟΥΣΑΚΑΙΟΔΥΡΟΜΕΝΗΕΚΕΙΘΕΝΑΠΗΝΕΓΚΕΝΕΜΕΔΕΦΟΒΩΙΑΦΗΚΕΝΕΙΣΣΤΟΜΑΤΟΥΜΕΓΑΛΟΥΠΟΤΑΜΟΥΤΟΥΝΑΥΣΙΠΟΡΟΥΠΟΡΡΩΔΕΝΑΥΣΙΝΕΦΩΝΠΕΡΠΛΕΟΥΣΑΕΤΕΚΟΝΣΕΑΠΟΠΛΕΥΣΑΣΑΜΟΛΙΣΠΟΤΕΔΕΥΡΟΑΘΗΝΑΖΕΚΑΤΗΓΑΓΟΜΗΝΣΥΔΕΩΤΙΣΙΣΘΕΝΕΣΩΝΕΠΙΣΤΕΛΛΩΜΗΟΛΙΓΩΡΕΙΔΕΙΓΑΡΤΗΝΓΥΝΑΙΚΑΑΝΑΖΗΤΕΙΝΗΝΠΩΣΤΟΤΟΥΒΙΟΥΜΥΣΤΗΡΙΟΝΑΝΕΥΡΗΣΚΑΙΑΝΑΙΡΕΙΝΗΝΠΟΥΠΑΡΑΣΧΗΔΙΑΤΟΝΣΟΝΠΑΤΕΡΑΚΑΛΛΙΚΡΑΤΗΝΕΙΔΕΦΟΒΟΥΜΕΝΟΣΗΔΙΑΑΛΛΟΤΙΑΥΤΟΣΛΕΙΠΕΙΤΟΥΕΡΓΟΥΠΑΣΙΤΟΙΣΥΣΤΕΡΟΝΑΥΤΟΤΟΥΤΟΕΠΙΣΤΕΛΛΩΕΩΣΠΟΤΕΑΓΑΘΟΣΤΙΣΓΕΝΟΜΕΝΟΣΤΩΠΥΡΙΛΟΥΣΑΣΘΑΙΤΟΛΜΗΣΕΙΚΑΙΤΑΑΡΙΣΤΕΙΑΕΧΩΝΒΑΣΙΛΕΥΣΑΙΤΩΝΑΝΘΡΩΠΩΝΑΠΙΣΤΑΜΕΝΔΗΤΑΤΟΙΑΥΤΑΛΕΓΩΟΜΩΣΔΕΑΑΥΤΗΕΓΝΩΚΑΟΥΚΕΨΕΥΣΑΜΗΝ \bye ```
3
https://tex.stackexchange.com/users/51799
689664
319,945
https://tex.stackexchange.com/questions/689666
0
I used my university thesis class to complete my dissertation. However, my university requires margins to be 1.5 inches on the left and 1 inch on the right, top, and bottom of the page. I have tried changing them in the .cls file, but I don't see them updated on the document. I have copied the part of the .cls file where the margins are declared. ``` \LoadClass{memoir} \RequirePackage{calc} % command for optional typesetting \newcommand{\pretty}[1]{} \if@pretty\renewcommand{\pretty}[1]{#1}\fi %set the margins %\RequirePackage[left=1.5in,right=1in,top=1in,bottom=1in,footskip=0.5in]{geometry} %\settrimmedsize{\stockheight}{\stockwidth}{*} \settrims{0in}{0in} \setstocksize{11in}{8.5in} \setlrmarginsandblock{1.5in}{1in}{*} \setulmarginsandblock{1in}{1in}{*} \setlength{\evensidemargin}{\oddsidemargin} \setheaderspaces{*}{\baselineskip}{*} \newlength{\@extrafootskip} \settoheight{\@extrafootskip}{1} \setheadfoot{.5in}{.5in}%-\@extrafootskip} \setmarginnotes{10pt}{1in}{1ex} \checkandfixthelayout \setsecnumdepth{subsection} \setcounter{tocdepth}{2} %modify the above lengths to account for the margins \newlength{\@topmatter}\setlength{\@topmatter}{1in} \newlength{\@bottommatter}\setlength{\@bottommatter}{1in} \setlength{\@topmatter}{\uppermargin} \addtolength{\@topmatter}{\headsep} \addtolength{\@bottommatter}{\lowermargin} ``` I am still getting all sides' margins to be 1 inch. Any help is greatly appreciated.
https://tex.stackexchange.com/users/299743
Margins are not updated in the document
false
* It is not entirely clear what you like to get. * Page layout in `memoir` document you can be simple defined for example with: ``` \documentclass[12pt,a4paper,openbib,twoside,openright]{memoir} \setstocksize{297mm}{210mm} \settrimmedsize{\stockheight}{\stockwidth}{*} \settypeblocksize{247mm}{120mm}{*}%237 \setulmargins{25mm}{*}{1} % upper, lower margin, ratio \setlrmarginsandblock{30mm}{60mm}{*}% spinner, outer margin, ratio \setmarginnotes{5mm}{45mm}{2.5mm} \checkandfixthelayout %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------------------------% \begin{document} page layout \end{document} ``` (example is taken from one of my textbook). * I must confess that I'm lost in your code example, so I'm not able to insert your desired text block and margins size. * For more details about setting of page layout see package documentation.
1
https://tex.stackexchange.com/users/18189
689670
319,946
https://tex.stackexchange.com/questions/689676
1
when I compile this document in texstudio using xelatex: ``` \documentclass{dolphinbook} \usepackage{xeCJK} \usepackage{subfiles} \usepackage{listings} \usepackage[bookmarksopen,bookmarksdepth=4]{hyperref} \setCJKmainfont{Noto Serif CJK SC} \begin{document} \begin{lstlisting} ddddd \end{lstlisting} \end{document} ``` shows error: ``` Undefined control sequence. \begin{lstlisting} ``` this is the `dolphinbook` class file looks like: ``` \NeedsTeXFormat{LaTeX2e} \ProvidesClass{dolphinbook} \LoadClass[8pt]{book} \RequirePackage{listings} \lstset{ alsolanguage= XML, tabsize=4, % frame=shadowbox, commentstyle=\color{red!50!green!50!blue!50}, frameround=tttt, rulesepcolor=\color{red!20!green!20!blue!20}, keywordstyle=\color{blue!90}\bfseries, showstringspaces=false, stringstyle=\ttfamily, keepspaces=true, % breakindent=22pt, % breaklines=true, numbers=left, stepnumber=1, %numberstyle=\tiny, numberstyle={\color[RGB]{0,192,192}\tiny}, numbersep=8pt, basicstyle=\ttfamily, showspaces=false, % escapechar=`, flexiblecolumns=true, % breaklines=true, breakautoindent=true,% breakindent=4em, % aboveskip=1em, tabsize=4, showstringspaces=false, backgroundcolor=\color[RGB]{245,245,244}, %backgroundcolor=\color[rgb]{0.91,0.91,0.91} escapeinside={``}{\_}, %% added by http://bbs.ctex.org/viewthread.php?tid=53451 fontadjust, captionpos=t, framextopmargin=2pt, framexbottommargin=2pt, abovecaptionskip=-3pt, belowcaptionskip=3pt, xleftmargin=1em, xrightmargin=1em, texcl=true } ``` Am I missing something? what should I do to fixed this issue?
https://tex.stackexchange.com/users/69600
Undefined control sequence. \begin{lstlisting} when using custom cls file
false
With `\RequirePackage{xcolor}` added into the `dolphinbook.cls` file, I can compile your code successfully.
1
https://tex.stackexchange.com/users/241621
689678
319,947
https://tex.stackexchange.com/questions/689659
0
I'm writing my thesis and I'm trying to print the list of acronyms. However, for those that I only call their short form (e.g. CPU), the hyperlink does not show in color. For the ones that are called "normally" i.e. their long form, the acronym is displayed correctly. This is what I'm trying to do ``` \documentclass{book} \usepackage{hyperref} \usepackage[usenames,dvipsnames,table,xcdraw]{xcolor} \hypersetup{ bookmarksnumbered=true, plainpages=false, pdfborder={0 0 0}, colorlinks, breaklinks=true, linkcolor=Sepia, urlcolor=NavyBlue, citecolor=Sepia, } \usepackage[printonlyused]{acronym} \newcommand*\acronymname{Acronyms} \newcommand*\acronymbiggest{zk-SNARK} \newcommand*\acronymfile{acros.tex} \def\printacronyms{% \chapter*{\acronymname} \begin{acronym}[\acronymbiggest] % the biggest acronym \input{\acronymfile} \end{acronym} } \title{} \author{} \date{} \begin{document} \printacronyms Test % \acf{CPU} % => The hyperlink is colored % \acs{CPU} % => The hyperlink is NOT colored \end{document} ``` In the `acros.tex` file, I have this line `\acro{CPU}{Central Processing Unit}`. Does any one know how I can fix this? Thanks in advance
https://tex.stackexchange.com/users/284691
Acronyms are not being hyperlinked
false
acronym creates a link from the list to the "main" use of the acronym. If you use only the short version it has no idea which one to use. You can choose one of your uses as a target and place the label manually: ``` \documentclass{book} \usepackage{hyperref} \usepackage{xcolor} \hypersetup{colorlinks} \usepackage[printonlyused]{acronym} \makeatletter \newcommand\ACplacelabel{\AC@placelabel} \makeatother \begin{document} \begin{acronym}[MWE] \acro{CPU}{Central Processing Unit} %linked \acro{MWE}{Minimal Working Example} %no link \end{acronym} \acs{MWE} \ACplacelabel{CPU}\acs{CPU} % \end{document} ```
1
https://tex.stackexchange.com/users/2388
689680
319,948
https://tex.stackexchange.com/questions/497228
7
Say one is talking about numbers `10^6`, `10^7`, `10^8`, `10^9` and so forth one can also write them as `1M`, `10M`, `100M`,`1G`, with their corresponding [SI unit prefixes](https://en.wikipedia.org/wiki/Metric_prefix#List_of_SI_prefixes). Is there a way to convert a number on the form ``` 10000000... 1E6 1E-6 -100000... ``` To a number with SI unit prefixes automatically? ``` ------------------------------------ Input | Output ------------------------------------ \prefix{1000000} | 1M \prefix{10000000} | 10M \prefix{100000000} | 100M \prefix{1000000000} | 1G \prefix{1E6} | 1M \prefix{-1E6} | 1μ ------------------------------------ ```
https://tex.stackexchange.com/users/8306
Automatically convert a number to use the correct SI unit prefix
false
With new version of siunitx, it is now possible to do: ``` \DeclareSIUnit\noop{\relax} \qty[drop-zero-decimal round-precision = 3, scientific-notation = engineering, exponent-to-prefix ]{1000000}{\noop} ```
3
https://tex.stackexchange.com/users/170313
689681
319,949
https://tex.stackexchange.com/questions/689674
1
I am using the latex workshop plugin in visual studio to write a tex file, everytime I save the document the background task will auto build the document, I have already find the auto compile in latex workshop but failed, is there any way to disable the auto compile process?
https://tex.stackexchange.com/users/69600
is it possible to disable the auto compile when using latex workshop plugin in visual studio
true
In `settings.json` set: ``` "latex-workshop.latex.autoBuild.run": "never" ``` According to the [wiki](https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#latex-workshoplatexautobuildrun), the string `latex-workshop.latex.autoBuild.run` has three possible values: `never`, `onSave` and `onFileChange`(default).
1
https://tex.stackexchange.com/users/241621
689683
319,950
https://tex.stackexchange.com/questions/689647
0
I have a general question. If I'm writing a .cls file (or a package file, as well), what's the best way to edit standard commands like `\section` which are defined by the used standard class or latex.ltx? In this hypothetic case, for example, I could use a package like `titlesec`, or the `\patchcmd` from `etoolbox`, or do a complete redefinition with `RenewDocumentCommand`/`renewcmand`. Which of these possibilities is the most robust respectively most save way to alter such a command, and why? If I had to guess, I would say its the most simplistic way with renewing, because it needs less additional packages, but I may be wrong. **Edit** Because my question may have been a little bit to unspecific, I try to make it clearer. Assuming I'm writing a class file which provides the layout of a specific journal and, in best case, can be added to CTAN. If I want to change the styling of sectioning commands in such a case, but of course preserve aspects like numbering, ToC etc. What would be the most robust/savest way in such a scenario? Thanks in advance!
https://tex.stackexchange.com/users/297560
Which way to alter commands is more robust/sustainable
false
Still opinion based, but too long for a comment. `\renewcommand` is far more readable and rather safe, if you start from the standard definition and make your changes, taking care to preserve the whole structure which provides the numbering etc. features as requested by OP and discussed in @enkorvaks answer. Nevertheless, I prefer to use `etoolbox`'s `patchcmd` for small changes (like e.g. `\large`->`\Large`) for better compatibility. And in the case of a large project loading many packages, it is rather unlikely that `etoolbox` it not anyway loaded by them. As an example, in most of my custom `.sty` or `.cls`, based on the standard `book` ckass, I use `\renewcommand` for significant changes in `chapter`s (in fact in `\@makechapterhead` and `\@makeschapterhead`), but `\patchcmd` for slight modifications of `\section` and `\subsection` (assuming that one understand how LaTeX's `\@startsection` works with its 6 argumemts). And, oppositely to many posts on this site, I would recommand to never use `titlesec`/`titleformat`, that breaks several things, the worse (for my use case) being incompatibility with `minitoc`. Another important thing is to make the changes early enough, especially before the loading of `hyperref` and many others that also alter the sectioning commands but are not usually listed in the packages to be loaded "very late", as the former is.
2
https://tex.stackexchange.com/users/33514
689684
319,951
https://tex.stackexchange.com/questions/689676
1
when I compile this document in texstudio using xelatex: ``` \documentclass{dolphinbook} \usepackage{xeCJK} \usepackage{subfiles} \usepackage{listings} \usepackage[bookmarksopen,bookmarksdepth=4]{hyperref} \setCJKmainfont{Noto Serif CJK SC} \begin{document} \begin{lstlisting} ddddd \end{lstlisting} \end{document} ``` shows error: ``` Undefined control sequence. \begin{lstlisting} ``` this is the `dolphinbook` class file looks like: ``` \NeedsTeXFormat{LaTeX2e} \ProvidesClass{dolphinbook} \LoadClass[8pt]{book} \RequirePackage{listings} \lstset{ alsolanguage= XML, tabsize=4, % frame=shadowbox, commentstyle=\color{red!50!green!50!blue!50}, frameround=tttt, rulesepcolor=\color{red!20!green!20!blue!20}, keywordstyle=\color{blue!90}\bfseries, showstringspaces=false, stringstyle=\ttfamily, keepspaces=true, % breakindent=22pt, % breaklines=true, numbers=left, stepnumber=1, %numberstyle=\tiny, numberstyle={\color[RGB]{0,192,192}\tiny}, numbersep=8pt, basicstyle=\ttfamily, showspaces=false, % escapechar=`, flexiblecolumns=true, % breaklines=true, breakautoindent=true,% breakindent=4em, % aboveskip=1em, tabsize=4, showstringspaces=false, backgroundcolor=\color[RGB]{245,245,244}, %backgroundcolor=\color[rgb]{0.91,0.91,0.91} escapeinside={``}{\_}, %% added by http://bbs.ctex.org/viewthread.php?tid=53451 fontadjust, captionpos=t, framextopmargin=2pt, framexbottommargin=2pt, abovecaptionskip=-3pt, belowcaptionskip=3pt, xleftmargin=1em, xrightmargin=1em, texcl=true } ``` Am I missing something? what should I do to fixed this issue?
https://tex.stackexchange.com/users/69600
Undefined control sequence. \begin{lstlisting} when using custom cls file
true
Don't trust short error messages delivered by some LaTeX front-ends. The exact error message is ``` ! Undefined control sequence. \lst@fillcolor ->\color [RGB]{245,245,244} l.12 \begin{lstlisting} ``` Since you apply colors in your `\lstset` setup, for instance ``` commentstyle=\color{red!50!green!50!blue!50}, ``` you want `xcolor` syntax. So add ``` \RequirePackage{xcolor} ``` to your class file. While you're at it, remove all the trailing `%` in the argument to `\lstset`: they're unnecessary and there's no reason for having them in some lines and not in others. And the option `[8pt]` to `book` is completely unknown: indeed ``` LaTeX Warning: Unused global option(s): [8pt]. ``` tells you exactly this.
1
https://tex.stackexchange.com/users/4427
689694
319,954
https://tex.stackexchange.com/questions/689695
4
Such a simple text makes me confused ``` \def\say#1{The argument is #1, I see it} \say{\catcode`{=12 \bf Hello} \bye ``` when TeX fails to compile it and reports ``` Runaway argument? {\catcode `{=12 \bf Hello} ! Forbidden control sequence found while scanning use of \say. <inserted text> \par <to be read again> \bye l.3 \bye ``` I guess TeX takes `{` of catcode 1 into token list when reading `\catcode`{` so that an unbalanced argument comes to be. For that, I change the command slightly, just adding an extra `}` at the end: ``` \say{\catcode`{=12 \bf Hello}} ``` Now a new error raises: ``` ! Too many }'s. <argument> \catcode `{=12 \bf Hello} \say #1->The argument is #1 , I see it l.2 \say{\catcode`{=12 \bf Hello}} ``` As you see, it also doesn't work. But if considering the token list, there are two left braces `{` of catcode 1 and two right braces `}` of catcode 2 following, thus the list seems to be in balance (maybe). Obviously TeX doesn't think so. Finally when I match `\catcode`{=12` with `\catcode`}=12`, it runs successfully: ``` \say{\catcode`{=12 \bf Hello\catcode`}=12} ``` This may imply that TeX first collects `\catcode`{=12 \bf Hello\catcode`}=12` as argument to `\say`, then analyzes the token list. So what happens? What a role does `{` in `\catcode`{` plays here? How does TeX judge whether the argument is balanced or not?
https://tex.stackexchange.com/users/299648
Using `\catcode` inside argument reports "Runaway argument" error
true
With ``` \def\say#1{The argument is #1, I see it} ``` the code ``` \say{\catcode`{=12 \bf Hello} \bye ``` is illegal, because `{` hasn't yet received category code 12, so TeX looks for a matching `}` and doesn't find it. Upon hitting `\bye`, which is illegal in a macro argument, TeX stops with the error about a “Forbidden control sequence”. If you add a closing brace ``` \say{\catcode`{=12 \bf Hello}} ``` then the argument is properly balanced. Now TeX will do macro replacement and the input stream will become ``` The argument is \catcode`{=12 \bf Hello}, I see it ``` where *there is* an unbalanced `}`. As Ulrike suggests, ``` \say{\catcode`\{=12 \bf Hello} ``` would produce no errors. An alphabetical constant consists of a back quote (category code 12) and either a single character or a single character control sequence. For instance, in order to change the category code of `%` you *must* say ``` \catcode`\%=12 ``` in order to avoid TeX taking `%` as the comment character. Some characters *must* always be escaped in this context: 1. characters with category code 0 2. characters with category code 5 3. characters with category code 9 4. characters with category code 14 5. characters with category code 15 All others *can* be escaped and some *must* depending on where you are. For instance `#` should be escaped if you're writing a definition ``` \def\foo{\catcode`#=12 } ``` wouldn't work, but ``` \def\foo{\catcode`\#=12 } ``` would. Similarly for braces in a ⟨balanced text⟩. Exercise: guess what would you get from ``` \edef\foo{\catcode`\^^M=12 } \foo \showthe\catcode`\^^M ```
5
https://tex.stackexchange.com/users/4427
689697
319,955
https://tex.stackexchange.com/questions/689236
1
I had frozen my LaTex in April, 2020, since I always seemed to be in the middle of projects. With a bit of a break, I just updated my setup, installing Tex Live 2023. So far, I have only found one issue, which I describe here. My preferred style is to include named theorems in the book index (in two places). Once alphabetically by name, and once alphabetically under the "Theorems (named)" index item. The following code worked in 2020. Compiling now, all theorem names are "-NoValue-". The commented out lines show various things I have tried that did not work. As far as references to other answers, see Thomas Strum's answers [here](https://tex.stackexchange.com/questions/86711/tcolorbox-list-of-listings) and [here](https://tex.stackexchange.com/questions/315809/referencing-named-tcbtheorems). ``` \documentclass{book} \usepackage{imakeidx} \makeindex[name=MainIndex, title=Index] \usepackage{hyperref} \usepackage{tcolorbox} \tcbuselibrary{theorems, skins, breakable} %\makeatletter %\tcbset{ %% addtoidx/.code={\addcontentsline{lol}{subsection}{\kvtcb@title}}, % addtoidx/.code={\typeout{NextTest: \kvtcb@title}}, %% addtoidx/.code args={#1#2}={\typeout{NextTest: #2}}, % } %\makeatother %\makeatletter \newtcbtheorem[number within=chapter]{Theorem}{Theorem}% {enhanced, breakable, colback=white,colframe=black!80!white, colbacktitle=black!10!white, coltitle=black, fontupper=\itshape, before upper={\parindent17pt\noindent}, beforeafter skip=10pt plus 2pt minus 3pt,% code={\TheoremToIndex{#2}},% %code={\TheoremToIndex{\kvtcb@title}},% %code={\typeout{TheoremToIndex: #2}},% %code={\typeout{TheoremToIndex: \kvtcb@title}},% %addtoidx, fonttitle=\large\bfseries, leftrule=0.5mm} {theorem}% %\makeatother \NewDocumentCommand \TheoremToIndex{m}{% {\if\relax\detokenize{#1}\relax% \else\index[MainIndex]{#1}\index[MainIndex]{Theorems (Named)!#1}\fi}% } \begin{document} \mainmatter \chapter{Chapter One} \begin{Theorem}{Triangle Inequality}{TriangleInequality} This Theorem \textbf{will} go into the Index. \end{Theorem} We next use the results of Theorem \ref{theorem:TriangleInequality} \begin{Theorem}{}{UseTriangleInequality} This Theorem \textbf{will not} go into the Index. \end{Theorem} \backmatter \printindex[MainIndex] \end{document} ``` It appears that the "code=" line no longer works. I would appreciate any assistance in reworking the code to allow passing the theorem title to an indexing routine.
https://tex.stackexchange.com/users/155355
\newtcbtheorem Automatically put Theorem Title in the Index
true
It is a bit surprising that this worked previously but I didn't track it. You can try to use the `description formatter` instead: ``` \documentclass{book} \usepackage{imakeidx} \makeindex[name=MainIndex, title=Index] \usepackage{hyperref} \usepackage{tcolorbox} \tcbuselibrary{theorems, skins, breakable} \newtcbtheorem[number within=chapter]{Theorem}{Theorem}% {enhanced, breakable, colback=white,colframe=black!80!white, colbacktitle=black!10!white, coltitle=black, fontupper=\itshape, before upper={\parindent17pt\noindent}, beforeafter skip=10pt plus 2pt minus 3pt,% description formatter=\TheoremToIndex, fonttitle=\large\bfseries, leftrule=0.5mm} {theorem}% \ExplSyntaxOn \NewDocumentCommand \TheoremToIndex{m}{% \tl_if_empty:nF{#1} {#1\index[MainIndex]{#1}\index[MainIndex]{Theorems~(Named)!#1}}% } \ExplSyntaxOff \begin{document} \mainmatter \chapter{Chapter One} \begin{Theorem}{Triangle Inequality}{TriangleInequality} This Theorem \textbf{will} go into the Index. \end{Theorem} We next use the results of Theorem \ref{theorem:TriangleInequality} \begin{Theorem}{}{UseTriangleInequality} This Theorem \textbf{will not} go into the Index. \end{Theorem} \backmatter \printindex[MainIndex] \end{document} ```
2
https://tex.stackexchange.com/users/2388
689702
319,958
https://tex.stackexchange.com/questions/689638
1
For example, I would like to further indent an `if-then-else` block like is done in this [question](https://tex.stackexchange.com/a/553651/144086). ``` \documentclass{article} \usepackage{algpseudocode} \usepackage{algorithm} \begin{document} \begin{algorithm} \caption{my alg} \begin{algorithmic}[1] \If{condition} % <-- would like to indent this whole block further \State{$x=1$} \EndIf \end{algorithmic} \end{algorithm} \end{document} ```
https://tex.stackexchange.com/users/144086
How to manually (further) indent an `if` statement in `algorithm`
true
You can define an "empty" block to create a new nesting level. The new block should have no text and produce not extra lines. ``` \documentclass{article} \usepackage{algpseudocode} \usepackage{algorithm} \algblockdefx{Nest}{EndNest}{}{} \algtext*{Nest}{} \algtext*{EndNest}{} \begin{document} \begin{algorithm} \caption{my alg} \begin{algorithmic}[1] \If{condition} % <-- would like to indent this whole block further \State{$x=1$} \EndIf \Statex \Nest \If{condition} % <-- would like to indent this whole block further \State{$x=1$} \EndIf \EndNest \Statex \Nest \Nest \If{condition} % <-- would like to indent this whole block further \State{$x=1$} \EndIf \EndNest \EndNest \end{algorithmic} \end{algorithm} \end{document} ```
5
https://tex.stackexchange.com/users/64821
689724
319,965
https://tex.stackexchange.com/questions/30720
178
I would like to have a footnote about the funding source of my work in the first page without marker. I tried below approaches: 1. `\footnotetext{text goes here}` This creates a footnote but with '0' as marker. However, the marker reference does not appear within the normal text where I placed this command. 2. Used `\def\blfootnote{\xdef\@thefnmark{}\@footnotetext}` definition provided at <http://help-csli.stanford.edu/tex/latex-footnotes.shtml#unnumber>. I placed this definition in the main tex file just after package declaration. But, this gives the below error. ``` ! Use of \@ doesn't match its definition. \blfootnote ->\xdef \@thefnmark{}\@f ootnotetext ```
https://tex.stackexchange.com/users/8403
Footnote without a marker
false
It's an old question, but just so there is an answer in plain tex, in plain tex you can just do `\footnote{}{Footnote without a marker}`.
0
https://tex.stackexchange.com/users/258453
689726
319,966
https://tex.stackexchange.com/questions/689725
2
when I using xelatex to render this document: ``` \documentclass[12pt,a4paper,sans]{moderncv} \moderncvstyle{classic} \moderncvcolor{green} \usepackage{ctex} \usepackage[T1]{fontspec} \usepackage{tgcursor} \usepackage[scale=0.75]{geometry} \setmainfont{lmroman10-regular.otf} \setlength{\footskip}{149.60005pt} \setlength{\hintscolumnwidth}{3cm} \begin{document} hello world! \end{document} ``` shows error: ``` Option clash for package fontspec. \usepackage ``` why did this error happen? what should I do to fixed this issue?
https://tex.stackexchange.com/users/69600
Option clash for package fontspec. \usepackage
true
Unfortunately your editor's treatment of error messages makes them completely useless, ignore that and use the errors from tex in the log file. The first error is ``` ! LaTeX Error: Option clash for package fontspec. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.8 \usepackage {tgcursor} ? ``` Delete `\usepackage[T1]{fontspec}` You then get ``` ! Undefined control sequence. <argument> \@firstname {}~\@lastname {} l.15 \begin{document} ? ``` as no first name has been specified, so this runs without error in xelatex ``` \documentclass[12pt,a4paper,sans]{moderncv} \moderncvstyle{classic} \moderncvcolor{green} \usepackage{ctex} \usepackage{tgcursor} \usepackage[scale=0.75]{geometry} \setmainfont{lmroman10-regular.otf} \setlength{\footskip}{149.60005pt} \setlength{\hintscolumnwidth}{3cm} \firstname{David} \familyname{Carlisle} \begin{document} hello world! \end{document} ```
4
https://tex.stackexchange.com/users/1090
689727
319,967
https://tex.stackexchange.com/questions/689733
1
Say I want to use a package using [`l3keys`](http://mirrors.ctan.org/macros/latex/contrib/l3kernel/interface3.pdf) for it options, e.g. I want to print numbers using [`siunitx`](https://ctan.org/pkg/siunitx)'s `\num`. I load it with my desired default options (e.g. just `\usepackage{siunitx}`) but have a recurring use-case in which I want to pass a number of different settings to `\num`. I don't want to type all the options each time but rather have a custom, short key that does it for me (e.g. `\num[foo]{<number>}`. Am I supposed to just use `\DeclareKeys` in the preamble? E.g. ``` \DeclareKeys[siunitx]{ foo .meta:n = { round-mode = figures , round-precision = 3 , exponent-mode = scientific , }, } ``` This macro is documented in [`clsguide.pdf`](http://mirrors.ctan.org/macros/latex/base/clsguide.pdf) and not mentioned in [`usrguide.pdf`](http://mirrors.ctan.org/macros/latex/base/usrguide.pdf) which makes me unsure if it is intended for such a use-case. It also feels a bit weird to add keys to the `siunitx` "namespace", but I guess that's unavoidable with the intended usage.
https://tex.stackexchange.com/users/48973
Using \DeclareKeys as a document author/designer
false
Adding a key to the package namespace is exactly the same conceptually as what you'd do in `pgf` if you declare a `.style` key, it's just that you probably don't notice it. (I agree that this is likely something that should be documented with guidance on what is good practice.) Taking the specific, if you want to add directly to `siunitx` then yes you can use `\DeclareKeys`, although I think it's probably better to see this as a 'programmer' use of the API and to use `\keys_define:nn` in an `\ExplSyntaxOn` context. (All of the `siunitx` programmers API is formally documented, so you can rely on the names of keys being in this namespace - it's explicitly mentioned in the manual.)
4
https://tex.stackexchange.com/users/73
689737
319,970
https://tex.stackexchange.com/questions/689736
-3
When the following macro lies in my macro files, the following bug happens: ``` \mycolumnbreak ->\ifnum \doublecol @number>\z @ \vfill \mbox {}\columnbreak ... l.303 ...names]{_TEST.csv}{}{\feuilleDeCorrection} ``` But, this macro in never called. Do you see any obvious reason? Thanks ``` %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Subalign %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % see: https://tex.stackexchange.com/a/198806/8323 \makeatletter \newcommand{\subalignCANNOTBECALLED}[1]{% \vcenter{% \Let@ \restore@math@cr \default@tag \baselineskip\fontdimen10 \scriptfont\tw@ \advance\baselineskip\fontdimen12 \scriptfont\tw@ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ \lineskiplimit\lineskip \ialign{\hfil$\m@th\scriptstyle##$&$\m@th\scriptstyle{}##$\hfil\crcr #1\crcr }% }% } \makeatother ``` --- EDIT: Here is the code of `\mycolumnbreak`: ``` \def\mycolumnbreak{% \ifnum \doublecol@number>\z@ \vfill\mbox{}\columnbreak% \fi% } ```
https://tex.stackexchange.com/users/8323
A macros that causes a bug without being called
false
An MWE is ``` \documentclass{article} \makeatletter \makeatother \def\mycolumnbreak{\ifnum \doublecol@number>\z@ \vfill \mbox {}\columnbreak\fi} \mycolumnbreak ``` You did not show the error message, which is undefined control sequence: ``` ! Undefined control sequence. \mycolumnbreak ->\ifnum \doublecol @number>\z @ \vfill \mbox {}\columnbreak \fi l.7 \mycolumnbreak ? ``` Note the message shows a break after `\doublecol` and `\z@` as `\z @` as `@` has catcode other (12) so is not part of the command names. So presumably the code you show (which ends in `\makeatother`) is before the code you did not show which defines `\mycolumnbreak` and you should remove `\makeatother`
2
https://tex.stackexchange.com/users/1090
689739
319,971
https://tex.stackexchange.com/questions/689738
3
Sorry to ask an extremely "entry-level" question, but after googling to get a description of how to do conditional logic in TikZ, I don't see a straight and simple answer. I see a bunch of very complicated examples where the point is not to explain the use of conditional logic, but to accomplish some specific task, and I can't quite sort through what is strictly necessary to get a basic if-then-else. I am trying to do a double-loop over some floats, and want to skip the particular case where both `\i` and `\j` are zero. Here is a very pared down example: ``` \foreach \i in {-3,...,3} { \foreach \j in {-3,...,3} { \node at (\i,\j) {\i+\j}; } } ``` I have seen examples of using `\ifnum` but none of them involve performing a boolean computation. Here I need something like ``` \foreach \i in {-3,...,3} { \foreach \j in {-3,...,3} { \ifnum {\i!=0 \AND \j!=0} {\node at (\i,\j) {\i+\j};}; } } ``` But I can't find documentation on the correct way to write negations, conjunctions, and so on. More generally, if anyone knows a reference for this sort of intro-level documentation for programming in TikZ, I'd appreciate it! --- If it's valuable, here is a more complete example of what I'm trying to do. The following code throws an error, presumably because of the case when `\i` and `\j` are both zero. ``` \begin{tikzpicture} \foreach \i in {-3,-2.5,...,3} { \foreach \j in {-3,-2.5,...,3} { \pgfmathsetmacro \d {2*sqrt((\i)^2+(\j)^2)}; \draw[->] ({\i},{\j}) -- ({\i - \i/\d}, {\j-\j/\d}); }; }; \end{tikzpicture} ```
https://tex.stackexchange.com/users/62274
How to skip a value in a \foreach in TikZ?
true
The first diagram uses low-level `\ifdim` which does not evaluate `\d` further (in this case no problem because it already contains just a value). Without using other packages or LaTeX3 tools that support conditionals you could use the `math` library which is shown in the second diagram. (The `\d` doesn't need to evaluated inside `\tikzmath`.) But then you could do everything in `math` actually (3rd diagram). All these approaches only support numbers in the range of 16 thousand (and since you use `\d` inside of the path you'd run into trouble there anyway) since it uses PGFMath but for “real” floating point math you will need to check out other solutions like the one posted by [Ulrike Fischer](https://tex.stackexchange.com/a/689745). Code ---- ``` \documentclass[tikz]{standalone} \usetikzlibrary{math} \begin{document} \begin{tikzpicture} \foreach \i in {-3,-2.5,...,3} { \foreach \j in {-3,-2.5,...,3} { \pgfmathsetmacro \d {2*sqrt((\i)^2+(\j)^2)}; \unless\ifdim\d pt=0pt \draw[->] ({\i},{\j}) -- ({\i - \i/\d}, {\j-\j/\d}); \fi } } \end{tikzpicture} \begin{tikzpicture} \foreach \i in {-3,-2.5,...,3} { \foreach \j in {-3,-2.5,...,3} { \tikzmath{ \d = 2*sqrt((\i)^2+(\j)^2); if \d != 0 then { { \draw[->] ({\i},{\j}) -- ({\i - \i/\d}, {\j-\j/\d}); }; }; } } } \end{tikzpicture} \begin{tikzpicture} \tikzmath{ for \i in {-3,-2.5,...,3} { for \j in {-3,-2.5,...,3} { \d = 2*sqrt((\i)^2+(\j)^2); if \d != 0 then { { \draw[->] ({\i},{\j}) -- ({\i - \i/\d}, {\j-\j/\d}); }; }; }; }; } \end{tikzpicture} \end{document} ```
7
https://tex.stackexchange.com/users/16595
689742
319,974
https://tex.stackexchange.com/questions/689721
1
I want to define a key to handle a length, but also have custom settings. The usage I intend: * `my length = auto` will set a boolean to false and ignore the length * `my length = half` will set a boolean to true and set the length to `0.5\linewidth` * `my length = 20pt` will set a boolean to true and set the length to `20pt` So far, so good, but I'd like to use `my length = \linewidth` or `my length = \myotherlength`, for example, but using a macro\* as a key breaks the `.is choice` processing. * yes, a length in this case :) This is my code: ``` \documentclass[12pt]{article} \usepackage{pgfkeys} \newif\ifisauto \isautofalse \newlength{\mylength} \pgfkeys{ /my test/.cd, my length/.is choice, my length/auto/.code = {\isautotrue}, my length/half/.code = {\isautofalse\setlength{\mylength}{0.5\linewidth}}, my length/.unknown/.code = {\isautofalse\setlength{\mylength}{\pgfkeyscurrentname}}% won't work with macros } \newcommand{\printinfo}{% \ifisauto Choice is auto, ignoring \textbackslash mylength% \else Choice is not auto and \textbackslash mylength is \the\mylength% \fi% } \begin{document} Tests: \pgfkeys{/my test/my length = auto}% OK \printinfo \pgfkeys{/my test/my length = half}% OK \printinfo \pgfkeys{/my test/my length = 20pt}% OK \printinfo \pgfkeys{/my test/my length = \linewidth}% this fails! \printinfo \end{document} ``` Any ideas on how to get this working without having separate keys for the boolean and the length?
https://tex.stackexchange.com/users/64821
pgfkeys with length and .is choice
true
We can create this with an altered `.is choice` handler (I'll call it `.is robust choice`). The changes compared to current `pgfkeys`' `.is choice` are: * The `.unknown` handler can access the unknown value directly via `#1`. * The choice is matched as a string, so macros don't hurt there. ``` \documentclass[12pt]{article} \usepackage{pgfkeys} \newif\ifisauto \isautofalse \newlength{\mylength} \makeatletter % this is based on the definition of the .is choice handler \pgfkeys{/handlers/.is robust choice/.code=% \pgfkeys{% \pgfkeyscurrentpath/.cd,% .code=% \edef\pgfkeys@was@choice{\unexpanded{##1}}% \pgfkeysifdefined{\pgfkeyscurrentkey/\detokenize{##1}/.@cmd}% {\expandafter\pgfkeysalso\expandafter{\pgfkeyscurrentkey/\detokenize{##1}}}% {\expandafter\pgfkeysalso\expandafter{\pgfkeyscurrentkey/.unknown={##1}}}, .unknown/.code={% default .unknown handler of an .is choice \def\pgf@marshal{\pgfkeysvalueof{/errors/unknown choice value/.@cmd}}% {\expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfkeys@pathtoks\expandafter}\expandafter{\pgfkeys@was@choice}\pgfeov}% }% }% } \makeatother \pgfkeys{ /my test/.cd, my length/.is robust choice, my length/auto/.code = {\isautotrue}, my length/half/.code = {\isautofalse\setlength{\mylength}{0.5\linewidth}}, my length/.unknown/.code = {\isautofalse\setlength{\mylength}{#1}}% won't work with macros } \newcommand{\printinfo}{% \ifisauto Choice is auto, ignoring \textbackslash mylength% \else Choice is not auto and \textbackslash mylength is \the\mylength% \fi% } \begin{document} Tests: \typeout{\string\pgfkeys{/my test/my length = auto}}% OK \pgfkeys{/my test/my length = auto}% OK \printinfo \pgfkeys{/my test/my length = half}% OK \printinfo \pgfkeys{/my test/my length = 20pt}% OK \printinfo \pgfkeys{/my test/my length = \linewidth}% this fails! \printinfo \end{document} ```
1
https://tex.stackexchange.com/users/117050
689743
319,975
https://tex.stackexchange.com/questions/689721
1
I want to define a key to handle a length, but also have custom settings. The usage I intend: * `my length = auto` will set a boolean to false and ignore the length * `my length = half` will set a boolean to true and set the length to `0.5\linewidth` * `my length = 20pt` will set a boolean to true and set the length to `20pt` So far, so good, but I'd like to use `my length = \linewidth` or `my length = \myotherlength`, for example, but using a macro\* as a key breaks the `.is choice` processing. * yes, a length in this case :) This is my code: ``` \documentclass[12pt]{article} \usepackage{pgfkeys} \newif\ifisauto \isautofalse \newlength{\mylength} \pgfkeys{ /my test/.cd, my length/.is choice, my length/auto/.code = {\isautotrue}, my length/half/.code = {\isautofalse\setlength{\mylength}{0.5\linewidth}}, my length/.unknown/.code = {\isautofalse\setlength{\mylength}{\pgfkeyscurrentname}}% won't work with macros } \newcommand{\printinfo}{% \ifisauto Choice is auto, ignoring \textbackslash mylength% \else Choice is not auto and \textbackslash mylength is \the\mylength% \fi% } \begin{document} Tests: \pgfkeys{/my test/my length = auto}% OK \printinfo \pgfkeys{/my test/my length = half}% OK \printinfo \pgfkeys{/my test/my length = 20pt}% OK \printinfo \pgfkeys{/my test/my length = \linewidth}% this fails! \printinfo \end{document} ``` Any ideas on how to get this working without having separate keys for the boolean and the length?
https://tex.stackexchange.com/users/64821
pgfkeys with length and .is choice
false
Since using `.is choice` seems unfeasible without changing some interal code, the solution ended up being to do the comparisons manually. ``` \documentclass[12pt]{article} \usepackage{pgfkeys} \usepackage{ifthen} \newif\ifisauto \isautofalse \newlength{\mylength} \pgfkeys{ /my test/.cd, my length/.code = {% \ifthenelse{\equal{auto}{#1}}{% \isautotrue% }{% \isautofalse% \ifthenelse{\equal{half}{#1}}{% \setlength{\mylength}{0.5\linewidth}% }{% \setlength{\mylength}{#1}% }% }% }, } \newcommand{\printinfo}{% \ifisauto Choice is auto, ignoring \textbackslash mylength% \else Choice is not auto and \textbackslash mylength is \the\mylength% \fi% } \begin{document} Tests: \pgfkeys{/my test/my length = auto}% OK \printinfo \pgfkeys{/my test/my length = half}% OK \printinfo \pgfkeys{/my test/my length = 20pt}% OK \printinfo \pgfkeys{/my test/my length = \linewidth}% OK now \printinfo \pgfkeys{/my test/my length = 0.1\linewidth}% OK now \printinfo \pgfkeys{/my test/my length = \dimexpr \linewidth/3 - 2pt}% OK now \printinfo \end{document} ```
0
https://tex.stackexchange.com/users/64821
689744
319,976
https://tex.stackexchange.com/questions/689738
3
Sorry to ask an extremely "entry-level" question, but after googling to get a description of how to do conditional logic in TikZ, I don't see a straight and simple answer. I see a bunch of very complicated examples where the point is not to explain the use of conditional logic, but to accomplish some specific task, and I can't quite sort through what is strictly necessary to get a basic if-then-else. I am trying to do a double-loop over some floats, and want to skip the particular case where both `\i` and `\j` are zero. Here is a very pared down example: ``` \foreach \i in {-3,...,3} { \foreach \j in {-3,...,3} { \node at (\i,\j) {\i+\j}; } } ``` I have seen examples of using `\ifnum` but none of them involve performing a boolean computation. Here I need something like ``` \foreach \i in {-3,...,3} { \foreach \j in {-3,...,3} { \ifnum {\i!=0 \AND \j!=0} {\node at (\i,\j) {\i+\j};}; } } ``` But I can't find documentation on the correct way to write negations, conjunctions, and so on. More generally, if anyone knows a reference for this sort of intro-level documentation for programming in TikZ, I'd appreciate it! --- If it's valuable, here is a more complete example of what I'm trying to do. The following code throws an error, presumably because of the case when `\i` and `\j` are both zero. ``` \begin{tikzpicture} \foreach \i in {-3,-2.5,...,3} { \foreach \j in {-3,-2.5,...,3} { \pgfmathsetmacro \d {2*sqrt((\i)^2+(\j)^2)}; \draw[->] ({\i},{\j}) -- ({\i - \i/\d}, {\j-\j/\d}); }; }; \end{tikzpicture} ```
https://tex.stackexchange.com/users/62274
How to skip a value in a \foreach in TikZ?
false
``` \documentclass[tikz]{standalone} \ExplSyntaxOn \cs_set_eq:NN\fpcompareTF\fp_compare:nNnTF \ExplSyntaxOff \begin{document} \begin{tikzpicture} \foreach \i in {-3,-2.5,...,3} { \foreach \j in {-3,-2.5,...,3} { \pgfmathsetmacro \d {2*sqrt((\i)^2+(\j)^2)} \fpcompareTF{\d}={0}{} { \draw[->] ({\i},{\j}) -- ({\i - \i/\d}, {\j-\j/\d}); } } } \end{tikzpicture} \end{document} ```
6
https://tex.stackexchange.com/users/2388
689745
319,977
https://tex.stackexchange.com/questions/689721
1
I want to define a key to handle a length, but also have custom settings. The usage I intend: * `my length = auto` will set a boolean to false and ignore the length * `my length = half` will set a boolean to true and set the length to `0.5\linewidth` * `my length = 20pt` will set a boolean to true and set the length to `20pt` So far, so good, but I'd like to use `my length = \linewidth` or `my length = \myotherlength`, for example, but using a macro\* as a key breaks the `.is choice` processing. * yes, a length in this case :) This is my code: ``` \documentclass[12pt]{article} \usepackage{pgfkeys} \newif\ifisauto \isautofalse \newlength{\mylength} \pgfkeys{ /my test/.cd, my length/.is choice, my length/auto/.code = {\isautotrue}, my length/half/.code = {\isautofalse\setlength{\mylength}{0.5\linewidth}}, my length/.unknown/.code = {\isautofalse\setlength{\mylength}{\pgfkeyscurrentname}}% won't work with macros } \newcommand{\printinfo}{% \ifisauto Choice is auto, ignoring \textbackslash mylength% \else Choice is not auto and \textbackslash mylength is \the\mylength% \fi% } \begin{document} Tests: \pgfkeys{/my test/my length = auto}% OK \printinfo \pgfkeys{/my test/my length = half}% OK \printinfo \pgfkeys{/my test/my length = 20pt}% OK \printinfo \pgfkeys{/my test/my length = \linewidth}% this fails! \printinfo \end{document} ``` Any ideas on how to get this working without having separate keys for the boolean and the length?
https://tex.stackexchange.com/users/64821
pgfkeys with length and .is choice
false
If you don't have to use `pgfkeys` you could as well use a key=value implementation that comes with the required behaviour built in, like `expkv-def`. In it you can use a `choice` and set the unknown handler with `unknown-choice`. The `protected` is just there to make the underlying key-code `\protected` (else you'd get problems with your definitions in `\edef` or `\expanded` contexts). Disclaimer: I'm the author of `expkv-def`. ``` \documentclass[12pt]{article} \usepackage{expkv-def} \newif\ifisauto \isautofalse \newlength{\mylength} \ekvdefinekeys{my test} { protected choice my length = { auto = \isautotrue, half = \isautofalse\setlength\mylength{.5\linewidth} }, protected unknown-choice my length = \isautofalse\setlength\mylength{#1} } \newcommand{\printinfo}{% \ifisauto Choice is auto, ignoring \textbackslash mylength% \else Choice is not auto and \textbackslash mylength is \the\mylength% \fi% } \begin{document} Tests: \ekvset{my test}{my length = auto}% OK \printinfo \ekvset{my test}{my length = half}% OK \printinfo \ekvset{my test}{my length = 20pt}% OK \printinfo \ekvset{my test}{my length = \linewidth}% this fails! \printinfo \end{document} ```
1
https://tex.stackexchange.com/users/117050
689746
319,978
https://tex.stackexchange.com/questions/627247
5
I am working on Ubuntu 20.04.3 LTS. I want to work with TEXstudio. When trying to build my pdf I get error messages like: `File 'biblatex.sty' not found. \addbibresource` or `File 'blindtext.sty' not found.` As far as I understand, I do not have these packages installed. I thought, that that's what I need texlive for in the first place. I looked with `apt list --installed` if both are installed and got: texlive-base, texlive-binaries, texlive-fonts-recommended, texlive-latex-base, texlive-latex-extra, texlive-latex-recommended, texlive-pictures, texlive-plain-generic, texstudio-doc, texstudio-l10n, texstudio/focal Do I need more for it to work? How do I install singular packages? I am close to crying, appreciate any help!
https://tex.stackexchange.com/users/196161
How do I get texlive to work? (Ubuntu)
false
There are two general ways: (1) install TeX Live base via `texlive`; (2) install TeX Live full via `texlive-full`. The latter is *massive* at on the order of 10 GB on disk. Hence, I recommend the former via the `texlive` metapackage: ``` sudo apt-get install texlive ``` This installs the following packages: ``` dvisvgm fonts-lmodern fonts-texgyre libptexenc1 libteckit0 libtexlua53 libtexluajit2 libzzip-0-13 lmodern t1utils tex-common tex-gyre texlive texlive-base texlive-binaries texlive-fonts-recommended texlive-latex-base texlive-latex-recommended tipa ``` It works just fine. The `texlive-full` metapackage installs fonts for pretty much every language in the world and then some, hence its massive size. An alternative approach would be simply to install that and delete all of the optional fonts it installs or to create your own `texlive-complete` metapackage. **RECOMMENDATION**: you are better off using [Typst](https://github.com/typst/typst).
-1
https://tex.stackexchange.com/users/89827
689759
319,981
https://tex.stackexchange.com/questions/689761
1
I have a TikZ picture that is animated. Unfortunately, that causes jumps in the content, as the centering is apparently not considering the animation. I resize the picture with an adjustbox, so it fits the page nicely. Is there a way to avoid page jumps in such a setup? MWE: ``` \documentclass{beamer} \usetheme{metropolis} \usepackage{adjustbox} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{frame}{Demo} \begin{adjustbox}{max width=\textwidth} \begin{tikzpicture}[node distance=40pt] \node<+-> [draw] (one) {One}; \node<+-> [draw,below=of one] (two) {Two}; \end{tikzpicture} \end{adjustbox} \end{frame} \end{document} ```
https://tex.stackexchange.com/users/194783
Avoid jumps from overlays in beamer in TikZ picture inside `adjustbox` environment
true
You can avoid the jumping if the elements are present (but not visible) on all overlays, e.g. with the `overlay-beamer-styles` library: ``` \documentclass{beamer} \usetheme{metropolis} \usepackage{adjustbox} \usepackage{tikz} \usetikzlibrary{overlay-beamer-styles} \usetikzlibrary{positioning} \begin{document} \begin{frame}{Demo} \begin{adjustbox}{max width=\textwidth} \begin{tikzpicture}[node distance=40pt] \node[visible on=<+->] [draw] (one) {One}; \node[draw,below=of one,visible on=<+->] (two) {Two}; \end{tikzpicture} \end{adjustbox} \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/36296
689762
319,983
https://tex.stackexchange.com/questions/689736
-3
When the following macro lies in my macro files, the following bug happens: ``` \mycolumnbreak ->\ifnum \doublecol @number>\z @ \vfill \mbox {}\columnbreak ... l.303 ...names]{_TEST.csv}{}{\feuilleDeCorrection} ``` But, this macro in never called. Do you see any obvious reason? Thanks ``` %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Subalign %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % see: https://tex.stackexchange.com/a/198806/8323 \makeatletter \newcommand{\subalignCANNOTBECALLED}[1]{% \vcenter{% \Let@ \restore@math@cr \default@tag \baselineskip\fontdimen10 \scriptfont\tw@ \advance\baselineskip\fontdimen12 \scriptfont\tw@ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ \lineskiplimit\lineskip \ialign{\hfil$\m@th\scriptstyle##$&$\m@th\scriptstyle{}##$\hfil\crcr #1\crcr }% }% } \makeatother ``` --- EDIT: Here is the code of `\mycolumnbreak`: ``` \def\mycolumnbreak{% \ifnum \doublecol@number>\z@ \vfill\mbox{}\columnbreak% \fi% } ```
https://tex.stackexchange.com/users/8323
A macros that causes a bug without being called
false
I replaced ``` \def\mycolumnbreak{% \ifnum \doublecol@number>\z@ \vfill\mbox{}\columnbreak% \fi% } ``` by ``` \makeatletter \def\mycolumnbreak{% \ifnum \doublecol@number>\z@ \vfill\mbox{}\columnbreak% \fi% } \makeatother ``` It works.
0
https://tex.stackexchange.com/users/8323
689773
319,985
https://tex.stackexchange.com/questions/689772
0
Currently, I am able to make a command shortcut that produces a matrix given a fixed amount of arguments. For example, the command ``` \newcommand{\MAT}[4]{\begin{bmatrix} #1 & #2 \\ #3 & #4 \\ \end{bmatrix} } ``` produces a matrix with arguments inputted row by row. My question is: is there a way to define a similar matrix but for any dimension, especially for nonsquare matrices? I'd like to be able to have two arguments that defines the dimensions of the matrix, and then an arbitrary amount of arguments where each entry is added along the rows. Something like `\MAT{2}{2}{a}{b}{c}{d}` that outputs a 2x2 matrix with entries a, b, c, d would be very nice.
https://tex.stackexchange.com/users/282309
Defining a new command shortcut for matrices
false
For example, your macro `\MAT` can look like this: ``` \def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}} \newcount\MATcol \newcount\MATitems \def\MAT#1#2{\def\MATc{#2}\MATcol=#2 \MATitems=#1 \multiply\MATitems by\MATcol \def\MATbuf{}\MATa} \def\MATa#1{% \addto\MATbuf{#1} \advance\MATcol by-1 \advance\MATitems by-1 \ifnum\MATcol=0 \addto\MATbuf{\cr}\MATcol=\MATc\relax \else \addto\MATbuf{&}\fi \ifnum\MATitems>0 \expandafter\MATa \else \expandafter\MATb \fi } \def\MATb{ \begin{bmatrix} \MATbuf \end{bmatrix} } ```
1
https://tex.stackexchange.com/users/51799
689774
319,986
https://tex.stackexchange.com/questions/689772
0
Currently, I am able to make a command shortcut that produces a matrix given a fixed amount of arguments. For example, the command ``` \newcommand{\MAT}[4]{\begin{bmatrix} #1 & #2 \\ #3 & #4 \\ \end{bmatrix} } ``` produces a matrix with arguments inputted row by row. My question is: is there a way to define a similar matrix but for any dimension, especially for nonsquare matrices? I'd like to be able to have two arguments that defines the dimensions of the matrix, and then an arbitrary amount of arguments where each entry is added along the rows. Something like `\MAT{2}{2}{a}{b}{c}{d}` that outputs a 2x2 matrix with entries a, b, c, d would be very nice.
https://tex.stackexchange.com/users/282309
Defining a new command shortcut for matrices
true
I contend that ``` \MAT{a,b;c,d} ``` is much shorter than ``` \MAT{2}{2}{a}{b}{c}{d} ``` and doesn't even require specifying the number of rows and columns. ``` \documentclass{article} \usepackage{amsmath} \ExplSyntaxOn \NewDocumentCommand{\MAT}{m} { \begin{bmatrix} \__dee_mat_rows:n { #1 } \end{bmatrix} } \cs_new_protected:Nn \__dee_mat_rows:n { \seq_set_split:Nnn \l_tmpa_seq { ; } { #1 } \seq_map_function:NN \l_tmpa_seq \__dee_mat_cols:n } \cs_new_protected:Nn \__dee_mat_cols:n { \clist_use:nn { #1 } { & } \\ } \ExplSyntaxOff \begin{document} \begin{gather*} \MAT{a,b;c,d} \quad \MAT{a,b,c} \quad \MAT{a;b;c} \\ \MAT{11,12,13,14,15,16;21,22,23,24,25,26} \quad \MAT{11,12;21,22;31,32;41,42} \end{gather*} \end{document} ``` The idea is to split the argument at the semicolons. Then we map over the chunks: each chunk is a comma separated list and `&` is inserted between items; a final `\\` ends the row. Note that nothing prevents you from inputting ``` \MAT{ 11 , 12 , 13 ; 21 , 22 , 23 ; 31 , 32 , 33 } ``` Spaces around commas or semicolons and newlines in the argument (but not blank lines) are optional.
3
https://tex.stackexchange.com/users/4427
689783
319,992
https://tex.stackexchange.com/questions/689792
0
I have nested folders with multiple files containing statements and solutions for exercices. ``` main.tex exercices (folder) ⮑ statements (folder) ⮑ 1.tex ⮑ 2.tex ⮑ solutions (folder) ⮑ 2.tex ``` From what I understand on few topics like [input files in different directories](https://tex.stackexchange.com/questions/39083/input-files-in-different-directories?rq=1), you cannot input files from different nested directories and need to use the `import` package. So this was the previous code : ``` \foreach \filenumber in {1,2}{ \IfFileExists{exercices/statements/\filenumber}{\input{exercices/statements/\filenumber}} \IfFileExists{exercices/solutions/\filenumber}{\input{exercices/solutions/\filenumber}} } ``` The issue is that the following code still doesn't work with the `\import` command. ``` \documentclass{book} \usepackage{import} \usepackage{tikz} \begin{document} \foreach \filenumber in {1,2}{ \IfFileExists{exercices/statements/\filenumber}{\import{exercices/statements/}{\filenumber}} \IfFileExists{exercices/solutions/\filenumber}{\import{exercices/solutions/}{\filenumber}} } \end{document} ``` The code gives the error `LaTeX Error: File exercices/solutions/1.tex' not found.`
https://tex.stackexchange.com/users/270421
Using import package with foreach loop
true
You could use `\input` but here you simply want `\InputIfFileExists` ``` \documentclass{book} \usepackage{pgffor} \begin{document} \foreach \filenumber in {1,2}{% \InputIfFileExists{exercices/statements/\filenumber}{}{}\par \InputIfFileExists{exercices/solutions/\filenumber}{}{No solution}\par } \end{document} ``` The terminal and log show the three files being input: ``` (./exercices/statements/1.tex) (./exercices/solutions/1.tex) (./exercices/statements/2.tex) [1 ``` Producing If you put suitable text such as "ex1" in `1.tex`
1
https://tex.stackexchange.com/users/1090
689793
319,996
https://tex.stackexchange.com/questions/117939
7
I am using the template from here <https://www.sharelatex.com/templates/cv/moderncv-classic/> I wanted texworks to add the latest date and also place and signature(.jpg item) everytime I typeset my cv at the end just before end document. How should I do this?
https://tex.stackexchange.com/users/12860
how to add a current date, place and signature to the cv
false
At the end of your *document* environment, you can incorporate the following code: ``` \emptysection{}\closesection \vfill \begin{center} \textit{\small\today} \end{center} ``` Furthermore, you can also include your *signature.jpg* using the `\includegraphics` command.
0
https://tex.stackexchange.com/users/272501
689797
319,997
https://tex.stackexchange.com/questions/689766
1
I am using the `changes` package to highlight changes in my document. But changes inside math mode throw errors when listing the changes, so I tried wrapping them in `\ensuremath{}`. I thought it would be convenient to redefine the macros to automate this. The issue is that it does not always work in both `draft` and `final` modes (see MWE below). ``` \documentclass{article} \usepackage{mathtools} \usepackage[colorlinks]{hyperref} \def\mode{draft} %\def\mode{final} \usepackage[\mode]{changes} % My attempt \ifthenelse{\equal{\mode}{draft}}{ \let\origreplaced\replaced \renewcommand{\replaced}[2]{\ifmmode{\origreplaced{\ensuremath{#1}}{\ensuremath{#2}}} \else{\origreplaced{#1}{#2}}\fi} }{} \begin{document} Deleting \deleted{some undesirable} text % Worked originally - inspiration for redefinition % \[ K = \alpha^2\replaced{\ensuremath{\phi_\text{in}}}{\ensuremath{\phi_\text{out}}} \] % Works \[ K = \alpha^2\replaced{\phi_{\text{in}}}{\phi_{\text{out}}} \] \[ \begin{aligned} % Does not work \replaced{\phi_{\text{in}}}{\phi_{\text{out}}} &= \frac{1}{A} \int T(\vec{x})\,\mathrm{d}\vec{x} \\ &= \frac{1}{\pi R_2^2} \int_{R_1}^{R_2}T(r) 2\pi r\,\mathrm{d}r \end{aligned} \] \listofchanges \end{document} ``` Is there a way to redefine the macros so that I do not need to use `\ensuremath{}` each time? I am not very proficient in LaTeX, but I tried playing with `\protect`, `\expandafter` etc., but could not manage to make it work. Of course, solutions without `\ensuremath{}` are definitely welcome!
https://tex.stackexchange.com/users/142058
Redefine `changes` macros to play nicely with `amsmath` `\text{}`
true
With this post [Correct usage of \ifmmode](https://tex.stackexchange.com/questions/82653/correct-usage-of-ifmmode), it requires a `\relax` before `\ifmmode` ``` \renewcommand{\replaced}[2]{\relax\ifmmode{\origreplaced{\ensuremath{#1}} ``` With this other post [Wrong to delete/replace equation by using changes package](https://tex.stackexchange.com/questions/297111/wrong-to-delete-replace-equation-by-using-changes-package/352748#352748), we can steer in math mode **The code** ``` \documentclass{article} \usepackage{mathtools} \usepackage[colorlinks]{hyperref} \def\mode{draft} %\def\mode{final} \usepackage[\mode]{changes} %https://tex.stackexchange.com/questions/297111/wrong-to-delete-replace-equation-by-using-changes-package/352748#352748 % My attempt \newcommand{\stkout}[1]{\ifmmode\text{\sout{\ensuremath{#1}}}\else\sout{#1}\fi} \setdeletedmarkup{\stkout{#1}} % https://tex.stackexchange.com/questions/82653/correct-usage-of-ifmmode \ifthenelse{\equal{\mode}{draft}}{ \let\origreplaced\replaced \renewcommand{\replaced}[2]{\relax\ifmmode{\origreplaced{\ensuremath{#1}}{\ensuremath{#2}}}\else{\origreplaced{#1}{#2}}\fi} }{} \begin{document} Deleting \deleted{some undesirable} text \[ K = \alpha^2\replaced{\phi_{\text{in}}}{\phi_{\text{out}}}\] \[ \begin{aligned} \replaced{\phi_{\text{in}}}{\phi_{\text{out}}} &= \frac{1}{A} \int T(\vec{x})\,\mathrm{d}\vec{x} \\ &= \frac{1}{\pi R_2^2} \int_{R_1}^{R_2}T(r) 2\pi r\,\mathrm{d}r \end{aligned} \] \listofchanges \end{document} ```
0
https://tex.stackexchange.com/users/263375
689800
320,000
https://tex.stackexchange.com/questions/689801
4
Because I am not able to understand French, I have to use a "secondary citation" (so a citation in a citation). Unfortunately I am not sure if this is really the English term for it. In my mother tongue (German) we call this "Sekundärzitat". I want to get the following output: "This follows from [10, cited after [3, p.~44]." I tried to do it as follows: "This follows from \cite[cited after \cite[p.~23]{Z}]{F}.", but this did not work. LaTeX says that there is a mistake. Do you have an idea how to solve this?
https://tex.stackexchange.com/users/299817
Citation in a citation
true
Whenever LaTeX parses an argument in `[]`'s, it does so ad hoc, it does not know about matching `[]`. So in the processing of `\cite[cited after \cite[p.~23]{Z}]{F}`, the outer `\cite` sees * `cited after \cite[p.~23` as its optional argumnent * `{Z}` as its main argument * `]{F}` is left over. This then goes wrong when the outer `\cite` trys to typeset its optional argument as cited after `\cite[p.~23` is incomplete. With these kinds of issues the solution is to hide the inner set of `[]`'s, aka use ``` \cite[zitiert nach {\cite[S. 23]{Z}}]{F} ``` then the "argument parser" does not see the inner set of `[]`'s and does not get confused.
5
https://tex.stackexchange.com/users/3929
689807
320,003
https://tex.stackexchange.com/questions/484815
1
What is wrong with this please? I have error ``` ! Undefined control sequence. Fit& 1& 2& 3& 4& 5& 6& 7& 8& 9& \cellcolor ``` Thank you ``` \documentclass[12pt,a4paper]{report} \usepackage[locale=FR]{siunitx} \usepackage{booktabs} \usepackage{xcolor} \begin{document} \noindent \textbf{Konvergence - MOST a BRITE} \begin{table}[h!!] \renewcommand{\arraystretch}{1.45} \scriptsize \begin{tabular}{r|S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]S[table-format=5.6,table-auto-round]} Fit& 1& 2& 3& 4& 5& 6& 7& 8& 9& \cellcolor{blue!25}10 & 11\\ \end{tabular} \end{table} \end{document} ```
https://tex.stackexchange.com/users/181272
Cellcolor - undefined control sequence
false
Despite being correct in the causes, @user156344's solution did not help me. Further Googling lead me [here](https://tex.stackexchange.com/questions/83101/option-clash-for-package-xcolor): The two solutions in that post are the following: 1. Add the command `\PassOptionsToPackage{table}{xcolor}` on your preamble before `\documentclass`. 2. Add the option `table` directly in your `\documentclass`.
0
https://tex.stackexchange.com/users/298528
689808
320,004
https://tex.stackexchange.com/questions/689768
0
**What the best way for me to close this question?** I tried, but I simply cannot find the time to provide the code I promised, and I am certain I have already lost all interest in the answer, as I have made the difficult decision to moved back home (MS Word). However, someone else might find this useful? I do not know how to navigate the situation. What's the best way to abandon the question unanswered (despite the nice attempts below) while maintaining any possible value to the community? Should I just close/delete it? or is there a protocol I should follow? I'll check back to check for suggestions in the coming 2 days and implement them. Sorry for the inconvenience --- I am writing my one and (hopefully) last LaTeX document, and I am using this template provided by my school: <https://www.overleaf.com/latex/templates/university-of-waterloo-thesis-template-updated-august-2022/qxqqzmbrcmpp> **I am working on preparing a minimal working example, I'll update the post when that's ready. It'll take me some time** it uses the glossaries-extra package: ``` \usepackage[automake,toc,abbreviations]{glossaries-extra} ``` with which I have the following issues: 1. It colors every single abbreviation in my text. It becomes silly when I use it alot. I am also using it for mathematical formulas and to name things like temperature is T, and so on. Imagine `c = a + b` where a,b,c are green, but = and + are back. Yuk. To "fix" this, I have resorted to simply color it black: `\renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}}`. I know that this may raise a few eyebrows, but I don't want the colors, underlines, or anything distracting. It will look very very bad. 2. Issue #2 emerges. If I dare to use any `\gls{}` in my section or chapter titles, my table of contents becomes funny looking with a mostly blue text, with black words sprinkled here and there. I fixed it by simply not committing this cardinal sin. The reader will probably find this abbreviation in a nearby text, click on it there and they can see the full form or whatever. not a big deal. But is this really the correct use? even if I hadn't made it black, apparently the correct use was green (not blue), still a 5yo sketch book. 3. I also use `\gls{}` with figure captions. These figure captions show up in a List of Figures page. Again funny colors, but this time it would be a big compromise to do the same as in titles and not use it. 4. Now that I have my glossaries showing up in the first few pages, another feature becomes practically unusable. Say I have the following: `\newabbreviation{qec}{QEC}{quantum error correction}` the first `\gls{qec}` will show up in text as "quantum error correction (QEC)" while the following `\gls{qec}` will only show up as "QEC". Pretty neat feature, except that this first occurrence is apparently happening in the list of figures page before page #1! sigh... I do not write in LaTeX for a living. This is probably the last time I'll use it, but I am in too deep to pull out now. In fact, I am in too deep to change glossary packages. If anyone knows of a solution, even a Band-Aid solution, I am all ears. If I am doing it wrong, please advise me. If neither, then I'll make do with what I have, and bury the memory of it once it's over. There are probably more relevant "settings" that need to be mentioned. I have no clue what they are (otherwise I wouldn't be asking the question). I've linked to the template which I barely edited (setting wise). I hope it has all you need, and if not, please be kind and let me know what do you need from me without expecting much literacy in LaTeX. Oh, I am of course using overleaf, this is how LaTeX noobs do :) **Edit**: to be clear, I want the hyperlinks to exist. I do not want them to become unclickable (otherwise the solution is simple, don't use `\gls{}`.
https://tex.stackexchange.com/users/299787
Issue with glossaries-extra package usage in figure captions and titles
false
As you noticed placing hyperlinks in movable parts of your document (headings, "short" captions, etc.) is not a good idea, as they are re-used in the TOC, LOF etc. (which are lists of links) and nested links are not sensible. So you want to use the starred versions of the glossary macros in order to suppress the links (e.g. `\gls*` instead of `\gls`). In order to avoid setting the first-use flag (which shouldn't be done in titles or captions anyhow), use `\glstext*` instead of `\gls*`. Have a look at the `glossaries` and `glossaries-extra` documentations for more details. They are a bit overwhelming at first glance but you can find all relevant information on those macros in there.
1
https://tex.stackexchange.com/users/48973
689816
320,008
https://tex.stackexchange.com/questions/689824
0
I'm trying to build my resume with LaTex. I wanted to display my confidence level in different spoken languages that I know. The display is using a tabular format. For some reason, my tabularx fails and complains about an error. ``` Package array Error: Illegal pream-token (t): `c' used. ``` Here below is my MWE for the build up towards making the display. ``` \documentclass[landscape]{article} \usepackage[margin=1cm,twoside]{geometry} \geometry{a5paper, reset, left=2cm} \usepackage{tikz,tabularx,amssymb, incgraph} \usepackage{pgfplots} \usepackage{tablefootnote} %\usetikzlibrary{calc} %\usepackage{} \usetikzlibrary{shapes.geometric, calc, shadows.blur, shapes, shapes.multipart} \def\CircleSLIDER#1#2{% 1: length, 2: position of the mark (0 to 1) \tikz[baseline=-0.1cm]{ \coordinate (start) at (0,-0.1cm); \coordinate (end) at (#1,0.1cm); \coordinate (mark) at ($(start|-0,0)!#2!(end|-0,0)$); \fill[rounded corners=0.1cm, draw=gray, bottom color=lightgray, top color=black, middle color=lightgray] (start) rectangle (end); \shade[draw=darkgray, rounded corners=0.2mm, ball color=blue!20!cyan] (mark) circle(.15) ; } } \def\SquareSLIDER#1#2{% 1: length, 2: position of the mark (0 to 1) \tikz[baseline=-0.1cm]{ \coordinate (start) at (0,-0.1cm); \coordinate (end) at (#1,0.1cm); \coordinate (mark) at ($(start|-0,0)!#2!(end|-0,0)$); \fill[rounded corners=0.1cm, draw=gray, bottom color=lightgray, top color=black, middle color=lightgray] (start) rectangle (end); \shade[draw=darkgray, rounded corners=0.2mm, ball color=blue!20!cyan] (mark) +(-.15,-.15) rectangle +(.15, .15) ; } } \def\TriangleSLIDER#1#2{% 1: length, 2: position of the mark (0 to 1) \tikz[baseline=-0.1cm]{ \coordinate (start) at (0,-0.1cm); \coordinate (end) at (#1,0.1cm); \coordinate (mark) at ($(start|-0,0)!#2!(end|-0,0)$); \fill[rounded corners=0.1cm, draw=gray, bottom color=lightgray, top color=black, middle color=lightgray] (start) rectangle (end); \shade[draw=darkgray, rounded corners=0.2mm, ball color=blue!20!cyan] (mark) ++(-.15,-.15) -- ++(.15,-.15) -- ++(.15,.15) -- ++(0,.3) -- ++(-.3,0) -- cycle ; } } \newcommand\score[2]{% \pgfmathsetmacro\pgfxa{#1 + 1}% \tikzstyle{scorestars}=[star, star points=5, star point ratio=2.25, draw, inner sep=0.15em, anchor=outer point 3]% \begin{tikzpicture}[baseline] \foreach \i in {1, ..., #2} { \pgfmathparse{\i<=#1 ? "yellow" : "gray"} \edef\starcolor{\pgfmathresult} \draw (\i*1em, 0) node[name=star\i, scorestars, fill=\starcolor] {}; } \pgfmathparse{#1>int(#1) ? int(#1+1) : 0} \let\partstar=\pgfmathresult \ifnum\partstar>0 \pgfmathsetmacro\starpart{#1-(int(#1)} \path [clip] ($(star\partstar.outer point 3)!(star\partstar.outer point 2)!(star\partstar.outer point 4)$) rectangle ($(star\partstar.outer point 2 |- star\partstar.outer point 1)!\starpart!(star\partstar.outer point 1 -| star\partstar.outer point 5)$); \fill (\partstar*1em, 0) node[scorestars, fill=yellow] {}; \fi \end{tikzpicture}% } %%\def\IosSevenSlider{#1#2}{ %\def\IosSevenSlider{2}{ % \tikz[baseline=-0.1cm]{ % \coordinate (start) at (0,0) {0\% }; % \coordinate (end) at (#1,0) {100\%}; % \coordinate (mark) at ($(start)!#2!(end)$); % \useasboundingbox (start|- 0,-.25) rectangle (end|- 0, .25); % \draw[line width=0.4mm, line cap=round, blue!50!cyan] % (start) -- (mark) edge[red] (end); % \node[fill=white, draw=lightgreen, very thin, % blur shadow={shadow xshift=0pt, shadow opacity=20, shadow yshift=-0.9mm, % shadow blur steps=6, shadow blur radius=0.3mm}, % circle, minimum size=0.25cm, inner sep=0pt] at (mark); % } %} \begin{document} %\CircleSLIDER{2.5cm}{0.4} %\SquareSLIDER{2.5cm}{0.7} \TriangleSLIDER{5cm}{0.1}\newline \TriangleSLIDER{5cm}{0.2}\newline \TriangleSLIDER{5cm}{0.3}\newline \TriangleSLIDER{5cm}{0.4}\newline \TriangleSLIDER{5cm}{0.5}\newline \TriangleSLIDER{5cm}{1}\newline \begin{table*} { \footnote{\score{0}{5} 0\% \small\score{3}{5} 50\%-60\% \Huge{\score{5}{5} 100\%}}}] % \title{LANGUAGE Fluency:} \begin{tabularx}{123.6mm}{title="Language\nolinebreak Fluency"} {|c(5.29mm)|c(5.59mm)|p(5.29mm)|X|}% original {X|X|X} \textbf{Language} & \textbf{Fluency} & \textbf{Remark}\\ \newline {English}:&\TriangleSLIDER{1cm}{1}&Well Conversant \newline {Hindi}:&\TriangleSLIDER{1cm}{1}&Well Conversant \newline {Malayalam}:&\TriangleSLIDER{1cm}{0.6}& Conversant for $ >40+$ years \newline {Kannada}:&\TriangleSLIDER{1cm}{.5}& Conversant for $\lessapprox years \\ \newline {Tamil}:&\TriangleSLIDER{1cm}{.4}& Conversant for \lessapprox 10+years \end{tabularx} **<<-- {{font color | red| ERROR LINE ** >Package array Error: Illegal pream-token (t): `c' used.}} \\ \newline \end{table*} \tcbuselibrary{listings}{title=Alex} \begin{tcblisting}{colback=red!50,colframe=red!75!black} This is a \LaTeX\ example which displays the text as source code and in compiled form. \end{tcblisting} \begin{tikzpicture} \draw[node font=\itshape] (1,0) -- +(1,1) node[above] {italic}; \tikz \node[fill=yellow!80!black,align=center] {This is a\\[-2pt] demonstration text for\\[1ex] alignments.}; \end{tikzpicture} % The following lines of code are worthless. Keeping it here for future reference. % \begin{tikzpicture}[x=1.5cm] % \pgfkeys{/pgf/number format/.cd,fixed,precision=2} % % \foreach \i in {0,1,...,5}{ % \pgfmathsetmacro{\num}{int(10*\i)} % \draw (\i,0) node[below=1mm]{$\num$}--+(90:2mm); % } % % Total 44 participants % \foreach \j/\jtext/\jnum in {1/A/32,2/B/40,3/C/42}{ % \draw (0,\j) node[left=5mm]{\jtext}--+(180:2mm); % \pgfmathsetmacro{\jpercent}{\jnum/44*100}; % \draw[blue!50,line width=3mm] (0,\j)--+(0:\jnum/10) % node[right,blue]{$\jnum \;(\pgfmathprintnumber{\jpercent} \%)$}; % } % % \draw (0,3.5)--(0,0)--(5,0); % \path % (current bounding box.north) node[above]{My title} % (current bounding box.south) node[below=2mm]{Number of Participants}; % \end{tikzpicture} % \setlength{\fboxsep}{0pt} % Some Errors seen in this macro call. Worked once. % TO DO: % DeBUG the macro on a latter day. % \fbox{\IosSevenSlider{5cm}{0.7}} \end{document} ``` I have tried static the tabular columnar width but to no avail. Can any TexPerts suggest what has gone wrong in my assumptions about tabular column sizing? Thank You, Alex
https://tex.stackexchange.com/users/299828
Side column table with slider using tabularx
false
The error ``` ! Package array Error: Illegal pream-token (t): `c' used. ``` is from the first letter `t` in the spurious argument ``` {title="Language\nolinebreak Fluency"} ``` If you remove that you get ``` ! Package array Error: Illegal pream-token ((): `c' used. ``` from `(` in `c(5.59mm)` not sure what you intended, but I changed it to `wc{5.59mm}` twice and `p(5.29mm)` to `p{5.29mm}` That gives ``` ! Extra alignment tab has been changed to \cr. ``` as you seem to have used `\newline` instead of `\\` so all entries are in the same row ``` ! Missing $ inserted. <inserted text> $ l.100 \end{tabularx} ? ``` from missing `$` in `$\lessapprox` You then get ``` ! Undefined control sequence. l.103 \tcbuselibrary ``` from an undefined command, but unrelated to this tabularx question similarly ``` ! LaTeX Error: Environment tcblisting undefined. ``` it then had no errors but everything in three narrow columns, not using `X` 4th column,so I deleted `|p{5.29mm}` and made the other columns wider ``` \documentclass[landscape]{article} \usepackage[margin=1cm,twoside]{geometry} \geometry{a5paper, reset, left=2cm} \usepackage{tikz,tabularx,amssymb, incgraph} \usepackage{pgfplots} \usepackage{tablefootnote} %\usetikzlibrary{calc} %\usepackage{} \usetikzlibrary{shapes.geometric, calc, shadows.blur, shapes, shapes.multipart} \def\CircleSLIDER#1#2{% 1: length, 2: position of the mark (0 to 1) \tikz[baseline=-0.1cm]{ \coordinate (start) at (0,-0.1cm); \coordinate (end) at (#1,0.1cm); \coordinate (mark) at ($(start|-0,0)!#2!(end|-0,0)$); \fill[rounded corners=0.1cm, draw=gray, bottom color=lightgray, top color=black, middle color=lightgray] (start) rectangle (end); \shade[draw=darkgray, rounded corners=0.2mm, ball color=blue!20!cyan] (mark) circle(.15) ; } } \def\SquareSLIDER#1#2{% 1: length, 2: position of the mark (0 to 1) \tikz[baseline=-0.1cm]{ \coordinate (start) at (0,-0.1cm); \coordinate (end) at (#1,0.1cm); \coordinate (mark) at ($(start|-0,0)!#2!(end|-0,0)$); \fill[rounded corners=0.1cm, draw=gray, bottom color=lightgray, top color=black, middle color=lightgray] (start) rectangle (end); \shade[draw=darkgray, rounded corners=0.2mm, ball color=blue!20!cyan] (mark) +(-.15,-.15) rectangle +(.15, .15) ; } } \def\TriangleSLIDER#1#2{% 1: length, 2: position of the mark (0 to 1) \tikz[baseline=-0.1cm]{ \coordinate (start) at (0,-0.1cm); \coordinate (end) at (#1,0.1cm); \coordinate (mark) at ($(start|-0,0)!#2!(end|-0,0)$); \fill[rounded corners=0.1cm, draw=gray, bottom color=lightgray, top color=black, middle color=lightgray] (start) rectangle (end); \shade[draw=darkgray, rounded corners=0.2mm, ball color=blue!20!cyan] (mark) ++(-.15,-.15) -- ++(.15,-.15) -- ++(.15,.15) -- ++(0,.3) -- ++(-.3,0) -- cycle ; } } \newcommand\score[2]{% \pgfmathsetmacro\pgfxa{#1 + 1}% \tikzstyle{scorestars}=[star, star points=5, star point ratio=2.25, draw, inner sep=0.15em, anchor=outer point 3]% \begin{tikzpicture}[baseline] \foreach \i in {1, ..., #2} { \pgfmathparse{\i<=#1 ? "yellow" : "gray"} \edef\starcolor{\pgfmathresult} \draw (\i*1em, 0) node[name=star\i, scorestars, fill=\starcolor] {}; } \pgfmathparse{#1>int(#1) ? int(#1+1) : 0} \let\partstar=\pgfmathresult \ifnum\partstar>0 \pgfmathsetmacro\starpart{#1-(int(#1)} \path [clip] ($(star\partstar.outer point 3)!(star\partstar.outer point 2)!(star\partstar.outer point 4)$) rectangle ($(star\partstar.outer point 2 |- star\partstar.outer point 1)!\starpart!(star\partstar.outer point 1 -| star\partstar.outer point 5)$); \fill (\partstar*1em, 0) node[scorestars, fill=yellow] {}; \fi \end{tikzpicture}% } %%\def\IosSevenSlider{#1#2}{ %\def\IosSevenSlider{2}{ % \tikz[baseline=-0.1cm]{ % \coordinate (start) at (0,0) {0\% }; % \coordinate (end) at (#1,0) {100\%}; % \coordinate (mark) at ($(start)!#2!(end)$); % \useasboundingbox (start|- 0,-.25) rectangle (end|- 0, .25); % \draw[line width=0.4mm, line cap=round, blue!50!cyan] % (start) -- (mark) edge[red] (end); % \node[fill=white, draw=lightgreen, very thin, % blur shadow={shadow xshift=0pt, shadow opacity=20, shadow yshift=-0.9mm, % shadow blur steps=6, shadow blur radius=0.3mm}, % circle, minimum size=0.25cm, inner sep=0pt] at (mark); % } %} \begin{document} %\CircleSLIDER{2.5cm}{0.4} %\SquareSLIDER{2.5cm}{0.7} \TriangleSLIDER{5cm}{0.1}\newline \TriangleSLIDER{5cm}{0.2}\newline \TriangleSLIDER{5cm}{0.3}\newline \TriangleSLIDER{5cm}{0.4}\newline \TriangleSLIDER{5cm}{0.5}\newline \TriangleSLIDER{5cm}{1}\newline \begin{table*} { \footnote{\score{0}{5} 0\% \small\score{3}{5} 50\%-60\% \Huge{\score{5}{5} 100\%}}}] % \title{LANGUAGE Fluency:} \begin{tabularx}{350mm} {|wc{15mm}|wc{15mm}|X|}% original {X|X|X} \textbf{Language} & \textbf{Fluency} & \textbf{Remark}\\ {English}:&\TriangleSLIDER{1cm}{1}&Well Conversant \\ {Hindi}:&\TriangleSLIDER{1cm}{1}&Well Conversant \\ {Malayalam}:&\TriangleSLIDER{1cm}{0.6}& Conversant for $ >40+$ years \\ {Kannada}:&\TriangleSLIDER{1cm}{.5}& Conversant for $\lessapprox$ years \\ {Tamil}:&\TriangleSLIDER{1cm}{.4}& Conversant for $\lessapprox$ 10+years \end{tabularx} \end{table*} %\tcbuselibrary{listings}{title=Alex} % \begin{tcblisting}{colback=red!50,colframe=red!75!black} % This is a \LaTeX\ example which displays the text as source code % and in compiled form. % \end{tcblisting} \begin{tikzpicture} \draw[node font=\itshape] (1,0) -- +(1,1) node[above] {italic}; \tikz \node[fill=yellow!80!black,align=center] {This is a\\[-2pt] demonstration text for\\[1ex] alignments.}; \end{tikzpicture} % The following lines of code are worthless. Keeping it here for future reference. % \begin{tikzpicture}[x=1.5cm] % \pgfkeys{/pgf/number format/.cd,fixed,precision=2} % % \foreach \i in {0,1,...,5}{ % \pgfmathsetmacro{\num}{int(10*\i)} % \draw (\i,0) node[below=1mm]{$\num$}--+(90:2mm); % } % % Total 44 participants % \foreach \j/\jtext/\jnum in {1/A/32,2/B/40,3/C/42}{ % \draw (0,\j) node[left=5mm]{\jtext}--+(180:2mm); % \pgfmathsetmacro{\jpercent}{\jnum/44*100}; % \draw[blue!50,line width=3mm] (0,\j)--+(0:\jnum/10) % node[right,blue]{$\jnum \;(\pgfmathprintnumber{\jpercent} \%)$}; % } % % \draw (0,3.5)--(0,0)--(5,0); % \path % (current bounding box.north) node[above]{My title} % (current bounding box.south) node[below=2mm]{Number of Participants}; % \end{tikzpicture} % \setlength{\fboxsep}{0pt} % Some Errors seen in this macro call. Worked once. % TO DO: % DeBUG the macro on a latter day. % \fbox{\IosSevenSlider{5cm}{0.7}} \end{document} ```
1
https://tex.stackexchange.com/users/1090
689838
320,015
https://tex.stackexchange.com/questions/689836
2
I have a long document with many equations, theorems, definitions, etc. They are in different environments, e.g. for definitions I have ``` \newtheorem{definition}{Definition} \begin{definition} ... \end{defintion} ``` What I want to do is make a document where I just have all the definitions (things that appear in the definition environment) that appear in my main file, with none of the other text. Is there a way to do this?
https://tex.stackexchange.com/users/299837
Reprint all equations in specific environment
true
You can define the `definition` environment so that it calls the “real” one after grabbing the text that can be saved in an auxiliary file to be input by another file. The write out operation is done after the typesetting, so we can use `\thedefinitioninner`, which will have the correct value. Main file `bedge.tex` --------------------- ``` \documentclass{book} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{definitioninner}{Definition}[section] \ExplSyntaxOn % the definition environment grabs the environments % contents, including possibly the optional argument \NewDocumentEnvironment{definition}{o +b} { \bedge_definition:nn { #1 } { #2 } } {} % allocate a stream for writing the definition texts \iow_new:N \g_bedge_definition_iow % and open it \iow_open:Nn \g_bedge_definition_iow { \c_sys_jobname_str.defn } % and close it at the end \AtEndDocument{\iow_close:N \g_bedge_definition_iow} % the main command \cs_new_protected:Nn \bedge_definition:nn {% typeset the definition and then write the contents \tl_if_novalue:nTF { #1 } {% no optional argument \begin{definitioninner} #2 \end{definitioninner} \__bedge_definition_write:en { \thedefinitioninner } { #2 } } {% optional argument \begin{definitioninner}[#1] #2 \end{definitioninner} \__bedge_definition_write:enn { \thedefinitioninner } { #1 } { #2 } } } % no optional argument \cs_new_protected:Nn \__bedge_definition_write:nn { \iow_now:Nn \g_bedge_definition_iow { \saveddefinition{#1}{#2} } } \cs_generate_variant:Nn \__bedge_definition_write:nn { e } % optional argument \cs_new_protected:Nn \__bedge_definition_write:nnn { \iow_now:Nn \g_bedge_definition_iow { \saveddefinition{#1}[#2]{#3} } } \cs_generate_variant:Nn \__bedge_definition_write:nnn { e } \ExplSyntaxOff \begin{document} \mainmatter \chapter{First} \section{Test} \begin{definition} This is an unnamed definition. \end{definition} \begin{definition}[Foo] This is a named definition. \end{definition} \section{Another} \begin{definition}[Foo] This is a named definition. \end{definition} \chapter{Second} \section{Test} \begin{definition} This is an unnamed definition. \end{definition} \begin{definition}[Foo] This is a named definition. \end{definition} \section{Another} \begin{definition}[Foo] This is a named definition. \end{definition} \end{document} ``` Secondary file `bedge-defn.tex` ------------------------------- ``` \documentclass{article} \usepackage{amsthm} \theoremstyle{definition} \newtheorem*{definition}{Definition \thisdefinitionnumber} \newcommand{\thisdefinitionnumber}{} % initialize \NewDocumentCommand{\saveddefinition}{m o +m}{% \renewcommand{\thisdefinitionnumber}{#1}% \IfNoValueTF{#2} {\begin{definition}#3\end{definition}} {\begin{definition}[#2]#3\end{definition}}% } \begin{document} All the definitions in the main document follow. \bigskip \input{bedge.defn} \end{document} ``` If I run LaTeX on the first file, a file called `bedge.defn` will be produced (the name is the same as the first file's) ``` \saveddefinition {1.1.1}{This is an unnamed definition.} \saveddefinition {1.1.2}[Foo]{This is a named definition.} \saveddefinition {1.2.1}[Foo]{This is a named definition.} \saveddefinition {2.1.1}{This is an unnamed definition.} \saveddefinition {2.1.2}[Foo]{This is a named definition.} \saveddefinition {2.2.1}[Foo]{This is a named definition.} ``` The result of running LaTeX on the secondary file is
6
https://tex.stackexchange.com/users/4427
689842
320,017