0

I understand that this answer : https://tex.stackexchange.com/a/11880, is quite comprehensive and brilliant in its own right

but i want to export a .tex file as an image from Overleaf

is there any possibility to achieve that ? preferable with the standalone LaTeX bundle

Here's the MWE i want to extract;

\documentclass[journal]{article}

\usepackage{msc}
% \usepackage{showframe}

\begin{document}

\makebox{\textwidth}
{
\setlength{\instdist}{2.25cm}
\setlength{\envinstdist}{1.07\envinstdist}
\begin{msc}{lul}
\declinst{d1}{L}{L\textsubscript{d1}}
\declinst{pi}{lul}{pi}\declinst{d2}{LL}{LL\textsubscript{d2}}
\mess{1. lol $\rightarrow \textbf{LUL} $}{d1}{pi}
\nextlevel[2]\mess{2. lul $\rightarrow \textbf{lol} $}{pi}{d2}
\end{msc}
}
\end{document}
2
  • Don't use \makebox{\textwidth}{...} with standalone.
    – imnothere
    Dec 9, 2022 at 1:44
  • @imnothere ok , what should i use then ? i am trying to keep the image centered Dec 9, 2022 at 4:10

1 Answer 1

1

There is no need to (and you shouldn't) use \makebox{\textwidth}{...} with standalone:

\documentclass[preview]{standalone}
\usepackage{msc}

\begin{document}

\setlength{\instdist}{2.25cm}
\setlength{\envinstdist}{1.07\envinstdist}
\begin{msc}{lul}
\declinst{d1}{L}{L\textsubscript{d1}}
\declinst{pi}{lul}{pi}\declinst{d2}{LL}{LL\textsubscript{d2}}
\mess{1. lol $\rightarrow \textbf{LUL} $}{d1}{pi}
\nextlevel[2]\mess{2. lul $\rightarrow \textbf{lol} $}{pi}{d2}
\end{msc}

\end{document}

example output of code

1
  • what if the drawn figure is quite wide ? the figure i want to draw is quite large and if i use your suggested code, it keeps going out of bounds .. Dec 9, 2022 at 20:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .