1

all my struktograms in struktex have an unwanted indent/margin at the left. I don't know why - can U help me out?

I experienced with some options: outer, parskip - nothing helps.

MWE:

\documentclass[12pt, border=2pt]{standalone} \usepackage[outer]{struktex} \usepackage{parskip} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \begin{document}% \setlength{\parindent}{0pt} \sffamily% \begin{struktogramm}(170,42)% \assign{Drücke im Viewsonic-Homescreen auf die Uhrzeit} \ifthenelse{5}{5}{Steht unter 'vom Netzwerk bereitgestellte Zeit' schon die richtige Uhrzeit?}{ja}{nein} \assign[20]{Stelle Zeitzone auf 'GMT$+$0'} \change \assign[20]{Stelle Zeitzone entsprechend ein, GMT$-$1 oder GMT$+$1} \ifend \end{struktogramm} \end{document} 

You can see the left margin...

2
  • with \hspace*{-7mm} i get rid of that space but that is odd a bit Commented Nov 7, 2024 at 9:48
  • 2
    One workaround is to append optional varwidth with large width, e.g. 20cm. The whole content of document will then be wrapped by varwidth environment. See documentation of standalone and varwidth for more info. Commented Nov 7, 2024 at 11:31

1 Answer 1

2

The problem is in struktex.sty which has

\def\struktogramm@NoProof(#1,#2)[#3]{% \def\next{#3} \setlength{\savelength@nss}{\unitlength} \setlength{\unitlength}{0.001mm} \begin{minipage}[\Position@nss]{#1mm} \ifx\next\empty\else #3\\[\smallskipamount]\fi% \begin{picture}(#1000,#2000)% \str@kt{0}{#2000}{#1000}% } 

and this inserts three unwanted space tokens.

File a bug report. The correct code should be

\def\struktogramm@NoProof(#1,#2)[#3]{% \def\next{#3}% \setlength{\savelength@nss}{\unitlength}% \setlength{\unitlength}{0.001mm}% \begin{minipage}[\Position@nss]{#1mm} \ifx\next\empty\else #3\\[\smallskipamount]\fi \begin{picture}(#1000,#2000) \str@kt{0}{#2000}{#1000} } 

You can see the differences: I added three % characters (and removed three that do nothing, but were actually harmless).

What happens is that if you use struktogramm in a normal document, you probably will have it between paragraphs, so those spaces aren't significant. But standalone typesets its input inside \mbox and now those spaces become signifiicant.

Workaround:

\documentclass[12pt, border=2pt,varwidth=1000pt]{standalone} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage[outer]{struktex} \begin{document} \sffamily \begin{struktogramm}(170,42) \assign{Drücke im Viewsonic-Homescreen auf die Uhrzeit} \ifthenelse{5}{5}{Steht unter 'vom Netzwerk bereitgestellte Zeit' schon die richtige Uhrzeit?}{ja}{nein} \assign[20]{Stelle Zeitzone auf 'GMT$+$0'} \change \assign[20]{Stelle Zeitzone entsprechend ein, GMT$-$1 oder GMT$+$1} \ifend \end{struktogramm} \end{document} 

In any case using parskip and setting \parindent should be avoided in standalone.

3
  • thanks to all responders! i accepted this answer cause this delivers a root cause a solution and a workaround. THANK YOU! Commented Nov 10, 2024 at 16:59
  • I've sent an email to the maintainer of struktex and mentioned you, egreg. Commented Nov 10, 2024 at 17:33
  • @texpiet You did well. Commented Nov 10, 2024 at 20:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.