von BennyS » So 21. Mai 2017, 18:01
Hallo zusammen,
ich würde gerne eine Gleichung aus einem Textbuch in Vektorgrafik umwandeln bzw. in Latex einbauen.
Das Ziel ist diese Gleichung
[img]
http://fs5.directupload.net/images/170521/r4yrlb2u.png[\img]
Mein bisheriger Code sieht wie folgt aus:
\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{shapes.geometric,arrows.meta,arrows,matrix,positioning}
\begin{document}
\begin{tikzpicture}[
matrixonlybox/.style = {
draw,
matrix of math nodes,
very thick,
align = center
},
vectorwithparens/.style = {
matrix of math nodes,
outer sep=0pt,
left delimiter=(,
right delimiter=)},%align=center
vectorwithbraces/.style = {
matrix of math nodes,
outer sep=0pt,
columnwidth/.style={minimum width = .25cm},
column 1/.style={columnwidth},
left delimiter=\{,
right delimiter=\}
}]
\node (assignment1) {=};
\matrix [vectorwithbraces,
left = of assignment1 ] (velvector) {
\phantom{O}\\
\widetilde u \\
\phantom{O}\\
};
\matrix[matrixonlybox,
left = of velvector](dampmatrix){
\phantom{O} & \phantom{O} & \phantom{O}\\
\phantom{O} & D & \phantom{O}\\
\phantom{O} & \phantom{O} & \phantom{O}\\
};
\node(left of = dampmatrix,)(plus1){+};
\matrix [vectorwithbraces,
left = of plus1] (accvector) {
\phantom{O}\\
\widetilde u \\
\phantom{O}\\
};
\matrix[matrixonlybox,
left = of accvector](massmatrix){
\phantom{O} & \phantom{O} & \phantom{O}\\
\phantom{O} & M & \phantom{O}\\
\phantom{O} & \phantom{O} & \phantom{O}\\
};
\end{tikzpicture}
\end{document}
Leider klappt das mit der Matrix Positionierung nicht so wie gedacht und ich habe keine Ahnung warum nicht

Darüberhinaus hätte ich gerne die Vektoren ( in {} ) etwas schmaler. Habe aber auch noch nicht herausgefunden wie ich die spaltenbreite verringere
Könnte mir hier jemand bitte helfen?
Grüße
Benny
Hallo zusammen,
ich würde gerne eine Gleichung aus einem Textbuch in Vektorgrafik umwandeln bzw. in Latex einbauen.
Das Ziel ist diese Gleichung
[img]http://fs5.directupload.net/images/170521/r4yrlb2u.png[\img]
Mein bisheriger Code sieht wie folgt aus:
[code]
\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{shapes.geometric,arrows.meta,arrows,matrix,positioning}
\begin{document}
\begin{tikzpicture}[
matrixonlybox/.style = {
draw,
matrix of math nodes,
very thick,
align = center
},
vectorwithparens/.style = {
matrix of math nodes,
outer sep=0pt,
left delimiter=(,
right delimiter=)},%align=center
vectorwithbraces/.style = {
matrix of math nodes,
outer sep=0pt,
columnwidth/.style={minimum width = .25cm},
column 1/.style={columnwidth},
left delimiter=\{,
right delimiter=\}
}]
\node (assignment1) {=};
\matrix [vectorwithbraces,
left = of assignment1 ] (velvector) {
\phantom{O}\\
\widetilde u \\
\phantom{O}\\
};
\matrix[matrixonlybox,
left = of velvector](dampmatrix){
\phantom{O} & \phantom{O} & \phantom{O}\\
\phantom{O} & D & \phantom{O}\\
\phantom{O} & \phantom{O} & \phantom{O}\\
};
\node(left of = dampmatrix,)(plus1){+};
\matrix [vectorwithbraces,
left = of plus1] (accvector) {
\phantom{O}\\
\widetilde u \\
\phantom{O}\\
};
\matrix[matrixonlybox,
left = of accvector](massmatrix){
\phantom{O} & \phantom{O} & \phantom{O}\\
\phantom{O} & M & \phantom{O}\\
\phantom{O} & \phantom{O} & \phantom{O}\\
};
\end{tikzpicture}
\end{document}
[/code]
Leider klappt das mit der Matrix Positionierung nicht so wie gedacht und ich habe keine Ahnung warum nicht :( Darüberhinaus hätte ich gerne die Vektoren ( in {} ) etwas schmaler. Habe aber auch noch nicht herausgefunden wie ich die spaltenbreite verringere :(
Könnte mir hier jemand bitte helfen?
Grüße
Benny