2022 Developer Survey is open! Take survey.

New answers tagged

1 vote

elementary school-like math operation

You say: "Term can be written with siunitx package". It means: it can or may not. I didn't use this package and I did use plain TeX and \halign primitive: \def\unit{g/h} \halign{\llap{#}&...
user avatar
  • 52.3k
0 votes

elementary school-like math operation

I simply used the align* environment. Use & to align at that point. Here is the code: \documentclass{article} \usepackage{mathtools,amssymb} \usepackage{siunitx} \begin{document} \begin{align*}...
user avatar
  • 908
6 votes

elementary school-like math operation

You may use array: \documentclass{article} \usepackage{siunitx,booktabs} \sisetup{per-mode=symbol} \begin{document} \[ \begin{array}{ c % the operation symbol r % the numbers @{\,}% the ...
user avatar
  • 985k
5 votes

How can I draw a box around a picture plus text?

If I understood your question correctly, you are after the following: \documentclass{article} \usepackage{lipsum} \usepackage[skins]{tcolorbox} \tcbset{boxrule=1pt, colframe=red, colback=...
user avatar
  • 251k
3 votes

How can I draw a box around a picture plus text?

This may be what you want: \documentclass{article} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{tcolorbox} \begin{document} \begin{tcolorbox}[standard jigsaw,opacityback=0,colframe=red] \...
user avatar
  • 1,803
0 votes

How do I get "et al." to appear in italics when using \textcite or \citeauthor with biblatex

If you are using biblatex v3.17 (2022-01-25) or above you can use bibstring formatting sets to typeset "et al." in italics. Bibstring formatting sets allow us to apply additional formatting ...
user avatar
  • 158k
1 vote
Accepted

Remove dot from custom defined section title

I have this idea to achieve that. But it end up with shifting the star version section heading down as well (As I labeled in figure with red rectangle). You can always add local titleformat to avoid ...
user avatar
  • 1,803
1 vote
Accepted

How can I use tikz-cd and \mathsurround simultaneously?

Set \mathsurround to zero at each tikz environment. \documentclass{article} \usepackage{tikz} \usepackage{tikz-cd} \setlength{\mathsurround}{30pt} \AtBeginEnvironment{tikzcd}{\setlength{\mathsurround}...
user avatar
  • 985k
2 votes
Accepted

Adding Column Rules in ConTeXt's columnsets / pagecolumns

After a discussion with Hans (and with useful input from Wolfgang), the solution below came out. It works well if columns are not balanced. I did not do the main work, so I prefer not to take the ...
3 votes

Adding Column Rules in ConTeXt's columnsets / pagecolumns

An extension of Wolfgang's answer that uses Lua callbacks to measure the column heights. (Edited to fix a small bug) \doifnot{\contextmark}{LMTX}{ \errmessage{"LMTX/MkXL is required to ...
user avatar
0 votes

How to create code in the preamble to give the same result as a prescribed boxed figure with nested caption and numbering

I'm not sure exactly what you want, because you've changed the colors you use in your code a couple times, and the options for the innerbox and outerbox in your attempts are not the same, but I think ...
user avatar
  • 35.7k
3 votes

Adding Column Rules in ConTeXt's columnsets / pagecolumns

The pagecolumns has support for rules to separate the columns but the code for the rules itself is commented and can't be used. If the code where enabled you could just enable the separator with ...
user avatar
1 vote

Center reaction with chemfig: subscript causes shifting

\documentclass{article} \usepackage{chemfig} \begin{document} \schemestart \chemfig{CH_4} \+ \chemfig{\vphantom{C}-[,.6,,,dotted]M-M-M-[,.6,,,dotted]} \arrow \chemfig{-[,.6,,,dotted]M(-[2]CH_3)-M(-[2]...
user avatar
  • 3,774
0 votes
Accepted

How to create code in the preamble to give the same result as a prescribed boxed figure with nested caption and numbering

Your MWE gives Please explain what is your problem! I will delete this answer after your response.
user avatar
  • 251k
1 vote

LaTex - Table formatting (multicolumn, multirow, parbox)

If you are wiling to use tabularray package, than your table is not difficult to write. Your table example is huge and can not be simple . To insert it in your document, you have the following ...
user avatar
  • 251k
1 vote

LaTex - Table formatting (multicolumn, multirow, parbox)

With complicated tables like this multirow isn't the proper solution. It is beyond its capacity, since it actually counts in lines, not in multi-line table rows. The package tabularray is a much ...
user avatar
0 votes

Fixing vertical subscript offset: one more step

Following @user202729 advice, I have finished my work \documentclass[10pt]{article} \everymath{ \fontdimen15\textfont2=4pt \fontdimen16\textfont2=4pt \fontdimen17\textfont2=4pt } \begin{document}...
user avatar
1 vote

Fixing vertical subscript offset: one more step

You need not do any more. The \fontdimen setting is global. Try to add next $n_P$ in your testing code and you see. Of course, it is better to move this setting to the preamble. But LaTeX sets all ...
user avatar
  • 52.3k
1 vote

How to draw a long table in LATEX My table has 6 columns and footnote If I can get an entire table in one page it will be quite hepflul

As starting point how you should transform your data into LaTeX table. Based on guessing how your data are organized: \documentclass{report} \usepackage{xcolor} \usepackage{tabularray} \UseTblrLibrary{...
user avatar
  • 251k
1 vote

Write some text under physic-chemistry formula

Inspired from this old question Two questions about the stackengine package: you can obtain the same result of \underset. Note that \setstackgap{S}{3pt} it is important to put the text more below (see ...
user avatar
  • 46.2k
7 votes
Accepted

Write some text under physic-chemistry formula

Something like this? \documentclass{article} \usepackage{amsmath} \begin{document} \[ \Delta_\mu G^\phi = \underset{\text{prodotti}}{\sum \nu \Delta_f G^\phi} - \underset{\text{reagenti}}{\sum \nu \...
user avatar
  • 15.4k
2 votes
Accepted

strecthed \wedge

Not sure if this does what you want, but you could use \scalebox to scale \wedge vertically but not horizontally. Of course you can change the scale factors however you want. This is assuming you're ...
user avatar
  • 20.1k
2 votes

Move a few lines to the right of the page in the sheet

I describe the reason why only AAA is at the right margin. The \newline does (roughly speaking) \nobreak\hfil\break. You are using \hfill primitive at the left side. A text follows and then there is \...
user avatar
  • 52.3k
2 votes
Accepted

Move a few lines to the right of the page in the sheet

If all you want to is align text to the right side of the page I would suggest the usage of \raggedleft as follows. {\raggedleft AAA \\ BBB \\ CCC \\ DDD \\ EEE \\ FFF \\ } Please note that I changed ...
user avatar
0 votes

Formatting frontmatter pages

It seems that the text within a doublespacing environment should end with a blank line for it all to work. \documentclass[headsepline,footsepline,footinclude=false,twoside,fontsize=12pt,paper=a4,...
user avatar
  • 25.2k
1 vote
Accepted

Formatting frontmatter pages

Rather than keep repeating \thispagestyle{empty} on each page you that you want without headers and footers, a simpler approach might be to structure your document like this \documentclass[...]{...
user avatar
  • 35.8k
1 vote
Accepted

Customize chapter and section style in appendices

Replace \chaptername by \chapapp and add option numbers=noenddot.¹ Example: \documentclass[numbers=noenddot]{scrbook}% <- changed \usepackage[T1]{fontenc} \usepackage{xcolor} \usepackage{charter} \...
user avatar
  • 81.4k
2 votes

Centering middle line in 2x2 table

With tabularray package and the same approach as is in the second example in the @Mico answer (+1), the table code is a bit shorter: \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[...
user avatar
  • 251k
3 votes
Accepted

Centering middle line in 2x2 table

Here are two equivalents ways of achieving your formatting objective. The first employs the w column type (provided by the array package). The second employs a tabularx environment (provided by the ...
user avatar
  • 435k
0 votes

Beamer spacing inside equation

Is that what You needed? \documentclass{beamer} \usepackage{amsmath, amssymb} \begin{document} \begin{frame} \[ \kappa = \begin{cases} \left \lfloor{...
user avatar
3 votes
Accepted

Tree Diagram with Filesystem Branches

This can be done with forest, but it requires some manual adjustment because of the way the folder style interacts with the standard style. \documentclass{article} \usepackage[edges]{forest} \...
user avatar
  • 20.1k
2 votes

Tree Diagram with Filesystem Branches

your question is not clear, sorry. your other image is simple to draw by use of forest package: \documentclass[border=0.2 cm]{standalone} \usepackage[edges]{forest} \usetikzlibrary{arrows.meta} \...
user avatar
  • 251k

Top 50 recent answers are included