梅威瑟:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage[margin=3cm]{geometry}
\begin{document}
\paragraph*{Problem 1}
This problem can be modelled as a clamped-free cantilever with a point load at the end. Thus, the following boundary conditions can be assigned:
\begin{alignat}{2}
\underline{\emph{Clamped end:}}& &\underline{\emph{Free end:}}&\nonumber \\
w(0) &= 0\quad\textnormal{(no deflection)}\quad\quad\quad & w''(L) &= 0\quad\textnormal{(no moment)}\nonumber \\
w'(0) &= 0\quad\textnormal{(no slope)}\quad\quad\quad & w'''(L) &= 0\quad\textnormal{(no shear force)}\nonumber
\end{alignat}
The boundary condition concerning the shear force at $ x=L $ is a matter of taste, since there is a discontinuity in the shear force in this point.
\end{document}
制作这个:
我想要一个类似于 \boxed{} 生产的盒子围绕所述所有边界条件(包括带下划线的文本)。我查看过类似的问题,但它似乎总是针对该特定问题的特殊解决方案 - 最简单的方法是什么?
答案1
这是一个简单的应用empheq
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath,empheq}
\usepackage[margin=3cm]{geometry}
\begin{document}
\paragraph*{Problem 1}
This problem can be modelled as a clamped-free cantilever with a point load at the end. Thus, the following boundary conditions can be assigned:
\begin{empheq}[box=\fbox]{alignat=2}
\underline{\emph{Clamped end:}}& &\underline{\emph{Free end:}}&\nonumber \\
w(0) &= 0\quad\textnormal{(no deflection)}\quad\quad\quad & w''(L) &= 0\quad\textnormal{(no moment)}\nonumber \\
w'(0) &= 0\quad\textnormal{(no slope)}\quad\quad\quad & w'''(L) &= 0\quad\textnormal{(no shear force)}\nonumber
\end{empheq}
The boundary condition concerning the shear force at $ x=L $ is a matter of taste, since there is a discontinuity in the shear force in this point.
\end{document}
答案2
可能的选择是hf-tikz
:
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage[margin=3cm]{geometry}
\usepackage[norndcorners,customcolors]{hf-tikz}
\tikzset{set border color=black,set fill color=white}
\begin{document}
\paragraph*{Problem 1}
This problem can be modelled as a clamped-free cantilever with a point load at the end. Thus, the following boundary conditions can be assigned:
\begin{alignat}{2}\tikzmarkin{a}
\underline{\emph{Clamped end:}}& &\underline{\emph{Free end:}}&\nonumber \\
w(0) &= 0\quad\textnormal{(no deflection)}\quad\quad\quad & w''(L) &= 0\quad\textnormal{(no moment)}\nonumber \\
w'(0) &= 0\quad\textnormal{(no slope)}\quad\quad\quad & w'''(L) &= 0\quad\textnormal{(no shear force)}\nonumber\tikzmarkend{a}
\end{alignat}
The boundary condition concerning the shear force at $ x=L $ is a matter of taste, since there is a discontinuity in the shear force in this point.
\end{document}
结果: