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/681418
44
I'm currently reading [Sparks of Artificial General Intelligence: Early experiments with GPT-4](https://arxiv.org/pdf/2303.12712.pdf). This paper by Microsoft employees experiments with the capabilities of GPT-4, a successor of ChatGPT. One task is to draw a unicorn with tikz.ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ They claim: > > GPT-4 produces impressive outputs that are [...] at least comparable (if not superior) to what a human would do. > > > Who wants to prove them wrong? edit: Please don't include PNG / JPG / other pixel image formats. MS-SPO is the only one allowed to do that (as a grandfathering-rule) - kudos for finding the loophole in this question and for thinking outside of the box edit: We now have 200 [fun](/questions/tagged/fun "show questions tagged 'fun'") questions!
https://tex.stackexchange.com/users/5645
Draw a unicorn in TikZ
false
"Diamonds are forever ...", said "The last unicorn" ;-) ``` \documentclass[10pt, border=4mm]{standalone} \usepackage{tikz} \begin{document} \tikzset{ unic/.pic={ % ~~~ colored shapes ~~~~ \draw [fill=yellow!60,draw=none] (3.2,4.7) -- (4.3,5.5) -- (4.9,5.35) -- (3.3,4.3) -- cycle; \draw [fill=red!20,draw=none] (0,4.2) -- (.3,.9) -- (4.2,1.6) -- (4.5,3.5) -- cycle; % ~~~ head ~~~~~~~~ \draw (2.96, 4.67) to [out=88, in=95] (3.22, 4.78); \draw (3.13, 4.63) to [out=55, in=85] (3.22, 4.43) to [out=-45, in=105] (3.57, 3.79) to [out=288, in=85] (3.88, 2.86); \draw (3.77, 2.82) to [out=230, in=280] (3.32, 2.73) to [out=90, in=300] (2.79, 3.34); \draw (2.84, 3.28) to [out=185, in=270] (2.20, 3.92) to [out=250, in=160] (2.67, 2.83); % ~~~ eye ~~~~~~~~ \draw (3.30, 4.10) to [out=190, in=160] (3.04, 4.04) to [out=300, in=190] (3.32, 3.93); % ~~~ nose ~~~~~~~~ \draw (3.84, 2.83) -- (3.70, 3.00); % ~~~ hair ~~~~~~~ \draw (2.89, 4.83) to [out=180, in=90] (1.78, 3.69) to [out=270, in=160] (2.90, 2.50); \draw (1.63, 4.24) to [out=230, in=80] (2.14, .76); \draw (1.73, .45) to [out=70, in=270] (1.03, 3.04); \draw (1.61, 3.65) to [out=260, in=140] (2.31, 2.29) to [out=-40, in=105] (3.34, 1.54); % ~~~ horn ~~~~~~ \draw (3.48, 4.19) to [out=35, in=30] (4.67, 5.22) to [out=35, in=30](3.65, 4.82); \draw (3.65, 4.34) to [out=90 , in=280] (3.59, 4.69); \draw (3.85, 4.51) to [out=90 , in=290] (3.79, 4.75); \draw (4.00, 4.64) to [out=95 , in=290] (3.96, 4.83); \draw (4.19, 4.77) to [out=95 , in=300] (4.16, 4.89); }} \tikzset{% diamond dmnd/.pic={\draw [fill=red,line width=2.5pt] (-.7,0) -- (0,1.1) -- (.7,0) -- (0,-1.1)-- cycle;} } \tikzset{% half card half/.pic={ \pic at (0,0) [line width=2.5pt] {unic}; \pic at (-1,5.5) [scale=.7, transform shape] {dmnd}; }} \tikz{% á la card ... \pic at (-2.5,-.5) {half}; \pic at (+2.5,+.5) [rotate=180,transform shape] {half}; \draw (-4.5,-7) [rounded corners=10pt,line width=4pt] rectangle ++(9,14); } \end{document} ```
5
https://tex.stackexchange.com/users/245790
683056
316,923
https://tex.stackexchange.com/questions/682913
0
I have basic-miktex-22.10-x on Windows 10. I saw a discussion of similar error in the Internet but did not see an answer clear for me (I am a simple user without deep understanding of the program). I have been using earlier versions of LaTeX for many years but never encountered such a problem. Help would be greatly appreciated. ``` \documentclass[preprint,aps,amsmath,eqsecnum,fleqn]{revtex4} \usepackage{bm} \usepackage[dvips]{graphicx} \newcommand{\arccosh}{\mbox{arccosh}} \begin{document} In $n$ region of the material there are charged donors and electrons excited from these donors \end{document} ``` and texing gives > > ! Extra \endgroup. \document ->\endgroup \init@documenthook \set@typesize@hook \normalsize \set... l.10 \begin{document} ? ! LaTeX Error: Missing \begin{document} > > >
https://tex.stackexchange.com/users/295043
Extra \endgroup ... \begin{document} ... LaTeX Error: Missing \begin{document}
false
I think that your error is due to improper use of `newcommand` or a not updated version of the LaTeX's distribution or a basic MikTeX (You are probably using commands that are not contained in the basic version). Here there is your full compilable example. ``` \documentclass[preprint,aps,amsmath,eqsecnum,fleqn]{revtex4} \usepackage{bm} \usepackage[dvips]{graphicx} \DeclareMathOperator{\arccosh}{arccosh} \begin{document} In $n$ region of the material there are charged donors and electrons excited from these donors $\arccosh x=0.253$. \end{document} ``` Here there is the screenshot: See also this link [\document ->\endgroup ERROR](https://tex.stackexchange.com/questions/568112/document-endgroup-error)
1
https://tex.stackexchange.com/users/117876
683062
316,926
https://tex.stackexchange.com/questions/682874
1
I feel exhausted and frustrated from trying to use some of the fonts from: <https://tug.org/FontCatalogue/> , e.g. Calligraphical and Handwritten Fonts, Other (mostly decorative) Fonts, etc. I have tried many of the comments/suggestions from tex.stackexchange.com and I still fail :-(. I have carefully examined the log files but nothing I saw in them was the "key" to solving the problems associated with the LaTeX code. I have been using LaTeX for over 40 years and thought I could find at least one possible solution; but, now I must stop working on this. Please, I beg of you, take a close look at why there are so many font problems being reported with miktex 22, 23 and see if there is a fix that really works. I am using **miktex 4.9 console** in the administrator mode. I have reinstalled miktex at least 7 times by now -- still font problems. The following is taken from the **System Report.txt** file generated by TeXstudio 4.5.1 (git 4.5.1) Using Qt Version 6.4.2, compiled with Qt 6.4.2 RTeXstudio (4.5.1): dpi: 96 where pdflatex: C:\Program Files\MiKTeX\miktex\bin\x64\pdflatex.exe PDFLATEX: pdflatex.exe -version MiKTeX-pdfTeX 4.14 (MiKTeX 23.1) I will prepare an example that should be helpful in finding the problems associated with "special" fonts in TeXstudio. > > ***How can I upload the tex file for this example to be prepared?*** > > >
https://tex.stackexchange.com/users/80252
How to use the different fonts available for LaTeX -- miktex (23.1) on a windows 10 platform?
false
run in a terminal the command `luafindfont` and you'll get the complete list of fonts which can be used by the different latex engines. Fonts in the directory `.../opentype/`. or `.../truetype/` or in a system directory can only be used with `lualatex/xelatex` and all other by `pdflatex` : ``` bash-5.2$ luafindfont -n "*" No. Filename Path 1. Aboensis-Regular.otf /usr/local/texlive/2022/texmf-dist/fonts/opentype/public/aboensis/ 2. academicons.ttf /usr/local/texlive/2022/texmf-dist/fonts/truetype/public/academicons/ 3. Academy Engraved LET Fonts.ttf /System/Library/Fonts/Supplemental/ 4. ACaslonPro-Bold.otf /Users/voss/Library/Fonts/Caslon/ 5. ACaslonPro-BoldItalic.otf /Users/voss/Library/Fonts/Caslon/ 6. ACaslonPro-Italic.otf /Users/voss/Library/Fonts/Caslon/ .... .... 6644. ヒラギノ角ゴシック W9.ttc /System/Library/Fonts/ 6645. ヒラギノ角ゴシック W9.ttc /System/Library/Fonts/ 6646. 儷宋_Pro.ttf /Users/voss/Library/Fonts/KozukaPro/ 6647. 华文仿宋.ttf /Users/voss/Library/Fonts/KozukaPro/ 6648. 华文楷体.ttf /Users/voss/Library/Fonts/KozukaPro/ ```
1
https://tex.stackexchange.com/users/187802
683071
316,929
https://tex.stackexchange.com/questions/681418
44
I'm currently reading [Sparks of Artificial General Intelligence: Early experiments with GPT-4](https://arxiv.org/pdf/2303.12712.pdf). This paper by Microsoft employees experiments with the capabilities of GPT-4, a successor of ChatGPT. One task is to draw a unicorn with tikz.ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ They claim: > > GPT-4 produces impressive outputs that are [...] at least comparable (if not superior) to what a human would do. > > > Who wants to prove them wrong? edit: Please don't include PNG / JPG / other pixel image formats. MS-SPO is the only one allowed to do that (as a grandfathering-rule) - kudos for finding the loophole in this question and for thinking outside of the box edit: We now have 200 [fun](/questions/tagged/fun "show questions tagged 'fun'") questions!
https://tex.stackexchange.com/users/5645
Draw a unicorn in TikZ
false
``` \documentclass[10pt, border=5mm]{standalone} \usepackage{color} \usepackage{tikz} \usetikzlibrary{shapes.callouts,decorations.shapes,shapes.geometric} % ~~~ (most) colors ~~~~~~~~~~~~~~~~~~~~~~~ \definecolor{pnk}{RGB}{244,173,203} \definecolor{yel}{RGB}{245,233,49} \definecolor{bld}{RGB}{110,181,233} \definecolor{bll}{RGB}{180,220,246} \definecolor{blu}{RGB}{145,200,239} % ~~~ short hand notation ~~~~~~~~~~~~~~~~ \newcommand\pix[3]{ \node [fill=#1] at (#2/4,#3/4) {};} \begin{document} \tikzset{% needed for beauty-corn paint/.style={draw=#1!50!black, fill=#1!50}, my star/.style={decorate,decoration={shape backgrounds,shape=star}, star points=#1} } \tikzset{% beaty-corn, as one-liners beauty/.style={line width=1pt,decoration={shape sep=8pt,shape size=8pt}}, beauty/.pic={ % ~~~ horn coloration ~~~~~~~~ \draw [decoration={shape sep=11pt,shape size=10pt},my star=6, paint=yellow] (4.67, 5.22) -- (3.25,4.4); % ~~~ head ~~~~~~~~ \draw (2.96, 4.67) to [out=88, in=95] (3.22, 4.78);\draw (3.13, 4.63) to [out=55, in=85] (3.22, 4.43) to [out=-45, in=105] (3.57, 3.79) to [out=288, in=85] (3.88, 2.86);\draw (3.77, 2.82) to [out=230, in=280] (3.32, 2.73) to [out=90, in=300] (2.79, 3.34);\draw (2.84, 3.28) to [out=185, in=270] (2.20, 3.92) to [out=250, in=160] (2.67, 2.83); % ~~~ eye ~~~~~~~~ \draw (3.30, 4.10) to [out=190, in=160] (3.04, 4.04) to [out=300, in=190] (3.32, 3.93); % ~~~ nose ~~~~~~~~ \draw (3.84, 2.83) -- (3.70, 3.00); % ~~~ hair ~~~~~~~ \draw [my star=5, paint=red] (2.89, 4.83) to [out=180, in=90] (1.78, 3.69) to [out=270, in=160] (2.90, 2.50);\draw [my star=5, paint=orange] (1.63, 4.24) to [out=230, in=80] (2.14, .76);\draw [my star=5, paint=blue] (1.73, .45) to [out=70, in=270] (1.03, 3.04);\draw [my star=5, paint=yellow] (1.61, 3.65) to [out=260, in=140] (2.31, 2.29) to [out=-40, in=105] (3.34, 1.54); % ~~~ horn ~~~~~~ \draw (3.48, 4.19) to [out=35, in=30] (4.67, 5.22) to [out=35, in=30](3.65, 4.82);\draw (3.65, 4.34) to [out=90 , in=280] (3.59, 4.69);\draw (3.85, 4.51) to [out=90 , in=290] (3.79, 4.75);\draw (4.00, 4.64) to [out=95 , in=290] (3.96, 4.83);\draw (4.19, 4.77) to [out=95 , in=300] (4.16, 4.89); }} \tikzset{ bitcorn/.pic={ % ~~~ starting somewhere ~~~~~~~~~~ \node [fill=pnk] at (0,0) {};% so it begins \node [fill=bld] at (1/4,0) {};\node [fill=bll] at (2/4,0) {}; \node [fill=blu] at (3/4,0) {};\node [fill=blu] at (4/4,0) {}; \node [fill=pnk] at (5/4,0) {};\node [fill=bll] at (6/4,0) {}; % ~~~ line(s) above ~~~~~~~~~ \pix{pnk}{1}{1}% using short hand notation \pix{bld}{2}{1}\pix{pnk}{4}{1}\pix{bld}{5}{1}\pix{blu}{6}{1}\pix{blu}{7}{1}\pix{blu}{8}{1} \pix{pnk}{4}{2}\pix{bll}{5}{2}\pix{black}{6}{2}\pix{bll}{7}{2}\pix{bll}{8}{2} \pix{pnk}{4}{3}\pix{pnk}{5}{3}\pix{pnk}{6}{3}\pix{yel}{7}{3} \pix{pnk}{5}{4}\pix{pnk}{6}{4}\pix{yel}{8}{4} % ~~~ line(s) below ~~~~~~~~~~ \pix{pnk}{1}{-1}\pix{blu}{2}{-1}\pix{blu}{3}{-1}\pix{blu}{4}{-1}\pix{bll}{5}{-1}\pix{blu}{6}{-1} \pix{pnk}{1}{-2}\pix{blu}{2}{-2}\pix{bll}{3}{-2}\pix{bld}{5}{-2}\pix{bll}{7}{-2} \pix{gray!40}{2}{-3}\pix{gray!40}{5}{-3}\pix{gray!40}{7}{-3} }} \tikz{ % text \node [draw,inner ysep=2em,inner xsep=3em,rounded corners=20pt,line width=3pt] at (-8,4) {\Huge{Once upon a time \dots}}; % dream \node at (1,0) [draw,cloud callout,cloud puffs=15,callout relative pointer={(215:3cm)}, callout pointer segments=3,ball color=orange,inner color=yellow!70,outer color=orange!70] {\tikz{\pic [xscale=-1] {beauty};}}; % dreamer \pic at (-12,-8) [scale=2.5,transform shape] {bitcorn}; } \end{document} ```
4
https://tex.stackexchange.com/users/245790
683072
316,930
https://tex.stackexchange.com/questions/683035
1
The output of `pdflatex --version` is: ``` 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 ``` When I enter `pdflatex` and try to add a `topinsert` I get an error, shown below. ``` This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2022/dev/Debian) (preloaded format=pdflatex) restricted \write18 enabled. **\relax entering extended mode LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-01-21> *\topinsert ! Undefined control sequence. <*> \topinsert ``` However, the same code works just fine when parsed using `pdftex`. How do I access the `\{...}insert` family of commands in `pdflatex`?
https://tex.stackexchange.com/users/295127
`\{...}insert` Family of Commands in LaTeX
true
LaTeX uses a different model for floating insertions. The simplistic model of plain TeX allows for just one float per page, be it `\midinsert`, `\topinsert` or `\pageinsert`. To the contrary, LaTeX allows for more floats on a single page. By default it accepts a maximum of two top floats and one bottom float. The parameters controlling this are `topnumber` and `bottomnumber` (counters), but also `\topfraction` (by default `0.7`, saved in the macro `\topfraction`) and `\bottomfraction` (by default `0.3`, saved in the macro `\bottomfraction`). It also defines a minimum fraction of the page devoted to text (by default `0.2`, which is saved in the macro `\textfraction`). The parameters `\topfraction` and `\bottomfraction` control the maximum fraction of the page devoted to top and bottom floats respectively. The values are examined when the output routine is being performed, so you can change them before a page is shipped out. Floats can also be declared to be “page floats”, so they'll only go in a dedicated page. When LaTeX does the analog of `\dosupereject` (in plain TeX parlance), for instance when a chapter is going to start or the endgame routine is invoked, all remaining floats in the queues are inserted as page floats. Note that a page of floats can contain more than one float. You specify the positioning with characters as optional argument to `\begin{figure}` or `\begin{table}`. The choices are * `h` for a “here float” (similar to `\midinsert`); * `t` for a “top float” (similar to `\topinsert`); * `b` for a “bottom float” (no analog in plain); * `p` for a “page float” (similar to `\pageinsert`). You can also add `!` that means “relax a bit the constraints”. Note that LaTeX will *never* do a “page float” on its own initiative, unless forced by a situation where the queues must be flushed (as described above). Similarly to plain TeX `\midinsert`, only specifying `h` will result in `ht` being used. If the optional argument is not used, the default (stored in `\fps@figure` and `\fps@table`) are `tbp` for both figures and tables. You see you have *much* more than `\topinsert`.
2
https://tex.stackexchange.com/users/4427
683073
316,931
https://tex.stackexchange.com/questions/683076
-1
I have this kind of document ``` \documentclass[a4paper,12pt,twoside,openright]{memoir} ``` however, the left blank pages due to the openright option are not numbered. For example, I am moving from page 5 to 7 since the page 6 is actually empty. How is it possible to let the page number appear on blank even pages ? In other words, I want every page of my document to be numbered even if it is blank page
https://tex.stackexchange.com/users/142665
How to number blank even pages?
true
Try this in the preamble: ``` \makeevenhead{empty}{\thepage}{}{} ``` The memoir package automatically switches to the pagestyle `empty' for these pages. The command works like this: ``` \makeevenhead{⟨style⟩}{⟨left⟩}{⟨center⟩}{⟨right⟩} ``` Commands `\makeoddhead`, `\makeevenfoot` and `\makeoddfoot` work alike.
3
https://tex.stackexchange.com/users/295156
683078
316,932
https://tex.stackexchange.com/questions/683074
2
I want to make a stack (as in programming but not algebraic one...) in LaTeX. For example, I want to define a set {} with the last three operation: 1. Add a number at the last of the set. 2. Take the last number of the set. 3. Delete the last number of the set. How do I make this true in LaTeX?
https://tex.stackexchange.com/users/239990
How to make a stack in LaTeX?
false
An implementation based on `interface3`, “Sequences and stacks” ``` \documentclass{article} \ExplSyntaxOn \seq_new:N \l_ngiap_stack_seq \msg_new:nnnn { ngiap } { stackempty } { Take~or~delete~from~empty~stack } { You've~attempted~to~take~or~delete~from~an~empty~stack } \NewDocumentCommand{\stackpush}{m} { \seq_push:Nn \l_ngiap_stack_seq { #1 } } \NewDocumentCommand{\stackget}{o} { \seq_get:NNTF \l_ngiap_stack_seq \l_tmpa_tl { \IfValueTF { #1 } { \tl_set_eq:NN #1 \l_tmpa_tl } { \tl_use:N \l_tmpa_tl } } { \msg_error:nn { ngiap } { stackempty } } } \NewDocumentCommand{\stackpop}{o} { \seq_pop:NN \l_ngiap_stack_seq \l_tmpa_tl \quark_if_no_value:NTF \l_tmpa_tl { \msg_error:nn { ngiap } { stackempty } } { \IfValueTF { #1 } { \tl_set_eq:NN #1 \l_tmpa_tl } { \tl_use:N \l_tmpa_tl } } } \NewDocumentCommand{\stackshow}{}{\seq_show:N \l_ngiap_stack_seq} \ExplSyntaxOff \begin{document} \stackshow \stackpush{1}\stackshow \stackget\stackshow \stackpush{2}\stackshow \stackget\stackshow \stackget[\foo]\show\foo \stackpop[\baz]\show\baz\stackshow \stackpop\stackshow \stackpop\stackshow \end{document} ``` With `\stackpush` we add an item at the top of the stack. With `\stacktake` we access the top item, optionally saving it in a macro; this doesn't change the stack. With `\stackpop` we access the top item, optionally saving it in a macro, deleting it from the stack. The example file will print 1 2 1 and show the following output in the console: ``` The sequence \l_ngiap_stack_seq is empty > . <recently read> } l.59 \stackshow ? The sequence \l_ngiap_stack_seq contains the items (without outer braces): > {1}. <recently read> } l.61 \stackpush{1}\stackshow ? The sequence \l_ngiap_stack_seq contains the items (without outer braces): > {1}. <recently read> } l.63 \stackget\stackshow ? The sequence \l_ngiap_stack_seq contains the items (without outer braces): > {2} > {1}. <recently read> } l.65 \stackpush{2}\stackshow ? The sequence \l_ngiap_stack_seq contains the items (without outer braces): > {2} > {1}. <recently read> } l.67 \stackget\stackshow ? > \foo=macro: ->2. l.68 \stackget[\foo]\show\foo ? > \baz=macro: ->2. l.70 \stackpop[\baz]\show\baz \stackshow ? The sequence \l_ngiap_stack_seq contains the items (without outer braces): > {1}. <recently read> } l.70 \stackpop[\baz]\show\baz\stackshow ? The sequence \l_ngiap_stack_seq is empty > . <recently read> } l.71 \stackpop\stackshow ? ! Package ngiap Error: Take or delete from empty stack For immediate help type H <return>. ... l.72 \stackpop\stackshow ? The sequence \l_ngiap_stack_seq is empty > . <recently read> } l.72 \stackpop\stackshow ? ```
7
https://tex.stackexchange.com/users/4427
683081
316,933
https://tex.stackexchange.com/questions/683061
0
I'm trying to make a macro able to do a simple arithmetical operation and which will display the result beside their equivalent in a foreign script. I'm trying to do it in `expl3` with use of `\tl_put_right:Nn` or `:Nx`. My try is leading to a weird result. I'm expecting something like this "30 = ३०", "40 = ४०"... ``` \documentclass{beamer} \mode<presentation> { \usetheme{metropolis} } \usepackage{polyglossia} \newfontfamily\devanagarifontsf[Script=Devanagari]{NotoSansDevanagari} \newcommand{\devanagarinumeral}[1]{% \devanagaridigits{\number\csname c@#1\endcsname}} \setotherlanguages{english} \newfontfamily\englishfontsf{NotoSans} \newcommand{\eng}[1]{\textenglish{#1}} \setmainlanguage{sanskrit} \setmainfont[Script=Devanagari]{NotoSansDevanagari} \newcommand{\sam}[1]{\textsanskrit{#1}} \ExplSyntaxOn \tl_new:N \l_mystack_tl \NewDocumentCommand\putnumbers { m m } { \tl_put_right:Nx { #1 } { \int_eval:n { 10 * #2 } } \tl_put_right:Nx { #1 } { = \devanagaridigits{ \int_eval:n { 10 * #2 } } } \tl_use:N #1 } \ExplSyntaxOff \begin{document} \begin{frame} $\putnumbers{\l_mystack_tl}{3}$ \end{frame} \end{document} ```
https://tex.stackexchange.com/users/145290
do multiplication and display the result in foreign script with expl3
true
You need to access the L3 variable using document conventions, I used `c` here so the name Could be constructed. Also do the arithmetic before applying devanagaridigits and I used `\text` as the font is not set up in math mode. ``` \documentclass{beamer} \mode<presentation> {\usetheme{metropolis}} \usepackage{polyglossia} \newfontfamily\devanagarifontsf[Script=Devanagari]{NotoSansDevanagari} \newcommand{\devanagarinumeral}[1]{% \devanagaridigits{\number\csname c@#1\endcsname}} \setotherlanguages{english} \newfontfamily\englishfontsf{NotoSans} \newcommand{\eng}[1]{\textenglish{#1}} \setmainlanguage{sanskrit} \setmainfont[Script=Devanagari]{NotoSansDevanagari} \newcommand{\sam}[1]{\textsanskrit{#1}} \ExplSyntaxOn \tl_new:N \l_mystack_tl \NewDocumentCommand\putnumbers { m m } { \tl_put_right:cx {l_ #1 _tl } { \int_eval:n { 10 * #2 } } \tl_put_right:cx {l_ #1 _tl } { = \exp_not:N\text{\exp_not:N\devanagarifontsf{ \exp_not:N\devanagaridigits{ \int_eval:n { 10 * #2 } } }}} \tl_use:c {l_ #1 _tl } } \ExplSyntaxOff \begin{document} \begin{frame} $\putnumbers{mystack}{3}$ \end{frame} \end{document} ```
3
https://tex.stackexchange.com/users/1090
683085
316,935
https://tex.stackexchange.com/questions/683080
3
Is it possible to `\write` and explicit carriage-return character in LaTeX? Reason for this question: I have workflow where a latex run generates output for another program, which requires CRLF line endings. I know I can use unix2dos (or similar tools) to convert the file afterwards, (or call them via `\write18`) but it would be more elegant if I could generate files with CRLF line endings on a Linux system without an additional tool.
https://tex.stackexchange.com/users/295156
Explicit carriage-return character in \write
false
Using LuaLaTeX you can switch of escaping of `^^` while writing. So, e.g. ``` %!TeX LuaLaTeX \documentclass{article} \begingroup \catcode`\^^M=12\relax% \gdef\writewithcrlf#1#2{% \directlua{texio.setescape(0)}% \write#1{#2^^M}% \directlua{texio.setescape(1)}% }% \endgroup \newwrite\txtfile \begin{document} Test: \openout\txtfile{\jobname.txt} \writewithcrlf\txtfile{This line ends with CRLF.} \write\txtfile{This line ends with LF only.} \closeout\txtfile \end{document} ``` would write a file, where the first line ends with CRLF and the second with LF only. Here is the hexdump of the generated file: ``` 00000000 54 68 69 73 20 6c 69 6e 65 20 65 6e 64 73 20 77 |This line ends w| 00000010 69 74 68 20 43 52 4c 46 2e 0d 0a 54 68 69 73 20 |ith CRLF...This | 00000020 6c 69 6e 65 20 65 6e 64 73 20 77 69 74 68 20 4c |line ends with L| 00000030 46 20 6f 6e 6c 79 2e 0a |F only..| 00000038 ```
2
https://tex.stackexchange.com/users/277964
683086
316,936
https://tex.stackexchange.com/questions/683083
1
When I use the button "Composition" in **TeXShop**, I get a single pass compilation and all my references and index aren't right (I get ?? marks all over the PDF document instead of their proper number). I know that I need *three runs* to get the references and index right. I was using **Latexian** before, which had a preference option to automatically do 1, 2 or 3 runs at compilation (sadly, this great app is now defunct). I don't see a similar option in **TeXShop**. So how should I compile my document to get a PDF file with all references and index properly numbered? Please, take note that I'm a full blown idiot and complete retard at Terminal programming and zsh coding/file management. So I'm looking for a solution directly in **TeXShop**. If there's no solution directly in **TeXShop**, despite all of its preferences options and settings, then how should a novice know that he need to do some pesky zsh/bash coding just to get a proper PDF file when he presses the Composition button? I don't understand why **TeXShop** doesn't have this option in its fabulous preferences settings, like other old apps do have (**Latexian**, for example).
https://tex.stackexchange.com/users/139556
TeXShop on Mac: how to automatically run three times for Composition?
true
You need to use the engines that come with TeXShop to automate your processing runs. You didn't specify which version of TeXShop and TeX Live you are using so I will assume recent versions of both. In Finder, go to `~/Library/TeXShop` and you should see a folder named `Engines`. Open the `Engines` folder and you should see several files, some of which have names ending in `mk`. These are engines that use `latexmk`, a script that automatically processes your document the correct number of times so as to resolve references, create an index, etc. By default, you should see `lualatexmk`, `pdflatexmk`, and `sepdflatexmk` among the various files there (note that they all have the extension `.engine` if you have Finder configured to show extensions). If these files are in place, you are all set. If you do not see these files, open the folder named `Inactive` and then open the folder `Latexmk`. There you should see files described here. Just copy them up two levels to the `Engines` folder. Now quit and relaunch TeXShop. On the main menubar, next to the `Typeset` button, you should see a dropdown menu. There should be an entry for each of the engines in the `Engine` folder described above. Select the one you need. If you want to process your document with pdfLaTeX (the usual default), you need to select `pdflatexmk`. Now when you typeset your document, the processing should continue until no more processing is necessary. This is the "old" way. The more modern way is to put the line `!TEX program = pdflatexmk` at the top of your document and the corresponding engine will automatically be used.
2
https://tex.stackexchange.com/users/218142
683087
316,937
https://tex.stackexchange.com/questions/683080
3
Is it possible to `\write` and explicit carriage-return character in LaTeX? Reason for this question: I have workflow where a latex run generates output for another program, which requires CRLF line endings. I know I can use unix2dos (or similar tools) to convert the file afterwards, (or call them via `\write18`) but it would be more elegant if I could generate files with CRLF line endings on a Linux system without an additional tool.
https://tex.stackexchange.com/users/295156
Explicit carriage-return character in \write
true
We can add simply the `^^M` character at the end of the `\write` parameter: ``` \newwrite\w \immediate\openout\w=test.txt {\catcode`\^^M=12 % \gdef\writecrlf#1#2{\immediate\write#1{#2^^M}}% } \writecrlf\w{First line} \writecrlf\w{Second line} \bye ``` The file `test.txt` has CRLF at the ends of the lines.
5
https://tex.stackexchange.com/users/51799
683090
316,938
https://tex.stackexchange.com/questions/73421
18
I am using the `book` documentclass for my thesis. The chapter titles are the normal ones but I would like to know is it is possible to change them to something more fancy, preferable without changing the documentclass. In particular, I am interested to those chapter titles which, on the first page of every chapter, they have a solid black line on top (i.e., in the header), above which and flushed left is written "Chapter x" while, directly below that line and flushed right is the chapter name/title. I have seen various theses written in this style although I cannot find which one it is. I am aware of `fncychap`, `memoir` etc but the styles of those packages - at least the ones which I have seen - do not appeal to me. If anyone is familiar with the style I described and knows a smooth way to do it within the documentclass `book`, I would be glad to know it. If, for any reason whatsoever, this is incompatible with documentclass `book`, I would also like to know alternative solutions.
https://tex.stackexchange.com/users/18960
How to create specific chapter style in book documentclass
false
Just adding to Gonzalo's answer above, as it is missing the actual title. it should be ``` \documentclass{book} \usepackage{titlesec} \usepackage{lipsum} % just to generate text for the example \titleformat{\chapter}[display] {\bfseries\Large} {\filright\MakeUppercase{\chaptertitlename} \Huge\thechapter} {1ex} {\titlerule\vspace{1ex}\filleft #1} [\vspace{1ex}\titlerule] \begin{document} \chapter{Test Unnumbered Chapter} \lipsum[1-2] \end{document} ```
1
https://tex.stackexchange.com/users/295166
683091
316,939
https://tex.stackexchange.com/questions/683096
2
**TeXShop** (with the standard **MacTex distribution**, and using the **pdflatexmk** engine) creates a lot of pesky temporary auxiliary files, and I always have to click the trash button to remove them. But doing so, I always end with a **name.lol** file (list of listings?) that I don't want to have each time I compile a document. Why it isn't trashed like the other &%$# files? It is very cumbersome to always have to trash all these pesky files that I don't want/need. Is there a way to configure TeXShop to automatically remove all these? And even when I press the trash button, why the **.lol** file is still there?
https://tex.stackexchange.com/users/139556
Why TeXShop doesn't erase the "lol" file? Is it laughing at me?
false
Assuming you have the latest version of TeXShop, select Help -> TeXShop Manual and then look in section 10 where this is explained. Different files are used for different purposes, and are generated for different reasons during a compilation. For example, if you need to build an index you will generate files that would not otherwise be generated if do not need an index. As David Carlisle pointed out all these files are needed in case you do further document processing. The editor has no way of knowing when you are finished. TeXShop's developer decided on a default set of files that could be deleted because these are the most often generated files during a compilation. You can add to this list of files as explained in section 10 of the Manual.
1
https://tex.stackexchange.com/users/218142
683097
316,940
https://tex.stackexchange.com/questions/683095
2
The folling MWE produces no diamond symbol when compiled with LuaLaTeX. The log file contains the message ``` Missing character: There is no ⋄ (U+22C4) in font [LibertinusMath-Regular.otf] :mode=base;script=math;language=dflt;;! ``` The pdfLaTeX version of the font does not have this problem (or at least compiling the MWE with pdfLaTeX gives the desired output.) Does the font really not contain the `\diamond` symbol? How can I work around this? ``` % !TeX program = lualatex \documentclass{article} \usepackage{libertinus} \begin{document} \verb|\diamond|: \(\diamond\) \end{document} ```
https://tex.stackexchange.com/users/48973
\diamond not available with Libertinus Math and LuaLaTeX?
false
``` \documentclass{article} \usepackage{libertinus} \begin{document} \verb|\diamond|: \(\diamondsuit\) $\vardiamondsuit$ \setmathfont{XITS} $\diamondcdot$ $\mdwhtdiamond$ \end{document} ``` There are some more diamond commands ...
2
https://tex.stackexchange.com/users/187802
683099
316,941
https://tex.stackexchange.com/questions/683095
2
The folling MWE produces no diamond symbol when compiled with LuaLaTeX. The log file contains the message ``` Missing character: There is no ⋄ (U+22C4) in font [LibertinusMath-Regular.otf] :mode=base;script=math;language=dflt;;! ``` The pdfLaTeX version of the font does not have this problem (or at least compiling the MWE with pdfLaTeX gives the desired output.) Does the font really not contain the `\diamond` symbol? How can I work around this? ``` % !TeX program = lualatex \documentclass{article} \usepackage{libertinus} \begin{document} \verb|\diamond|: \(\diamond\) \end{document} ```
https://tex.stackexchange.com/users/48973
\diamond not available with Libertinus Math and LuaLaTeX?
true
Borrow it from another font. Here's an example. ``` \documentclass{article} \usepackage{libertinus} \setmathfont{TeX Gyre Termes Math}[range=\smwhtdiamond] \setmathfont{LibertinusMath-Regular.otf}[range=] \begin{document} \verb|\diamond|: \(x \diamond y\) \end{document} ``` In `unicode-math-table.tex` you see that U+22C4 is `\smwhtdiamond` and it's a `\mathbin`; `\diamond` is an alias. Next, ask the maintainers of Libertinus Math to add the glyph.
4
https://tex.stackexchange.com/users/4427
683107
316,942
https://tex.stackexchange.com/questions/683105
1
I'm making a poster in tikzposter, and I would like to have a figure with caption, but without label (i.e, I don't want the caption to start with "Figure 1: ..."). I'm using tikzfigure like so: ``` \begin{tikzfigure}[Caption goes here] \centering \includegraphics[width=0.08\textwidth]{image.png} \end{tikzfigure} ``` which works except that the caption includes the label. Is there a way to remove the label?
https://tex.stackexchange.com/users/25582
Figure with caption but without label in tikzposter
true
The `tikzfigure` environment is defined as: ``` \newenvironment{tikzfigure}[1][]{ \def \rememberparameter{#1} \vspace{10pt} \refstepcounter{figurecounter} \begin{center} }{ \ifx\rememberparameter\@empty \else %nothing \\[10pt] {\small Fig.~\thefigurecounter: \rememberparameter} \fi \end{center} } ``` Therefor you could try to place something like the following code in you preamble: ``` \makeatletter \renewenvironment{tikzfigure}[1][]{ \def \rememberparameter{#1} \vspace{10pt} \refstepcounter{figurecounter} \begin{center} }{ \ifx\rememberparameter\@empty \else %nothing \\[10pt] {\small \rememberparameter} \fi \end{center} } \makeatother ```
2
https://tex.stackexchange.com/users/29873
683110
316,943
https://tex.stackexchange.com/questions/683098
2
I'm trying to color the cells of the matrix which have nonnull entries, but it seems that `\cellcolor` doesn't work. There is any solution to this? Moreover, the vertical dots of the first column (outside the matrix) have normal size. My code is the following: ``` \documentclass[10pt,xcolor={dvipsnames,table}]{beamer} \mode<article> % only for the article version { \usepackage{fullpage} \usepackage{hyperref} } \mode<presentation> { %\setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10] \setbeamercovered{transparent} \usefonttheme{serif} \usecolortheme{crane} } \setbeamercovered{dynamic} \setbeamertemplate{items}[circle] \usepackage[table]{xcolor} \usepackage{amsmath} \usepackage{kbordermatrix} \usepackage{tikz} \usetikzlibrary{tikzmark} \newcommand\x{\times} \begin{document} \begin{frame} \begin{equation*} \kbordermatrix{ & 2^{0} & 2^{1} & & 2^{2} & \ldots & 2^{m} & \ldots & n & \ldots & 2^{m+1} & \ldots \\ 2^{0} & {\cellcolor{orange}1} & 0 & 0 & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{1} & 0 & {\cellcolor{orange}1} & {\cellcolor{orange}1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ & 0 & {\cellcolor{orange}1} & {\cellcolor{orange}-1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{2} & \vdots & \vdots & \vdots & \ddots & & \vdots & \vdots & & \vdots & \\ \vdots & \vdots & \vdots & \vdots & & \ddots & \vdots & \vdots & & \vdots & \\ 2^{m} & 0 & 0 & 0 & \ldots & \ldots & {\cellcolor{orange}\x} & {\cellcolor{orange}\x} & {\cellcolor{orange}\ldots} & {\cellcolor{orange}\x} & \ldots & \ldots \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & {\cellcolor{orange}\x} & {\cellcolor{orange}\x} & {\cellcolor{orange}\ldots} & {\cellcolor{orange}\x} & \ldots & \ldots \\ k & \vdots & \vdots & \vdots & & & {\cellcolor{orange}\vdots} & {\cellcolor{orange}\vdots} & {\cellcolor{orange}\ddots} & {\cellcolor{orange}\vdots} & \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & {\cellcolor{orange}\x} & {\cellcolor{orange}\x} & {\cellcolor{orange}\ldots} & {\cellcolor{orange}\x} & \ldots & \ldots \\ 2^{m+1} & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & \ddots & \\ \vdots & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & & \ddots } \end{equation*} \end{frame} \end{document} ```
https://tex.stackexchange.com/users/293909
Colouring cells in a matrix with bordering
false
If you like to use `kbordermatrix` than you faced with problem with coloring of some matrix cells. First, in it `\cellcolor` doesn't work, since it is intended for tables, second, possible solution is to use `colorbox`, but result is not pleasant: ``` \documentclass[10pt,xcolor={dvipsnames,table}]{beamer} \setbeamercovered{dynamic} \setbeamertemplate{items}[circle] \usepackage[table]{xcolor} \usepackage{kbordermatrix} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage{amsmath} \newcommand\x{$\times$} \newcommand\CB[1]{\colorbox{orange!30}{#1}} \begin{document} \begin{frame} \[ \kbordermatrix{ & 2^{0} & 2^{1} & & 2^{2} & \ldots & 2^{m} & \ldots & n & \ldots & 2^{m+1} & \ldots \\ 2^{0} & \CB{1} & 0 & 0 & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{1} & 0 & \CB{1} & \CB{1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ & 0 & \CB{1} & \CB{-1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{2} & \vdots & \vdots & \vdots & \ddots & & \vdots & \vdots & & \vdots & \\ \vdots & \vdots & \vdots & \vdots & & \ddots & \vdots & \vdots & & \vdots & \\ 2^{m} & 0 & 0 & 0 & \ldots & \ldots & \CB{\x} &\CB{\x} & \CB{$\ldots$} &\CB{\x} & \ldots & \ldots \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & \CB{\x} &\CB{\x} & \CB{$\ldots$} &\CB{\x} & \ldots & \ldots \\ k & \vdots & \vdots & \vdots & & & \CB{$\vdots$} &\CB{$\vdots$} &\CB{$\ddots$} & \CB{$\vdots$} & \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & \CB{\x} &\CB{\x} &\CB{$\ldots$} &\CB{\x} & \ldots & \ldots \\ 2^{m+1} & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & \ddots & \\ \vdots & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & & \ddots } \] \end{frame} \end{document} ``` **Edit:** For nicer result you should stick wit suggestion given in my answer to your previous question: ``` \documentclass[10pt,xcolor={dvipsnames,table}]{beamer} \setbeamercovered{dynamic} \setbeamertemplate{items}[circle] \usepackage{tikz} \usetikzlibrary{fit, matrix, positioning} \tikzset{baseline = (current bounding box.center), node distance= 1mm and 2mm, M/.style = {matrix of math nodes, nodes in empty cells, nodes={minimum size=2em, inner sep=4pt, anchor=center}, column sep=2pt, row sep=2pt, inner xsep=2pt, inner ysep=-2pt }, CB/.style = {fill=orange!50}, lbl/.style = {text=gray, left=of #1} } \newcommand\svd{\raisebox{-2ex}{$\smash\vdots$}} \newcommand\sdd{\raisebox{-2ex}{$\smash\ddots$}} \newcommand\x{\times} \begin{document} \begin{frame}[fragile] \[ \mathbf{D} = \tikz{ \matrix (n) [M, left delimiter={[},right delimiter={]}] { |[CB]| 1 & 0 & 0 & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 0 & |[CB]| 1 & |[CB]| 1 & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 0 & |[CB]| 1 & |[CB]| -1& \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ \svd & \sdd & \svd & |[CB]| \svd & |[CB]| \svd & |[CB]| \svd & |[CB]| \svd & \svd & \ldots & \ldots \\ 0 & 0 & 0 & |[CB]| \ldots & |[CB]| \x & |[CB]| \x & |[CB]| \ldots & \x & \ldots & \ldots \\ 0 & 0 & 0 & |[CB]| \ldots & |[CB]| \x & |[CB]| \x & |[CB]| \ldots & \x & \ldots & \ldots \\ \svd & \svd & & |[CB]| \svd & |[CB]| \svd & |[CB]| \sdd & |[CB]| \svd & & & \\ 0 & 0 & 0 & \ldots & \x & \x & \ldots & \x & \ldots & \ldots \\ \svd & \svd & \svd & & \svd & \svd & \svd & \svd & \sdd & \\ \svd & \svd & \svd & & \svd & \svd & \svd & \svd & & \sdd \\ }; \node[lbl=n-1-1.west] {$2^{0}$}; \node[lbl=n-2-1] {$2^{1}$}; \node[lbl=n-3-1] {$2^{2}$}; \node[lbl=n-4-1] {$\svd$}; \node[lbl=n-5-1] {$2^{m}$}; \node[lbl=n-6-1] {$\svd$}; \node[lbl=n-7-1] {$k$}; \node[lbl=n-8-1] {$\svd$}; \node[lbl=n-9-1] {$2^{m+1}$}; \node[lbl=n-10-1] {$\svd$}; % }% end of tikz \] \end{frame} \end{document} ```
2
https://tex.stackexchange.com/users/18189
683116
316,945
https://tex.stackexchange.com/questions/683121
5
On a relatively old MacTeX distribution (2015), the following code was compiling fine without any issue. But with the latest MacTeX, it doesn't compile well anymore. I'm getting some mysterious error at compilation and I don't see where's the error: ``` \documentclass[12pt,oneside]{article} \usepackage[printwatermark]{xwatermark} \begin{document} Blabla \end{document} ``` In the console, I'm getting these two incomprehensible warnings: ``` LaTeX Warning: You have requested package `atbegshi', but the package provides `atbegshi-ltx'. LaTeX Warning: You have requested package `atveryend', but the package provides `atveryend-ltx'. ``` So what's wrong here? How should I use that `xwatermark` package with the latest MacTeX distribution? **EDIT:** It seems that this package doesn't work anymore with LaTeX. I'll need to replace that package with something else.
https://tex.stackexchange.com/users/139556
What's wrong with the xwatermark package?
true
<https://www.ctan.org/pkg/xwatermark> `xwatermark` "is currently unmaintained and does not work with modern LaTeX releases." You probably want to use the `watermark` package instead. <https://www.ctan.org/pkg/watermark>
8
https://tex.stackexchange.com/users/278534
683122
316,948
https://tex.stackexchange.com/questions/683115
4
I want to be able to follow a derivation cleanly from eqn 1 to eqn 2(a or b) to eqn 3a(a or b) to eqn 4aa(a or b), etc. if it makes sense. I am currently using the built-in sub-equation environment to try to do this, but it only has a default counter of 3 and that is not enough for me, as eqn 3 keeps getting Repeated in my long derivation. GPT suggested that I make a custom env with an unlimited counter that mirrors subeqn in function, but it hasn’t been working for me. I’m wondering if the sub-equation environment is really what I’m looking for, or if there is a better way that I don’t know of that I should be considering. ``` \usepackage{physics} \usepackage{breqn} \title{FCI Questions} \author{Patryk Kozlowski} \date{\today} %% Change "\today" by another date manually \begin{document} \maketitle \section{0 differences between two determines} \begin{equation} \mel{\Psi }{V}{\Psi } =v^{\alpha\beta\gamma\delta}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{1}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{equation} \begin{subequations} \begin{align} =\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }\delta _{\delta \kappa _{1}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a^{\dag}_{\kappa _{1}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{1}}\delta _{\gamma \kappa _{2}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta_{\kappa _{1}}}a^{\dag}_{\kappa _{2}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{'}a^{\dag}_{\beta }\delta _{\gamma \kappa _{1}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a^{\dag}_{\kappa _{1}}a_{\gamma }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a_{\kappa _{2}}a_{\kappa _{1}}a^{\dag}_{\kappa _{2}}a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{2}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a^{\dag}_{\kappa _{2}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}\delta _{\alpha \kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma\kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a_{\kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\delta \kappa _{1}}\delta _{\alpha \kappa _{1}}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha } \delta _{\beta \kappa _{1}} a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma\kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} -\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{ _{2} }H_{0}a_{ _{2} }a_{1} a_{ \kappa _{2} } }{\Psi } \end{align} \begin{subequations} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }\delta _{\beta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \end{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\gamma \kappa _{1}}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }\delta _{\beta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} -\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{ _{2} }H_{0}a_{ _{2} }a_{1} a_{ \kappa _{2} } }{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \end{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\gamma \kappa _{1}}\delta _{\beta \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}a^{\dag}_{\kappa _{2}}}H_{0} a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \end{subequations} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} +\delta _{\gamma \kappa _{1}}\delta _{\beta \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}a^{\dag}_{\kappa _{2}}}H_{0} a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \end{subequations} \end{subequations} \text{adding the integrals back in.} \begin{subequations} \begin{subequations} \begin{align} =v^{\kappa _{1}\kappa _{2}\kappa _{2}\kappa _{1}} \end{align} \begin{align} -v^{\kappa _{1}\kappa _{2}\kappa _{1}\kappa _{2}} \end{align} \end{subequations} \begin{subequations} \begin{align} +v^{\kappa _{1}\beta \gamma \kappa _{1}} \end{align} \begin{align} +v^{\alpha \kappa _{1}\kappa _{1}\delta } \end{align} \begin{align} -v^{\kappa _{1}\beta \kappa _{1}\delta } \end{align} \end{subequations} \end{subequations} \text{equation 3 part b similar to the Condon roles. not sure were to go with this, or with part a} \section{math_drafts.pdf} I'm confused about the steps you took to get from \begin{equation} \sum_{\kappa }h^{\kappa \kappa } \end{equation} \begin{equation} \sum_{\kappa } h^{(\kappa )(\kappa )}\delta _{[\kappa ],[\kappa ]} \end{equation} \end{document} ```
https://tex.stackexchange.com/users/286070
Nesting multiple equations
false
One possible way is to use `align` and keep it simple. Taking the first few lines of formulas presented in the lengthy example then: ``` \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{physics} \begin{document} \section{differences between two determines} \begin{align} \mel{\Psi }{V}{\Psi } &= v^{\alpha\beta\gamma\delta}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{1}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \\ &= \bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }\delta _{\delta \kappa _{1}} \left(\prod_{\kappa^{\prime}= \left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \\ & \hspace{5mm} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a^{\dag}_{\kappa _{1}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \\ &= \bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{1}}\delta _{\gamma \kappa _{2}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \\ & \hspace{5mm} - \bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta_{\kappa _{1}}}a^{\dag}_{\kappa _{2}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{document} ``` It should be noted that the equal signs are aligned and the lines without equal signs are slightly offset. The equation numbering, in this example, just counts the number of equations. The output is: As a side note: If this is just for study then keeping the format in a simple format may often do more good than bad. There are various ways to make, or use, equation counters that are of the form `1.xx` for section one and `2.xx` for section two and so on.
5
https://tex.stackexchange.com/users/63404
683124
316,949
https://tex.stackexchange.com/questions/683115
4
I want to be able to follow a derivation cleanly from eqn 1 to eqn 2(a or b) to eqn 3a(a or b) to eqn 4aa(a or b), etc. if it makes sense. I am currently using the built-in sub-equation environment to try to do this, but it only has a default counter of 3 and that is not enough for me, as eqn 3 keeps getting Repeated in my long derivation. GPT suggested that I make a custom env with an unlimited counter that mirrors subeqn in function, but it hasn’t been working for me. I’m wondering if the sub-equation environment is really what I’m looking for, or if there is a better way that I don’t know of that I should be considering. ``` \usepackage{physics} \usepackage{breqn} \title{FCI Questions} \author{Patryk Kozlowski} \date{\today} %% Change "\today" by another date manually \begin{document} \maketitle \section{0 differences between two determines} \begin{equation} \mel{\Psi }{V}{\Psi } =v^{\alpha\beta\gamma\delta}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{1}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{equation} \begin{subequations} \begin{align} =\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }\delta _{\delta \kappa _{1}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a^{\dag}_{\kappa _{1}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{1}}\delta _{\gamma \kappa _{2}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta_{\kappa _{1}}}a^{\dag}_{\kappa _{2}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{'}a^{\dag}_{\beta }\delta _{\gamma \kappa _{1}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a^{\dag}_{\kappa _{1}}a_{\gamma }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a_{\kappa _{2}}a_{\kappa _{1}}a^{\dag}_{\kappa _{2}}a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{2}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a^{\dag}_{\kappa _{2}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}\delta _{\alpha \kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma\kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a_{\kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\delta \kappa _{1}}\delta _{\alpha \kappa _{1}}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha } \delta _{\beta \kappa _{1}} a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma\kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} -\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{ _{2} }H_{0}a_{ _{2} }a_{1} a_{ \kappa _{2} } }{\Psi } \end{align} \begin{subequations} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }\delta _{\beta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \end{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\gamma \kappa _{1}}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }\delta _{\beta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} -\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{ _{2} }H_{0}a_{ _{2} }a_{1} a_{ \kappa _{2} } }{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \end{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\gamma \kappa _{1}}\delta _{\beta \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}a^{\dag}_{\kappa _{2}}}H_{0} a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \end{subequations} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} +\delta _{\gamma \kappa _{1}}\delta _{\beta \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}a^{\dag}_{\kappa _{2}}}H_{0} a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \end{subequations} \end{subequations} \text{adding the integrals back in.} \begin{subequations} \begin{subequations} \begin{align} =v^{\kappa _{1}\kappa _{2}\kappa _{2}\kappa _{1}} \end{align} \begin{align} -v^{\kappa _{1}\kappa _{2}\kappa _{1}\kappa _{2}} \end{align} \end{subequations} \begin{subequations} \begin{align} +v^{\kappa _{1}\beta \gamma \kappa _{1}} \end{align} \begin{align} +v^{\alpha \kappa _{1}\kappa _{1}\delta } \end{align} \begin{align} -v^{\kappa _{1}\beta \kappa _{1}\delta } \end{align} \end{subequations} \end{subequations} \text{equation 3 part b similar to the Condon roles. not sure were to go with this, or with part a} \section{math_drafts.pdf} I'm confused about the steps you took to get from \begin{equation} \sum_{\kappa }h^{\kappa \kappa } \end{equation} \begin{equation} \sum_{\kappa } h^{(\kappa )(\kappa )}\delta _{[\kappa ],[\kappa ]} \end{equation} \end{document} ```
https://tex.stackexchange.com/users/286070
Nesting multiple equations
false
As @Leucippus does in [their answer](https://tex.stackexchange.com/a/683124/5001), I suggest you drop the `subequations` approach and employ a single, multi-page `align` environment. I would also replace all tall parentheses (sized via `\left(` and `\right)`) with `\bigg`-sized parentheses, for a more balanced appearance of the material. You find it easier to track the derivations by inserting colored dots or other visual markers at the start of each equation group. ``` \documentclass{article} \usepackage{physics,breqn} \begin{document} \section{0 differences between two determines} \allowdisplaybreaks % allow page breaks in long 'align' env. \begin{align} % use a single 'align' env. \mel{\Psi}{V}{\Psi} &=v^{\alpha\beta\gamma\delta} \bra{0} \biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\alpha} a^{\dag}_{\beta} a_{\gamma} a_{\delta} \biggl(\prod_{\,\kappa'=(\kappa_1\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr) \ket{0} \\ %\end{align} %\begin{subequations} %\begin{align} &=\bra{0} \biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\alpha}a^{\dag}_{\beta}a_{\gamma}\delta_{\delta\kappa_1} \biggl(\prod_{\,\kappa'=(\kappa_2\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\alpha}a^{\dag}_{\beta}a_{\gamma}a^{\dag}_{\kappa_1}a_{\delta} \biggl(\prod_{\,\kappa'=(\kappa_2\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\begin{subequations} %\begin{subequations} %\begin{align} &=\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\alpha}a^{\dag}_{\beta}\delta_{\delta\kappa_1}\delta_{\gamma \kappa_2} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\alpha}a^{\dag}_{\beta}\delta_{\delta_{\kappa_1}}a^{\dag}_{\kappa_2}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\begin{subequations} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{'}a^{\dag}_{\beta}\delta_{\gamma \kappa_1}a_{\delta} \biggl(\prod_{\,\kappa'=(\kappa_2\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad+\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\alpha}a^{\dag}_{\beta}a^{\dag}_{\kappa_1}a_{\gamma}a_{\delta} \biggl(\prod_{\,\kappa'=(\kappa_2\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{subequations} %\begin{align} &=\delta_{\alpha \kappa_1}\delta_{\beta \kappa_2}\delta_{\gamma \kappa_2}\delta_{\delta\kappa_1} \\ %\end{align} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) a_{\kappa_2}a_{\kappa_1}a^{\dag}_{\kappa_2}a^{\dag}_{\alpha}a^{\dag}_{\beta} \delta_{\delta\kappa_1}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\begin{subequations} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) \delta_{\gamma \kappa_1}a^{\dag}_{\alpha}a^{\dag}_{\beta}\delta_{\delta\kappa_2} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad+\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_1)}\mkern-10mu a_{\kappa}\biggr) \delta_{\gamma \kappa_1}a^{\dag}_{\alpha}a^{\dag}_{\beta}a^{\dag}_{\kappa_2}a_{\delta} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{subequations} %\begin{align} &=\delta_{\alpha \kappa_1}\delta_{\beta \kappa_2}\delta_{\gamma \kappa_2}\delta_{\delta\kappa_1} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad+\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\delta\kappa_1}\delta_{\alpha \kappa_1}a^{\dag}_{\beta}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\delta\kappa_1}a^{\dag}_{\alpha}a_{\kappa_1}a^{\dag}_{\beta}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{align} &\quad-\delta_{\alpha \kappa_1}\delta_{\beta \kappa_2}\delta_{\gamma\kappa_1}\delta_{\delta\kappa_2} \\ %\end{align} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\gamma \kappa_1}a_{\kappa_1}a^{\dag}_{\alpha}a^{\dag}_{\beta}a_{\delta} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{subequations} %\begin{align} &=\delta_{\alpha \kappa_1}\delta_{\beta \kappa_2}\delta_{\gamma \kappa_2}\delta_{\delta\kappa_1} \\* %\end{align} %\begin{subequations} %\begin{align} &\quad+\delta_{\delta\kappa_1}\delta_{\alpha \kappa_1}\bra{0} \biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\beta}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\delta\kappa_1}a^{\dag}_{\alpha}\delta_{\beta \kappa_1}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad+\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\delta\kappa_1}a^{\dag}_{\alpha}a_{\kappa_1}a^{\dag}_{\beta}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{align} &\quad-\delta_{\alpha \kappa_1}\delta_{\beta \kappa_2}\delta_{\gamma\kappa_1}\delta_{\delta\kappa_2} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\gamma\kappa_1}\delta_{\alpha \kappa_1}a^{\dag}_{\beta}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad+\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\gamma\kappa_1}a^{\dag}_{\alpha}a_{\kappa_1}a^{\dag}_{\beta}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{subequations} %\begin{align} &=\delta_{\alpha \kappa_1}\delta_{\beta\kappa_2}\delta_{\gamma\kappa_2}\delta_{\delta\kappa_1} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad+\delta_{\alpha \kappa_1}\delta_{\delta\kappa_1}\mel{\Psi}{a^{\dag}_{\kappa_1} a^{\dag}_{\kappa_2}H_0a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad-\delta_{\beta\kappa_1}\delta_{\delta\kappa_1}\mel{\Psi}{a^{\dag}_{\kappa_1} a^{\dag}_{ _2 }H_0a_{ _2 }a_1 a_{ \kappa_2 } }{\Psi} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad+\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\delta\kappa_1}a^{\dag}_{\alpha}\delta_{\beta\kappa_1}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} &\quad-\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) \delta_{\delta\kappa_1}a^{\dag}_{\alpha} a^{\dag}_{\beta}a_{\kappa_1}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_3\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\end{subequations} %\end{subequations} %\end{subequations} %\end{subequations} %\begin{align} &\quad-\delta_{\alpha \kappa_1}\delta_{\beta\kappa_2}\delta_{\gamma\kappa_1}\delta_{\delta\kappa_2} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad-\delta_{\gamma\kappa_1}\delta_{\alpha \kappa_1}\mel{\Psi}{a^{\dag}_{\kappa_1}a^{\dag}_{\kappa_2}H_0a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad+\delta_{\gamma\kappa_1}\bra{0}\biggl(\prod_{\,\kappa=(\kappa_n\dots\kappa_3)}\mkern-10mu a_{\kappa}\biggr) a^{\dag}_{\alpha}\delta_{\beta\kappa_1}a_{\gamma} \biggl(\prod_{\,\kappa'=(\kappa_{}\dots\kappa_n)}\mkern-10mu a^{\dag}_{\kappa'}\biggr)\ket{0} \\ %\end{align} %\begin{align} -0 %\\ %\end{align} %\end{subequations} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{subequations} %\begin{align} &=\delta_{\alpha \kappa_1}\delta_{\beta\kappa_2}\delta_{\gamma\kappa_2}\delta_{\delta\kappa_1} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad+\delta_{\alpha \kappa_1}\delta_{\delta\kappa_1}\mel{\Psi}{a^{\dag}_{\kappa_1} a^{\dag}_{\kappa_2}H_0a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad-\delta_{\beta\kappa_1}\delta_{\delta\kappa_1}\mel{\Psi}{a^{\dag}_{\kappa_1} a^{\dag}_{ _2 }H_0a_{ _2 }a_1 a_{ \kappa_2 } }{\Psi} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad+\delta_{\beta\kappa_1}\delta_{\delta\kappa_1}\mel{\Psi}{a^{\dag}_{\kappa_1} a^{\dag}_{\kappa_2}H_0a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{align} -0 %\\ %\end{align} %\end{subequations} %\end{subequations} %\end{subequations} %\end{subequations} %\begin{align} &=\delta_{\alpha \kappa_1}\delta_{\beta\kappa_2}\delta_{\gamma\kappa_1}\delta_{\delta\kappa_2} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad-\delta_{\gamma\kappa_1}\delta_{\alpha \kappa_1}\mel{\Psi}{a^{\dag}_{\kappa_1} a^{\dag}_{\kappa_2}H_0a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{subequations} %\begin{align} &\quad+\delta_{\gamma\kappa_1}\delta_{\beta\kappa_1} \mel{\Psi}{a^{\dag}_{\kappa_1a^{\dag}_{\kappa_2}}H_0 a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{align} -0 %\\ %\end{align} %\end{subequations} %\end{subequations} %\end{subequations} %\begin{subequations} %\begin{subequations} %\begin{align} &=\delta_{\alpha \kappa_1}\delta_{\beta\kappa_2}\delta_{\gamma\kappa_2}\delta_{\delta\kappa_1} \\ %\end{align} %\begin{align} &\quad-\delta_{\alpha \kappa_1}\delta_{\beta\kappa_2}\delta_{\gamma\kappa_1}\delta_{\delta\kappa_2} \\ %\end{align} %\end{subequations} %\begin{subequations} %\begin{align} &\quad+\delta_{\alpha \kappa_1}\delta_{\delta\kappa_1} \mel{\Psi}{a^{\dag}_{\kappa_1}a^{\dag}_{\kappa_2}H_0a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{align} &\quad+\delta_{\gamma\kappa_1}\delta_{\beta\kappa_1} \mel{\Psi}{a^{\dag}_{\kappa_1a^{\dag}_{\kappa_2}}H_0 a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\begin{align} &\quad-\delta_{\gamma\kappa_1}\delta_{\alpha \kappa_1} \mel{\Psi}{a^{\dag}_{\kappa_1}a^{\dag}_{\kappa_2}H_0a_{\kappa_2}a_{\kappa_1}}{\Psi} \\ %\end{align} %\end{subequations} %\end{subequations} \intertext{adding the integrals back in.} %\begin{subequations} %\begin{subequations} %\begin{align} &=v^{\kappa_1\kappa_2\kappa_2\kappa_1} \\ %\end{align} %\begin{align} &\quad-v^{\kappa_1\kappa_2\kappa_1\kappa_2} \\ %\end{align} %\end{subequations} %\begin{subequations} %\begin{align} &\quad+v^{\kappa_1\beta \gamma \kappa_1} \\ %\end{align} %\begin{align} &\quad+v^{\alpha \kappa_1\kappa_1\delta } \\ %\end{align} %\begin{align} &\quad-v^{\kappa_1\beta \kappa_1\delta } %\end{align} %\end{subequations} %\end{subequations} \end{align} Equation 3 part b similar to the Condon roles. not sure were to go with this, or with part a. \section{math\_drafts.pdf} I'm confused about the steps you took to get from \begin{gather} \sum_{\kappa }h^{\kappa \kappa } \\ \sum_{\kappa } h^{(\kappa )(\kappa )}\delta_{[\kappa ],[\kappa ]} \end{gather} \end{document} ```
5
https://tex.stackexchange.com/users/5001
683127
316,951
https://tex.stackexchange.com/questions/683114
0
I am using Latex Workshop on visual studio code. My lualatex tool is: ``` { "name": "lualatex", "command": "lualatex", "args": [ "-synctex=1", "-interaction=nonstopmode", "-file-line-error", "%DOC%" ], "env": {} } ``` My recipe is: ``` { "name": "lualatex x2", "tools": [ "lualatex", "lualatex" ] }, ``` My code is ``` \documentclass{article} \usepackage{graphicx} % Pictures \usepackage{amsmath} % Maths formulas \usepackage{amssymb} %Maths symbols like R and N \usepackage{subcaption} %Subfigures \usepackage{float} % Float placement \usepackage{wrapfig} \usepackage{geometry} \usepackage{tikz} % Pretty graphs \usetikzlibrary{graphs, graphdrawing, positioning, quotes, decorations, decorations.pathmorphing, arrows, arrows.meta, shapes} \usegdlibrary{trees, force, layered, circular} \title{My title} \author{} \date{} \begin{document} \pagenumbering{arabic} \maketitle \section{} \subsection*{a.} Some text Here \ref{fig:first}. \begin{flushleft} \begin{figure}[h] \begin{subfigure}[b]{0.25\textwidth} \begin{tikzpicture} \begin{scope}[every node/.style = {draw, circle}, semithick] \node (s) at (3,3) {s}; \node (x) at (3,0) {x}; \node (y) at (0,3) {y}; \node (t) at (0,0) {t}; \end{scope} \begin{scope}[->, >={Stealth}, semithick, auto=right] \draw (s) edge ["1", swap] (x); \draw (s) edge ["3"] (y); \draw (x) edge ["1"] (y); \draw (x) edge ["4", swap] (t); \draw (y) edge ["1"] (t); \end{scope} \end{tikzpicture} \caption*{A caption} \label{fig:first} \end{subfigure} \begin{subfigure}[b]{0.25\textwidth} \begin{tikzpicture} \begin{scope}[every node/.style = {draw, circle}, semithick] \node (s) at (3,3) {s}; \node (x) at (3,0) {x}; \node (y) at (0,3) {y}; \node (t) at (0,0) {t}; \end{scope} \begin{scope}[->, >={Stealth}, semithick, auto=right] \draw (s) edge ["1", swap] (x); \draw (s) edge ["3"] (y); \draw (x) edge ["1"] (y); \draw (x) edge ["4", swap] (t); \draw (y) edge ["1"] (t); \end{scope} \end{tikzpicture} \caption*{Another caption} \label{fig:second} \end{subfigure} \end{figure} \end{flushleft} \end{document} ``` I am getting the warning "Reference fig:first on p[age 1 undefined." and the reference appears as an unresolved reference "??". What am I doing wrong?
https://tex.stackexchange.com/users/179593
\ref before \label fails to evaluate running lualatex from Latex workshop
true
You have used `\caption*` so there is no number to reference.
1
https://tex.stackexchange.com/users/1090
683131
316,952
https://tex.stackexchange.com/questions/683135
3
The following code works fine and gives expected output. ``` \documentclass[fontsize=14pt,twoside,a4paper]{book} \usepackage[T1]{fontenc} \usepackage[none]{hyphenat} \usepackage{scrextend} \usepackage{wordlike} \usepackage{blindtext,setspace} \geometry{hmargin=2.54cm,vmargin=2.54cm} \setstretch{1.09} \begin{document} \noindent\blindtext[9] \end{document} ``` I want to convert it to class file. Following is the class-file based on above code. ``` \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myclass} \LoadClass[fontsize=14pt,twoside,a4paper]{book} \RequirePackage[T1]{fontenc} \RequirePackage[none]{hyphenat} \RequirePackage{scrextend} \RequirePackage{wordlike} \RequirePackage{blindtext,setspace} \geometry{hmargin=2.54cm,vmargin=2.54cm} \setstretch{1.09} ``` When I compile the code in `my.tex` file (given below), it gets compiled. ``` \documentclass{myclass} \begin{document} \noindent\blindtext[9] \end{document} ``` However the options `fontsize=14pt` and probably other options are not passed. So the problem is that `\LoacClass` doesn't seem to pass options to tex file. How can this issue be addressed? I also found that if I use `\documentclass[fontsize=14pt,twoside,a4paper]{myclass}`, the issue gets solved. But I want to load `myclass` with options specified. Is it possible?
https://tex.stackexchange.com/users/75476
Options not passing through class file with \LoadClass command
true
In the case of using the code 'directly', the option `fontsize=14bp` isn't recognised by the `book` class, but as you are giving it as a global option (the optional argument to `\documentclass`), it is available to all of the packages you load. It *is* recognised by `scrextend`, so it gets applied. In contrast, when you make a class, the option `fontsize=14pt` is no longer on the global list, it's now *purely* passed to `book`, which doesn't recognise it, and as a result a warning is issued. You need to pass the option here to the package that actually needs it, so ``` \RequirePackage[fontsize=14pt]{scrextend} ```
4
https://tex.stackexchange.com/users/73
683136
316,954
https://tex.stackexchange.com/questions/683121
5
On a relatively old MacTeX distribution (2015), the following code was compiling fine without any issue. But with the latest MacTeX, it doesn't compile well anymore. I'm getting some mysterious error at compilation and I don't see where's the error: ``` \documentclass[12pt,oneside]{article} \usepackage[printwatermark]{xwatermark} \begin{document} Blabla \end{document} ``` In the console, I'm getting these two incomprehensible warnings: ``` LaTeX Warning: You have requested package `atbegshi', but the package provides `atbegshi-ltx'. LaTeX Warning: You have requested package `atveryend', but the package provides `atveryend-ltx'. ``` So what's wrong here? How should I use that `xwatermark` package with the latest MacTeX distribution? **EDIT:** It seems that this package doesn't work anymore with LaTeX. I'll need to replace that package with something else.
https://tex.stackexchange.com/users/139556
What's wrong with the xwatermark package?
false
I've found `draftwatermark` to be a reliable alternative for `xwatermark` (using XeLaTeX). <https://www.ctan.org/pkg/draftwatermark>
3
https://tex.stackexchange.com/users/295203
683147
316,957
https://tex.stackexchange.com/questions/683145
16
On p. 58 of *The TeXBook*, Dr. Knuth wrote: > > The units have been defined here so that precise conversion to sp is > efficient on a wide variety of machines. In order to achieve this, > TeX's "pt" has been made slightly larger than the official printer's > point. > > > According to my calculation, 1 pt in the American Point System is equal to 0.013833...inch. This means that 72.29 pt is equal to 1 inch, while 72.27 TeX pt is equal to 1 inch. As written in the quotation above, the pt in TeX is slightly larger. But how can this difference designed intentionally really work effectively in TeX's internal arithmetic calculation? Could someone explain it?
https://tex.stackexchange.com/users/295205
Why is a "TeX point" slightly larger than an "American point"?
false
According to the [Wikipedia article on typographic point](https://en.wikipedia.org/wiki/Point_(typography)), one point is 0.013837 inches as defined by the Type Founders Association and this is the value used by Knuth for defining his own slightly different unit. This corresponds to one inch being 72.27000072270000722700... points so this is why Knuth says that a TeX point is (very) slightly larger than the TFA point. Indeed one TeX point is .01383700013837000138... inches From the TeXbook, page 58: > > The units have been defined here so that precise conversion to sp > is efficient on a wide variety of machines. In order to achieve this, > TeX’s “pt” has been made slightly larger than the official printer’s > point, which was defined to equal exactly 0.013837 in by the American > Typefounders Association in 1886 [cf. National Bureau of Standards > Circular 570 (1956)]. In fact, one classical point is exactly > 0.99999999 pt, so the “error” is essentially one part in 108. > > > This is more than two orders of magnitude less than the amount by which > the inch itself changed during 1959, when it shrank to 2.54 cm from > its former value of (1/0.3937) cm; so there is no point in worrying > about the difference. The new definition 72.27 pt = 1 in is not only > better for calculation, it is also easier to remember. > > > About efficiency, we can see it at work in module 458 of `tex.web`:
20
https://tex.stackexchange.com/users/4427
683149
316,959
https://tex.stackexchange.com/questions/683130
0
I would like to have ``` \begin{question} Text \end{question} \begin{question} Text2 \end{question} ``` Behave in the same manner as ``` \begin{enumerate} \item Text \item Text2 \end{enumerate} ``` where Text and Text2 potentially can contain lists also, so it is required that the 'nested' list is indented properly. I have tried various solutions, but I either do not manage to get the indentation work, or fail to have the outer numbering to be on the same line as Text.
https://tex.stackexchange.com/users/2070
Make environment behaving as a list
true
With the `\list` mechanism of LaTeX, you can have something like this: ``` \documentclass{article} \usepackage{kantlipsum} \newcounter{qno} \NewDocumentEnvironment{ question }{ }{% \refstepcounter{qno}% \list{\ignorespaces\theqno.}{}% \item }{\endlist} \begin{document} \begin{question} What do you think, Kant? \end{question} \kant[1-1] \begin{question} What do you think, Kant? \end{question} \kant[1-1] \end{document} ```
1
https://tex.stackexchange.com/users/174620
683153
316,962
https://tex.stackexchange.com/questions/683161
0
I am trying to plot a vector field and a circle using the following code. With the code as it is, the blue circle appears off-center. If I comment out that draw command and un-comment the other, the blue circle does not plot at all. Why is this happening? How can it be fixed? I feel like there is something really simple I'm missing. ``` \usepackage{pgfplots} \usepackage{tikz-3dplot} \usetikzlibrary{3d} \begin{document} \def\length{sqrt(1+(x+y)^2)} \begin{tikzpicture}[>=latex,x=1.5cm,y=1.5cm,scale=1.85,font=\footnotesize] \begin{axis}[ axis lines=middle, view={0}{90}, domain=-2.5:2.5, samples=18, axis equal image, ticklabel style = {font=\tiny} ] \addplot3[ gray, quiver={u={1/(\length)}, v={(x+y)/(\length)}, scale arrows=0.2, every arrow/.append style={-latex}} ] (x,y,0); % \draw (axis cs:0,0) circle [blue, radius=1]; \end{axis} \draw[thick,blue] (0,0) circle (1); \end{tikzpicture} \end{document} ```
https://tex.stackexchange.com/users/2863
How to Plot a Vector Field and a Curve on a Single Plot
true
Add `\pgfplotsset{compat=newest}` to have the coordinate system inside the `axis` environment sychonized for `\path` (as well as for `\draw`, `\fill` and similar) macros. This way, you can omit `axis cs`: ``` \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture}[>=latex, x=1.5cm, y=1.5cm, scale=1.85, font=\footnotesize] \def\length{sqrt(1+(x+y)^2)} \begin{axis}[ axis lines=middle, view={0}{90}, domain=-2.5:2.5, samples=18, axis equal image, ticklabel style={font=\tiny} ] \addplot3[ gray, quiver={u={1/(\length)}, v={(x+y)/(\length)}, scale arrows=0.2, every arrow/.append style={-latex}}, ] (x,y,0); \draw[blue] (0,0) circle[radius=1]; \end{axis} \end{tikzpicture} \end{document} ```
1
https://tex.stackexchange.com/users/47927
683162
316,966
https://tex.stackexchange.com/questions/683117
0
For my thesis I have to adhere to my university's standard (for thesis layouts). With the following MWE I receive the desired result for printing URLs in the bibliography, but the field for `lastchecked` isn't printed: ``` % !TeX program = lualatex \documentclass[ngerman]{scrreprt} \usepackage{fontspec} \usepackage{babel} \usepackage{hyperref} \begin{filecontents}{MWE.bib} @url{Google, author = {{Google Ireland Limited}}, title = {Google}, url = {https://google.de}, urldate = {1997-09-15}, lastchecked = {2023-04-16} } \end{filecontents} \usepackage[% backend=biber, style=numeric, sorting=none ]{biblatex} \addbibresource{MWE.bib} \DeclareFieldFormat[url]{url}{<\url{#1}>} \DeclareFieldFormat[url]{urldate}{\mkbibparens{#1}} \DeclareFieldFormat[url]{lastchecked}{\mkbibbrackets{Zugriff \printdate{#1}}} \renewcommand{\newunitpunct}{\addcomma\addspace} \DeclareBibliographyDriver{url}{%URLs \usebibmacro{author}% \setunit{\addcolon\addnbspace}% \usebibmacro{title}% \newunit \usebibmacro{url}% \setunit{\addnbspace} \usebibmacro{urldate}% \setunit{\addnbspace} \printfield{lastchecked}% is not printed } \begin{document} \cite{Google} \printbibliography \end{document} ``` As literature management program I am using BibDesk which gives me the two different dates `urldate` (the release date of of the URL/content) as well as `lastchecked` (the last time I visited the URL) which I both need due to the aforementioned standard.
https://tex.stackexchange.com/users/244141
URLs "lastchecked" not printed in bibliography
true
The default entry types and field types in [BibDesk](https://en.wikipedia.org/wiki/BibDesk) are for [BibTeX](https://en.wikipedia.org/wiki/BibTeX), and are different from those for BibLaTeX. (See [BibLaTeX cheat sheet](http://tug.ctan.org/info/biblatex-cheatsheet/biblatex-cheatsheet.pdf), but ignore that it says "BibTeX database file" in some places; it should say "BibLaTeX database file" instead.) The `lastchecked` field is for BibTeX. The equivalent in BibLaTeX is `urldate`. The release date of the URL/content should go in `date`. See [BibLaTeX Types and Fields](https://sourceforge.net/p/bibdesk/wiki/Tips_and_Tricks/#biblatex-types-and-fields) on the BibDesk wiki for information about how to configure BibDesk's entry types and field types for BibLaTeX.
2
https://tex.stackexchange.com/users/121590
683163
316,967
https://tex.stackexchange.com/questions/683115
4
I want to be able to follow a derivation cleanly from eqn 1 to eqn 2(a or b) to eqn 3a(a or b) to eqn 4aa(a or b), etc. if it makes sense. I am currently using the built-in sub-equation environment to try to do this, but it only has a default counter of 3 and that is not enough for me, as eqn 3 keeps getting Repeated in my long derivation. GPT suggested that I make a custom env with an unlimited counter that mirrors subeqn in function, but it hasn’t been working for me. I’m wondering if the sub-equation environment is really what I’m looking for, or if there is a better way that I don’t know of that I should be considering. ``` \usepackage{physics} \usepackage{breqn} \title{FCI Questions} \author{Patryk Kozlowski} \date{\today} %% Change "\today" by another date manually \begin{document} \maketitle \section{0 differences between two determines} \begin{equation} \mel{\Psi }{V}{\Psi } =v^{\alpha\beta\gamma\delta}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{1}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{equation} \begin{subequations} \begin{align} =\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }\delta _{\delta \kappa _{1}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\gamma }a^{\dag}_{\kappa _{1}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{1}}\delta _{\gamma \kappa _{2}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta_{\kappa _{1}}}a^{\dag}_{\kappa _{2}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{'}a^{\dag}_{\beta }\delta _{\gamma \kappa _{1}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }a^{\dag}_{\beta }a^{\dag}_{\kappa _{1}}a_{\gamma }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{2}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a_{\kappa _{2}}a_{\kappa _{1}}a^{\dag}_{\kappa _{2}}a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }\delta _{\delta \kappa _{2}} \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{1}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a^{\dag}_{\kappa _{2}}a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}\delta _{\alpha \kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma\kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a_{\kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\delta } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\delta \kappa _{1}}\delta _{\alpha \kappa _{1}}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha } \delta _{\beta \kappa _{1}} a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma\kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\gamma \kappa _{1}}a^{\dag}_{\alpha }a_{\kappa _{1}}a^{\dag}_{\beta }a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} -\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{ _{2} }H_{0}a_{ _{2} }a_{1} a_{ \kappa _{2} } }{\Psi } \end{align} \begin{subequations} \begin{align} +\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }\delta _{\beta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) \delta _{\delta \kappa _{1}}a^{\dag}_{\alpha }a^{\dag}_{\beta }a_{\kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{3}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \end{subequations} \end{subequations} \end{subequations} \end{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\gamma \kappa _{1}}\bra{0}\left(\prod_{\kappa=\left(\kappa_{n}\dots\kappa_{3}\right)}a_{\kappa}\right) a^{\dag}_{\alpha }\delta _{\beta \kappa _{1}}a_{\gamma } \left(\prod_{\kappa^{\prime}=\left(\kappa_{}\dots\kappa_{n}\right)}a^{\dag}_{\kappa^{\prime}}\right)\ket{0} \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} -\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{ _{2} }H_{0}a_{ _{2} }a_{1} a_{ \kappa _{2} } }{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\beta \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \end{subequations} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \begin{subequations} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{subequations} \begin{align} +\delta _{\gamma \kappa _{1}}\delta _{\beta \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}a^{\dag}_{\kappa _{2}}}H_{0} a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -0 \end{align} \end{subequations} \end{subequations} \end{subequations} \begin{subequations} \begin{subequations} \begin{align} =\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{2}}\delta _{\delta \kappa _{1}} \end{align} \begin{align} -\delta _{\alpha \kappa _{1}}\delta _{\beta \kappa _{2}}\delta _{\gamma \kappa _{1}}\delta _{\delta \kappa _{2}} \end{align} \end{subequations} \begin{subequations} \begin{align} +\delta _{\alpha \kappa _{1}}\delta _{\delta \kappa _{1}}\mel{\Psi }{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} +\delta _{\gamma \kappa _{1}}\delta _{\beta \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}a^{\dag}_{\kappa _{2}}}H_{0} a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \begin{align} -\delta _{\gamma \kappa _{1}}\delta _{\alpha \kappa _{1}}\mel{\Psi}{a^{\dag}_{\kappa _{1}}a^{\dag}_{\kappa _{2}}H_{0}a_{\kappa _{2}}a_{\kappa _{1}}}{\Psi } \end{align} \end{subequations} \end{subequations} \text{adding the integrals back in.} \begin{subequations} \begin{subequations} \begin{align} =v^{\kappa _{1}\kappa _{2}\kappa _{2}\kappa _{1}} \end{align} \begin{align} -v^{\kappa _{1}\kappa _{2}\kappa _{1}\kappa _{2}} \end{align} \end{subequations} \begin{subequations} \begin{align} +v^{\kappa _{1}\beta \gamma \kappa _{1}} \end{align} \begin{align} +v^{\alpha \kappa _{1}\kappa _{1}\delta } \end{align} \begin{align} -v^{\kappa _{1}\beta \kappa _{1}\delta } \end{align} \end{subequations} \end{subequations} \text{equation 3 part b similar to the Condon roles. not sure were to go with this, or with part a} \section{math_drafts.pdf} I'm confused about the steps you took to get from \begin{equation} \sum_{\kappa }h^{\kappa \kappa } \end{equation} \begin{equation} \sum_{\kappa } h^{(\kappa )(\kappa )}\delta _{[\kappa ],[\kappa ]} \end{equation} \end{document} ```
https://tex.stackexchange.com/users/286070
Nesting multiple equations
false
Not a solution, but showing how to reproduce subequation numbering. Note that amsmath uses the counter `parentequation` to store the old equaton number then changes `\theequation` to produce subequation numbers. That way they can use normal equations inside the `subequations` environment. For `\tag` it is easier just to create a `subequation` counter. Then again, maybe not. ``` \documentclass{article} \usepackage{amsmath} \newcounter{subequation}[equation] \renewcommand{\thesubequation}{\theequation\alph{subequation}} \begin{document} \begin{align} x &= a \\ &= b+c \tag{\stepcounter{subequation}\thesubequation} \end{align} % \begin{subequations} \begin{align} x &= a \tag{\theparentequation} \\ &= b+c \end{align} \end{subequations} \end{document} ```
1
https://tex.stackexchange.com/users/34505
683168
316,970
https://tex.stackexchange.com/questions/683089
0
I have been trying out `Quarto` as a replacement for `RMarkdown` for writing reports but come across some problems with tables. The main issue seems to be that I cannot get it to compile if I am trying to use both a table caption, and also some of the nice tools available in `kableExtra` to create nice looking `LaTeX` tables, see code below: ``` --- title: "REPREX - QMD KABLE CAPTION COMPILATION PROBLEM" format: pdf: documentclass: article code-line-numbers: true latex-output-dir: ../output keep-tex: true --- ```{r} #| label: setup #| include: false library(tidyverse) library(kableExtra) tbl <- tribble( ~"pos_neg", ~"<8", ~"8-10", ~">10", "Negative", 95, 23, 45, "Positive", 49, 22, 25, ) ``` ```{r} #| tbl-cap: Test #| label: tbl-test tbl %>% janitor::adorn_totals(where = c("row", "col")) %>% kable( longtable = TRUE, booktabs = TRUE, linesep = "", align = c("l", "c", "c", "c", "c"), col.names = c("", names(.)[-1]), ) %>% add_header_above(c(" " = 1, "Inoculum volume (mL)" = 3, " " = 1), bold = TRUE) %>% row_spec(0, bold = TRUE) %>% column_spec(1, bold = TRUE) %>% column_spec(2:4, width = "3em") ``` ``` I get this error returned: > > compilation failed- error Package array Error: Illegal pream-token > (\caption): `c' used. > > > See the array package documentation for explanation. Type H > for immediate help. ... > > l.238 ...{3em}>{\centering\arraybackslash}p{3em}c} > > > This is the tex code outputted for the table: ``` \begin{longtable}{>{} \caption{\label{tbl-test}Test }\tabularnewline l>{\centering\arraybackslash}p{3em}>{\centering\arraybackslash}p{3em}>{\centering\arraybackslash}p{3em}c} \toprule \multicolumn{1}{c}{\textbf{ }} & \multicolumn{3}{c}{\textbf{Inoculum volume (mL)}} & \multicolumn{1}{c}{\textbf{ }} \\ \cmidrule(l{3pt}r{3pt}){2-4} \textbf{} & \textbf{<8} & \textbf{8-10} & \textbf{>10} & \textbf{Total}\\ \midrule \textbf{Negative} & 95 & 23 & 45 & 163\\ \textbf{Positive} & 49 & 22 & 25 & 96\\ \textbf{Total} & 144 & 45 & 70 & 259\\ \bottomrule \end{longtable} ``` If I remove the `#| tbl-cap: Test` chunk option it compiles but obviously without the table caption. If anyone is able to help I would be grateful. Thanks > > [✓] Checking Quarto installation......OK > Version: 1.2.475 > Path: /Applications/quarto/bin > > > [✓] Checking basic markdown render....OK > > > [✓] Checking R installation...........OK > Version: 4.2.2 > Path: /usr/local/Cellar/r/4.2.2/lib/R > LibPaths: > - /usr/local/Cellar/r/4.2.2/lib/R/library > rmarkdown: 2.21 > > > [✓] Checking Knitr engine render......OK > > > Darwin mac-mini.lan 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 > 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE\_X86\_64 x86\_64 > > > tlmgr revision 66798 (2023-04-08 02:15:21 +0200) tlmgr > using installation: /usr/local/texlive/2023 TeX Live > (<https://tug.org/texlive>) version 2023 > > > TeX 3.141592653 (TeX Live 2023) kpathsea version 6.3.5 > > > knitr\_1.42 > rmarkdown\_2.21 > janitor\_2.2.0 > kableExtra\_1.3.4 > R version 4.2.2 (2022-10-31) > > >
https://tex.stackexchange.com/users/273376
unable to compile quarto document using kableextra and table caption
true
Not a answer, but I cannot explain well in a comment: Your problem is not reproducible for some reason. Something outdated? You are making something not showed? (always show a mininal working example compilable "as is", not snippets that have, for instance, one R chunk without the end marks). Reconstructing you file, or something similar (?) the header of the table with caption is correct in my computer: ``` \begin{longtable}{>{}l>{\centering\arraybackslash}p{3em}>{\centering\arraybackslash}p{3em}>{\centering\arraybackslash}p{3em}c} \caption{\label{tbl-test}Test }\tabularnewline \toprule ... ``` An the table is rendered correctly: The whole Quarto used for this output: ``` --- title: "REPREX - QMD KABLE CAPTION COMPILATION PROBLEM" format: pdf: documentclass: article code-line-numbers: true latex-output-dir: ../output keep-tex: true --- ```{r} #| label: setup #| include: false library(tidyverse) library(kableExtra) tbl <- tribble( ~"pos_neg", ~"<8", ~"8-10", ~">10", "Negative", 95, 23, 45, "Positive", 49, 22, 25, ) ``` ```{r} #| tbl-cap: Test #| label: tbl-test tbl %>% janitor::adorn_totals(where = c("row", "col")) %>% kable( longtable = TRUE, booktabs = TRUE, linesep = "", align = c("l", "c", "c", "c", "c"), col.names = c("", names(.)[-1]), ) %>% add_header_above(c(" " = 1, "Inoculum volume (mL)" = 3, " " = 1), bold = TRUE) %>% row_spec(0, bold = TRUE) %>% column_spec(1, bold = TRUE) %>% column_spec(2:4, width = "3em") ``` ```
0
https://tex.stackexchange.com/users/11604
683172
316,973
https://tex.stackexchange.com/questions/522635
2
I am trying to install latex on my Android device (no root). I didn't find an application to compile tex documents offline. By following instructions from this website (<https://williewong.wordpress.com/2017/06/30/texlive-on-android/>) I installed termux from play store and installed texlive using the command; ``` pkg install texlive ``` Process was successful. But I don't know if I am able to compile my documents now. Please help me. What should I do to compile tex documents offline? (I know that there are many questions on this l topic. But they are seriously outdated and solutions provided don't work for me. That is why I open this question) Another link <https://wiki.termux.com/wiki/TeX_Live>
https://tex.stackexchange.com/users/193507
Installing Latex on Android
false
I use TeXlive on Termux, as described above. No root needed. Things to know: 1. For some time, the Termux project has recommended that Termux be side-loaded via F-Droid, rather than directly via Google Play Store. I switched from Google Play to F-Droid, just for Termux, a year or two ago. No problem. The reason offered by Termux is that Google Play might tighten the ability for an app (termux) to download other things (its software). 2. Within Termux, you are always "root" there, and do not need (and cannot get) sudo permission to install or modify things. This is because you are jailed within the Termux app. You can read and write non-executable files to common storage, but you cannot modify anything exterior to Termux (unless your Android device is rooted). 3. Currently, Termux has packages `texlive-bin` and `texlive-installer`. The first is only the binaries, built for the jailed Termux path. The installer is the same as provided by TUG, except that you will not install any of its binaries. Unless your device has a lot of on-board storage (not removable card), only install as much as you need. You can add more later. 4. Because the binaries must be built specifically for Termux, they arrive much later than the TUG release. At the time I write this, the binaries are still 2022, but TUG is at 2023, so that the package installer fails (wrong year). TUG and CTAN have gotten much criticism for this practice. 5. In Termux, the TeX packages are installed in a directory that differs from the TeX default. Once in a while, a TeX script update will revert paths to the TeX defaults, and then TeX cannot find its packages via `kpathsea`. It is possible to patch the scripts. However, a simpler solution is to create a `.bashrc` file in your home directory. It is automatically read at Termux launch. In this file, define the various TeX internal environment variables. Here is how mine looks: ``` export TEXMFROOT="$PREFIX/share/texlive" export TEXMFOS="$TEXMFROOT" export TEXMFDIST="$TEXMFROOT/texmf-dist" export TEXMFLOCAL="$TEXMFROOTtexmf-local" export TEXMFVAR="$HOME/.local/texlive2022/texmf-var" export TEXMFCONFIG="$HOME/.local/texlive2022/texmf-config" export TEXMFHOME="$HOME/.local/texmf" ``` Your paths may differ.
1
https://tex.stackexchange.com/users/287367
683181
316,977
https://tex.stackexchange.com/questions/683186
3
When asking `texdef` for command defined in `book.cls` we get "undefined" as response. ``` $ texdef -t latex -s \chapter \chapter: undefined ``` But if the command is defined in `article.cls` we get a valid result: ``` $ texdef -t latex -s \section % article.cls, line 302: \newcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} ``` How can I query commands defined in `book.cls`?
https://tex.stackexchange.com/users/255699
Unexpected results of `texdef` with command defined in "book.cls"
true
This is expected behaviour. The default class used when the class is not explicitly mentioned is `article`, and since that class doesn't define `\chapter` it reports that correctly. To check for commands inside another class you need to explicitly state the class using the `-class` or `-c` option. ``` texdef -t latex -c book -s \chapter % book.cls, line 350: \newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi \thispagestyle{plain}% \global\@topnum\z@ \@afterindentfalse \secdef\@chapter\@schapter} ``` If you don't know the package that defines a particular command, and you have an up-to-date TeXLive or MikTeX, you can try the `texfindpkg` utility. It can find (and install) package dependencies as well as find packages given a command name. Here's an example: ``` $ texfindpkg query '\Soprano' [tfp] you are using texlive [tfp] found package file recorder-fingering.sty [tfp] finding dependencies for recorder-fingering.sty [tfp] finding dependencies for tikz.sty [tfp] finding dependencies for pgf.sty [tfp] finding dependencies for pgfrcs.sty [tfp] no dependency info for everyshi.sty [tfp] no dependency info for tikzlibrarycalc.sty [tfp] finding dependencies for graphicx.sty [tfp] finding dependencies for keyval.sty [tfp] finding dependencies for trig.sty [tfp] please install texlive package recorder-fingering pgf pgf pgf graphics graphics graphics ``` Which correctly finds that the `\Soprano` command is defined by the `recorder-fingering` package. If you search for a command that multiple packages defines it will give you all the relevant packages and dependencies: ``` $ texfindpkg query '\Tree' [tfp] you are using texlive [tfp] ================================================ [tfp] found package file logicpuzzle.sty with command \Tree [tfp] building dependency tree for logicpuzzle.sty: [tfp] ------------------------ [tfp] logicpuzzle.sty (from logicpuzzle) [tfp] |- xkeyval.sty (from xkeyval) [tfp] |- ifthen.sty (from latex) [tfp] |- ragged2e.sty (from ragged2e) [tfp] |- footmisc.sty (from footmisc) [tfp] |- marginnote.sty (from marginnote) [tfp] |- tikz.sty (from pgf) [tfp] |- pgf.sty (from pgf) [tfp] |- pgfrcs.sty (from pgf) [tfp] |- everyshi.sty (from everyshi) [tfp] |- tikzlibrarydecorations.pathmorphing.code.tex (from pgf) [tfp] |- tikzlibrarydecorations.pathreplacing.code.tex (from pgf) [tfp] |- tikzlibrarydecorations.code.tex (from pgf) [tfp] |- tikzlibrarycalc.code.tex (from pgf) [tfp] |- tikzlibraryshapes.geometric.code.tex (from pgf) [tfp] ------------------------ [tfp] texlive packages needed: logicpuzzle xkeyval latex ragged2e footmisc marginnote pgf everyshi [tfp] these packages are already installed [tfp] ================================================ [tfp] found package file qtree.sty with command \Tree [tfp] building dependency tree for qtree.sty: [tfp] ------------------------ [tfp] qtree.sty (from qtree) [tfp] |- pict2e.sty (from pict2e) [tfp] |- trig.sty (from graphics) [tfp] ------------------------ [tfp] texlive packages needed: qtree pict2e graphics [tfp] these packages are already installed [tfp] ================================================ [tfp] found package file tikz-qtree.sty with command \Tree [tfp] building dependency tree for tikz-qtree.sty: [tfp] ------------------------ [tfp] tikz-qtree.sty (from tikz-qtree) [tfp] |- tikz.sty (from pgf) [tfp] |- pgf.sty (from pgf) [tfp] |- pgfrcs.sty (from pgf) [tfp] |- everyshi.sty (from everyshi) [tfp] |- pgftree.sty (from tikz-qtree) [tfp] |- pgffor.sty (from pgf) [tfp] |- pgfmath.sty (from pgf) [tfp] |- pgfsubpic.sty (from tikz-qtree) [tfp] ------------------------ [tfp] texlive packages needed: tikz-qtree pgf everyshi [tfp] these packages are already installed [tfp] ================================================ [tfp] texlive packages not yet installed in total: ``` This means, however, if you look for something that lots of packages or classes define (like your original example `\chapter` it will in practical terms return *a lot* of things. The information will be there, however, but it will be quite a bit of searching to find it. For example: ``` $ texfindpkg query '\chapter' ``` returns 1039 lines of output. A more comprehensive search can be done by using `grep`: ``` $ grep -r '\Tree' /usr/local/texlive/2023/texmf-dist/tex/latex ``` But this will also require some digging to find packages that are actually defining the specific command.
7
https://tex.stackexchange.com/users/2693
683187
316,978
https://tex.stackexchange.com/questions/170491
2
How do I make \footcite work in a tabular? ``` \documentclass{memoir} \usepackage{threeparttable} % nice tables \usepackage{biblatex} \begin{document} \begin{threeparttable} \begin{tabular}{@{}m{8cm}lm{6cm}@{}} \toprule a\footcite{blah} & b & c \\ \bottomrule \end{tabular} \end{threeparttable} \end{document} ```
https://tex.stackexchange.com/users/512
How do I make \footcite work in a tabular?
false
To turn [a previous answer](https://tex.stackexchange.com/a/243852/90570)'s note/link into a proper answer. You can use the `footnote` package, which provides a `savenotes` environment. If you put your `tabular` in this environment, the footnote is properly placed. Here's a MWE based on the OP's example. ``` \documentclass{memoir} \usepackage{threeparttable} % nice tables \usepackage{biblatex} \usepackage{footnote} \begin{document} \begin{savenotes} \begin{threeparttable} \begin{tabular}{@{}m{8cm}lm{6cm}@{}} \toprule a\footcite{blah} & b & c \\ \bottomrule \end{tabular} \end{threeparttable} \end{savenotes} \end{document} ``` And here's what the output looks like (cropped to be concise):
0
https://tex.stackexchange.com/users/90570
683188
316,979
https://tex.stackexchange.com/questions/683193
2
I get some strange errors that I can't explain when I use mak4ht with my miktex distribution. Does anyone have an idea? First there are two warnings: [WARNING] tocid: char-def module not found [WARNING] tocid: cannot fix section id's Then I get "Missing \endcsname inserted" for each section and subserction, each repeated 5 times, the first howver with a wrong line number (855). Best Christian ``` \documentclass[12pt,a4paper,notitlepage,german,twoside]{book}% \usepackage{amssymb} \usepackage{graphicx} \usepackage{amsmath} \usepackage[ngerman]{babel} \usepackage{eurosym} \usepackage{amsfonts} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{minitoc} \usepackage{verbatim} \usepackage{hyperref} \usepackage{textcomp} \usepackage{tabularx} \usepackage{etoc} \begin{document} \shorthandoff{"} \part{Markt} %\input{dynvwl-part1-markt.tex} \chapter{test} \section{test2} test \part{Übungen} \end{document} ```
https://tex.stackexchange.com/users/128124
Error "Missing \endcsname inserted" with make4ht
false
I don't get any error with your file, so it is possible that the error is caused by an older version of some packages on your system. Looking at the packages you use, I see that some of them are not useful with TeX4ht. Namely Minitoc and Etoc. You can include them conditionally, only when you don't compile your document with TeX4ht: ``` \documentclass[12pt,a4paper,notitlepage,german,twoside]{book}% \usepackage{amssymb} \usepackage{graphicx} \usepackage{amsmath} \usepackage[ngerman]{babel} \usepackage{eurosym} \usepackage{amsfonts} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{verbatim} \usepackage{hyperref} \usepackage{textcomp} \usepackage{tabularx} \ifdefined\HCode\else \usepackage{minitoc} \usepackage{etoc} \fi \begin{document} \shorthandoff{"} \part{Markt} %\input{dynvwl-part1-markt.tex} \chapter{test} \section{test2} test \part{Übungen} \end{document} ``` If you still get the error, try to move more packages to this part: ``` \ifdefined\HCode\else \usepackage{minitoc} \usepackage{etoc} \fi ``` These packages will be not used with TeX4ht.
1
https://tex.stackexchange.com/users/2891
683195
316,981
https://tex.stackexchange.com/questions/683123
1
For my work, I need to use an MLA format for citations. I want to use the (Author, Year) format for the in-text citation, but I do not know how. Can someone help me?
https://tex.stackexchange.com/users/295181
MLA Citation & In-Text Citation on LaTeX
true
As moewe told you, MLA citation style is not (Author, Year) but, if you like, you can mix the styles and use `authoryear` for citations and `mla` for bibliography (I don't know if such a thing is orthodox): ``` \documentclass{book} \usepackage[citestyle=authoryear,bibstyle=mla]{biblatex} \renewcommand{\nameyeardelim}{\addcomma\addspace} \addbibresource{biblatex-examples.bib} \begin{document} Some examples: with \verb|\parencite|: \parencite{pines} with \verb|\textcite|: \textcite{knuth:ct:a} with \verb|\cite|: \cite{sigfridsson} \printbibliography \end{document} ```
2
https://tex.stackexchange.com/users/101651
683199
316,984
https://tex.stackexchange.com/questions/683205
0
I have limited experience writing Chinese characters in LaTeX. I am currently using the package CJKutf8. With the command `\begin{CJK*}{UTF8}{bsmi} \end{CJK*}` I can print traditional Chinese characters, and with the command `\begin{CJK}{UTF8}{gbsn} \end{CJK}` I can print simplified Chinese characters. But I have a document where some characters are simplified and some are traditional. Is there a way to print both, without having to switch between the two commands a character at a time?
https://tex.stackexchange.com/users/134209
Simplified and traditional Chinese characters in LaTeX
true
You should build with `xelatex`. You can also change the font. And setting fallback font is also supporting. I suggest you read the doc of `xeCJK`. ``` \documentclass{article} \usepackage{xeCJK} \begin{document} 测试简体 測試繁體 \end{document} ```
1
https://tex.stackexchange.com/users/238422
683213
316,987
https://tex.stackexchange.com/questions/683207
2
Say I want to write a command `igtest`, which works identically as `\includegraphics` from `graphicx`, except that if the page number is given, e.g. `\igtest[page=5]{someimg}`, then the page number is overwritten by 1, i.e. it should work as `\includegraphics[page=1]{someimg}`. (It's a MWE, so don't ask why I want to do this...) My attempt is as follows: ``` \documentclass{article} \usepackage{graphicx} \ExplSyntaxOn \keys_define:nn { ig_keys } { page.tl_set:N = \l_ig_page_tl } \tl_new:N \l__ig_unknown_keys_tl \NewDocumentCommand{\igtest}{O{} m} { \keys_set_known:nnN { ig_keys }{ #1 }\l__ig_unknown_keys_tl \tl_if_empty:NTF{\l_ig_page_tl}{ \includegraphics[#1]{#2} }{ \includegraphics[\tl_use:N\l__ig_unknown_keys_tl,page=1]{#2} } } \ExplSyntaxOff \begin{document} \igtest[width=\textwidth,page=2]{example-image-a} \end{document} ``` The roadmap is clear: capture the page key individually, store other keys as unknown keys in a token list `\l__ig_unknown_keys_tl`, then forward it to `\includegraphics`. The code doesn't work. Obviously, I do not use `\l__ig_unknown_keys_tl` correctly. How to fix that? Or is it fixable (since `\includegraphics` is not written with LaTeX3)?
https://tex.stackexchange.com/users/107173
LaTeX3 keyval forwarding
true
Use `\use:x`: ``` \documentclass{article} \usepackage{graphicx} \ExplSyntaxOn \keys_define:nn { ig_keys } { page.tl_set:N = \l_ig_page_tl } \tl_new:N \l__ig_unknown_keys_tl \NewDocumentCommand{\igtest}{O{} m} { \keys_set_known:nnN { ig_keys }{ #1 }\l__ig_unknown_keys_tl \tl_if_empty:NTF{\l_ig_page_tl}{ \includegraphics[#1]{#2} }{ \use:x{ \exp_not:N\includegraphics[\exp_not:V \l__ig_unknown_keys_tl,page=1]{\exp_not:n{#2}} } } } \ExplSyntaxOff \begin{document} \igtest[width=\textwidth,page=2]{example-image-a} \end{document} ``` This builds up some code to be executed (as the x-expansion of whatever there are in the argument), then execute it. (to print out what code is actually executed just change `\use:x` to `\tl_show:x` or something similar.)
3
https://tex.stackexchange.com/users/250119
683214
316,988
https://tex.stackexchange.com/questions/683207
2
Say I want to write a command `igtest`, which works identically as `\includegraphics` from `graphicx`, except that if the page number is given, e.g. `\igtest[page=5]{someimg}`, then the page number is overwritten by 1, i.e. it should work as `\includegraphics[page=1]{someimg}`. (It's a MWE, so don't ask why I want to do this...) My attempt is as follows: ``` \documentclass{article} \usepackage{graphicx} \ExplSyntaxOn \keys_define:nn { ig_keys } { page.tl_set:N = \l_ig_page_tl } \tl_new:N \l__ig_unknown_keys_tl \NewDocumentCommand{\igtest}{O{} m} { \keys_set_known:nnN { ig_keys }{ #1 }\l__ig_unknown_keys_tl \tl_if_empty:NTF{\l_ig_page_tl}{ \includegraphics[#1]{#2} }{ \includegraphics[\tl_use:N\l__ig_unknown_keys_tl,page=1]{#2} } } \ExplSyntaxOff \begin{document} \igtest[width=\textwidth,page=2]{example-image-a} \end{document} ``` The roadmap is clear: capture the page key individually, store other keys as unknown keys in a token list `\l__ig_unknown_keys_tl`, then forward it to `\includegraphics`. The code doesn't work. Obviously, I do not use `\l__ig_unknown_keys_tl` correctly. How to fix that? Or is it fixable (since `\includegraphics` is not written with LaTeX3)?
https://tex.stackexchange.com/users/107173
LaTeX3 keyval forwarding
false
Your issue is expansion related (`\includegraphics` doesn't "see" the keys as they were passed in, but only `\tl_use:N\l__ig_unknown_keys_tl,page=1`, so tries to parse `\tl_use:N\l__ig_unknown_keys_tl` as a single key, which fails), and the [answer by user202729](https://tex.stackexchange.com/a/683214/117050) shows how to fix that (by expanding `\l__ig_unknown_keys_tl` to its value before `\includegraphics` expands). The following uses `expkv-cs` instead to implement that filter behaviour, this way no expansion tricks are necessary at all. Note however that this mechanism only works for up to 8 keys you want to filter this way (else you'd need another macro of `expkv-cs` that might require expansion tricks again...). ``` \documentclass{article} \usepackage{expkv-cs} \usepackage{graphicx} \ExplSyntaxOn \NewDocumentCommand \igtest {O{} m} { \__ig_test_filter_page:nn {#1} {#2} } \ekvcSplit \__ig_test_filter_page:nn { page=, % #1 will be the value of the page key, and empty if it was unused ... % #2 will be all the unknown keys } { \tl_if_empty:nTF {#1} { \includegraphics [#2] } { \includegraphics [#2, page=1] } % the mandatory argument to \includegraphics will be curried } \ExplSyntaxOff \begin{document} \includegraphics[width=5cm, page=1]{example-image-duck} \includegraphics[width=5cm, page=5]{example-image-duck} \igtest[width=5cm, page=5]{example-image-duck} \end{document} ``` Minor issue: `\__ig_test_filter_page:nn` will not be defined `\protected` though it should be since it expands to the unexpandable `\includegraphics` macro.
3
https://tex.stackexchange.com/users/117050
683219
316,991
https://tex.stackexchange.com/questions/683207
2
Say I want to write a command `igtest`, which works identically as `\includegraphics` from `graphicx`, except that if the page number is given, e.g. `\igtest[page=5]{someimg}`, then the page number is overwritten by 1, i.e. it should work as `\includegraphics[page=1]{someimg}`. (It's a MWE, so don't ask why I want to do this...) My attempt is as follows: ``` \documentclass{article} \usepackage{graphicx} \ExplSyntaxOn \keys_define:nn { ig_keys } { page.tl_set:N = \l_ig_page_tl } \tl_new:N \l__ig_unknown_keys_tl \NewDocumentCommand{\igtest}{O{} m} { \keys_set_known:nnN { ig_keys }{ #1 }\l__ig_unknown_keys_tl \tl_if_empty:NTF{\l_ig_page_tl}{ \includegraphics[#1]{#2} }{ \includegraphics[\tl_use:N\l__ig_unknown_keys_tl,page=1]{#2} } } \ExplSyntaxOff \begin{document} \igtest[width=\textwidth,page=2]{example-image-a} \end{document} ``` The roadmap is clear: capture the page key individually, store other keys as unknown keys in a token list `\l__ig_unknown_keys_tl`, then forward it to `\includegraphics`. The code doesn't work. Obviously, I do not use `\l__ig_unknown_keys_tl` correctly. How to fix that? Or is it fixable (since `\includegraphics` is not written with LaTeX3)?
https://tex.stackexchange.com/users/107173
LaTeX3 keyval forwarding
false
You can define an internal copy of `\includegraphics`, so you can define variants thereof. ``` \documentclass{article} \usepackage{graphicx} \ExplSyntaxOn \keys_define:nn { ig_keys } { page.tl_set:N = \l_ig_page_tl, } \tl_new:N \l__ig_unknown_keys_tl \cs_new_protected:Nn \__ig_ig:nnn { \includegraphics[#1,#2]{#3} } \cs_generate_variant:Nn \__ig_ig:nnn { V } \NewDocumentCommand{\igtest}{O{} m} { \group_begin: \keys_set_known:nnN { ig_keys }{ #1 } \l__ig_unknown_keys_tl \tl_if_empty:NTF \l_ig_page_tl { \__ig_ig:nnn { #1 } { } { #2 } } { \__ig_ig:Vnn \l__ig_unknown_keys_tl { page=1 } { #2 } } \group_end: } \ExplSyntaxOff \begin{document} \igtest[width=3cm,angle=30,page=2]{example-image-a} \igtest[width=3cm,angle=30]{example-image-a} \end{document} ``` Note that you need `\group_begin:` and `\group_end:` unless you first clear the possible value of `\l_ig_page_tl`. Even more compact: ``` \ExplSyntaxOn \keys_define:nn { ig_keys } { page.tl_set:N = \l_ig_page_tl, } \tl_new:N \l__ig_unknown_keys_tl \cs_new_protected:Nn \__ig_ig:nnn { \includegraphics[#1,#2]{#3} } \cs_generate_variant:Nn \__ig_ig:nnn { Ve } \NewDocumentCommand{\igtest}{O{} m} { \group_begin: \keys_set_known:nnN { ig_keys }{ #1 } \l__ig_unknown_keys_tl \__ig_ig:Ven \l__ig_unknown_keys_tl { \tl_if_empty:NF \l_ig_page_tl { page=1 } } { #2 } \group_end: } \ExplSyntaxOff ```
4
https://tex.stackexchange.com/users/4427
683225
316,993
https://tex.stackexchange.com/questions/683202
3
I have seen the commands `\pushQED` and `\popQED` used in quite a few examples, many connected with the `amsthm` `proof` environment, but I cannot find any documentation explaining what they actually do or why you would need them. What do they do?
https://tex.stackexchange.com/users/195942
What do \pushQED and \popQED do?
false
The basic purpose of `\pushQED` and `\popQED` is to ensure that when `\qedhere` is used, no QED symbol will appear at `\end{proof}`. This also allows nested proofs, which is why a stack is used. ``` \documentclass{article} \usepackage{amsthm} \newenvironment{innerproof}{% \renewcommand{\qedsymbol}{\ensuremath{\clubsuit}}% \proof[Inner proof] }{\endproof} \makeatletter \AddToHook{cmd/endproof/before}{% \expandafter\typeout\expandafter{\detokenize\expandafter{\QED@stack}}% } \makeatother \begin{document} \begin{proof} This is a standard proof. \end{proof} \begin{proof} This is a standard proof ending with an equation \[ 1=1. \qedhere \] \end{proof} \begin{proof} This proof has inner proofs inside it. \begin{innerproof} This has only text. \end{innerproof} Some text in between. \begin{innerproof} This ends with an equation \[ 0=0. \qedhere \] \end{innerproof} Some final text. \end{proof} \end{document} ``` The `\AddToHook` business is just for debugging, so we can see the stack at each call of `\endproof`. In the console (and log file) you'll see ``` \qed@elt {\qed } \qed@elt {} \qed@elt {\qed }\qed@elt {\qed } \qed@elt {}\qed@elt {\qed } \qed@elt {\qed } ``` This shows that when `\qedhere` is used, the top item in the stack, when `\endproof` is about to be executed, contains `\qed@elt{}`, so no `\qed` command is performed, because `\qedhere` has been found in the same environment. Basically, `\qedhere` replaces `\qed@elt{\qed}` as the top item in the stack with `\qed@elt{}`.
2
https://tex.stackexchange.com/users/4427
683229
316,996
https://tex.stackexchange.com/questions/683234
0
I want the below code in the center but \begin{center} and \end{center} doesn't work here. ``` \begin{figure} \begin{center} \begin{tikzpicture}[scale = 0.4] \def\nx{12} \def\ny{12} \foreach \i in {0, ..., \nx}{ \fill (0:13+\i) ++ (-60:\i) ++ (-120:\i) coordinate (f\i) circle (2pt) node[right] {\small$f_{\i}$}; %node[right] {\i}; } \foreach \j in {0, ..., \ny}{ \fill (0:11-\j) ++ (-60:\j) ++ (-120:\j) coordinate (e\j) circle (2pt) node[left]{\small$e_{\j}$}; % node[left] (e\j) {\j}; } \draw (f0) -- (f12); \draw (e0) -- (e12); \end{tikzpicture} \end{center} \end{figure} ``` It gives me left-shifted figure instead of centered figure. Can you help? Thank you!
https://tex.stackexchange.com/users/267933
tikz figure centering doesn't work
false
The problem is in the way you find the points where to draw your things. I will show you do this: 1. Build a correct MWE (because the class *will* affect the result) 2. Add `[showframe]{geometry}` package to see the page outlines 3. add an `\fbox` around your picture to show the size of the picture 4. finally, I am adding a line to the path movement `(0:13+\i) ++ (-60:\i) ++ (-120:\i)` (and changing the fill to a draw to be able to see anything). As you can see, you move right then left; Ti*k*Z does not know that you do not want to have those points in the picture (they are on a path!), so it sets the bounding box to consider them. So yes, your picture is centered; what is not centered is your drawing *inside* the picture. ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage[showframe]{geometry} \begin{document} \begin{figure} \begin{center} \fbox{\begin{tikzpicture}[scale = 0.4] \def\nx{12} \def\ny{12} \foreach \i in {0, ..., \nx}{ \draw (0:13+\i) -- ++ (-60:\i) -- ++ (-120:\i) coordinate (f\i) circle (2pt) node[right] {\small$f_{\i}$}; %node[right] {\i}; } \foreach \j in {0, ..., \ny}{ \fill (0:11-\j) ++ (-60:\j) ++ (-120:\j) coordinate (e\j) circle (2pt) node[left]{\small$e_{\j}$}; % node[left] (e\j) {\j}; } \draw (f0) -- (f12); \draw (e0) -- (e12); \end{tikzpicture}} \end{center} \end{figure} \end{document} ``` One possible solution, as commented before, is to manually reset the bounding box ([manual here](https://tikz.dev/tikz-actions#sec-15.8)): ``` \documentclass{article} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage[showframe]{geometry} \begin{document} \begin{figure} \centering %better than {center} environment, no vertical spurious space \fbox{\begin{tikzpicture}[scale = 0.4] \def\nx{12} \def\ny{12} \foreach \i in {0, ..., \nx}{ \path (0:13+\i) -- ++ (-60:\i) -- ++ (-120:\i) coordinate (f\i) circle (2pt) node[right] {\small$f_{\i}$}; %node[right] {\i}; } \foreach \j in {0, ..., \ny}{ \fill (0:11-\j) ++ (-60:\j) ++ (-120:\j) coordinate (e\j) circle (2pt) node[left]{\small$e_{\j}$}; % node[left] (e\j) {\j}; } \draw (f0) -- (f12); \draw (e0) -- (e12); %% take responsibility for the bounding box \pgfresetboundingbox \draw [use as bounding box] ([shift={(-2,2)}] e12 |- f0) rectangle ([shift={(2,-2)}] f12); %% Notice the use of the perpendicular coordinate system here %% and a shift added to avoid clipping labels. \end{tikzpicture}} \end{figure} \end{document} ``` which results in the following: The other solution is to use [Juan Castaño's answer](https://tex.stackexchange.com/a/683236/38080) and simplify the way you build your figure.
3
https://tex.stackexchange.com/users/38080
683235
316,997
https://tex.stackexchange.com/questions/683234
0
I want the below code in the center but \begin{center} and \end{center} doesn't work here. ``` \begin{figure} \begin{center} \begin{tikzpicture}[scale = 0.4] \def\nx{12} \def\ny{12} \foreach \i in {0, ..., \nx}{ \fill (0:13+\i) ++ (-60:\i) ++ (-120:\i) coordinate (f\i) circle (2pt) node[right] {\small$f_{\i}$}; %node[right] {\i}; } \foreach \j in {0, ..., \ny}{ \fill (0:11-\j) ++ (-60:\j) ++ (-120:\j) coordinate (e\j) circle (2pt) node[left]{\small$e_{\j}$}; % node[left] (e\j) {\j}; } \draw (f0) -- (f12); \draw (e0) -- (e12); \end{tikzpicture} \end{center} \end{figure} ``` It gives me left-shifted figure instead of centered figure. Can you help? Thank you!
https://tex.stackexchange.com/users/267933
tikz figure centering doesn't work
false
A solution complementary to Romano's answer (+1), which I agree with. Something a little more simple could be: ``` \documentclass{article} \usepackage{lipsum} % dummy text \usepackage{showframe} % to show the page geometry \usepackage{tikz} \begin{document} \lipsum[1] \begin{figure}[ht]\centering \begin{tikzpicture}[scale=0.4] \def\nx{12} \foreach\i in{0,...,\nx} { \fill (0: 1) ++ (-60 :2*\i) coordinate (f\i) circle (2pt) node[right] {\small$f_{\i}$}; \fill (0:-1) ++ (-120:2*\i) coordinate (e\i) circle (2pt) node[left] {\small$e_{\j}$}; } \draw (f0) -- (f12); \draw (e0) -- (e12); \end{tikzpicture} \end{figure} \lipsum[2] \end{document} ```
3
https://tex.stackexchange.com/users/231368
683236
316,998
https://tex.stackexchange.com/questions/683234
0
I want the below code in the center but \begin{center} and \end{center} doesn't work here. ``` \begin{figure} \begin{center} \begin{tikzpicture}[scale = 0.4] \def\nx{12} \def\ny{12} \foreach \i in {0, ..., \nx}{ \fill (0:13+\i) ++ (-60:\i) ++ (-120:\i) coordinate (f\i) circle (2pt) node[right] {\small$f_{\i}$}; %node[right] {\i}; } \foreach \j in {0, ..., \ny}{ \fill (0:11-\j) ++ (-60:\j) ++ (-120:\j) coordinate (e\j) circle (2pt) node[left]{\small$e_{\j}$}; % node[left] (e\j) {\j}; } \draw (f0) -- (f12); \draw (e0) -- (e12); \end{tikzpicture} \end{center} \end{figure} ``` It gives me left-shifted figure instead of centered figure. Can you help? Thank you!
https://tex.stackexchange.com/users/267933
tikz figure centering doesn't work
false
Your image is centered in the text block, but you should take a care that image will not be wider than `\textwidth`. However, for your figure I would consider: * instead of `center` environment I would rather use command `\centering`, inserted immediately after `\begin{figure}` * for image code I would adapt my answer on your previous question: ``` \documentclass{article} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------------------------% \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture}[scale=0.4, dot/.append style = {circle, fill, inner sep=2pt, label=#1} ] \def\nx{12} \def\ny{12} \foreach \i in {0, ..., \nx} { \path (0:25-\i) ++ (80:\i) ++ (100:\i) node (f\i) [dot=right:$f_\i$] {}; } \foreach \j in {0, ..., \ny} { \path (0:\j) ++ (80:\j) ++ (100:\j) node (e\j) [dot=left:$e_\j$] {}; } \draw (f0) -- (f12); \draw (e0) -- (e12); \end{tikzpicture} \end{figure} \end{document} ``` (red lines indicate page layout)
0
https://tex.stackexchange.com/users/18189
683237
316,999
https://tex.stackexchange.com/questions/683098
2
I'm trying to color the cells of the matrix which have nonnull entries, but it seems that `\cellcolor` doesn't work. There is any solution to this? Moreover, the vertical dots of the first column (outside the matrix) have normal size. My code is the following: ``` \documentclass[10pt,xcolor={dvipsnames,table}]{beamer} \mode<article> % only for the article version { \usepackage{fullpage} \usepackage{hyperref} } \mode<presentation> { %\setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10] \setbeamercovered{transparent} \usefonttheme{serif} \usecolortheme{crane} } \setbeamercovered{dynamic} \setbeamertemplate{items}[circle] \usepackage[table]{xcolor} \usepackage{amsmath} \usepackage{kbordermatrix} \usepackage{tikz} \usetikzlibrary{tikzmark} \newcommand\x{\times} \begin{document} \begin{frame} \begin{equation*} \kbordermatrix{ & 2^{0} & 2^{1} & & 2^{2} & \ldots & 2^{m} & \ldots & n & \ldots & 2^{m+1} & \ldots \\ 2^{0} & {\cellcolor{orange}1} & 0 & 0 & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{1} & 0 & {\cellcolor{orange}1} & {\cellcolor{orange}1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ & 0 & {\cellcolor{orange}1} & {\cellcolor{orange}-1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{2} & \vdots & \vdots & \vdots & \ddots & & \vdots & \vdots & & \vdots & \\ \vdots & \vdots & \vdots & \vdots & & \ddots & \vdots & \vdots & & \vdots & \\ 2^{m} & 0 & 0 & 0 & \ldots & \ldots & {\cellcolor{orange}\x} & {\cellcolor{orange}\x} & {\cellcolor{orange}\ldots} & {\cellcolor{orange}\x} & \ldots & \ldots \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & {\cellcolor{orange}\x} & {\cellcolor{orange}\x} & {\cellcolor{orange}\ldots} & {\cellcolor{orange}\x} & \ldots & \ldots \\ k & \vdots & \vdots & \vdots & & & {\cellcolor{orange}\vdots} & {\cellcolor{orange}\vdots} & {\cellcolor{orange}\ddots} & {\cellcolor{orange}\vdots} & \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & {\cellcolor{orange}\x} & {\cellcolor{orange}\x} & {\cellcolor{orange}\ldots} & {\cellcolor{orange}\x} & \ldots & \ldots \\ 2^{m+1} & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & \ddots & \\ \vdots & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & & \ddots } \end{equation*} \end{frame} \end{document} ```
https://tex.stackexchange.com/users/293909
Colouring cells in a matrix with bordering
false
With `{bNiceMatrix}` of `nicematrix.` ``` \documentclass[10pt,xcolor=dvipsnames]{beamer} \setbeamercovered{dynamic} \setbeamertemplate{items}[circle] \usepackage{xcolor} \usepackage{nicematrix} \newcommand\x{\times} \newcommand\CB[1]{\Block[fill=orange!30,draw=white,line-width=1pt]{}{#1}} \begin{document} \begin{frame} \setcounter{MaxMatrixCols}{12} \renewcommand{\arraystretch}{1.2} \[ \begin{bNiceMatrix}[first-row,first-col,margin] & 2^{0} & 2^{1} & & 2^{2} & \ldots & 2^{m} & \ldots & n & \ldots & 2^{m+1} & \ldots \\ 2^{0} & \CB{1} & 0 & 0 & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{1} & 0 & \CB{1} & \CB{1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ & 0 & \CB{1} & \CB{-1} & \ldots & \ldots & 0 & 0 & \ldots & 0 & \ldots & \ldots \\ 2^{2} & \vdots & \vdots & \vdots & \ddots & & \vdots & \vdots & & \vdots & \\ \vdots & \vdots & \vdots & \vdots & & \ddots & \vdots & \vdots & & \vdots & \\ 2^{m} & 0 & 0 & 0 & \ldots & \ldots & \CB{\x} &\CB{\x} & \CB{\ldots} &\CB{\x} & \ldots & \ldots \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & \CB{\x} &\CB{\x} & \CB{\ldots} &\CB{\x} & \ldots & \ldots \\ k & \vdots & \vdots & \vdots & & & \CB{\vdots} &\CB{\vdots} &\CB{\ddots} & \CB{\vdots} & \\ \vdots & 0 & 0 & 0 & \ldots & \ldots & \CB{\x} &\CB{\x} &\CB{\ldots} &\CB{\x} & \ldots & \ldots \\ 2^{m+1} & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & \ddots & \\ \vdots & \vdots & \vdots & \vdots & & & \vdots & \vdots & \vdots & \vdots & & \ddots \end{bNiceMatrix} \] \end{frame} \end{document} ```
2
https://tex.stackexchange.com/users/163000
683244
317,002
https://tex.stackexchange.com/questions/439855
2
I came across several similar questions and answers with a similar issue, like <https://tex.stackexchange.com/a/20055> and <https://tex.stackexchange.com/a/46871>, but even after registering my custom command, I still get a similar error. Not using the `\soulregister` command yields the exact same error. ``` \newcommand{\code}[1]{\sethlcolor{gray}\hl{\texttt{#1}}} \soulregister{\code}{1} ``` This is the error I get: ``` ! Argument of \@textcolor has an extra }. <inserted text> \par l.276 \section{\code{virusscan}} ``` The latex code in question looks like below. I'm using this inside a memoir document. ``` \section{\code{virusscan}} ``` --- **Edit:** Defining the command like this: ``` \sethlcolor{gray} \newcommand{\code}[1]{\hl{\texttt{#1}}} \soulregister{\code}{1} ``` yields ``` ! Argument of \let has an extra }. <inserted text> \par l.277 \section{\code{virusscan}} ``` Also `\texttt{\hl{#1}}` doesn't change anything. --- **Edit 2:** Here's the minimal non-working example: ``` \documentclass{memoir} \usepackage{hyperref} \usepackage{xcolor} \usepackage{soul} \newcommand{\code}[1]{\sethlcolor{gray}\hl{\texttt{#1}}} \soulregister{\code}{1} \begin{document} \section{\code{test}} \end{document} ```
https://tex.stackexchange.com/users/146601
Soul "Argument of \xxx has an extra }" after registering custom command with \soulregister
false
I am adding an answer here instead of a new question as I had an **extremely similar** issue with slightly different code, and the answers provided here gave me the required hints to solve it, though in a different way. ### Minimal (hopefully¹ not working) example: ``` \documentclass{article} \usepackage{hyperref} \usepackage{xcolor} \usepackage{soul} \begin{document} \begin{table} \caption{ Something {\sethlcolor{blue}\hl{highlighted}} and that's all. } \end{table} \end{document} ``` ### Diagnosis Even without a list of tables in the document, the caption presumably found its way in the `aux` file, where something bad happened due to the extra `\@textcolor`. ### Workaround I could have made it a command, with something similar to what was proposed in other answers. The simpler way in this case (and probably a good practice anyway) is to add a short caption for the `aux` file, that does not contain highlight commands, even if it is not displayed anywhere in the final document (I might choose to add a list of tables later anyway): ``` \begin{table} \caption[A table with some highlight in the caption.]{ Something {\sethlcolor{blue}\hl{highlighted}} and that's all. } \end{table} ``` --- ¹ Unfortunately, I couldn't reproduce the issue locally, neither with this minimal example nor with the other one, so I am not sure if it correctly highlight the issue. The issue appeared with a different version of TeXLive inside a CI system (based on Debian). The example is still fit to illustrate the issue.
0
https://tex.stackexchange.com/users/64362
683247
317,004
https://tex.stackexchange.com/questions/682338
1
Nomencl package latex: create two lists and order them by order of appearance (list with more than 100 elements) I found this solution for ordering by appearance ([nomencl package : sort by order of appearance](https://tex.stackexchange.com/questions/383027/nomencl-package-sort-by-order-of-appearance)) but it does not work for more than 100 entries ``` \usepackage{etoolbox} \usepackage[]{nomencl} \makenomenclature \providetoggle{nomsort} \settoggle{nomsort}{true} % true = sort by use, false = sort as usual \makeatletter \iftoggle{nomsort}{% \let\old@@@nomenclature=\@@@nomenclature \newcounter{@nomcount} \setcounter{@nomcount}{0}% \renewcommand\the@nomcount{\two@digits{\value{@nomcount}}}% Ensure 10>01 \def\@@@nomenclature[#1]#2#3{% Taken from package documentation \addtocounter{@nomcount}{1}% \def\@tempa{#2}\def\@tempb{#3}% \protected@write\@nomenclaturefile{}% {\string\nomenclatureentry{\the@nomcount\nom@verb\@tempa @[{\nom@verb\@tempa}]% \begingroup\nom@verb\@tempb\protect\nomeqref{\theequation}% |nompageref}{\thepage}}% \endgroup \@esphack}% }{} \makeatother ``` **And I can't conjugate this solution with the creation of separate lists with nomencl. To create different lists I am using this:** ``` \newif\iffirstglossary\firstglossarytrue %% This removes the main title: \renewcommand{\nomname}{} %% this modifies item separation: \setlength{\nomitemsep}{8pt} %% this part defines the groups: %---------------------------------------------- \usepackage{etoolbox} \renewcommand\nomgroup[1]{% \iffirstglossary \firstglossaryfalse \else \clearpage \fi \item[\Large\bfseries \ifstrequal{#1}{N}{List of Symbols}{% \ifstrequal{#1}{O}{List of Operators}{% \ifstrequal{#1}{A}{List of Abbreviations}{}}}% ]\vspace{10pt}} % this is to add vertical space between the groups. ```
https://tex.stackexchange.com/users/294705
Two lists in nomencl package and order them by appearance
true
[Troy's answer](https://tex.stackexchange.com/a/383460/106162) needs a couple of patches for this. The first is already given in a [comment](https://tex.stackexchange.com/questions/383027/nomencl-package-sort-by-order-of-appearance#comment1034035_383460), `\two@digits` adds a zero to the start of any single-digit numbers, going over 100 we now need a three-digit version of each number so define and use ``` \def\three@digits#1{\ifnum#1<100 0\ifnum#1<10 0\fi\fi\number#1} ``` The second part is probably a mistake in the linked answer, the optional argument is omitted in favour of the counter, with `\string\nomenclatureentry{#1\nom@verb` in the package becoming `\string\nomenclatureentry{\the@nomcount\nom@verb` in the answer. However, I don't see any reason not to first sort by the prefix and then by order of appearance (if you just want order of appearance and a single list, just don't use the prefix). This would call for `\string\nomenclatureentry{#1\the@nomcount\nom@verb`. So relative to [Troy's answer](https://tex.stackexchange.com/a/383460/106162) we need a couple of small changes in the `\makeatletter`/`\makeatother` block ``` \makeatletter \def\three@digits#1{\ifnum#1<100 0\ifnum#1<10 0\fi\fi\number#1} \iftoggle{nomsort}{% \let\old@@@nomenclature=\@@@nomenclature \newcounter{@nomcount} \setcounter{@nomcount}{0}% \renewcommand\the@nomcount{\three@digits{\value{@nomcount}}}% Ensure 100>001,010 etc \def\@@@nomenclature[#1]#2#3{% Taken from package documentation \addtocounter{@nomcount}{1}% \def\@tempa{#2}\def\@tempb{#3}% \protected@write\@nomenclaturefile{}% {\string\nomenclatureentry{#1\the@nomcount\nom@verb\@tempa @[{\nom@verb\@tempa}]% Write prefix and then order \begingroup\nom@verb\@tempb\protect\nomeqref{\theequation}% |nompageref}{\thepage}}% \endgroup \@esphack}% }{} \makeatother ``` which we can see works with your multiple lists and over 100 nomenclature instances. ``` \documentclass{article} \usepackage{etoolbox} \usepackage{nomencl} \makenomenclature \providetoggle{nomsort} \settoggle{nomsort}{true} % true = sort by use, false = sort as usual \makeatletter \def\three@digits#1{\ifnum#1<100 0\ifnum#1<10 0\fi\fi\number#1} \iftoggle{nomsort}{% \let\old@@@nomenclature=\@@@nomenclature \newcounter{@nomcount} \setcounter{@nomcount}{0}% \renewcommand\the@nomcount{\three@digits{\value{@nomcount}}}% Ensure 10>01 \def\@@@nomenclature[#1]#2#3{% Taken from package documentation \addtocounter{@nomcount}{1}% \def\@tempa{#2}\def\@tempb{#3}% \protected@write\@nomenclaturefile{}% {\string\nomenclatureentry{#1\the@nomcount\nom@verb\@tempa @[{\nom@verb\@tempa}]% \begingroup\nom@verb\@tempb\protect\nomeqref{\theequation}% |nompageref}{\thepage}}% \endgroup \@esphack}% }{} \makeatother \newif\iffirstglossary\firstglossarytrue %% This removes the main title: \renewcommand{\nomname}{} %% this modifies item separation: \setlength{\nomitemsep}{8pt} %% this part defines the groups: %---------------------------------------------- \renewcommand\nomgroup[1]{% \iffirstglossary \firstglossaryfalse \else \clearpage \fi \item[\Large\bfseries \ifstrequal{#1}{N}{List of Symbols}{% \ifstrequal{#1}{O}{List of Operators}{% \ifstrequal{#1}{A}{List of Abbreviations}{}}}% ]\vspace{10pt}} % this is to add vertical space between the groups. \begin{document} \ExplSyntaxOn \str_map_inline:nn {kjihgfedcba}{ \str_map_inline:nn {kjihgfedcba}{ \nomenclature[N]{$#1##1$}{#1##1} \nomenclature[O]{$#1##1$}{#1##1} }} \ExplSyntaxOff \nomenclature{$j$}{Appears first} \nomenclature{$i$}{Appears second} \nomenclature{$h$}{Appears third} \nomenclature{$g$}{Appears fourth} \nomenclature{$f$}{Appears fifth} \nomenclature{$e$}{Appears sixth} \nomenclature{$d$}{Appears seventh} \nomenclature{$c$}{Appears eighth} \nomenclature{$b$}{Appears ninth} \nomenclature{$a$}{Appears tenth~(last)} \printnomenclature Abbreviations appear as in \verb|https://tex.stackexchange.com/a/383460|. Symbols and Operators appear separately through use of the optional prefix, both defined in order $kk$, $kj$, \ldots, $ka$, $jk$, \ldots, $aa$. \end{document} ```
0
https://tex.stackexchange.com/users/106162
683251
317,006
https://tex.stackexchange.com/questions/683252
3
Wondering what are the use cases of `unicode-math` and `mathspec` packages, I stumbled upon [this excellent question and better answers](https://tex.stackexchange.com/questions/118244/what-is-the-difference-between-unicode-math-and-mathspec), that helped me clarify the situation. If I understand correctly, the goal of the `mathspec` package is to be able to use regular (unicode?) fonts to typesetting math. This may not be the ideal situation, but makes perfect sense in some cases. Unfortunately, it seems that the `mathspec` package is only compatible with `XeLaTeX` and its maintenance status is unclear. Im aware of the `mathastext` package, but its author says, that it: > > was initially developed for the traditional TEX fonts and engines, and that compatibility with Unicode engines and OpenType fonts is partial. > > > So I wonder how authors have to proceed if they are using `LuaLaTeX` and want to use non-math regular fonts to typeset their formulae? Is there any mathspec-equivalent for `LuaLateX`? Does this make any sense at all?
https://tex.stackexchange.com/users/48799
Is there a Mathspec equivalent for LuaLaTeX?
false
> > Is there any `mathspec`-equivalent for LuaLaTeX? > > > I suggest you look into the [unicode-math](https://www.ctan.org/pkg/unicode-math) package. It works with both LuaLaTeX and XeLaTeX.
5
https://tex.stackexchange.com/users/5001
683258
317,008
https://tex.stackexchange.com/questions/663924
9
since I have updated my M1 macbook air to macOS Ventura I am no longer able to use the quicklook feature for my .tex files, in the finder when pressing the space bar on a files it simply prompts me : " *The extension com.apple.tips.TipsAppQuicklook-macOS does not implement file previews*". I also tried to manually install a qlgenerator from a third party which should be able to open in preview more uncommon files like redme or markdowns. I tried to check in the terminal with the command `qlmanage -m plugins` but the *com.apple.tips.TipsAppQuickloo*k doesn't appear in the list that the command yelds. I have also tried to update all my latex packages thinking that they needed to be up to date with my OS. I've scavenged the internet but nothings really pops up, I was hoping that someone here would have encountered the same problem and could hint for a solution to this.Thanks in advance to all.
https://tex.stackexchange.com/users/284159
Quicklook on MacOS Ventura not working anymore for .tex files
false
I encountered this problem on my new M1 iMac running Ventura. I tried the other solutions and discovered that certain other files could not be previewed. I finally found an app call Peek on the Mac App Store and it seems to work perfectly for me. It is not free, but it is also not expensive. It lets me preview files with no extension, like `platexmkrc`, which the other solution would not do for some reason. <https://apps.apple.com/us/app/peek-a-quick-look-extension/id1554235898?mt=12>
0
https://tex.stackexchange.com/users/218142
683260
317,009
https://tex.stackexchange.com/questions/683262
3
I do not think an MWE is necessary for this question but here it is. You will see that the font reverses to the default 10pt to if I set it to 14pt. Thanks! ``` \documentclass[14pt]{octavo} \usepackage[ paperwidth=160mm, paperheight=240mm, %layoutsize={110mm, 180mm}, %layoutoffset={5mm, 10mm}, textheight=18cm, textwidth=10.5cm, inner=2.5cm, %marginparwidth=20pt, ] {geometry} \begin{document} Hello world! \end{document} ```
https://tex.stackexchange.com/users/254618
Can I set the font to 14 pt in the octavo class?
true
This is basically the solution by [@egreg last year](https://tex.stackexchange.com/a/641742/273733) but as the `octavo` class is based on but not necessarily the same as the `book` class it is probably best to just post an answer. I tested it rather then flagging as duplicate as the `octavo` class might be different. Using: ``` \usepackage{fix-cm} \usepackage[fontsize=14pt]{fontsize} ``` Changes the font: ``` \documentclass{octavo} \usepackage{fix-cm} % @egreg https://tex.stackexchange.com/a/641742/273733 \usepackage[fontsize=14pt]{fontsize} \usepackage[ paperwidth=160mm, paperheight=240mm, %layoutsize={110mm, 180mm}, %layoutoffset={5mm, 10mm}, textheight=18cm, textwidth=10.5cm, inner=2.5cm, %marginparwidth=20pt, ] {geometry} \begin{document} Hello world! \end{document} ```
4
https://tex.stackexchange.com/users/273733
683264
317,011
https://tex.stackexchange.com/questions/683269
0
I am using the theme \usetheme{Goettingen}. When I use \begin{frame}[plain] \titlepage \end{frame}, the side bar disappears, but the contents are still in the same position and not centered. Is it possible to keep a plain side bar without contents in this theme, or is it possible to center the contents, after removing the side bar?
https://tex.stackexchange.com/users/295296
How to remove the side bar from title frame in 'Goettingen' theme and center the contents of title page?
false
You can center the title page like this: ``` \documentclass{beamer} \usetheme{Goettingen} \title{text} \begin{document} \begin{frame}[plain] \hspace*{.5\beamersidebarwidth}\begin{minipage}{\textwidth} \titlepage \end{minipage} \end{frame} \end{document} ``` If you would like to keep an empty sidebar: ``` \documentclass{beamer} \usetheme{Goettingen} \title{text} \begin{document} \section{title} { \setbeamertemplate{sidebar right}{} \begin{frame} \titlepage \end{frame} } \begin{frame} content... \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/36296
683270
317,013
https://tex.stackexchange.com/questions/683252
3
Wondering what are the use cases of `unicode-math` and `mathspec` packages, I stumbled upon [this excellent question and better answers](https://tex.stackexchange.com/questions/118244/what-is-the-difference-between-unicode-math-and-mathspec), that helped me clarify the situation. If I understand correctly, the goal of the `mathspec` package is to be able to use regular (unicode?) fonts to typesetting math. This may not be the ideal situation, but makes perfect sense in some cases. Unfortunately, it seems that the `mathspec` package is only compatible with `XeLaTeX` and its maintenance status is unclear. Im aware of the `mathastext` package, but its author says, that it: > > was initially developed for the traditional TEX fonts and engines, and that compatibility with Unicode engines and OpenType fonts is partial. > > > So I wonder how authors have to proceed if they are using `LuaLaTeX` and want to use non-math regular fonts to typeset their formulae? Is there any mathspec-equivalent for `LuaLateX`? Does this make any sense at all?
https://tex.stackexchange.com/users/48799
Is there a Mathspec equivalent for LuaLaTeX?
false
(transferred from comment) [`mathfont`](https://ctan.org/pkg/mathfont) works both with xelatex and lualatex.
3
https://tex.stackexchange.com/users/293669
683275
317,014
https://tex.stackexchange.com/questions/683272
1
I recently downloaded the SF Pro font from <https://developer.apple.com/fonts/> on a MacBook Pro with MiKTeX installed. However, when I try to use it with XeLaTeX, the log says the font probably doesn't exist, even though I can use it on Word, Keynote, etc. In general, it seems that any downloaded fonts won't work. Any suggestions? (Edit:) In the following example, changing `SF Pro` with `DIN Alternate` or `Futura` (which are system fonts in macOS) will work. MWE: ``` \documentclass{article} \RequirePackage{mathspec} \setmainfont{SF Pro} \begin{document} Hello LaTeX. \end{document} ``` In log: `Package fontspec Info: Could not resolve font "SF Pro/B" (it probably doesn't (fontspec) exist).` Thanks in advance!
https://tex.stackexchange.com/users/265451
Using SF Pro font on MiKTeX (Mac)
false
After playing a lot with the fonts, I uninstalled them from the FontBook and reinstalled them dragging them into the `/Library/Fonts` folder directly. Somehow it worked, as I think it installed them system-wide.
1
https://tex.stackexchange.com/users/265451
683282
317,019
https://tex.stackexchange.com/questions/641607
0
I would like to have a latex book where the page size is 21cm x 21cm, with a 0.8cm margin. And with a 13pt font. Am using texmaker, which does not have any defined or user-defined templates for starting a basic document. Have also checked texstudio but although it has templates, they do not conform to the 21cm x 21cm page size, those predefined are too large for what I am doing. I have coded the following, but cannot see a change in the font size. ``` \documentclass[13pt]{book} \usepackage{geometry} \geometry{ paperheight=21cm, paperwidth=21cm, left=8mm, right=8mm, top=8mm, bottom=8mm } \begin{document} hello world \end{document} ```
https://tex.stackexchange.com/users/268909
Latex book with specific font size
false
If you compile using `lualatex` (possibly `xetex` but not sure) you can use whatever font size, and line spacing, that you like. Even decimal numbers. Must be scalable fonts, of course: OpenType or TrueType. All text must be utf-8. I already do this with my own document class. In order to load `fontspec`, the `\normalsize` must first be defined. That comes from the document class, or you can manually specify it in your own preamble (before loading `fontspec`). Then, after `fontspec` loads, you can re-define `\normalsize` to suit yourself. MWE: ``` \documentclass{article} % Default font size. Process with lualatex. \usepackage{fontspec} \makeatletter \renewcommand\normalsize{\@setfontsize\normalsize{11.43pt}{15.824pt}} \normalsize \makeatother \begin{document} \setlength\parindent{0pt} Hello World.\\ Hello World\\ Hello World\par \makeatletter \renewcommand\normalsize{\@setfontsize\normalsize{13.723bp}{17.448bp}} \normalsize \makeatother Hello Again\\ Hello Again\\ Hello Again\par \end{document} ``` Result: Keep in mind that some older TeX packages rely on having integer font size, Type 1 fonts, encodings that I never heard of, and so forth.
0
https://tex.stackexchange.com/users/287367
683291
317,022
https://tex.stackexchange.com/questions/52316
15
Is it possible to test within the document what commandline arguments were passed to tex? The particular case that prompts this is the question [Tabs in output file written by xelatex and pdflatex are different](https://tex.stackexchange.com/q/14771/86) where it would be useful to know if the `-8bit` argument has been passed to tex and issue a warning if not. That is, if `pgfplots` could contain the code: ``` \ifxetex \ifarg{8bit} \else \pkgwarning{You're using xe(la)tex without the -8bit argument. Some external files might go wrong. If things don't work as you expect, try using the -8bit argument.} \fi \fi ``` then it might make it easier to spot when the situation of the linked question occurs. (A year after asking the above question, it happened to me again and it took me some time to realise what the problem was and find the solution, even though it had been me who found it last time!)
https://tex.stackexchange.com/users/86
Does tex know its own command line arguments?
false
With `--shell-escape`: > > (because of some permission issue this does not work on Overleaf, but otherwise should work on most POSIX systems) > > > > ``` > \ExplSyntaxOn > \sys_get_shell:nnN {ps~-o~args=~-p~$(ps~-o~ppid=~-p~$$)} {\cctab_select:N \c_other_cctab} \l_data_tl > \ExplSyntaxOff > > ``` > > Quoted from my other answer in <https://tex.stackexchange.com/a/621510/250119>. Then you need to parse the arguments somehow -- but be warned that parsing the arguments correctly is really difficult. A simple way is ``` \str_if_in:VnTF \l_data_tl {-8} { \typeout{>> probably~8bit} } { \typeout{>> not~8bit} } ``` but it's not foolproof, I run this simple bash file: ``` g(){ echo "========" "$@" "$@" </dev/null | grep '>>\|!' } f(){ g pdflatex --shell-escape "$@" g xelatex --shell-escape "$@" } mkdir -p -- --8bit a "a a" # create auxiliary directories named literally "--8bit" and "a" and "a a" ln -rsf a.tex "a --8bit b.tex" # link "a.tex" -> a file literally named "a --8bit b.tex" ln -rsf a.tex "b.tex" # ======== these 3 cases return false: f a.tex f --output-di a "a --8bit b.tex" f --output-di --8bit a.tex # ======== these 7 cases return true: f --output-di "a a" --8bit b.tex f -8bit a.tex f -8b a.tex f --8bit a.tex f --8bi a.tex f --8b a.tex f --8 a.tex f -8 a.tex ``` with `a.tex` contains: ``` % ======== copy from egreg's test ======== \input catchfile.sty \newif\ifeightbit \begingroup \immediate\openout15=tab.tst \catcode`\^^?=12 \immediate\write15{^^?} \immediate\closeout15 \CatchFileDef\atab{tab.tst}{\catcode`\^=12 \catcode`?=12 } \edef\btab{\string^\string^\string ? } \ifx\atab\btab \global\eightbitfalse \else \global\eightbittrue \fi \endgroup \ExplSyntaxOn \cs_generate_variant:Nn \str_if_in:nnTF {V} \sys_get_shell:nnN {ps~-o~args=~-p~$(ps~-o~ppid=~-p~$$)} {\cctab_select:N \c_other_cctab} \l_data_tl \typeout{>> \l_data_tl} \str_if_in:VnTF \l_data_tl {-8} { \typeout{>> probably~8bit} } { \typeout{>> not~8bit} } \typeout{>> ifeightbit=\meaning\ifeightbit} \ExplSyntaxOff \stop ``` As you can see, the simple test outputs "probably 8bit" for the last 2 cases of the first block even though it isn't 8bit. In particular, the 2nd and 4nd case makes the output **identical** with the provided command-line argument (you can fix this by not using `ps -o args` but I'm not sure how...) --- With LuaLaTeX there's the `arg` table, but it looks like you'll still have to manually parse it: ``` \directlua{for _, v in ipairs(arg) do print(v) end} \stop ``` From the other question in [In Luatex, how to know effective output directory?](https://tex.stackexchange.com/q/388326/250119). But... in this specific case LuaTeX always ignore `--8bit` argument anyway:
1
https://tex.stackexchange.com/users/250119
683297
317,025
https://tex.stackexchange.com/questions/48312
14
I have a file of class "article" with bibliography style "nature" Since I want to have the references in the table of contents with a section number, i have set a section with the references inside and now want to hide the automatically set title "References" As far as I know, `\renewcommand{\refname}{}` should do the magic, but it doesn't. What am I missing?
https://tex.stackexchange.com/users/12704
\renewcommand{\refname}{} does not remove "References"
false
If you use `babel`, the following might work. * for book or report class: `\addto\captionsenglish{\renewcommand{\bibname}{}}` * for article class: `\addto\captionsenglish{\renewcommand{\refname}{}}` The provided solution only works when the babel package with the english option is used. Without this package the redefinition is as simple as shown in other answer.
0
https://tex.stackexchange.com/users/218452
683302
317,028
https://tex.stackexchange.com/questions/683293
3
The nice answers to my question [U with $\mathfrak{i}$ and $\mathfrak{r}$?](https://tex.stackexchange.com/questions/682416/u-with-mathfraki-and-mathfrakr) gave me these ``` \newcommand\bigsqcapir{\ooalign{$\bigsqcap$\cr \hfil\raise0.4ex\hbox{$\scriptstyle\mathfrak{i}$}\hfil\cr \hfil\lower0.4ex\hbox{$\scriptstyle\mathfrak{r}$}\hfil\cr}} \newcommand\bigsqcapi{\ooalign{$\bigsqcap$\cr \hfil\raise0.4ex\hbox{$\scriptstyle\mathfrak{i}$}\hfil\cr}} \newcommand\bigsqcapr{\ooalign{$\bigsqcap$\cr \hfil\lower0.4ex\hbox{$\scriptstyle\mathfrak{r}$}\hfil\cr}} ``` How may I obtain an empty `\mediumsqcap` which has the same size as `$\bigscapr$`, `$\bigscapi$` and `$\bigscapir$`?
https://tex.stackexchange.com/users/24406
$\mediumsqcap$ without $\mathfrak{I}$ and $\mathfrak{r}$
true
The solution given below defines a macro called `\tsbigsqcap`, where "ts" is mnemonic for "text style". The size of the symbol it produces is the same regardless of whether it occurs in inline math mode (which uses `\textstyle` by default) and displayed math mode (which uses `\displaystyle` by default). To make size comparisons easy, the final line in the preceding screenshot groups the symbols `\sqcap`, `\tsbigsqcap`, and `\bigsqcap` in displaystyle math mode. As is the case for the macros `\bigsqcapir`, `\bigsqcapi`, and `\bigsqcapr`, the macro `\tsbigsqcap` should not be used in first- or second-level subscripts and superscripts. I trust this constraint isn't binding in practice. ``` \documentclass{article} \usepackage{stmaryrd} % a font package that provides a '\bigsqcap' macro \usepackage{amssymb} % for '\mathfrak' macro \newcommand\bigsqcapir{\ooalign{$\bigsqcap$\cr \hfil\raise0.4ex\hbox{$\scriptstyle\mathfrak{i}$}\hfil\cr \hfil\lower0.5ex\hbox{$\scriptstyle\mathfrak{r}$}\hfil\cr}} \newcommand\bigsqcapi{\ooalign{$\bigsqcap$\cr \hfil\raise0.4ex\hbox{$\scriptstyle\mathfrak{i}$}\hfil\cr}} \newcommand\bigsqcapr{\ooalign{$\bigsqcap$\cr \hfil\lower0.5ex\hbox{$\scriptstyle\mathfrak{r}$}\hfil\cr}} % 'ts' in '\tsbigsqcap' is mnemonic for "text style" \newcommand\tsbigsqcap{{\textstyle\bigsqcap}} \begin{document} \centering % inline math mode uses "\textstyle" by default: $uuu \bigsqcapir \bigsqcapi \bigsqcapr \tsbigsqcap vvv$ \[ % now display math uuu \bigsqcapir \bigsqcapi \bigsqcapr \tsbigsqcap vvv \] \verb+\sqcap+ \verb+\tsbigsqcap+ \verb+\bigsqcap+ in display-math mode \[ - \sqcap \tsbigsqcap \bigsqcap - \] \end{document} ```
5
https://tex.stackexchange.com/users/5001
683310
317,030
https://tex.stackexchange.com/questions/683307
3
I have this bit of code that list the author in bold and each their affiliations in italics everytime `\AddAuthor` is called and send all authors to TOC. ``` \newcommand{\AddAuthor}[2]{} %container \newcommand{\ListAuthor}[1]{ \renewcommand{\AddAuthor}[2]{##1} \addtocontents{toc}{\quad#1\par} \renewcommand{\AddAuthor}[2]{ \textbf{##1} \\ \textit{##2} \\ } } ``` However, I'd like to have the authors in TOC formatted nicely, separated by commas except the last one. This code, as you can see, only sends the authors separated by a space. I suppose one could make it by employing a counter and make conditionals, but so far I did no luck. Here's the MWE that I did so far. ``` \documentclass[oneside]{book} \newcommand{\AddAuthor}[2]{} %container \newcommand{\ListAuthor}[1]{ \renewcommand{\AddAuthor}[2]{##1} \addtocontents{toc}{\quad#1\par} \renewcommand{\AddAuthor}[2]{ \textbf{##1} \\ \textit{##2} \\ } \vspace{-5ex} #1 \vspace{5ex} } \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{The Awesome Chapter} \ListAuthor{ \AddAuthor{First Author}{Goodest Boy} \AddAuthor{Second Author}{Not the Best One} } \chapter{The Awesome Chapter, part 2} \ListAuthor{ \AddAuthor{First Author}{Another Good Boy} \AddAuthor{Second Author}{The Best of Its Kind} \AddAuthor{Third Author}{The Baddie} } \end{document} ```
https://tex.stackexchange.com/users/257859
Help making conditionals in a macro
true
I don't understand why you do not want the last author separated by comma. How should it be separated instead??? Here is a solution, with comma between all authors: ``` \documentclass[oneside]{book} \newcommand{\AddAuthor}[2]{% \textbf{#1} \\ \textit{#2} \\ } \newcommand{\ListAuthor}[1]{% <-- to avoid potentially unwanted spaces \begingroup \def\AddAuthor{\string\AddAuthor}% local redefinition to write \AddAuthor commands to the toc \addtocontents{toc}{\begin{l@listauthors}#1\end{l@listauthors}}% write l@listauthor environment with all the \AddAuthor commands to the toc \endgroup \vspace{-5ex} \begin{flushleft} #1 \end{flushleft} \vspace{5ex} } \newif\iffirstauthor% new boolean to detect the first \AddAuthor inside the toc \newenvironment{l@listauthors}{% environment to be used inside the toc for encapsulating the \AddAuthor commands. \quad \firstauthortrue \renewcommand{\AddAuthor}[2]{% local redefinition of \AddAuthor inside l@listauthors environment (used inside the toc) \iffirstauthor\firstauthorfalse\else, \fi% if it is the first author set boolean to false otherwise add a comma ##1% output author name }% }{\par} \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{The Awesome Chapter} \ListAuthor{% \AddAuthor{First Author}{Goodest Boy}% \AddAuthor{Second Author}{Not the Best One}% } \chapter{The Awesome Chapter, part 2} \ListAuthor{% \AddAuthor{First Author}{Another Good Boy}% \AddAuthor{Second Author}{The Best of Its Kind}% \AddAuthor{Third Author}{The Baddie}% } \end{document} ``` and here one with `, and` for the last one. ``` \documentclass[oneside]{book} \newcommand{\AddAuthor}[2]{% \textbf{#1} \\ \textit{#2} \\ } \newcommand{\ListAuthor}[1]{% <-- to avoid potentially unwanted spaces \begingroup \def\AddAuthor{\string\AddAuthor}% same as above \addtocontents{toc}{\begin{l@listauthors}#1\end{l@listauthors}% same as above }% \endgroup \vspace{-5ex} \begin{flushleft} #1 \end{flushleft} \vspace{5ex} } \newcounter{authorcnt}% used for the number of authors \newcounter{lastauthor}% number of last author in the end code of l@listauthors \newcommand*{\authorlist}{}% used for the local author list of a l@listauthors environment \newenvironment{l@listauthors}{% \quad \setcounter{authorcnt}{0}% init the number to none \def\authorlist{}% empty the local list (should not be needed) \renewcommand{\AddAuthor}[2]{% \stepcounter{authorcnt}% we have one more author \expandafter\def\expandafter\authorlist\expandafter{% define the author list \authorlist% by the current list \stepcounter{authorcnt}% and if the current number \ifnum\value{authorcnt}>1 , % is > 1 by a comma \ifnum \value{authorcnt}=\value{lastauthor} and \fi% and if the current number is the last by "and" + space \fi ##1% and always by the author name }% } }{% \setcounter{lastauthor}{\value{authorcnt}}% \setcounter{authorcnt}{0}% start the output again with author number 0 \authorlist \par } \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{The Awesome Chapter} \ListAuthor{% \AddAuthor{First Author}{Goodest Boy}% \AddAuthor{Second Author}{Not the Best One}% } \chapter{The Awesome Chapter, part 2} \ListAuthor{% \AddAuthor{First Author}{Another Good Boy}% \AddAuthor{Second Author}{The Best of Its Kind}% \AddAuthor{Third Author}{The Baddie}% } \end{document} ``` And last but not least a solution, where for two authors only `and` without comma is used: ``` \documentclass[oneside]{book} \newcommand{\AddAuthor}[2]{% \textbf{#1} \\ \textit{#2} \\ } \newcommand{\ListAuthor}[1]{% <-- to avoid potentially unwanted spaces \begingroup \def\AddAuthor{\string\AddAuthor}% \addtocontents{toc}{\begin{l@listauthors}#1\end{l@listauthors}} \endgroup \vspace{-5ex} \begin{flushleft} #1 \end{flushleft} \vspace{5ex} } % This is almost the same as above, only the conditionals are changed \newcounter{authorcnt} \newcounter{lastauthor} \newcommand*{\authorlist}{} \newenvironment{l@listauthors}{% \quad \setcounter{authorcnt}{0}% \def\authorlist{}% \renewcommand{\AddAuthor}[2]{% \stepcounter{authorcnt}% \expandafter\def\expandafter\authorlist\expandafter{% \authorlist \stepcounter{authorcnt}% \ifnum\value{authorcnt}>1 % for more than one authors add a separator \ifnum \value{authorcnt}=\value{lastauthor}% before the last author \ifnum \value{authorcnt}>2 , and % and this, if they are more than 2 \else \ and % and this, if less than two \fi \else , \fi% before all other authors only a comma \fi ##1% }% } }{% \setcounter{lastauthor}{\value{authorcnt}}% \setcounter{authorcnt}{0}% \authorlist \par } \begin{document} \frontmatter \tableofcontents \mainmatter \chapter{The Awesome Chapter} \ListAuthor{% \AddAuthor{First Author}{Goodest Boy}% \AddAuthor{Second Author}{Not the Best One}% } \chapter{The Awesome Chapter, part 2} \ListAuthor{% \AddAuthor{First Author}{Another Good Boy}% \AddAuthor{Second Author}{The Best of Its Kind}% \AddAuthor{Third Author}{The Baddie}% } \end{document} ``` I would prefer this one: It should be easy to extend this last solutions with additional conditionals (or to remove some), if you want other result.
4
https://tex.stackexchange.com/users/277964
683311
317,031
https://tex.stackexchange.com/questions/683305
0
I know how to get sentences of words to wrap in a cell, namely using `|p{cell width}|`, but what if I want a word itself to split over multiple lines? I would like your response to work for longtable in particular. For instance: ``` \begin{longtable}{|p{0.6cm}|} Mixture \\\hline \end{longtable} ``` should provide an example of the behaviour I don't want. Where mixture doesn't wrap across lines and instead the cell border goes through the word. Is there a way to get the word to split into say mixt on the first line and ure on the next line with a - after the first line to indicate it continues onto the next line?
https://tex.stackexchange.com/users/22398
How to get individual words to go over multiple lines in the cells of table
false
You can use this: ``` \documentclass[english]{article} % \usepackage{babel} \usepackage{longtable} \begin{document} % \showhyphens{Mixture} \begin{longtable}{|p{0.6cm}|} \hline % (added for nicer looks) % core TeX syntax: % \nobreak\hskip0pt\relax % or with overhead: \hspace*{0pt}% Mixture \\\hline \end{longtable} \end{document} ``` Notice that with engine LuaLaTeX the hyphenation of first word in a paragraph is not inhibited so you don't need the `\hspace*` trick. --- With `array` package syntax you can automatize this ``` \documentclass[english]{article} % \usepackage{babel} \usepackage{array} \usepackage{longtable} \begin{document} % \showhyphens{Mixture} \begin{longtable}{|>{\hspace*{0pt}}p{0.6cm}|} \hline Mixture \\\hline \end{longtable} \end{document} ```
1
https://tex.stackexchange.com/users/293669
683313
317,032
https://tex.stackexchange.com/questions/40172
33
I'd like to get "page x of y" in a footer on each page, and the way I've found is to use: ``` \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} \cfoot{Page \thepage\ of \pageref{LastPage}} ``` This works but has introduced a solid line at the top of each page and some headers. How do I get "page x of y" without any headers at all?
https://tex.stackexchange.com/users/10512
How can I get no header but still get "page x of y" in footer?
false
I found a useful answer on <https://latex.org/forum/viewtopic.php?t=3436> . You could use `\fancypagestyle{plain}{...}` to redefine the plain style, that's described in the [fancyhdr documentation](http://tug.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/fancyhdr.pdf). For example: ``` \fancypagestyle{plain}{% \fancyhf{}% clear all header and footer fields \renewcommand{\headrulewidth}{0pt}% \fancyfoot[R]{Page \thepage \hspace{1pt} of \pageref{Lastpage}} } ```
0
https://tex.stackexchange.com/users/284531
683327
317,039
https://tex.stackexchange.com/questions/683283
1
I found a MWE which reproduces the error message with epubcheck 2 times when having run tex4ebook (in my source the error appears 20 times identically) with `Fragmentbezeichner ist nicht angegeben` (transl.: "Fragmented label is not specified"). The error has to do with the `\pageref{somelabel}`. ``` \documentclass[11pt]{report} \usepackage[twoside,paperwidth=141mm,paperheight=211mm,top=11mm,includehead,bottom=19mm,outer=23mm,inner=18mm,bindingoffset=3mm]{geometry} \usepackage[cmintegrals,cmbraces]{newtxmath} \usepackage{ebgaramond-maths} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[german]{babel} \usepackage{csquotes} \usepackage{xpatch} \usepackage[backend=biber,sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp,datecirca=true,dateera=secular]{biblatex} \addbibresource{biblatex-examples.bib} \usepackage[continuous,page]{pagenote} \makepagenote \let\footnote=\pagenote \newcommand*{\addtonotesnewcommand}[1]{% \ifpnhaschapter% \ifnum\value{pnotesavechap}=\value{chapter}\else% \setcounter{pnotesavechap}{\value{chapter}}% \fi% \else% \ifnum\value{pnotesavechap}=\value{section}\else% \setcounter{pnotesavechap}{\value{section}}% \fi% \fi% \addtonotes{\vspace*{0.7\baselineskip}\protect\noindent\vspace*{0.35\baselineskip}\textsc{\large #1}}% }% by Michal H. \renewcommand*{\notesname}{Anmerkungen und Verweise} \usepackage{tex4ebook} \providecommand\phantomsection{} \ifdefined\HCode \usepackage[xindy,noautomatic]{imakeidx} \else \usepackage[]{imakeidx} \fi \makeindex \ifdefined\HCode \usepackage[tex4ht,hyperindex=true,hyperfootnotes=true, pdfauthor={Author}, pdftitle={Title}, pdfkeywords={Keywords}]{hyperref} \else\fi \urlstyle{same} \begin{document} \section{First Section} Some text\label{text} for the first\label{first} page: \fullcite{sigfridsson} \clearpage \section{Second Section} The error happens with epubcheck: Fragmentbezeichner ist nicht angegeben. "`sind einige so umsichtig, dass sie, ohne sich eine Blöße zu geben, durch ein hämisches Lächeln, durch ein Kichern, durch eine gewisse harmlose Boshaftigkeit, das, was sie nicht imstande waren, mit Gründen zu beweisen, und was sie nicht einmal sich selbst einreden können, mit solchen kleinen Kunstgriffen höflicher Verachtung die Ignoranz, die in jedem anderen Falle offenbar würde, nicht nur bei sich verdecken, sondern sie dem Gegner anlasten wollen; denn sie kommen nicht zum Disputieren, um die Wahrheit zu finden oder zu suchen, sondern um des Sieges willen, und um gelehrter zu scheinen und als eifrigere Verfechter des Gegenteils."'\footfullcite[Siehe][Seite 19]{sigfridsson}\label{ZitatGiordanoBrunoEins} Dies ein Zitat \index{Bruno@Bruno, Giordano}Giordano Brunos. \clearpage So aber gebärden sich grausame Charaktere des Hasses und der Verachtung, wie dies Giordano Bruno\index{Bruno@Bruno, Giordano} in den vorherigen Zitaten auf den Seiten \pageref{ZitatGiordanoBrunoEins} und \pageref{ZitatGiordanoBrunoZwei} beschrieben hatte. \clearpage "`Wozu es wahrlich heroischen Sinnes bedurfte, um nicht die Arme sinken zu lassen, zu verzweifeln und überwältigt zu werden von solch reißendem Strom gemeinster Verleumdungen, wie sie über mich ergossen wurden von dem Neid der Unwissenden, der Anmaßung der Sophisten, der Lästersucht der Böswilligen, dem Getuschel der Diener, dem Murren der Lohnarbeiter, den Nörgeleien der Dienstboten, den Unterstellungen der Dummköpfe, den Verdächtigungen der Spitzel, dem Übereifer der Heuchler, der Missgunst der Ungebildeten, der Wut des Pöbels, dem Zorn des Gesindels, den Klagen der Benachteiligten und dem Geschrei der Gezüchtigten; es fehlte nur noch die Empörung von Seiten aufgebrachter, verstiegener und gehässiger Weiber, deren falsche Tränen wirkungsvoller zu sein pflegen als noch so hohe Wogen und Stürme der Anmaßung, Neid, Lästersucht, Murren, Verrat, Zorn, Empörung, Hass und Wut."'\footfullcite[Siehe][Seite 5f]{sigfridsson}\label{ZitatGiordanoBrunoZwei} \printnotes \printindex \printbibliography \end{document} ``` What might be a fixing for it? If you can not reproduce the error with this file, I would probably need to let you know about the files `-c myconfig.cfg` and `-e mybuild.lua`. Let me know.
https://tex.stackexchange.com/users/292824
Errors with epubcheck after tex4ebook, concerning \pageref{somelabel}
false
Try to put `\label` inside your `\footullcite` commands, like in: ``` \footfullcite[Siehe][Seite 19\label{ZitatGiordanoBrunoEins}]{sigfridsson} ``` You need to use it inside the footnote, because otherwise the `\label` is used on the wrong page. This is the fixed document: ``` \documentclass[11pt]{report} \usepackage[twoside,paperwidth=141mm,paperheight=211mm,top=11mm,includehead,bottom=19mm,outer=23mm,inner=18mm,bindingoffset=3mm]{geometry} \usepackage[cmintegrals,cmbraces]{newtxmath} \usepackage{ebgaramond-maths} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[german]{babel} \usepackage{csquotes} \usepackage{xpatch} \usepackage[backend=biber,sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp,datecirca=true,dateera=secular]{biblatex} \addbibresource{biblatex-examples.bib} \usepackage[continuous,page]{pagenote} \makepagenote \let\footnote=\pagenote \newcommand*{\addtonotesnewcommand}[1]{% \ifpnhaschapter% \ifnum\value{pnotesavechap}=\value{chapter}\else% \setcounter{pnotesavechap}{\value{chapter}}% \fi% \else% \ifnum\value{pnotesavechap}=\value{section}\else% \setcounter{pnotesavechap}{\value{section}}% \fi% \fi% \addtonotes{\vspace*{0.7\baselineskip}\protect\noindent\vspace*{0.35\baselineskip}\textsc{\large #1}}% }% by Michal H. \renewcommand*{\notesname}{Anmerkungen und Verweise} \usepackage{tex4ebook} \providecommand\phantomsection{} \ifdefined\HCode \usepackage[xindy,noautomatic]{imakeidx} \else \usepackage[]{imakeidx} \fi \makeindex \ifdefined\HCode \usepackage[tex4ht,hyperindex=true,hyperfootnotes=true, pdfauthor={Author}, pdftitle={Title}, pdfkeywords={Keywords}]{hyperref} \else\fi \urlstyle{same} \begin{document} \section{First Section} Some text\label{text} for the first\label{first} page: \fullcite{sigfridsson} \clearpage \section{Second Section} The error happens with epubcheck: Fragmentbezeichner ist nicht angegeben. "`sind einige so umsichtig, dass sie, ohne sich eine Blöße zu geben, durch ein hämisches Lächeln, durch ein Kichern, durch eine gewisse harmlose Boshaftigkeit, das, was sie nicht imstande waren, mit Gründen zu beweisen, und was sie nicht einmal sich selbst einreden können, mit solchen kleinen Kunstgriffen höflicher Verachtung die Ignoranz, die in jedem anderen Falle offenbar würde, nicht nur bei sich verdecken, sondern sie dem Gegner anlasten wollen; denn sie kommen nicht zum Disputieren, um die Wahrheit zu finden oder zu suchen, sondern um des Sieges willen, und um gelehrter zu scheinen und als eifrigere Verfechter des Gegenteils."'\footfullcite[Siehe][Seite 19\label{ZitatGiordanoBrunoEins}]{sigfridsson} Dies ein Zitat \index{Bruno@Bruno, Giordano}Giordano Brunos. \clearpage So aber gebärden sich grausame Charaktere des Hasses und der Verachtung, wie dies Giordano Bruno\index{Bruno@Bruno, Giordano} in den vorherigen Zitaten auf den Seiten \pageref{ZitatGiordanoBrunoEins} und \pageref{ZitatGiordanoBrunoZwei} beschrieben hatte. \clearpage "`Wozu es wahrlich heroischen Sinnes bedurfte, um nicht die Arme sinken zu lassen, zu verzweifeln und überwältigt zu werden von solch reißendem Strom gemeinster Verleumdungen, wie sie über mich ergossen wurden von dem Neid der Unwissenden, der Anmaßung der Sophisten, der Lästersucht der Böswilligen, dem Getuschel der Diener, dem Murren der Lohnarbeiter, den Nörgeleien der Dienstboten, den Unterstellungen der Dummköpfe, den Verdächtigungen der Spitzel, dem Übereifer der Heuchler, der Missgunst der Ungebildeten, der Wut des Pöbels, dem Zorn des Gesindels, den Klagen der Benachteiligten und dem Geschrei der Gezüchtigten; es fehlte nur noch die Empörung von Seiten aufgebrachter, verstiegener und gehässiger Weiber, deren falsche Tränen wirkungsvoller zu sein pflegen als noch so hohe Wogen und Stürme der Anmaßung, Neid, Lästersucht, Murren, Verrat, Zorn, Empörung, Hass und Wut."'\footfullcite[Siehe][Seite 5f\label{ZitatGiordanoBrunoZwei}]{sigfridsson} \printnotes \printindex \printbibliography \end{document} ```
0
https://tex.stackexchange.com/users/2891
683328
317,040
https://tex.stackexchange.com/questions/683335
2
If I use not the `aspectratio` option of the Beamer class, the slides are 128×96 mm. If I use, e.g., `aspectratio=169`, what do I get? 128×72 mm or 171×96 mm?
https://tex.stackexchange.com/users/74057
Does aspectratio change the width or the height of a frame?
false
Neither the height nor the width are fixed: both may be adjusted when setting `aspectratio` to give 'convenient' dimensions of about the same scale.
2
https://tex.stackexchange.com/users/73
683337
317,044
https://tex.stackexchange.com/questions/683323
3
They have specified Perpetua (13pt), which is not ideal, but workable. However I have no idea how to go about diacritics more intricate than í. ``` \documentclass{article} \usepackage[T1]{fontspec} % compile w/XeLaTeX \setmainfont{Perpetua} \usepackage[T1,noenc]{tipa} \usepackage{tipx} \usepackage{filecontents} \usepackage[backend=biber,style=apa]{biblatex} \addbibresource{main.bib} \begin{filecontents*}{main.bib} @article{fiketPromisesChallengesDeliberative2022, title = {Promises and {{Challenges}} of {{Deliberative}} and {{Participatory Innovations}} in {{Hybrid Regimes}}: {{The Case}} of {{Two Citizens}}’ {{Assemblies}} in {{Serbia}}}, author = {Fiket, Irena and Đorđević, Biljana}, date = {2022}, journaltitle = {Filozofija i Društvo}, volume = {33}, number = {1}, pages = {3--25}, doi = {10.2298/FID2201003F}, url = {https://doi.org/10.2298/FID2201003F}, urldate = {2023-01-20} } @inbook{cesnulaityteKeyTrends2020, title = {Key {{Trends}}}, booktitle = {Innovative {{Citizen Participation}} and {{New Democratic Institutions}}: {{Catching}} the {{Deliberative Wave}}}, author = {Česnulaitytė, Ieva}, date = {2020}, edition = {first edition}, pages = {67--79}, publisher = {{OECD Publishing}}, location = {{Paris, France}}, url = {https://doi.org/10.1787/57c233e7-en}, bookauthor = {{Organisation for Economic Co-operation and Development}}, isbn = {978-92-64-72590-4}, chapter = {3} } \end{filecontents*} \begin{document} d\textipa{\=e}ēmokratí\textipa{\=a}ā and deliberation \cite{fiketPromisesChallengesDeliberative2022,cesnulaityteKeyTrends2020} \printbibliography \end{document} ``` References are synced with Zotero, but I don't think that matters a great deal. Any thoughts?
https://tex.stackexchange.com/users/269662
How do I get ē, Ð, and such in a Perpetua document?
true
You don't. The Perpetua font provided by Microsoft Office applications lacks an awful lot of characters. If you have just a few of them missing and don't try to use them in styles other than upright, here's a way to fake them. ``` \begin{filecontents*}{\jobname.bib} @article{fiketPromisesChallengesDeliberative2022, title = {Promises and Challenges of Deliberative and Participatory Innovations in Hybrid Regimes: The Case of Two Citizens’ Assemblies in {Serbia}}, author = {Fiket, Irena and Đorđević, Biljana}, date = {2022}, journaltitle = {Filozofija i Društvo}, volume = {33}, number = {1}, pages = {3--25}, doi = {10.2298/FID2201003F}, url = {https://doi.org/10.2298/FID2201003F}, urldate = {2023-01-20}, } @inbook{cesnulaityteKeyTrends2020, title = {Key Trends}, booktitle = {Innovative Citizen Participation and New Democratic Institutions: Catching the Deliberative Wave}, author = {Česnulaitytė, Ieva}, bookauthor = {{Organisation for Economic Co-operation and Development}}, date = {2020}, edition = {first edition}, pages = {67--79}, publisher = {OECD Publishing}, location = {Paris, France}, url = {https://doi.org/10.1787/57c233e7-en}, isbn = {978-92-64-72590-4}, chapter = {3}, } \end{filecontents*} \documentclass{article} \usepackage{fontspec} % compile w/XeLaTeX \usepackage[backend=biber,style=apa]{biblatex} \usepackage{newunicodechar} \setmainfont{Perpetua}[ Path=/Applications/Microsoft Word.app/Contents/Resources/DFonts/, BoldFont=* Bold, ItalicFont=* Italic, BoldItalicFont=* Bold Italic, ] \addbibresource{\jobname.bib} \providecommand*\UndeclareTextComposite[3]{% \expandafter\let\csname\expandafter\string\csname #2\endcsname\string#1-#3\endcsname\relax} \UndeclareTextComposite{\=}{TU}{a} \UndeclareTextComposite{\=}{TU}{e} \UndeclareTextComposite{\v}{TU}{C} \UndeclareTextComposite{\'}{TU}{c} \UndeclareTextComposite{\.}{TU}{e} \DeclareTextCompositeCommand{\=}{TU}{a}{\fakebar{a}} \newunicodechar{ā}{\=a} \DeclareTextCompositeCommand{\=}{TU}{e}{\fakebar{e}} \newunicodechar{ē}{\=e} \DeclareTextCompositeCommand{\v}{TU}{C}{\accent"02C7 C} \newunicodechar{Č}{\v{C}} \DeclareTextCompositeCommand{\'}{TU}{c}{\accent"B4 c} \newunicodechar{ć}{\'c} \DeclareTextCompositeCommand{\.}{TU}{e}{\fakedotabove{e}} \newunicodechar{ė}{\.e} \DeclareRobustCommand{\fakebar}[1]{% \leavevmode\vbox{\offinterlineskip\ialign{\hfil##\hfil\cr\smash{-}\cr#1\cr}}% } \DeclareRobustCommand{\fakedotabove}[1]{% \leavevmode\vbox{\offinterlineskip\ialign{\hfil##\hfil\cr.\cr\noalign{\vskip0.25ex}#1\cr}}% } \makeatletter \DeclareTextCommand{\DJ}{TU}{% \leavevmode\makebox[0pt][l]{\kern-0.02em\raisebox{0.3ex}[0pt][0pt]{-}}D% } \DeclareTextCommand{\dj}{TU}{% d\makebox[0pt][r]{\raisebox{0.85ex}[0pt][0pt]{-}\kern-0.04em}% } \makeatother \newunicodechar{Đ}{\DJ} \newunicodechar{đ}{\dj} \begin{document} dēmokratíā and deliberation \cite{fiketPromisesChallengesDeliberative2022,cesnulaityteKeyTrends2020} \printbibliography \end{document} ``` I removed almost all `{{...}}` parts in the bib file: they're wrong, except for one.
5
https://tex.stackexchange.com/users/4427
683338
317,045
https://tex.stackexchange.com/questions/683334
1
I want to have citation as footnotes, for this I use `\footfullcite`. For citation in the text, I use `\cite`. I just discovered the `style=authoryear-icomp` does the `ibidem` replacement for identical citations. But it doesn't seem to work. I want to have full citations in the notes, the `authoryear` for in-text citations, and the `ibidem` for identical citations. What am I missing or using wrong? Here my preamble: ``` \documentclass[12pt]{report} \usepackage[utf8]{inputenc} \usepackage[ bibencoding=utf-8, natbib=true, style=authoryear-icomp, backend=biber, url=false, doi=false, isbn=false, eprint=false, ]{biblatex} \addbibresource{/home/enrico/Università/uni_bib.bib} \usepackage[bottom]{footmisc} \usepackage[inline]{enumitem} \usepackage{hyperref} \usepackage{array} \usepackage{booktabs} \usepackage[flushleft]{threeparttable} \usepackage{amsmath} \usepackage{svg} \usepackage{graphicx} \graphicspath{ {images/} } \usepackage{tabularx} \usepackage[T1]{fontenc} \usepackage{blindtext} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} \usepackage[final]{microtype} \usepackage{setspace} \onehalfspacing ```
https://tex.stackexchange.com/users/286097
Am I using citations the right way?
true
I think this is what you like: ``` \begin{filecontents}[overwrite]{uni_bib.bib} @article{author, author = "A. Author", title = "A Title", journal = "A Journal", volume = "1", number = "2", year = "2023" } @article{buthor, author = "B. Buthor", title = "B Title", journal = "B Journal", volume = "3", number = "4", year = "2022" } @article{cuthor, author = "C. Cuthor", title = "C Title", journal = "C Journal", volume = "4", number = "5", year = "2021" } \end{filecontents} \documentclass[12pt]{report} %\usepackage[utf8]{inputenc} no more needed \usepackage[T1]{fontenc} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} \usepackage[bottom]{footmisc} \usepackage[inline]{enumitem} \usepackage{array} \usepackage{booktabs} \usepackage[flushleft]{threeparttable} \usepackage{amsmath} \usepackage{svg} \usepackage{graphicx} \graphicspath{ {images/} } \usepackage{tabularx} \usepackage{blindtext} \usepackage[final]{microtype} \usepackage{setspace} \onehalfspacing %\PassOptionsToPackage{ <---- Why this? \usepackage[ bibencoding=utf-8, natbib=true, style=authoryear-ibid, backend=biber, url=false, doi=false, isbn=false, eprint=false, ]{biblatex} \DeclareCiteCommand{\footfullcite}[\mkbibfootnote] {\usebibmacro{prenote}} {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage} {\usebibmacro{cite:ibid}} {\usedriver {\DeclareNameAlias{sortname}{default}} {\thefield{entrytype}}}} {\multicitedelim} {\usebibmacro{postnote}} \DeclareCiteCommand{\cite} {\citetrackerfalse\usebibmacro{prenote}} {\usebibmacro{cite}} {\multicitedelim} {\usebibmacro{postnote}\citetrackertrue} \addbibresource{uni_bib.bib} \usepackage{hyperref}% better loaded at last \nocite{*} \begin{document} cite: \cite{author} cite again: \cite{author} foot full cite: \footfullcite{buthor} foot full cite again: \footfullcite{buthor} cite: \cite{cuthor} foot full cite first: \footfullcite{cuthor} foot full cite second: \footfullcite{cuthor} cite: \cite{author} foot full cite third: \footfullcite{cuthor} foot full cite fouth: \footfullcite{cuthor} \newpage cite: \cite{author} cite again: \cite{author} foot full cite: \footfullcite{buthor} foot full cite again: \footfullcite{buthor} \printbibliography \end{document} ``` Page 1: Page 2: Bibliography:
3
https://tex.stackexchange.com/users/101651
683340
317,046
https://tex.stackexchange.com/questions/683344
4
The following code in my tex4ebook config file ``` \Css{ .newpage{page-break-before:always;} /* chapter heading */ h2.likechapterHead { font-family:"Montserrat", "Helvetica", sans-serif; font-size:1.7em; font-weight:normal; margin: 15% 0 0 0; page-break-after:avoid; text-align:center; text-indent:0; } } ``` Adds this to my epub css file: ``` .newpage{page-break-before:always;} /* chapter heading */ h2.likechapterHead { font-family:"Montserrat", "Helvetica", sans-serif; font-size:1.7em; font-weight:normal; margin: 15page-break-after:avoid; text-align:center; text-indent:0; } h2.chapterHead { font-family:"Montserrat", "Helvetica", sans-serif; font-size:1.7em; font-weight:normal; margin: 15page-break-after:avoid; text-align:center; text-indent:0; } /* end chapter heading */ ``` Is there a way to add newlines to make the css file more readable?
https://tex.stackexchange.com/users/272500
How to add new lines to css file in tex4ebook config file
true
No, the `\Css` command always joins the lines. If you want to write multiple CSS rules, you need to use multiple `\Css`, or save them to a separate CSS file, which can be then included using the `\Configure{AddCss}` command: ``` \Preamble{xhtml} \Configure{AddCss}{mycss.css} \begin{document} \EndPreamble ``` I would prefer this way, it is much easier to include a big number of CSS rules this way.
4
https://tex.stackexchange.com/users/2891
683346
317,049
https://tex.stackexchange.com/questions/683341
1
In the [user's guide for the `amsmath` package (Version 2.1)](https://www.ctan.org/pkg/amsmath) on page 3, the descriptions for the options `leqno` and `fleqn` are as follows: > > `leqno`: Place equation numbers on the left. > > > > > `fleqn`: Position equations at a fixed indent from the left margin rather than centered in the text column. > > > However, the meaning of the abbreviations "leqno" and "fleqn" are not immediately clear from these descriptions. In a response on this [link](https://latex.org/forum/viewtopic.php?t=9645), the following meanings were suggested: > > `leqno`: left equation numbers > > > > > `fleqn`: flush left equations > > > According to [Merriam-Webster Dictionary's entry for "no,"](https://www.merriam-webster.com/dictionary/no#:%7E:text=%5BLatin%20numero%2C%20ablative%20of%20numerus%5D%20number) which states that it is derived from the Latin word "numero" (ablative of "numerus"), it can be understood as meaning "number." Therefore, it can be inferred that `leqno` stands for "**l**eft **eq**uation **no**". However, it is unclear what the "n" in `fleqn` stands for if it is interpreted as "**f**lush **l**eft **eq**uations." I was not able to find a definitive explanation for the abbreviations `leqno` and `fleqn` and their corresponding words through a search engine. It seems that the suggested meanings are based on reasonable deductions/guesses. PS: English is not my native language, so please forgive any typos or inaccuracies in my expression. If there is any unclear part of my question, please let me know, and I will be happy to rephrase it until we can communicate effectively. Similarly, I am willing to do what I can to help in the process of finding an answer.
https://tex.stackexchange.com/users/257934
Full names and abbreviations of the `leqno` and `fleqn` options in amsmath
true
As shown in `C:\texlive\2023\texmf-dist\tex\latex\base\leqno.clo`: > > left equation numbers > > > As shown in `C:\texlive\2023\texmf-dist\tex\latex\base\fleqn.clo`: > > flush left equations > > >
1
https://tex.stackexchange.com/users/238422
683356
317,054
https://tex.stackexchange.com/questions/683331
0
I am running MiKTeX: 2.9.7440 and wished to use the Beamer package (which wasn't installed). However, when I tried to install it, I received an error message: "The following issues were detected: 1: minor issue: It has been a long time since a MiKTeX administrator has checked for updates." I have searched the web for any advice on how to fix this problem but with no success. Apologies for a probably very simple question from someone not too expert with the MikTeX Console.
https://tex.stackexchange.com/users/295036
MiKTeX: 2.9.7440 Update Issue
false
There is a good chance the option provided by Ulrike Fischer might not work. As of April 17, 2023 the MikTeX distribution has reached version 23.4. The console belonging to that distribution is version 4.9. You can check the installed versions in TeXStudio (probably in other editors as well) using *Help > Check LaTeX installation*. All information about the installed MikTeX distribution and TeXStudio will be displayed in a new TeXStudio window. There are a few options to proceed in updating your distribution. One is given in the comment. I will give a few alternatives below. **Final solution** Sounds ominous, but it is just a sure way to get the newest version and packages installed. 1. Delete your old MikTeX distribution using the Windows *Remove Apps* option. 2. Alternatively, rename your old distribution folder so you have a rollback option. 3. Download the newest distribution setup file from [MikTeX](https://miktex.org/download) and install that. It actually doesn't matter whether you're administrator or user on a system you work on alone. Administrator just installs for *all users* on that computer. 4. Open the newly installed MikTeX Console and tap on the menu item **Tasks**. Select *Refresh file name database*. 5. Next tap the same menu item and now select **Check Updates**. This can also be done in the side menu. 6. Open an existing *tex* file to download the packages you used before (by and large that would be a large portion of your packages). 7. If you want to use the *documentation* of the packages, check the **Documentation** option in the side menu. Nowadays only a few packages are installed including their documentation files. 8. As a last action tap on *Tasks* again and select the two middle options one after the other. All information about your distribution will be updated for use. **Next best option** If you have a version that was last updated after July 2022, you can try to use the steps **4-5-7-8** of the *Final solution*.
-1
https://tex.stackexchange.com/users/189383
683360
317,056
https://tex.stackexchange.com/questions/683362
0
I'm using beamer with the thmbox package to have nicely formatted lemmas/theorem/proofs. In particular, I'm using `\newtheorem` to define a few environments that I regularly use. What I am missing is a way to tell beamer to uncover the environments at different frames conveniently (as is possible with the `block` environment): ``` \usepackage{thmbox} \theoremstyle{definition} \newtheorem[style=M]{thm}{Theorem} \begin{frame} \begin{thm}<2-> % this is what I want to be able to communicate bla \end{thm} \end{frame} ``` Is there any way to modify the environment to support this? I've been stuffing my theorems into `\uncover<2->{...}` but it feels like this isn't the way to go about it and I really want to avoid typing this many `\uncover`'s...
https://tex.stackexchange.com/users/225535
frame indicators for thmboxes in beamer
true
You could define a custom wrapper around your new theorems: ``` \documentclass{beamer} \usepackage{thmbox} \theoremstyle{definition} \newtheorem[style=M]{thm}{Theorem} \newenvironment<>{mythm}{% \begin{actionenv}#1% \begin{thm} }{ \end{thm} \end{actionenv} } \begin{document} \begin{frame} \begin{mythm}<2> bla \end{mythm} \end{frame} \end{document} ```
2
https://tex.stackexchange.com/users/36296
683363
317,058
https://tex.stackexchange.com/questions/12845
32
Is there a c/o symbol in LaTex for writing an address? I have looked in the [Comprehensive latex symbol list](http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf) but couldn't find one.
https://tex.stackexchange.com/users/2683
Symbol for "care of" (c/o)
false
I've got a better one. ``` \usepackage{units} … {\nicefrac{\raisebox{.2em}{\textsc{c}}}{\raisebox{-.3em}{\textsc{\kern -.1em o}}}} ```
1
https://tex.stackexchange.com/users/81002
683365
317,059
https://tex.stackexchange.com/questions/553549
3
I'm trying to change the math font in a beamer (with metropolis user theme) document. I'm using XeLatex. I've managed to change the text font using `fontenc` but this style does not apply to math equation. Thank you. ``` \documentclass[11pt]{beamer} \usepackage[italian]{babel} \usepackage{ragged2e} \usepackage{etoolbox} \apptocmd{\frame}{}{\justifying}{} % Allow optional arguments after frame. \usetheme[progressbar=frametitle]{metropolis} \usepackage{appendixnumberbeamer} \usepackage[T1]{fontenc} \setmainfont{CMU Serif} \usepackage{booktabs} \usepackage[scale=2]{ccicons} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \usepackage{xspace} \newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace} \title{\textbf{Title}} \date{24 Giugno 2018} \author{Me} \begin{document} \maketitle \begin{frame}{Indice} \setbeamertemplate{section in toc}[sections numbered] \tableofcontents%[hideallsubsections] \end{frame} \section[Introduction]{Introduction} \begin{frame}[fragile]{Concetti generali della rinormalizzazione (I)} Equation number 1 \begin{equation} F(x) = g_0 + g_0^2F_1(x) + g_0^3F_2(x) + \dots . \end{equation} Second equation for F1 \begin{equation} F_1(x) = \alpha \int_0^\infty dt \frac{1}{x+t}, \end{equation} \end{frame} \end{document} ``` I want to change the math font to the default LaTeX font.
https://tex.stackexchange.com/users/215669
Beamer metropolis math font
false
Just load `unicode-math` and set the font theme to `serif`. ``` \documentclass[11pt]{beamer} \usepackage[italian]{babel} % you don't want to have long paragraphs % so why justify? %\usepackage{ragged2e} %\usepackage{etoolbox} %\apptocmd{\frame}{}{\justifying}{} % Allow optional arguments after frame. \usetheme[progressbar=frametitle]{metropolis} \usefonttheme{serif} \usepackage{appendixnumberbeamer} \usepackage{unicode-math} \usepackage{booktabs} \usepackage[scale=2]{ccicons} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} \usepackage{xspace} \setmainfont{CMU Serif} \newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace} \title{\textbf{Title}} \date{24 Giugno 2018} \author{Me} \begin{document} \maketitle \begin{frame}{Indice} \setbeamertemplate{section in toc}[sections numbered] \tableofcontents%[hideallsubsections] \end{frame} \section[Introduction]{Introduction} \begin{frame}[fragile]{Concetti generali della rinormalizzazione (I)} Equation number 1 with \themename and CMU Serif \begin{equation} F(x) = g_0 + g_0^2F_1(x) + g_0^3F_2(x) + \dots . \end{equation} Second equation for F1 \begin{equation} F_1(x) = \alpha \int_0^\infty dt \, \frac{1}{x+t}, \end{equation} \end{frame} \end{document} ```
1
https://tex.stackexchange.com/users/4427
683366
317,060
https://tex.stackexchange.com/questions/678686
2
Please look at my MWE. I would expect odd and even side margins being the same but they are not. What I am doing that is wrong? (I added most of my preamble just in case it matters...). ``` \documentclass[foolscap, 12pt]{octavo} \usepackage{xcolor} \usepackage{anyfontsize} \usepackage{fancyhdr} \usepackage[ paperwidth=115mm, paperheight=195mm, layoutsize={110mm, 190mm}, textheight=15.5cm, textwidth=8.5cm, outer=1.5cm, inner=1cm, top=1.5cm, bottom=2cm ] {geometry} \usepackage[italian]{varioref} \usepackage[italian]{babel} \usepackage[babel=true]{microtype}%%% \usepackage{blindtext} \usepackage{layout} %MULTIPLE COLUMNS \usepackage{paracol} \twosided \footnotelayout{m} \columnsep=0.1\textwidth \columnratio{0.65} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{ebgaramond} \setdefaultlanguage{italian} \usepackage{showframe} \begin{document} \sloppy %%%%%%%%%%%%%%%%%%%%%%%%%STARTHERE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \layout \chapter{1} \blindtext[3] \end{document} ```
https://tex.stackexchange.com/users/254618
Side margins right and left are not equal
true
I strongly recommend you comment out the option ``` layoutsize={110mm, 190mm} ``` while loading the `geometry` package. It doesn't seem to do anything useful anyway, at least not in the test document at hand. A separate comment: Don't load both `babel` and `polyglossia`. Use one or the other, *but not both simultaneously*. ``` \documentclass[foolscap, 12pt, italian]{octavo} \usepackage{xcolor} \usepackage{anyfontsize} \usepackage{fancyhdr} \usepackage[ paperwidth=115mm, paperheight=195mm, %%%layoutsize={110mm, 190mm}, % <-- comment out this line textwidth=85mm, textheight=155mm, outer=1.5cm, inner=1cm, top=1.5cm, bottom=2cm, showframe ] {geometry} \usepackage{varioref,babel,microtype} \usepackage{blindtext} %MULTIPLE COLUMNS \usepackage{paracol} % do you need this? \twosided \footnotelayout{m} \columnsep=0.1\textwidth \columnratio{0.65} \usepackage{fontspec} \usepackage{ebgaramond} %%\usepackage{polyglossia} % don't load both 'babel' and 'polyglossia' %%\setdefaultlanguage{italian} \begin{document} %% \sloppy % <-- why? %\layout \chapter{AA} \blindtext[6] \end{document} ```
2
https://tex.stackexchange.com/users/5001
683377
317,063
https://tex.stackexchange.com/questions/683379
0
``` \usepackage[style=authoryear]{biblatex} \renewcommand*{\nameyeardelim}{\addspace} \addbibresource{ref.bib} ``` In my slide file using beamer, using above package with `\parencite` shows (Roman 1984) style citation in the slide. I want to make this citation with 10pt font size with `lightgray` color. Please let me know how to change size and font size! (I guess it is using `\renewcommand` stuff but I am not sure about it)
https://tex.stackexchange.com/users/295367
beamer citation style color and size
false
Just to show you how you can use @Ulrike's answer from the duplicate: ``` \documentclass[9pt]{beamer} \usepackage[style=authoryear]{biblatex} \renewcommand*{\nameyeardelim}{\addspace} \addbibresource{biblatex-examples.bib} \newcommand\mkbibcolor[2]{\textcolor{#1}{\fontsize{10}{12}\selectfont \mkbibparens{#2}}} \DeclareCiteCommand{\parencite}[\mkbibcolor{lightgray}] {\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}} {\multicitedelim} {\usebibmacro{postnote}} \begin{document} \begin{frame} text \parencite{knuth:ct} text \end{frame} \begin{frame} \printbibliography \end{frame} \end{document} ```
0
https://tex.stackexchange.com/users/36296
683384
317,066
https://tex.stackexchange.com/questions/680904
1
I was wondering if there is a way to make a command to generate a BibLatex blank entry to be filled easily (instead of typing all the fields I need). **Context to what I am thinking**: I know JabRef and Zotero (the ones I use) produces the sort of entries according to the config./style I need, but, imagine that I just want to create my bibliog. entries directly in a .bib file. So, instead of writing: ``` @book{ , author = , title = , location = , etc ..., } ``` I could type, **for example**, \book -- into a .bib file -- and then generate the type of entry (book, article, inbook, etc). If there's a way, please, indicate me the way for achieving that. Ig there's not, thanks anyway. Thanks.
https://tex.stackexchange.com/users/288236
Is there a way to make a command to create blank BibLatex entry?
false
just for the sake of information/update... Following the documentation of TexStudio (which is the editor I use), I found out the **Macros** option in the menu. So, I "created" a macro for each of my entries and attributed the shortcut keys provided by TexStudio. Of course, it is the *Normal* mode, as TexStudio also offers environment and script options for macro creation, options I don't need. This way, I just type the shortcut keys into the .bib file and get what I need. See example below: * Macro name: book.Bib * Shortcut: Ctrl+M,Ctrl+B * Macro: ``` @book{, author = {}, title = {}, edition = {}, address = {}, publisher = {}, year = {}, translator = {}, } ``` I do hope it helps someone.
0
https://tex.stackexchange.com/users/288236
683388
317,067
https://tex.stackexchange.com/questions/683157
1
Unfortunately, I am no expert in LaTeX, however I have found myself coerced into using it again and again. My short term solution for the aforementioned deficiency thus far has been to search extensively on this site and whatever other references I could attain to produce the desired results by copying the code I have accosted. Therefore, it is not unexpected to run to several errors whilst doing so. Hence, I pose to you two different issues if that is alright. 1. In trying to integrate *newtxmath* I come across the ensuing error and the result does not resemble what I know *newtxmath* looks like. > > Command `\arrowvert' already defined. ...\mathord}{symbols}{106}{largesymbols}{60} > > > 2. I have copied the margins from the template of a Ph.D. thesis. Do you think it suits a book? Finally, do you have any recommendations for the ordering of the integrated packages? Thanks for your attention in advance. ``` \documentclass[11pt]{book} \usepackage{footnote} \usepackage{amsthm,amssymb,amsmath,mathtools} \usepackage{unicode-math} \usepackage{newtxmath} \makesavenoteenv{tabular} \makesavenoteenv{table} \makesavenoteenv{algorithm} \usepackage[top=40mm, bottom=40mm, left=25mm, right=35mm]{geometry} \usepackage[pagebackref=false,colorlinks,linkcolor=red,citecolor=red]{hyperref} \usepackage[utf8]{inputenc} \usepackage{graphicx} \graphicspath{{./images/}} \usepackage{fancyhdr} \usepackage{tikz} \usepackage{csquotes} \usepackage{setspace} \usepackage{algorithm} \usepackage{algorithmic} \usepackage{optidef} \usepackage{enumitem} \usepackage[square,comma,sort&compress,numbers]{natbib} \usepackage{multirow} \usepackage{array} \usepackage[perpagefootnote=on]{bidi} \usepackage{xepersian} \settextfont[Scale=1]{XB Zar} \setlatintextfont[Scale=0.9]{Cambria} \setmathdigitfont{XM Yekan} \setmathfont{XITS Math} \setmathfont[version=setB,StylisticSet=1]{XITS Math} \usepackage{tabularray} \theoremstyle{definition} \newtheorem{definition}{تعریف}[section] \theoremstyle{theorem} \newtheorem{theorem}[definition]{قضیه} \newtheorem{lemma}[definition]{لم} \newtheorem{proposition}[definition]{مسئلهٔ} \newtheorem{corollary}[definition]{نتیجه} \newtheorem{remark}[definition]{ملاحظه} \theoremstyle{definition} \newtheorem{example}[definition]{مثال} \doublespacing \setcounter{chapter}{1} \begin{document} \include{c2} \include{c4} \renewcommand{\bibname}{مراجع} \bibliographystyle{plain-fa} \bibliography{ch2refs} \nocite{*} \end{document} ```
https://tex.stackexchange.com/users/244485
Command `\arrowvert' already defined and Margin Suitability
true
1. The package `footnote` is obsolete and unmaintained. Don't use it. 2. It makes no sense to load both `unicode-math` and `newtxmath`. 3. `inputenc` is useless with XeLaTeX. 4. Fix the package loading order. ``` \documentclass[11pt]{book} \usepackage{amsthm} \usepackage{mathtools} \usepackage{unicode-math} \usepackage[top=40mm, bottom=40mm, left=25mm, right=35mm]{geometry} \usepackage{graphicx} \usepackage{fancyhdr} \usepackage{tikz} \usepackage{csquotes} \usepackage{setspace} \usepackage{algorithm} \usepackage{algorithmic} \usepackage{optidef} \usepackage{enumitem} \usepackage[square,comma,sort&compress,numbers]{natbib} \usepackage{multirow} \usepackage{array} \usepackage{tabularray} \usepackage[pagebackref=false,colorlinks,linkcolor=red,citecolor=red]{hyperref} \usepackage[perpagefootnote=on]{bidi} \usepackage{xepersian} \settextfont[Scale=1]{Scheherazade}% I don't have XB Zar \setlatintextfont[Scale=0.9]{Cambria} \setmathfont{Cambria Math} %\setmathdigitfont{XM Yekan} \graphicspath{{./images/}} \theoremstyle{definition} \newtheorem{definition}{تعریف}[section] \theoremstyle{theorem} \newtheorem{theorem}[definition]{قضیه} \newtheorem{lemma}[definition]{لم} \newtheorem{proposition}[definition]{مسئلهٔ} \newtheorem{corollary}[definition]{نتیجه} \newtheorem{remark}[definition]{ملاحظه} \theoremstyle{definition} \newtheorem{example}[definition]{مثال} \doublespacing \setcounter{chapter}{1} % Why? \begin{document} تِهْران پرجمعیت‌ترین شهر و پایتخت ایران، مرکز استان تهران و شهرستان تهران است. این شهر در برآورد سال ۱۴۰۱ بالغ بر ۹٬۰۳۹٬۰۰۰ تن جمعیت داشته‌است و براساس برآورد سال ۲۰۱۸ سازمان ملل متحد، سی و چهارمین[۶][۷] شهر پرجمعیت جهان و پرجمعیت‌ترین شهر باختر آسیا می‌باشد. کلان‌شهر تهران نیز دومین کلان‌شهر پرجمعیت خاورمیانه است. % text from https://fa.wikipedia.org/wiki/تهران \end{document} ```
1
https://tex.stackexchange.com/users/4427
683390
317,069
https://tex.stackexchange.com/questions/683283
1
I found a MWE which reproduces the error message with epubcheck 2 times when having run tex4ebook (in my source the error appears 20 times identically) with `Fragmentbezeichner ist nicht angegeben` (transl.: "Fragmented label is not specified"). The error has to do with the `\pageref{somelabel}`. ``` \documentclass[11pt]{report} \usepackage[twoside,paperwidth=141mm,paperheight=211mm,top=11mm,includehead,bottom=19mm,outer=23mm,inner=18mm,bindingoffset=3mm]{geometry} \usepackage[cmintegrals,cmbraces]{newtxmath} \usepackage{ebgaramond-maths} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[german]{babel} \usepackage{csquotes} \usepackage{xpatch} \usepackage[backend=biber,sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp,datecirca=true,dateera=secular]{biblatex} \addbibresource{biblatex-examples.bib} \usepackage[continuous,page]{pagenote} \makepagenote \let\footnote=\pagenote \newcommand*{\addtonotesnewcommand}[1]{% \ifpnhaschapter% \ifnum\value{pnotesavechap}=\value{chapter}\else% \setcounter{pnotesavechap}{\value{chapter}}% \fi% \else% \ifnum\value{pnotesavechap}=\value{section}\else% \setcounter{pnotesavechap}{\value{section}}% \fi% \fi% \addtonotes{\vspace*{0.7\baselineskip}\protect\noindent\vspace*{0.35\baselineskip}\textsc{\large #1}}% }% by Michal H. \renewcommand*{\notesname}{Anmerkungen und Verweise} \usepackage{tex4ebook} \providecommand\phantomsection{} \ifdefined\HCode \usepackage[xindy,noautomatic]{imakeidx} \else \usepackage[]{imakeidx} \fi \makeindex \ifdefined\HCode \usepackage[tex4ht,hyperindex=true,hyperfootnotes=true, pdfauthor={Author}, pdftitle={Title}, pdfkeywords={Keywords}]{hyperref} \else\fi \urlstyle{same} \begin{document} \section{First Section} Some text\label{text} for the first\label{first} page: \fullcite{sigfridsson} \clearpage \section{Second Section} The error happens with epubcheck: Fragmentbezeichner ist nicht angegeben. "`sind einige so umsichtig, dass sie, ohne sich eine Blöße zu geben, durch ein hämisches Lächeln, durch ein Kichern, durch eine gewisse harmlose Boshaftigkeit, das, was sie nicht imstande waren, mit Gründen zu beweisen, und was sie nicht einmal sich selbst einreden können, mit solchen kleinen Kunstgriffen höflicher Verachtung die Ignoranz, die in jedem anderen Falle offenbar würde, nicht nur bei sich verdecken, sondern sie dem Gegner anlasten wollen; denn sie kommen nicht zum Disputieren, um die Wahrheit zu finden oder zu suchen, sondern um des Sieges willen, und um gelehrter zu scheinen und als eifrigere Verfechter des Gegenteils."'\footfullcite[Siehe][Seite 19]{sigfridsson}\label{ZitatGiordanoBrunoEins} Dies ein Zitat \index{Bruno@Bruno, Giordano}Giordano Brunos. \clearpage So aber gebärden sich grausame Charaktere des Hasses und der Verachtung, wie dies Giordano Bruno\index{Bruno@Bruno, Giordano} in den vorherigen Zitaten auf den Seiten \pageref{ZitatGiordanoBrunoEins} und \pageref{ZitatGiordanoBrunoZwei} beschrieben hatte. \clearpage "`Wozu es wahrlich heroischen Sinnes bedurfte, um nicht die Arme sinken zu lassen, zu verzweifeln und überwältigt zu werden von solch reißendem Strom gemeinster Verleumdungen, wie sie über mich ergossen wurden von dem Neid der Unwissenden, der Anmaßung der Sophisten, der Lästersucht der Böswilligen, dem Getuschel der Diener, dem Murren der Lohnarbeiter, den Nörgeleien der Dienstboten, den Unterstellungen der Dummköpfe, den Verdächtigungen der Spitzel, dem Übereifer der Heuchler, der Missgunst der Ungebildeten, der Wut des Pöbels, dem Zorn des Gesindels, den Klagen der Benachteiligten und dem Geschrei der Gezüchtigten; es fehlte nur noch die Empörung von Seiten aufgebrachter, verstiegener und gehässiger Weiber, deren falsche Tränen wirkungsvoller zu sein pflegen als noch so hohe Wogen und Stürme der Anmaßung, Neid, Lästersucht, Murren, Verrat, Zorn, Empörung, Hass und Wut."'\footfullcite[Siehe][Seite 5f]{sigfridsson}\label{ZitatGiordanoBrunoZwei} \printnotes \printindex \printbibliography \end{document} ``` What might be a fixing for it? If you can not reproduce the error with this file, I would probably need to let you know about the files `-c myconfig.cfg` and `-e mybuild.lua`. Let me know.
https://tex.stackexchange.com/users/292824
Errors with epubcheck after tex4ebook, concerning \pageref{somelabel}
true
I found another solution due to my needs: ``` \newcounter{cnttextlabels}% in the preamble of sourcename.tex \refstepcounter{cnttextlabels}\label{Somelabel} % Always at the position in the text body where the reference should point at. \pageref{Somelabel} % Used in text for page-references to refer to the appropriate label in a text position where no other counter need to be refered to. ``` This reduced the errors in epubcheck from 20 to 0 (zero) and made it valide. And I tested the page-reference sporadically and found that they work correctly (which wasnt before this answer not the case, due to the 20 error in epubcheck which gave 20 non-functional pagerefering hyperlinks) The problem was, that I neither needed to label the `\footfullcite[][]{}` nor any other `\section{}` which all seem to have counters. So I defined a new counter for my `labeling within arbitrary text passages`, like quotes or defintions of special content that might be good refering to (and has no counter up to the new one cnttextlabels).
0
https://tex.stackexchange.com/users/292824
683395
317,070
https://tex.stackexchange.com/questions/683325
1
I would like to use `kaobook` in French. So, I use `\usepackage[francais]{babel}`. In this way the bulleted list style is replaced by `--`. How can I keep original theme in French please?
https://tex.stackexchange.com/users/295328
How to use kaobook with French babel and keep the original bulleted list style?
true
There are various ways to customize the French language settings using `babel`. The main command to setup things is `\frenchsetup`. To undo the list modifications you can use the setting: ``` \frenchsetup{StandardItemLabels=true} ``` For a full set of commands, see the [package documentation](https://texdoc.org/pkg/babel-french).
2
https://tex.stackexchange.com/users/2693
683397
317,071
https://tex.stackexchange.com/questions/507728
3
Is there a possibility to place text on a svg vector image without using Inkscape? For me it is much more convenient to change the text quickly using `\overpic` and `\put` than opening Inkscape and generating the pdf\_tex file every time. Or is that just the only way to do it? Thanks!
https://tex.stackexchange.com/users/191224
Adding text on a SVG image with overpic or similar
false
My answer is essentially the same as [the answer from Steven B. Segletes](https://tex.stackexchange.com/a/507740/128042), but I've added a `%` after `\stackinset{#1}{#2\wd0}{#3}{#4\ht0}{#5}{#6}`. Without this `%` the defined command `\scaledinset` always inserts a new line after the image, which can be very annoying. ``` \documentclass[standard]{letter} \usepackage{svg} \usepackage[usestackEOL]{stackengine} \usepackage{graphicx} \newcommand\scaledinset[6]{% \setbox0=\hbox{#6}% \stackinset{#1}{#2\wd0}{#3}{#4\ht0}{#5}{#6}% } \begin{document} \scaledinset{l}{.5}{b}{.7}{test}{\includegraphics[width=0.15\linewidth]{example-image}} \scaledinset{l}{.5}{b}{.7}{test}{\includegraphics[width=0.45\linewidth]{example-image}} \end{document} ``` With the [code from Steven B. Segletes](https://tex.stackexchange.com/a/507740/128042) one loses alignment, while one can keep the alignment by adding the `%` as shown in the following example: ``` \documentclass[standard]{report} \usepackage{subcaption} \usepackage{svg} \usepackage[usestackEOL]{stackengine} \usepackage{graphicx} \newcommand\scaledinset[6]{% \setbox0=\hbox{#6}% \stackinset{#1}{#2\wd0}{#3}{#4\ht0}{#5}{#6}% } \newcommand\scaledinsetOld[6]{% \setbox0=\hbox{#6}% \stackinset{#1}{#2\wd0}{#3}{#4\ht0}{#5}{#6} } \begin{document} \begin{figure} \centering \begin{subfigure}[b]{0.3\textwidth} \centering \includegraphics[width=\textwidth]{example-image} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\textwidth} \centering \scaledinset{l}{.3}{b}{.7}{test new code}{\includegraphics[width=\textwidth]{example-image}} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\textwidth} \centering \scaledinsetOld{l}{.3}{b}{.7}{test old code}{\includegraphics[width=\textwidth]{example-image}} \end{subfigure} \end{figure} \end{document} ```
1
https://tex.stackexchange.com/users/128042
683398
317,072
https://tex.stackexchange.com/questions/633765
1
I'm writing a manuscript with reledmac and I have long critical notes. My critical notes are set as PARAGRAPH -- see my MWE. I cannot see a way to have the text of a long note flowing to next page. This is not a problem with familiar notes. And all goes well in critical notes if I avoid the [paragraph] argument. But I need to have the notes arranged as a paragraph, which is the usual way to set the layout of the kind of text I'm writing. Please see below also the workaround that I use, nesting a second series of critical notes on the same lemma, which I can use for longer texts spanning more than one page. Thanks for your help. ``` \documentclass[foolscap, 11pt]{octavo} \usepackage{blindtext} \usepackage[marginparwidth=40pt, headsep=20pt]{geometry} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{ebgaramond} \usepackage{reledmac} \Xarrangement[A]{paragraph} \begin{document} \section{First} This is normal text with a long footnote.\footnote{\blindtext[3]} \beginnumbering \pstart \begin{footnotesize} This is \edtext{\textbf{critical}}{ \Afootnote[nonum, nosep]{This is a critical foot note} } text with critical \edtext{\textbf{notes}}{ \Afootnote[nonum, nosep]{And this is a critical foot note with long text. \blindtext[3]} } . \blindtext[1] \end{footnotesize} \pend \endnumbering And this is again normal text. \blindtext[1] \end{document} ``` Workaround using nested critical notes: ``` \documentclass[foolscap, 11pt]{octavo} \usepackage{blindtext} \usepackage[marginparwidth=40pt, headsep=20pt]{geometry} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{ebgaramond} \usepackage{reledmac} \Xarrangement[A]{paragraph} \Xarrangement[B]{normal} \begin{document} \section{First} This is normal text \beginnumbering \pstart \begin{footnotesize} This\footnote{This is a familiar note} is \edtext{\textbf{\edtext{critical}{\Bfootnote{This is a B footnote on the same lemma, and \blindtext[1]}}}}{ \Afootnote[nonum, nosep]{This is a critical foot note} } text with \edtext{\textbf{critical \edtext{notes}{\Bfootnote{And this is another B footnote on another lemma and \blindtext[2]}}}}{ \Afootnote[nonum, nosep]{And this is another critical foot note. } } . \blindtext[1] \end{footnotesize} \pend \endnumbering And this is again normal text. \end{document} ```
https://tex.stackexchange.com/users/254618
Long critical notes in reledmac: text does not flow to next page
true
Since paragraphed footnotes cannot contain page break inside, this is a workaround in which longer notes are in a second series: ``` \documentclass[foolscap, 11pt]{octavo} \usepackage{blindtext} \usepackage[marginparwidth=40pt, headsep=20pt]{geometry} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{ebgaramond} \usepackage{reledmac} \Xarrangement[A]{paragraph} \Xarrangement[B]{normal} \begin{document} \section{First} This is normal text \beginnumbering \pstart \begin{footnotesize} This\footnote{This is a familiar note} is \edtext{\textbf{\edtext{critical}{\Bfootnote{This is a B footnote on the same lemma, and \blindtext[1]}}}}{ \Afootnote[nonum, nosep]{This is a critical foot note} } text with \edtext{\textbf{critical \edtext{notes}{\Bfootnote{And this is another B footnote on another lemma and \blindtext[2]}}}}{ \Afootnote[nonum, nosep]{And this is another critical foot note. } } . \blindtext[1] \end{footnotesize} \pend \endnumbering And this is again normal text. \end{document} ```
1
https://tex.stackexchange.com/users/254618
683401
317,074
https://tex.stackexchange.com/questions/683301
1
I'm using the minipage and wrapfig options to have text wrapping around a few words. I'm not able to properly justify Hebrew. It should be ragged right. ``` \documentclass[14pt]{octavo} \usepackage[fontsize=14pt]{fontsize} \usepackage[ paperwidth=160mm, paperheight=240mm, %layoutsize={110mm, 180mm}, %layoutoffset={5mm, 10mm}, textheight=18cm, textwidth=10.5cm, inner=2.5cm, %marginparwidth=20pt, ] {geometry} \usepackage{lipsum} \usepackage{wrapfig} \usepackage{graphicx} \usepackage[babel=true]{microtype}%%% %MULTIPLE COLUMNS \usepackage{paracol} \twosided \footnotelayout{m} \columnsep=0.05\textwidth \columnratio{0.5} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{ebgaramond} \setdefaultlanguage{italian} \setotherlanguage{hebrew} \newfontfamily{\hebrewfont}{New Peninim MT} \begin{document} \begin{wrapfigure}{r}{0.4\textwidth} \begin{minipage}{0.27\linewidth} {\fontsize{46pt}{46pt}\selectfont \vspace{3pt} \texthebrew{אלה} \vspace{1pt} \noindent \texthebrew{הדברים}} \vspace{5pt} \end{minipage}\end{wrapfigure} \lipsum[1-2] \end{document} ```
https://tex.stackexchange.com/users/254618
Justification of hebrew - Minipage and wrapfig
false
Following the suggestions of @DavidCarlisle and using `\selectlanguage{hebrew}` instead then `\texthebrew{}` ``` \documentclass[14pt]{octavo} \usepackage[fontsize=14pt]{fontsize} \usepackage[ paperwidth=160mm, paperheight=240mm, %layoutsize={110mm, 180mm}, %layoutoffset={5mm, 10mm}, textheight=18cm, textwidth=10.5cm, inner=2.5cm, %marginparwidth=20pt, ] {geometry} \usepackage{lipsum} \usepackage{wrapfig} \usepackage{graphicx} \usepackage[babel=true]{microtype}%%% %MULTIPLE COLUMNS \usepackage{paracol} \twosided \footnotelayout{m} \columnsep=0.05\textwidth \columnratio{0.5} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{ebgaramond} \setdefaultlanguage{italian} \setotherlanguage{hebrew} \newfontfamily{\hebrewfont}{New Peninim MT} \begin{document} \begin{wrapfigure}{r}{0.4\textwidth} \selectlanguage{hebrew} \begin{flushright} {\fontsize{46pt}{46pt}\selectfont אלה \\ הדברים } \end{flushright} \vspace{5pt} \end{wrapfigure} \lipsum[1-2] \end{document} ```
1
https://tex.stackexchange.com/users/254618
683402
317,075
https://tex.stackexchange.com/questions/683403
0
I am compiling a solution file with exercises from different sections of a book, so I hope the exercises are numbered as `sectionnumber`.`subsectionnumber`.`exercisenumber`. The issue arises since the book's subsection labeling is particular: it is a combination of numbers and alphabets, so after subsection 1.1, 1.2, for example, it would then start alphabetically like subsections 1.A and 1.B (I assume to illustrate unimportant materials). I am looking for a way to **customize the counter so that the subsections and exercises are numbered correspondingly.** Thanks! --- **Update: Just saw [this post](https://tex.stackexchange.com/questions/617723), which solves most of the issue. I am still hoping to find a more ''automatic'' way of doing this, like using counter, etc.** --- For a working example, say ``` \documentclass[12pt]{article} \usepackage[letterpaper, margin=1in]{geometry} \usepackage{amsmath, amssymb, mathtools, tikz-cd, enumitem, fancyhdr, mleftright, wrapfig, scrextend,mathrsfs,amsthm} \theoremstyle{definition} \newtheorem{exercise}{Exercise}[subsection] \newtheorem{corollary}{Corollary}[exercise] \newtheorem{lemma}{Lemma}[exercise] \newtheorem{proposition}{Proposition}[exercise] \newtheorem{claim}{Claim}[exercise] \newtheorem{remark}{Remark}[exercise] \begin{document} \section{Section 1} \begin{exercise} % 1.0.1 \end{exercise} \subsection{Subsection 1.1} \begin{exercise} % 1.1.1 \end{exercise} \subsection{Subsection 1.2} \begin{exercise} % 1.2.1 \end{exercise} \subsection{Subsection 1.A} \begin{exercise} % 1.A.1 \end{exercise} \subsection{Subsection 1.B} \begin{exercise} % 1.B.1 \end{exercise} \section{Section 2} \subsection{Subsection 2.1} \begin{exercise} % 2.1.1 \end{exercise} \subsection{Subsection 2.2} \end{document} ```
https://tex.stackexchange.com/users/273371
Customize subsection counter
true
You could define a commend, that changes the subsection numbering style redefining `\thesubsection` and also stores the last value of the previous numbering style and optionally restores this value. In the example below `\subsectionnumbering{<style>}` would restore the previously last number of the style, but the star variant `\subsectionnumber*{<style>}` would always start with 1. ``` \documentclass[12pt]{article} \usepackage[letterpaper, margin=1in]{geometry} \usepackage{amsmath, amssymb, mathtools, tikz-cd, enumitem, fancyhdr, mleftright, wrapfig, scrextend,mathrsfs,amsthm} \theoremstyle{definition} \newtheorem{exercise}{Exercise}[subsection] \newtheorem{corollary}{Corollary}[exercise] \newtheorem{lemma}{Lemma}[exercise] \newtheorem{proposition}{Proposition}[exercise] \newtheorem{claim}{Claim}[exercise] \newtheorem{remark}{Remark}[exercise] \errorcontextlines\maxdimen \makeatletter \newcommand*{\currentsubsectionnumbering}{arabic} \NewDocumentCommand{\subsectionnumbering}{sm}{% \expandafter\edef\csname lastsubsection\currentsubsectionnumbering number\endcsname {\expandafter\the\value{subsection}}% \renewcommand*{\thesubsection}{\thesection.\@nameuse{#2}{subsection}}% \setcounter{subsection}{0}% \IfBooleanF{#1}{% star variant don't set it to the last used number of the numbering style \@ifundefined{lastsubsection#2number}{}{% \setcounter{subsection}{\@nameuse{lastsubsection#2number}}% }% } \@namedef{currentsubsectionnumbering}{#2}% } \makeatother \begin{document} \section{Section 1} \begin{exercise} % 1.0.1 \end{exercise} \subsection{Subsection 1.1} \begin{exercise} % 1.1.1 \end{exercise} \subsection{Subsection 1.2} \begin{exercise} % 1.2.1 \end{exercise} \subsectionnumbering{Alph} \subsection{Subsection 1.A} \begin{exercise} % 1.A.1 \end{exercise} \subsection{Subsection 1.B} \begin{exercise} % 1.B.1 \end{exercise} \subsectionnumbering{arabic} \subsection{Subsection 1.3} \begin{exercise} % 1.1.1 \end{exercise} \subsectionnumbering{Alph} \subsection{Subsection 1.C} \begin{exercise} % 1.C.1 \end{exercise} \subsectionnumbering{arabic}% should be BEFORE \section \section{Section 2} %\subsectionnumbering*{arabic}% alternative: use the star variant to start % again with subsection number 1 \subsection{Subsection 2.1} \begin{exercise} % 2.1.1 \end{exercise} \subsectionnumbering*{Alph}% Here we don't want to use the previous upper case % letter value, but want to start new. \subsection{Subsection 2.A} \begin{exercise} % 2.A.1 \end{exercise} \end{document} ```
1
https://tex.stackexchange.com/users/277964
683407
317,076
https://tex.stackexchange.com/questions/683393
0
I am having a bug: when I want to use both stmaryrd for `\llbracket` and french babel in some `book` I am writing, compilation never ends. Happens on my local machine and on Overleaf. Here is some MWE: ``` \documentclass{book} %General setup \usepackage[margin=2.5cm]{geometry} \usepackage{graphicx} \usepackage{amssymb} \usepackage{amsmath} \usepackage{enumitem} \usepackage{commath} \usepackage{stmaryrd} \usepackage{import} %Custom style \renewcommand{\partname}{Partie} \renewcommand{\contentsname}{Sommaire} \renewcommand{\chaptername}{Thème} \setcounter{tocdepth}{4} \setcounter{secnumdepth}{4} \usepackage{hyperref} \makeatletter \@addtoreset{chapter}{part} \makeatother \usepackage[frenchb]{babel} \title{My title} \date{Today} \author{Kal} \begin{document} \maketitle \newpage \begin{center}\Large \textit{Préambule} \end{center} \bigskip \begin{equation*} \forall k \in \llbracket 1 : N \rrbracket, \: i_k = \frac{G_k}{\sum\limits_{l=1}^N G_l} i \end{equation*} \end{document} ``` I tried everything, and the only thing I can tell you is that commenting the babel import on the MWE does the trick and gets it to compile. However, I cannot do this in the whole document. I am really stuck, especially without any error message...
https://tex.stackexchange.com/users/223998
stmaryrd & babel incompatibility
true
As pointed out by Ulrike, this is not a conflict between `stmaryrd` and `babel-french`, but between `commath` and `babel-french`. See [Incompatibility between commath and babel packages](https://tex.stackexchange.com/questions/540687) The `commath` makes the colon active, this conflicts with `babel-french` also making it active. As `commath` doesn't seem to be maintained (last update 2006), I could suggest to comment out lines 281-286 in `commath.sty`. If `:=` needs to be patched in math mode (that's the *only purpose* of making the colon active), there are alternatives (`mathtools.sty` f.i.). A cleaner solution would be to pick up the commands you really need in `commath.sty`, to add them to your preambule (or to a personal style file) and to drop the call to `commath.sty`. B.t.w, I would suggest to add `\usepackage[T1]{fontenc}` as recommended by `babel-french` and also `\usepackage{lmodern}` to get the Latin Modern fonts instead of the "cm-super" fonts.
2
https://tex.stackexchange.com/users/69978
683408
317,077
https://tex.stackexchange.com/questions/168711
6
When I print my glossary using \printglossaries it prints the glossary on a chapter level (at least it gives it the style of a chapter heading + it appears in the index on a chapter level). However, it doesn't get a chapter number. In the example below the result would be: 1. Content A. First Appendix Glossary Does anybody know how I could give it the proper chapter number (= B. Glossary) in this case? Being able to customize the term "Glossary" on top of that would be even better. ``` \documentclass{article} \usepackage{glossaries} \newglossaryentry{sample}{name={sample},description={an example}} \renewcommand{\glstextformat}[1]{\textit{#1}} \begin{document} \chapter{Content} \gls{sample}. \Appendix \chapter{First Appendix} \printglossaries \end{document} ``` Thanks
https://tex.stackexchange.com/users/48967
Give \printglossaries a section number and customize the name?
false
Because [`autolabel`](https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/macros/latex/contrib/glossaries/glossaries-user.html#glo:optval.numberedsection.autolabel) has been officially provided in the [`numberedsection`](https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/macros/latex/contrib/glossaries/glossaries-user.html#glo:opt.numberedsection) for [`printglossary`](https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/macros/latex/contrib/glossaries/glossaries-user.html#glo:printglossaryhttps://ftp.yz.yamagata-u.ac.jp/pub/CTAN/macros/latex/contrib/glossaries/glossaries-user.html#glo:printglossary) command, the option setting on the command below could directly help achieve the expected result: ``` \printglossary[numberedsection=autolabel] ```
0
https://tex.stackexchange.com/users/167375
683409
317,078
https://tex.stackexchange.com/questions/683405
0
How can I have the text to be 12pt and the title and introduction to be 16pt in a paper I am writing? ``` \documentclass{article} \usepackage{graphicx} % Required for inserting images \title{test} \author{R P} \date{April 2023} \begin{document} \maketitle \section{Introduction} \end{document} ```
https://tex.stackexchange.com/users/295392
How to get font size 16pt with the article class?
true
The standard classes have options `10pt` (default), `11pt` and `12pt` to setup the font sizes of the text. Depending on these options also the font size commands `\Huge`, `\huge`, `\LARGE`, `\Large`, `\large`, `\normalsize`, `\small`, `\footnotesize`, `\scriptsize` and `\tiny` are changed. The section heading usually uses `\Large`. With option `12pt` the size of `\Large` would be 17.28pt with baseline skip of 22pt. You could change this to 16pt instead and optionally also reduce the baseline skip, so would get 16pt instead of 17.28pt everywhere, `\Large` is used (e.g. the number line of `\part` headings): ``` \documentclass[12pt]{article} \usepackage{lmodern} % use free scalable fonts \title{test} \author{R P} \date{April 2023} \makeatletter \DeclareRobustCommand\Large{\@setfontsize\Large{16}{20}}% size and baselineskip reduced \makeatother \begin{document} \maketitle \section{Introduction} \end{document} ``` Alternatively you can change the size used by `\section` only. This can be done either using a package like `titlesec` or just redefining or patching `\section`: ``` \documentclass[12pt]{article} \usepackage{lmodern} % use free scalable fonts \usepackage{xpatch} \xpatchcmd{\section}{\Large}{\fontsize{16}{20}\selectfont}{}{\PatchFailure}% Patch \section to use another font size and baseline skip instead of \Large \title{test} \author{R P} \date{April 2023} \begin{document} \maketitle \section{Introduction} \end{document} ``` Note: Depending on the fonts you are using, maybe not all sizes would be supported. Usually this would be reported in the `log` file, e.g., by messages like: ``` LaTeX Font Warning: Font shape `OT1/cmr/bx/n' in size <16> not available (Font) size <17.28> substituted on input line 14. ``` In the examples above, I've switched over to scalable font Latin Modern to avoid such an issue. If you'd use XeLaTeX or LuaLaTeX you don't need to load package `lmodern` (and also should not do it), because these already use the OpenType version of Latin Modern as default. But note: If you have been told, the sizes should be 12 point and 16 point, you should also recognize, that 1pt in TeX is 1/72.27 inch, but 1 point in, e.g., Microsoft Word would be 1/72 inch. BTW: There are classes like `memoir` or the KOMA-Script classes, e.g., `scrartcl`, that provides user interfaces to change the font sizes of headings. For example with KOMA-Script you could use: ``` \documentclass[12pt,letterpaper,sfdefaults=false]{scrartcl}% Option sfdefaults needs at least KOMA-Script 3.39 \usepackage{lmodern} % use free scalable fonts \setkomafont{section}{\fontsize{16}{20}\selectfont} \title{test} \author{R P} \date{April 2023} \begin{document} \maketitle \section{Introduction} \end{document} ```
2
https://tex.stackexchange.com/users/277964
683412
317,079
https://tex.stackexchange.com/questions/683357
1
Why is the footer (containing the bank information) shifted down by parskip? ``` \documentclass[fontsize=12pt, DIN, A4, parskip=full, % removing this prevents the shift ]{scrlttr2} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage[margin=20mm, inner=25mm, outer=20mm, bottom=30mm, ]{geometry} \usepackage{ebgaramond} \usepackage{blindtext} \setlength{\footskip}{10mm} % set the pagemark (page x of y) \renewcommand*\pagemark{% \usekomafont{pagenumber}{\pagename~\thepage~von~\letterlastpage}% } \setkomavar{firstfoot}{\hfill\pagemark} % create pagemark also on first page \newcommand{\originalopening}{} \let\originalopening\opening \renewcommand{\opening}[1]{\originalopening{#1}\thispagestyle{plain}} \KOMAoptions{fromalign=off, pagenumber=botright, } \newkomavar[BIC]{BIC} \setkomavar{firstfoot}{% \hrule\vspace*{0.5em}\noindent% \usekomavar*{frombank}~\usekomavar{frombank} \hfill Sparkasse Deutschland \hfill \usekomavar*{BIC}~\usekomavar{BIC}} % =================================== \setkomavar{frombank}[IBAN]{DE98~1605~0000~7512~0130~19} \setkomavar{BIC}{WELADED2PMB} \setkomavar{toaddress}{Musterstraße 1} \setkomavar{fromname}{Donald Duck \textit{\&} Daisy Duck} \setkomavar{fromaddress}{Am Geldspeicher 1, 12345 Entenhausen} \begin{document} \begin{letter}{Max Mustermann\\Musterstraße 1\\12345 Musterstadt} \opening{Hello,} \Blindtext \closing{Mit freundlichen Grüßen} \end{letter} \end{document} ``` When I uncomment `parskip=full` the footer gets shifted up although there is no `\par` in the footer..
https://tex.stackexchange.com/users/281557
Parskip is shifting my footer down
true
You should not use low level TeX primitive `\hrule` in LaTeX, at least, if you don't know the details of this primitive. Because it does not switch to horizontal mode, it does not start the paragraph. So the `\noindent` in your code starts a new paragraph an the setting of option `parskip` is used. One possible change would be to use `\hrulefill` and just start a new line using `\\[<distance>]`: ``` \documentclass[fontsize=12pt, DIN, A4, parskip=full, % removing this prevents the shift ]{scrlttr2} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage[margin=20mm, inner=25mm, outer=20mm, bottom=30mm, ]{geometry} \usepackage{ebgaramond} \usepackage{blindtext} \setlength{\footskip}{10mm} % set the pagemark (page x of y) \renewcommand*\pagemark{% \usekomafont{pagenumber}{\pagename~\thepage~von~\letterlastpage}% } \setkomavar{firstfoot}{\hfill\pagemark} % create pagemark also on first page \newcommand{\originalopening}{} \let\originalopening\opening \renewcommand{\opening}[1]{\originalopening{#1}\thispagestyle{plain}} \KOMAoptions{fromalign=off, pagenumber=botright, } \newkomavar[BIC]{BIC} \setkomavar{firstfoot}{% \hrulefill\\% You could also use something like \\[.5em] to move the following text down. \usekomavar*{frombank}~\usekomavar{frombank} \hfill Sparkasse Deutschland \hfill \usekomavar*{BIC}~\usekomavar{BIC}} % =================================== \setkomavar{frombank}[IBAN]{DE98~1605~0000~7512~0130~19} \setkomavar{BIC}{WELADED2PMB} \setkomavar{toaddress}{Musterstraße 1} \setkomavar{fromname}{Donald Duck \textit{\&} Daisy Duck} \setkomavar{fromaddress}{Am Geldspeicher 1, 12345 Entenhausen} \begin{document} \begin{letter}{Max Mustermann\\Musterstraße 1\\12345 Musterstadt} \opening{Hello,} \Blindtext \closing{Mit freundlichen Grüßen} \end{letter} \end{document} ``` Or you can locally change option `parskip`: ``` \documentclass[fontsize=12pt, DIN, A4, parskip=full, % removing this prevents the shift ]{scrlttr2} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage[margin=20mm, inner=25mm, outer=20mm, bottom=30mm, ]{geometry} \usepackage{ebgaramond} \usepackage{blindtext} \setlength{\footskip}{10mm} % set the pagemark (page x of y) \renewcommand*\pagemark{% \usekomafont{pagenumber}{\pagename~\thepage~von~\letterlastpage}% } \setkomavar{firstfoot}{\hfill\pagemark} % create pagemark also on first page \newcommand{\originalopening}{} \let\originalopening\opening \renewcommand{\opening}[1]{\originalopening{#1}\thispagestyle{plain}} \KOMAoptions{fromalign=off, pagenumber=botright, } \newkomavar[BIC]{BIC} \setkomavar{firstfoot}{% \KOMAoptions{parskip=false}% \hrule\vspace{.5em}\noindent \usekomavar*{frombank}~\usekomavar{frombank} \hfill Sparkasse Deutschland \hfill \usekomavar*{BIC}~\usekomavar{BIC}} % =================================== \setkomavar{frombank}[IBAN]{DE98~1605~0000~7512~0130~19} \setkomavar{BIC}{WELADED2PMB} \setkomavar{toaddress}{Musterstraße 1} \setkomavar{fromname}{Donald Duck \textit{\&} Daisy Duck} \setkomavar{fromaddress}{Am Geldspeicher 1, 12345 Entenhausen} \begin{document} \begin{letter}{Max Mustermann\\Musterstraße 1\\12345 Musterstadt} \opening{Hello,} \Blindtext \closing{Mit freundlichen Grüßen} \end{letter} \end{document} ```
3
https://tex.stackexchange.com/users/277964
683416
317,081
https://tex.stackexchange.com/questions/683424
1
I want to add `\newkomavar` in my `.cls` file and use it in an `.lco` file. But it seems the .lco is called before the .cls and it does not work. How can I define new koma variables and use them in an .lco file? .cls ``` \NeedsTeXFormat{LaTeX2e} \ProvidesClass{businessletter}[2023-04-20 business letter] \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrlttr2}} \ProcessOptions\relax \LoadClass{scrlttr2} \newkomavar[IBAN]{fromiban} \newkomavar[BIC]{frombic} ``` .lco ``` \ProvidesFile{DonaldDaisy.lco}[2023/04/20]% \setkomavar{frombank}{Sparkasse Entenhausen} \setkomavar{fromiban}{DE98~1605~0000~7512~0130~19} \setkomavar{frombic}{WELADED2PMB} ``` .tex ``` \documentclass[fontsize=12pt, DonaldDaisy, ]{businessletter} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{ebgaramond} \usepackage{blindtext} \begin{document} \begin{letter}{Max Mustermann\\Musterstraße 1\\12345 Musterstadt} \opening{Hello,} \Blindtext \closing{Mit freundlichen Grüßen} \end{letter} \end{document} ```
https://tex.stackexchange.com/users/281557
How to add new komavars in .cls to use in .lco?
true
Using `\documentclass` to load `lco`-files is deprecated and results in a warning: ``` Class scrlttr2 Warning: loading of LCO via class option `DonaldDaisy'. (scrlttr2) Note: Loading a LCO via class option is deprecated. (scrlttr2) You should use `\LoadLetterOption{DonaldDaisy}' (scrlttr2) instead. ``` So you should use: ``` \begin{filecontents*}{businessletter.cls} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{businessletter}[2023-04-20 business letter] \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrlttr2}} \ProcessOptions\relax \LoadClass{scrlttr2} \newkomavar[IBAN]{fromiban} \newkomavar[BIC]{frombic} \end{filecontents*} \begin{filecontents*}{DonaldDaisy.lco} \ProvidesFile{DonaldDaisy.lco}[2023/04/20]% \setkomavar{frombank}{Sparkasse Entenhausen} \setkomavar{fromiban}{DE98~1605~0000~7512~0130~19} \setkomavar{frombic}{WELADED2PMB} \end{filecontents*} \documentclass[fontsize=12pt, ]{businessletter} %\usepackage[utf8]{inputenc}% not needed since LaTeX 2018/04/01 \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{ebgaramond} \usepackage{blindtext} \LoadLetterOption{DonaldDaisy} \begin{document} \begin{letter}{Max Mustermann\\Musterstraße 1\\12345 Musterstadt} \opening{Hello,} \Blindtext \closing{Mit freundlichen Grüßen} \end{letter} \end{document} ``` instead. I even would recommend to not define new variables in a wrapper class, but in a lco-file or a wrapper package, so that they also could be used with package `scrletter` and therefore also with class `scrletter` which is a wrapper class to `scrartcl` with package `scrletter`: ``` \begin{filecontents*}{businessletter.cls} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{businessletter}[2023-04-20 business letter] \LoadClassWithOptions{scrletter} \LoadLetterOption{businessletter} \end{filecontents*} \begin{filecontents*}{businessletter.lco} \ProvidesFile{bussinessletter.lco}[2023-04-20 business letter] \newkomavar[IBAN]{fromiban} \newkomavar[BIC]{frombic} \end{filecontents*} \begin{filecontents*}{DonaldDaisy.lco} \ProvidesFile{DonaldDaisy.lco}[2023/04/20]% \Ifkomavar{fromiban}{}{\LoadLetterOption{bussinessletter.lco}} \setkomavar{frombank}{Sparkasse Entenhausen} \setkomavar{fromiban}{DE98~1605~0000~7512~0130~19} \setkomavar{frombic}{WELADED2PMB} \end{filecontents*} \documentclass[fontsize=12pt]{businessletter} %\usepackage[utf8]{inputenc}% not needed since LaTeX 2018/04/01 \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{ebgaramond} \usepackage{blindtext} \LoadLetterOption{DonaldDaisy} \begin{document} \begin{letter}{Max Mustermann\\Musterstraße 1\\12345 Musterstadt} \opening{Hello,} \Blindtext \closing{Mit freundlichen Grüßen} \end{letter} \end{document} ```
2
https://tex.stackexchange.com/users/277964
683427
317,084
https://tex.stackexchange.com/questions/683420
1
I recently updated my TexLive distribution to the 2023 version, but in doing so I've started receiving a number of warnings from my `tikzposter`: ``` \documentclass{tikzposter} %\font\nullfont=cmr10 \title{TikZTests}% % \author{John Doe}% % \institute{World Government}% \begin{document} \maketitle \end{document} ``` While the compilation works: ``` latexmk -C tikzposter.tex && latexmk tikzposter.tex ``` There are a number of annoying warnings about missing characters: ``` Output written on tikzposter.pdf (1 page, 39473 bytes). Transcript written on tikzposter.log. Latexmk: Getting log file 'tikzposter.log' Latexmk: Examining 'tikzposter.fls' Latexmk: Examining 'tikzposter.log' Latexmk: Log file says output to 'tikzposter.pdf' Latexmk: Summary of warnings from last run of *latex: =====Latex reported missing or unavailable character(s). =====See log file for details. Latexmk: ====List of undefined refs and citations: Missing character: There is no 1 in font nullfont! Missing character: There is no = in font nullfont! Missing character: There is no 1 in font nullfont! Latexmk: All targets () are up-to-date ``` Anyone know where these come from? They only show up if the `\maketitle` macro is used, and is there some way to get rid of these warnings?
https://tex.stackexchange.com/users/285572
TiKZPoster: Title: Missing character: There is no 1 in font nullfont!
true
It is a bug in tikzposter. It uses an assignment on a macro instead of defining it. ``` \documentclass{tikzposter} %\font\nullfont=cmr10 \title{TikZTests}% % \author{John Doe}% % \institute{World Government}% \makeatletter \define@key{title}{titletextscale}{\def\TP@titletextscale{#1}} %instead of \TP@titletextscale=1 \makeatletter \begin{document} \maketitle \end{document} ```
3
https://tex.stackexchange.com/users/2388
683429
317,085
https://tex.stackexchange.com/questions/683428
0
I have a line going from `(0,0)` to `(4,4)`. I want to place a node along this line, 75% "away" from the (0,0) coordinate (the starting point). All methods I have seen thus far to achieve this suggest to do ``` \draw (0,0) -- (4,4) node [pos=0.75] (TextNode) {text}; ``` I.e., the line and the node are defined together. Suppose I first draw the line, how can I now insert *a new `\node` command* so that it inherits the "data" of the ALREADY drawn line and then places the node along it, 75% "away"? What I envision is something like ``` \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) -- (4,4) node [] (line) {}; \node (TextNode) at (line) [pos=0.75] {text}; \end{tikzpicture} \end{document} ``` but the `[pos=0.75]` has no effect and the node is rather positioned at `(0,0)`.
https://tex.stackexchange.com/users/180429
Position a node along a line, without \draw
true
Two options: 1. With a `\path` over the line and drawing a `node [pos=0.75]`. 2. Using `calc` library with the syntax `($(A)!0.75!(B)$)` that specifies a point between A and B with a distance ratio 0.75:0.25. ``` \documentclass[tikz,border=1.618mm]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (4,4); \draw (A) -- (B); \path (A) -- (B) node [blue,pos=0.75] {text at 0.75}; \node[red] at ($(A)!0.25!(B)$) {text at 0.25}; \end{tikzpicture} \end{document} ```
2
https://tex.stackexchange.com/users/231368
683430
317,086
https://tex.stackexchange.com/questions/683369
0
``` \documentclass[10pt, a4paper]{article} \usepackage{lipsum} \usepackage{enumitem} \setlist{topsep=1cm} \begin{document} \lipsum[66] \begin{itemize} \item[\textbf{(P1)}:] \end{itemize} \end{document} ``` The enumitem setting makes the item lose its indentation. Why? I tried this with no success: ``` \documentclass[10pt, a4paper]{article} \usepackage{lipsum} \usepackage{enumitem} \setlist{topsep=1cm} \setlist{labelindent=\parindent, leftmargin=*} \begin{document} \lipsum[66] \begin{itemize} \item[\textbf{(P1)}:] \end{itemize} \end{document} ```
https://tex.stackexchange.com/users/213255
Enumitem identation issue
false
The problem you're having has nothing do do with `enumitem` and everything to with the fact that you're trying to fit a large label into a small space, so the label appears to change the indent but in reality it is simply expanding to the right. Presumably you expected the label to start left aligned at the indentation but that's not how list labels are usually set. Here's your minimal example without loading `enumitem` and you can see that the effect is identical: ``` \documentclass[10pt, a4paper]{article} \usepackage{lipsum} \begin{document} \lipsum[66] \begin{itemize} \item some text \item[\textbf{(P1)}:] Some text \item Some text \end{itemize} \end{document} ``` So the solution to your problem (which is easily solved by using `enumitem`) is to adjust the margins of the list appropriately so that you have enough room for the larger label text *and* you have an indent of the items. This requires changing both the `leftmargin` and the `labelindent` parameters. Additionally, since you are misusing the `itemize` list to form what looks like a numbered list, you should really format the label of the list using `enumerate` instead of `itemize`. And in general, it's almost always a bad idea to supply an explicit label to a list item, and you should avoid doing it wherever possible. ``` \documentclass[10pt, a4paper]{article} \usepackage{lipsum} \usepackage{enumitem} \begin{document} \lipsum[66] \begin{enumerate}[label={\bfseries (P\arabic*):},leftmargin=3\parindent,labelindent=1.5\parindent] \item some text \item \lipsum[66] \end{enumerate} \end{document} ```
4
https://tex.stackexchange.com/users/2693
683432
317,087
https://tex.stackexchange.com/questions/683438
0
``` \documentclass{article} \usepackage[OT1,OT2]{fontenc} \begin{document} Neki tekst na Srpskom (NAME) \end{document} ``` I am writing a document that is in Cyrillic and I need to write an English name at some point. How do I do this?
https://tex.stackexchange.com/users/288171
How do I put latin text in a Cyrillic document?
true
You do nothing special. ``` \documentclass{article} \usepackage[T2A]{fontenc} \usepackage[ukrainian]{babel} \begin{document} Цей текст українською мовою. Англійське ім'я John. \end{document} ``` (Text courtesy of Google Translate.) If you use the obsolete method of OT2, ``` \documentclass{article} \usepackage[OT2,OT1]{fontenc} % use Type1 fonts \AtBeginDocument{\fontencoding{OT2}\selectfont} \DeclareFontFamilySubstitution{OT2}{cmr}{wncyr} %%% \newcommand{\latin}[1]{{\fontencoding{OT1}\selectfont#1}} \begin{document} Neki tekst na Srpskom (\latin{NAME}) \end{document} ```
1
https://tex.stackexchange.com/users/4427
683439
317,089
https://tex.stackexchange.com/questions/683441
3
In this [answer](https://tex.stackexchange.com/a/126115/290450), u/Qrrbrbirlbel has written a wonderful code for a command that makes long exact sequences simply by taking what are the entries. To understand and get a feel for its objective, I suggest visiting the answer once; but to put it simply, the objective was to make a command `\longexactsequence{-,-,...,-}` that made a long sequence with the objects in the order separated by commas. I modified the code presented to make it a bit more flexible (the zeros at the start and end were a bit restrictive): ``` \usepackage{extarrows,pgffor} \newcommand*{\longexactsequence}[2]{% \foreach \superscript/\entry in {#1} {% \entry \xlongrightarrow{\ifx\superscript\entry\else\superscript\fi}% } #2% } ``` This code works exactly the same way the previous one did, except that to write a long sequence that connects A,B,C,D,E, you use: ``` \longexact{A,B,C,D}{E} ``` This works wonderfully; it has all the functions the earlier code had (in particular naming functions). But one can see where it falls from being perfect: you have to write the last object in the sequence in a separate bracket. I would highly appreciate some help with fixing this bit; is there a way to make the command such that you only need one parentheses, without losing all the accessibility (particularly, the arrow labelling) the command already has? I believe something could be done if there was a way to identify the last entry in the input. I would prefer an answer that does not create a new bit of code, but rather modifies the code already polished and presented, but any answer is welcome!
https://tex.stackexchange.com/users/290450
Simplify a command for long exact sequences
true
If you don't need to label the arrows: ``` \documentclass{article} \usepackage{amsmath,extarrows} \ExplSyntaxOn \NewDocumentCommand{\longexactsequence}{m} { \clist_use:nn { #1 } { \xlongrightarrow{} } } \ExplSyntaxOff \begin{document} \[ \longexactsequence{A,B,C,D,E} \] \end{document} ``` For (possibly) labeled arrows, I suggest a different syntax: ``` \documentclass{article} \usepackage{amsmath,extarrows} \ExplSyntaxOn \NewDocumentCommand{\longexactsequence}{m} { \pceltide_les:n { #1 } } \seq_new:N \l_pceltide_les_items_seq \cs_new_protected:Nn \pceltide_les:n { \seq_set_split:Nnn \l_pceltide_les_items_seq { - } { #1 } \seq_indexed_map_function:NN \l_pceltide_les_items_seq \__pceltide_les_item:nn } \cs_new_protected:Nn \__pceltide_les_item:nn { \int_if_odd:nTF { #1 } { #2 } { \xlongrightarrow{#2} } } \ExplSyntaxOff \begin{document} \[ \longexactsequence{A -f- B -- C -g- D -- E} \] \end{document} ``` If you're tied to something like ``` \longexactsequence{A/f,B,C/g,D,E} ``` then it's a bit more complicated. ``` \documentclass{article} \usepackage{amsmath,extarrows} \ExplSyntaxOn \NewDocumentCommand{\longexactsequence}{m} { \pceltide_les:n { #1 } } \seq_new:N \l_pceltide_les_items_seq \seq_new:N \l__pceltide_les_term_seq \tl_new:N \l__pceltide_les_last_tl \cs_new_protected:Nn \pceltide_les:n { \seq_set_from_clist:Nn \l_pceltide_les_items_seq { #1 } \seq_pop_right:NN \l_pceltide_les_items_seq \l__pceltide_les_last_tl \seq_map_function:NN \l_pceltide_les_items_seq \__pceltide_les_item:n \tl_use:N \l__pceltide_les_last_tl } \cs_new_protected:Nn \__pceltide_les_item:n { \seq_set_split:Nnn \l__pceltide_les_term_seq { / } { #1 } \seq_item:Nn \l__pceltide_les_term_seq { 1 } \xlongrightarrow { \seq_item:Nn \l__pceltide_les_term_seq { 2 } } } \ExplSyntaxOff \begin{document} \[ \longexactsequence{A/f,B,C/g,D,E} \] \end{document} ```
7
https://tex.stackexchange.com/users/4427
683442
317,090
https://tex.stackexchange.com/questions/683445
0
The package `infwarerr` is included in quite a few packages (by means of `\RequirePackage{infwarerr}`and most of the times an option with a date) and it results (once) in the line: ``` Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) ``` I would like to suppress this message, is this possible? I found the question [Filtering with silence](https://tex.stackexchange.com/a/398856/44119) but this did not have the desired effect.
https://tex.stackexchange.com/users/44119
Suppress providing message of package
true
If you *really* want this you can load the package first with the message disabled, so it will not reload when called from packages. ``` \makeatletter \let\@@protected@wlog\protected@wlog \def\protected@wlog#1{\wlog{package info suppressed}} \RequirePackage{infwarerr} \let\protected@wlog\@@protected@wlog \makeatother \documentclass{article} \usepackage{hyperref} \begin{document} \end{document} ``` has log entries ``` (/usr/local/texlive/2023/texmf-dist/tex/generic/infwarerr/infwarerr.sty package info suppressed ) ``` ... ``` (/usr/local/texlive/2023/texmf-dist/tex/latex/hyperref/hyperref.sty Package: hyperref 2023-02-07 v7.00v Hypertext links for LaTeX (/usr/local/texlive/2023/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO) ) ``` showing just the one package is affected
2
https://tex.stackexchange.com/users/1090
683451
317,092
https://tex.stackexchange.com/questions/683422
0
In part of a text I want to use `\(\textcircled{r}\)` for *or* in the metalanguage, much as `\(\&\)` is used for *conjunction* in the metalanguage. I do not want to use `\(\textregistered\)` or `\(\faRegistered\)`, as that could come across as dishonest. The problem is that the encircled *r* is unstable, so that it does not always occur in the center of the circle. Is there a way to ensure stability?
https://tex.stackexchange.com/users/24406
Stable \(\textcircled{r}\}?
true
I guess you want to use it in math mode. ``` \documentclass{article} \usepackage{amsmath} \DeclareRobustCommand{\metaand}{\mathbin{\&}} \DeclareRobustCommand{\metaor}{\mathbin{\text{\textcircled{r}}}} \begin{document} $A\metaor B^{C\metaor D^{E\metaor F}}$ $A\metaand B$ \end{document} ``` Yes, the circle becomes oval in superscripts or subscripts. If you don't use it there, just ignore the issue. Otherwise you want to scale down the text style symbol. ``` \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \DeclareRobustCommand{\metaand}{\mathbin{\&}} \makeatletter \DeclareRobustCommand{\metaor}{\mathbin{\metaor@}} \newcommand{\metaor@}{% \mathchoice{\metaor@@{\f@size}}{\metaor@@{\f@size}} {\metaor@@{\sf@size}}{\metaor@@{\ssf@size}}% } \newcommand{\metaor@@}[1]{\scalebox{\fpeval{(#1)/(\f@size)}}{\textcircled{r}}} \makeatother \begin{document} $A\metaor B^{C\metaor D^{E\metaor F}}$ $A\metaand B$ \end{document} ```
5
https://tex.stackexchange.com/users/4427
683452
317,093
https://tex.stackexchange.com/questions/675354
0
I'm uploading the final version on edas, but the IEEE pdf express notices the error that notcertified: Upload failed: The PDF file has not been certified by PDF eXpress; created by TeX instead. How could I modify the latex file to meet the requirements?
https://tex.stackexchange.com/users/290272
notcertified: Upload failed: The PDF file has not been certified by PDF eXpress; created by TeX instead
false
Upload the paper to IEEE PDF Express: <https://ieee-pdf-express.org/> The website will generate a verified version of your PDF that you can now upload to IEEE.
0
https://tex.stackexchange.com/users/198960
683458
317,096
https://tex.stackexchange.com/questions/683437
0
I'm trying to pass variables to a tex template to generate a PDF with those values via pandoc. This is my template: ``` \documentclass[15pt]{article} \usepackage{sectsty} % Margins \topmargin=-0.45in \evensidemargin=0in \oddsidemargin=0in \textwidth=6.5in \textheight=9.0in \headsep=0.25in \newcommand{\Ticket}{} \newcommand{\Autor}{} \newcommand{\Erstelldatum}{} \title{Ticket: \Ticket} \author{Erstellt von: \Autor} \date{Erstellt am: \Erstelldatum} \begin{document} \maketitle \end{document} ``` I've tried running these commands but somehow the variables are remaining empty: ``` pandoc.exe -o test.pdf -s template.tex --variable Ticket=12345 pandoc.exe -o test.pdf -s template.tex --variable=Ticket=12345 pandoc.exe -o test.pdf -s template.tex --variable=Ticket:12345 ```
https://tex.stackexchange.com/users/295426
Pandoc CMD call tex template and pass variables
false
As @dexteritas already pointed out: Template variables are enclosed in `$`. This is documented in the [manual](https://pandoc.org/MANUAL.html#template-syntax). Also you need to load the template with the option `--template=` and you must make sure that you load all the packages `pandoc` actually needs. It is best to get the default template with `pandoc -D latex` and modify it. Let's call your file `template.latex`: ``` \documentclass[15pt]{article} \usepackage{sectsty} % Margins \topmargin=-0.45in \evensidemargin=0in \oddsidemargin=0in \textwidth=6.5in \textheight=9.0in \headsep=0.25in \title{Ticket: $Ticket$} \author{Erstellt von: $Autor$} \date{Erstellt am: $Erstelldatum$} \begin{document} \maketitle \end{document} ``` Then call pandoc: ``` pandoc --template=template.latex \ -V Ticket=12345 \ -V Autor="Vorname Nachname" \ -V Erstelldatum=2023-04-20 --in test.md --out test.pdf ```
1
https://tex.stackexchange.com/users/29873
683459
317,097
https://tex.stackexchange.com/questions/683369
0
``` \documentclass[10pt, a4paper]{article} \usepackage{lipsum} \usepackage{enumitem} \setlist{topsep=1cm} \begin{document} \lipsum[66] \begin{itemize} \item[\textbf{(P1)}:] \end{itemize} \end{document} ``` The enumitem setting makes the item lose its indentation. Why? I tried this with no success: ``` \documentclass[10pt, a4paper]{article} \usepackage{lipsum} \usepackage{enumitem} \setlist{topsep=1cm} \setlist{labelindent=\parindent, leftmargin=*} \begin{document} \lipsum[66] \begin{itemize} \item[\textbf{(P1)}:] \end{itemize} \end{document} ```
https://tex.stackexchange.com/users/213255
Enumitem identation issue
true
After your inputs and further investigations I managed to get what I wanted with the following code (option `wide` was the key to the desired indentation): ``` \documentclass[10pt, a4paper]{article} \usepackage[french]{babel} \frenchsetup{StandardLayout=true} \usepackage{lipsum} \usepackage{enumitem} \setlist{topsep=1cm, wide, itemsep=0pt, leftmargin=3\parindent, rightmargin=3\parindent} \begin{document} \lipsum[66] \begin{enumerate}[label={\bfseries (P\arabic*)}:] \item \item \item \end{enumerate} \lipsum[66] \end{document} ```
0
https://tex.stackexchange.com/users/213255
683465
317,100
https://tex.stackexchange.com/questions/683441
3
In this [answer](https://tex.stackexchange.com/a/126115/290450), u/Qrrbrbirlbel has written a wonderful code for a command that makes long exact sequences simply by taking what are the entries. To understand and get a feel for its objective, I suggest visiting the answer once; but to put it simply, the objective was to make a command `\longexactsequence{-,-,...,-}` that made a long sequence with the objects in the order separated by commas. I modified the code presented to make it a bit more flexible (the zeros at the start and end were a bit restrictive): ``` \usepackage{extarrows,pgffor} \newcommand*{\longexactsequence}[2]{% \foreach \superscript/\entry in {#1} {% \entry \xlongrightarrow{\ifx\superscript\entry\else\superscript\fi}% } #2% } ``` This code works exactly the same way the previous one did, except that to write a long sequence that connects A,B,C,D,E, you use: ``` \longexact{A,B,C,D}{E} ``` This works wonderfully; it has all the functions the earlier code had (in particular naming functions). But one can see where it falls from being perfect: you have to write the last object in the sequence in a separate bracket. I would highly appreciate some help with fixing this bit; is there a way to make the command such that you only need one parentheses, without losing all the accessibility (particularly, the arrow labelling) the command already has? I believe something could be done if there was a way to identify the last entry in the input. I would prefer an answer that does not create a new bit of code, but rather modifies the code already polished and presented, but any answer is welcome!
https://tex.stackexchange.com/users/290450
Simplify a command for long exact sequences
false
What we can do without expl3 and using only TeX primitives and basic plain TeX macros: ``` \def\longexactsequence #1{\lexseA #1 --\end} \def\lexseA #1{#1\lexseB} \def\lexseB #1-#2-#3{\ifx#3\end\else \buildrel#2\over\longrightarrow #3\expandafter\lexseB\fi} $$ \longexactsequence{A -f- B -- C -g- D -- E} $$ ``` Note: it works in LaTeX too.
10
https://tex.stackexchange.com/users/51799
683469
317,101
https://tex.stackexchange.com/questions/683257
0
I was given a project to build a thesis document which has a `cover.tex` and a `main.tex`. The `cover.tex` generates the necessary covers to comply with the institution's style. The `main.tex` file imports the pages from `cover.tex` with `\includepdf[pages=-]{cover.pdf}`. Is there a way, using `latexmk` (which I'm already using for `makeglossaries`), to generate the cover PDF automatically when building the main document?
https://tex.stackexchange.com/users/295290
Depend on the "compilation" of another file with latexmk
false
Just define a custom dependency to invoke latexmk to make a .pdf file (such as cover.pdf) from the corresponding .tex file: ``` add_cus_dep( 'tex', 'pdf', 0, 'makeexternaldocument' ); sub makeexternaldocument { my ($base_name, $path) = fileparse( $_[0] ); return system "latexmk", "-output-directory=$path", $_[0]; } ``` The only complication here was to ensure that latexmk puts the generated .pdf file is in the same directory as the .tex file, as required by the definition of a custom dependency.
2
https://tex.stackexchange.com/users/8495
683470
317,102
https://tex.stackexchange.com/questions/683449
0
The mwe below contains a wonderful (for me) defined style that creates a coordinate plane for my students use in graphing systems of equations. @JasperHabicht created this code to avoid having to repeatedly copy/paste the original style code lines. ``` \pgfplotsset{ my axis format/.style={ axis lines=middle, axis line style={ -stealth, shorten >=-3mm }, ``` Please assist this tex novice with the proper code to call this style for successive math problems created by `\task` in a 2 column worksheet format. Many thanks for taking time to respond! mwe: ``` \usepackage{pgfplots} \pgfplotsset{compat=1.18} \pgfplotsset{ my axis format/.style={ axis lines=middle, axis line style={ -stealth, shorten >=-3mm }, axis equal, xmin=-8, xmax=8, ymin=-8, ymax=8, width=10cm, height=10cm, xlabel=$x$, ylabel=$y$, grid=both, grid style={ draw=gray!25 }, xtick={-10,-9,...,10}, xtick style={ yshift=-0.5ex, }, xticklabel style={ font=\scriptsize\color{blue} }, ytick={-10,-9,...,10}, ytick style={ xshift=-0.5ex }, yticklabel style={ font=\scriptsize\color{blue} }, } } \begin{document} \begin{tikzpicture} \begin{axis}[ my axis format ] \end{axis} \end{tikzpicture} \end{document} ``` ```
https://tex.stackexchange.com/users/184615
Pgfplots: Calling a defined style to create repeat instances of coordinate plane
true
In cases, when in document are number of `pgfplots` diagrams whit the same settings of `axis˛environments, you can merge this settings in one, common style, for example (taken from my answer on your [previous question](https://tex.stackexchange.com/questions/683292/pgfplots-need-to-force-left-two-coordinate-planes-to-avoid-right-hand-bleed)): ``` \pgfplotsset{GRID/.style = { % define common style for images width=100mm, axis lines=middle, axis line style={-stealth,shorten >=-3mm}, xlabel=$x$, xlabel style={anchor=south west}, ylabel=$y$, ylabel style={anchor=south east}, grid=both, grid style={draw=gray!25}, ticklabel style={font=\scriptsize, text=black!50, inner sep=1pt}, xmin=-10, xmax=10, ymin=-10, ymax=10, xtick distance=2, ytick distance=2, minor tick num=1, tick align=outside, }} ``` and then in document use as ``` \begin{tikzpicture} \begin{axis}[GRID] \end{axis} \end{tikzpicture} ``` Of course you can style name "GRID" change to whatever you like to have and what has more meaning to you. In cases when all diagrams have the same `axis` style, then you not need top name axis style, sufficient is to add definition to `\pgfplotsset`: ``` \pgfplotsset{compat=1.18, width=100mm, axis lines=middle, axis line style={-stealth,shorten >=-3mm}, xlabel=$x$, xlabel style={anchor=south west}, ylabel=$y$, ylabel style={anchor=south east}, grid=both, grid style={draw=gray!25}, ticklabel style={font=\scriptsize, text=black!50, inner sep=1pt}, xmin=-10, xmax=10, ymin=-10, ymax=10, xtick distance=2, ytick distance=2, minor tick num=1, tick align=outside, } ``` and then in document use as ``` \begin{tikzpicture} \begin{axis} \end{axis} \end{tikzpicture} ``` This common settings you still can locally partly change or extend with new options, which you write into axis options. For example: ``` \begin{tikzpicture} \begin{axis}[GRID, every axis plot post/.append style={very thick} % if this diagran should have `very thick` function curve/line. ] \end{axis} \end{tikzpicture} ```
2
https://tex.stackexchange.com/users/18189
683473
317,104
https://tex.stackexchange.com/questions/683472
2
I have a very large figure that consists of 8 smaller figures. I'm not using the subfigure package as I think for my needs it's easier to create the big figure in another program (GraphPad Prism). The problem is that the figure is as big as a page, and I cannot make it smaller as it would decrease readability. I have forced the position of the figure on a new page with [H], if I don't do this the figure is moved to the end of my document. The caption of the figure now dissappears, I suspect because it's too big. Ideally, I'd want the caption to appear on the next page. Is this possible? The code for the figure looks like this: ``` \newpage \begin{figure}[H] \begin{adjustbox}{varwidth=\textwidth, fbox, left} \centering \includegraphics{Figures/Layout LDH CV 10k Fibro 3 days XY last two.png} \end{adjustbox} \caption{Relative LDH release (absorbance at 490nm / max LDH release) and Crystal Violet (CV) staining (absorbance at 550nm) were measured for primary fibroblasts cultured in growth medium supplemented with either (A, B) 1 g/L glucose (Control), (C, D) no glucose or galactose (No Glu), (E, F) 0.25 g/L glucose (Low Glu), (G, H) 4.5 g/L glucose (High Glu), or (I, J) 1 g/L (5.55 mM) galactose (Gal). The negative control is shown with a dashed line in the CV assays (0.0725). Data is shown as $mean \pm SD, n=3$ for each substrate} \label{fig:XY LDH CV 10k fibro 3 days substrates last two} \end{figure} ```
https://tex.stackexchange.com/users/294089
Figure is as big as a page, and caption dissappears
false
One option is split image in two parts and than use macro `\ContinuedFloat`:. For example: ``` \documentclass{article} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %---------------------------------------------------------------% \usepackage{graphicx} \usepackage{caption} \usepackage{lipsum} \begin{document} \lipsum[11] \begin{figure}[!b] \includegraphics[width=\textwidth, height=0.6\textheight]{example-image-a}%{Figures/Layout LDH CV 10k Fibro 3 days XY last two.png} \caption{Relative LDH release (absorbance at 490nm / max LDH release) and Crystal Violet (CV) staining (absorbance at 550nm) were measured for primary fibroblasts cultured in growth medium supplemented with either (A, B) 1 g/L glucose (Control), (C, D) no glucose or galactose (No Glu), (E, F) 0.25 g/L glucose (Low Glu), (G, H) 4.5 g/L glucose (High Glu), or (I, J) 1 g/L (5.55 mM) galactose (Gal). The negative control is shown with a dashed line in the CV assays (0.0725). Data is shown as $mean \pm SD, n=3$ for each substrate. (\emph{Continued on the next page})} \label{fig:XY LDH CV 10k fibro 3 days substrates last two} \end{figure} \begin{figure}[!t] \ContinuedFloat \includegraphics[width=\textwidth, height=0.6\textheight]{example-image-b}%{Figures/Layout LDH CV 10k Fibro 3 days XY last two.png} \caption{Continued from previous page} \end{figure} \lipsum[2] \end{document} ``` (red lines indicate pages layout. In real document remove code lines, which produce them!) Of course, you can at second part of figure repeat complete caption text.
1
https://tex.stackexchange.com/users/18189
683475
317,105
https://tex.stackexchange.com/questions/683474
0
I am drawing Lewis diagrams and need a little more space between the atoms, electrons, and charges. I cannot find anything that adds more separation between the atoms and \charge. Anyone know how I can do this? ``` \documentclass[a4paper]{article} \usepackage{chemfig} \begin{document} \noindent \chemfig{\charge{90=\:,180=\:,270=\:}{A}-\charge{90=\:,0=\:,270=\:}{B}^{-1}} \end{document} ```
https://tex.stackexchange.com/users/260299
Add separation between atoms and charges in Chemfig
true
``` \documentclass[a4paper]{article} \usepackage{chemfig} \begin{document} \setcharge{extra sep = 4pt} \chemfig{\charge{90=\:,180=\:,270=\:}{A}-\charge{90=\:,0=\:,270=\:, 25:6pt=$-1$}{B}} \end{document} ```
1
https://tex.stackexchange.com/users/186244
683477
317,106
https://tex.stackexchange.com/questions/683474
0
I am drawing Lewis diagrams and need a little more space between the atoms, electrons, and charges. I cannot find anything that adds more separation between the atoms and \charge. Anyone know how I can do this? ``` \documentclass[a4paper]{article} \usepackage{chemfig} \begin{document} \noindent \chemfig{\charge{90=\:,180=\:,270=\:}{A}-\charge{90=\:,0=\:,270=\:}{B}^{-1}} \end{document} ```
https://tex.stackexchange.com/users/260299
Add separation between atoms and charges in Chemfig
false
you can use the \charge command for this, adding as much space as you like,placing the sign in the position you want. ``` \documentclass[a4paper]{article} \usepackage{chemfig} \begin{document} \noindent \chemfig{\charge{90=\:,180=\:,270=\:}{A}-\charge{90=\:,0=\:,270=\:,30:5pt=$-$}{B}} \end{document} ```
1
https://tex.stackexchange.com/users/134993
683483
317,109
https://tex.stackexchange.com/questions/683203
1
I'm typesetting a book with two flows of text. Text 1 is regular text. Text 2 I would like it to flow through defined frames at the bottom of the page, all of the same width but of variable height. I know how to do this with the FLOWFRAM package using static frames. I could also do it in other ways. But I do not want to manually break my text. I would like the text to flow through the frames (dynamic frames) at the bottom of the page, while another text flow on the top. This is easy to obtain with indesign obviously. Is there a way to do it in Latex? Please see my MWE. I can make a text flow in the bottom frames, but how can I make another text flow in the top part of the page? ``` \documentclass[a5paper]{book} \usepackage{lipsum} \usepackage{flowfram} \newflowframe [1-2] {\textwidth} {7cm} {0\textwidth} {0\textheight} [Frame1] \newflowframe [3-5] {\textwidth} {3cm} {0\textwidth} {0\textheight} [Frame2] \newflowframe [6-7] {\textwidth} {5cm} {0\textwidth} {0\textheight} [Frame3] \begin{document} \lipsum{1} \end{document} ```
https://tex.stackexchange.com/users/254618
Text flowing through frames
false
One solution could be have each text in a separate pdf where earch frame should be a whole page, and use the pages of that files as images mixed in the final document in any order. In the MWE, these images are framed with `\fbox` to show the exact dimensions of each page. If this imagesmust be included in a regular order (A1 and B1 in page 1, A2 and B2 in page 2, etc.) with a loop you can mix even large texts with a few lines of code. The MWE show that with a reddish `\lipsum[1-10]` (fake dummy Latin) from a pdf of 5 pages (a6paper in landscape) is printed at five top frames and another similar pdf with a blue `\kant[1-7]` (non sense English text in Kantian style) is printed as bottom frames. Depending of your exact goal, you may want also crop every each source pdf page with `pdfcrop` to avoid original margins and vertical top or bottom gaps. Then each page will have random heights and even different widths (The MWE show that 9th frame is clearly smaller , because all pages have been cropped). Note that using cropped images with size relatives to the text layout could produce unexpected inconsistencies of font sizes (not in this MWE, however). MWE: `lipsum.tex` source (Use it to make also `kant.tex` after modify the dummy text and color accordingly): ``` \documentclass[a6paper,landscape]{article} \usepackage{lipsum,kantlipsum,xcolor} \usepackage[margin=1cm]{geometry} \pagestyle{empty} \begin{document} \color{red!30!black} \section{Lipsum} \lipsum[1-10] %\kant[1-7] \end{document} ``` `lipsum-crop.pdf` and `kant-crop.pdf`: ``` pdfcrop lipsum.pdf pdfcrop kant.pdf ``` main document: ``` \documentclass{article} \usepackage{graphicx} \usepackage[margin=2cm]{geometry} \usepackage{ifthen} \begin{document} \whiledo{\value{page}<6}{% \fbox{\includegraphics[page=\thepage, height=.45\textheight,width=\linewidth,keepaspectratio]{lipsum-crop.pdf}}\par \vspace{\fill} \fbox{\includegraphics[page=\thepage, height=.45\textheight,width=\linewidth,keepaspectratio]{kant-crop.pdf}} \newpage}% \end{document} ```
1
https://tex.stackexchange.com/users/11604
683485
317,111