qinglee / wrapstuff

Wrapping text around stuff
https://ctan.org/pkg/wrapstuff
LaTeX Project Public License v1.3c
11 stars 4 forks source link

beamer class #21

Open sicah opened 1 month ago

sicah commented 1 month ago

``一旦文件類別變更為 Beamer,LaTeX 的功能就會被取消,文字會以 MS Word 的樣式顯示,連字符也會被省略。有沒有相關的調整?

As soon as the document class is changed to beamer, the functionality of LaTeX is removed and text is displayed in MS Word style and hyphenations are also omitted. Is there an adjustment for this?

`%\documentclass[a4paper, 12pt]{article} \documentclass[a4paper, 12pt]{beamer} \usepackage{lipsum} \usepackage{wrapstuff}

\begin{document} \begin{wrapstuff}[l, top=1] \rule{4\normalbaselineskip}{3\normalbaselineskip} \end{wrapstuff} \lipsum[1-1][1-8] \par \bigskip \begin{wrapstuff}[r, top=3] \rule{4\normalbaselineskip}{3\normalbaselineskip} \end{wrapstuff} \lipsum[1-1][1-8] \end{document}`

muzimuzhi commented 1 month ago

As soon as the document class is changed to beamer, the functionality of LaTeX is removed and text is displayed in MS Word style and hyphenations are also omitted.

The Sans-Serif font family and fewer hyphenations are both "features" of beamer, hence irrelevant to wrapstuff package.

The beamer default is set in this way because author(s) of beamer though that's better suited for presentation, see the beamer user guide, sec. 5 "Guidelines for Creating Presentations".

To set back to the article default, you can use

% \documentclass[a4paper, 12pt]{article}
\documentclass[12pt]{beamer}
\usepackage{lipsum}
\usepackage{wrapstuff}

% overwrite default sans-serif font theme
\usefonttheme{serif}

% restore effect of \raggedright set by default
\usepackage{ragged2e}
\justifying

\begin{document}
\begin{wrapstuff}[l, top=1]
\rule{4\normalbaselineskip}{3\normalbaselineskip}
\end{wrapstuff}
\lipsum[1-1][1-8]
\par \bigskip
\begin{wrapstuff}[r, top=3]
\rule{4\normalbaselineskip}{3\normalbaselineskip}
\end{wrapstuff}
\lipsum[1-1][1-8]
\end{document}

image