# How to align frame title of mdframed on custom place?

mdframed has an option of frametitlealignment, but the manual does not list possible values. I wonder if it accepts values other than left, right and center (apart from derivatives like raggedleft).

Is it possible to place the title in a custom place (e.g. 30% from left)?

If not, how to set padding (margin) for the title? I simply moved the title by

frametitle=\hspace{1em}Title

but the problem is that I use the title in the page header, and do not want this hspace there.

EDIT: MWE for clarification of the problem.

\documentclass{article}

\usepackage{mdframed}
\usepackage{lipsum}
\makeatletter
\mdfdefinestyle{example}{settings={\@mkboth{\mdf@frametitle}{\mdf@frametitle}}}
\makeatother
\begin{document}

\begin{mdframed}[style=example,frametitle=\hspace*{0.30\linewidth}Some Title 1]
\lipsum[1]
\end{mdframed}
\end{document}

As can be seen, by adding \hspace to the frametitle, not only the frame title shifts, but also the page header will do. I need to customize the position of frame title, but not the page header.

In fact, I cannot alter frametitle, as its value is exactly used in the page header. I need to align the frame title with frametitlealignment.

-

You can use frametitlealignment={\hspace*{0.30\linewidth}} to position the text to 30% the \linewidth:

\documentclass{article}

\usepackage{mdframed}
\usepackage{lipsum}
\makeatletter
\mdfdefinestyle{example}{settings={\@mkboth{\mdf@frametitle}{\mdf@frametitle}}}
\makeatother
\begin{document}

\begin{mdframed}[style=example,frametitle=Some Title 1,
frametitlealignment={\hspace*{0.30\linewidth}}]
\lipsum[1]
\end{mdframed}
\end{document}
-
As I described, I use the frame title in the page header, I do not need this margin on my page header. If altering the content of frametitle={} it will be exactly displayed on the page header too. –  All Jun 5 '12 at 15:37
Can you compose a MWE that shows the problem with this. –  Peter Grill Jun 5 '12 at 15:40
I added a MWE to clarify the problem. –  All Jun 5 '12 at 15:54
@Ali: Ok, have updated to use frametitlealignment. –  Peter Grill Jun 5 '12 at 16:03
@Ali: Well, don't feel bad, neither did I. I just guessed correctly. –  Peter Grill Jun 5 '12 at 16:16