Hi all,
I have little problem.
I have text:
Scenario:
\begin{enumerate}
\item some text
\item some other text
\end{enumerate}
Sometimes Tex prints text Scenario: at the end of the page and the enumeration on the next page.
How can I tell him to give the Scenerio text to the next page?
thanx blaf
LaTeX forum ⇒ General ⇒ text division
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
text division
Insert a \newpage command right in front of it or put a minipage environment around that group.
Best regards
Thorsten¹
Best regards
Thorsten¹
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
- Stefan Kottwitz
- Site Admin
- Posts: 10214
- Joined: Mon Mar 10, 2008 9:44 pm
text division
Hi blaf,
welcome to the LaTeX Community board!
I want to mention one alternative to Thorstens solutions, because inserting a \newpage may be not so good if the pages can still change, whereas the minipage environment does not allow any pagebreak inside that group, so the text (enumerate) may reach into the bottom.
I recommend to use the needspace package. You tell LaTeX with \needspace{...} how many space is needed. If there's not enough free space left on the page then a pagebreak will be inserted, otherwise not. Example:
Stefan
welcome to the LaTeX Community board!
I want to mention one alternative to Thorstens solutions, because inserting a \newpage may be not so good if the pages can still change, whereas the minipage environment does not allow any pagebreak inside that group, so the text (enumerate) may reach into the bottom.
I recommend to use the needspace package. You tell LaTeX with \needspace{...} how many space is needed. If there's not enough free space left on the page then a pagebreak will be inserted, otherwise not. Example:
\usepackage{needspace} ... \needspace{3\baselineskip} Scenario: \begin{enumerate} \item some text ... \item some other text \end{enumerate}
Stefan
LaTeX.org admin
Re: text division
the needspace package is what i need
thanks so much
thanks so much
Re: text division
so it works fine but there is a side effect
i have latex code:
\subsection{Správa èÃselnÃkù}
%NásledujÃcà text se zabývá popisem funkcà týkajÃcÃch se správy èÃselnÃkových tabulek.
Protože jsou všechny scénáøe velmi podobné scénáøùm uvedeným v sekci~\ref{subsec:spravaUzivatelu}
tak zde nebudou popisovány. Jedinou vyjÃmku tvoøà pøÃpad UC~6.1.2:~VytvoøenÃ/editace lékaøe
a~proto bude dále popsán. Základnà pøehled poskytuje obrázek~\ref{fig:images/ciselnikyUC}.
\fig[width=140mm]{images/ciselnikyUC}{Use case diagram - Správa èÃselnÃkù}
\\\\
% UC 6.1.2:~VytvoøenÃ/editace lékaøe
\needspace{1\baselineskip}
{\bf UC 6.1.2:~VytvoøenÃ/editace lékaøe}\label{par:editaceLekareUCDesc}\\
Popis: Umožòuje vytváøet resp. editovat nové resp. existujÃcà lékaøe.\\
OprávnìnÃ: PøÃstup je poskytnut uživateli disponujÃcÃmu oprávnìnÃm Spravovat èÃselnÃky.
\needspace{1\baselineskip}Scénáø:
\begin{enumerate}
\item Zobrazenà formuláøe pro editaci lékaøe.
\item V pøÃpadì existujÃcÃho lékaøe jsou pole formuláøe vyplnìna údaji o~lékaøi.
\item VyplnìnÃ/zmìna údajù o~lékaøi.
\item Zobrazenà seznamu ústavù.
\item Výbìr ústavu pro lékaøe.
\item Kliknutà na tlaèÃtko Uložit.
\item Kontrola zadaných dat.
\item Uloženà informacà o lékaøi.
\item Zobrazenà seznamu lékaøù.
\end{enumerate}
\needspace{1\baselineskip}
VyjÃmky:
\begin{itemize}
\item V pøÃpadì chybnì vyplnìných údajù (napø. nevyplnìnà povinné položky) je zobrazen stejný formuláø s~chybovou zprávou.
\end{itemize}
problem is that the bold text UC 6.1.2:~VytvoøenÃ/editace lékaøe and Scénáø: are intended. They should be aligned the same way as texts Popis: and Vyjimky
do you know where is the problem?
i've attached pdf file with the text
thx blaf
i have latex code:
\subsection{Správa èÃselnÃkù}
%NásledujÃcà text se zabývá popisem funkcà týkajÃcÃch se správy èÃselnÃkových tabulek.
Protože jsou všechny scénáøe velmi podobné scénáøùm uvedeným v sekci~\ref{subsec:spravaUzivatelu}
tak zde nebudou popisovány. Jedinou vyjÃmku tvoøà pøÃpad UC~6.1.2:~VytvoøenÃ/editace lékaøe
a~proto bude dále popsán. Základnà pøehled poskytuje obrázek~\ref{fig:images/ciselnikyUC}.
\fig[width=140mm]{images/ciselnikyUC}{Use case diagram - Správa èÃselnÃkù}
\\\\
% UC 6.1.2:~VytvoøenÃ/editace lékaøe
\needspace{1\baselineskip}
{\bf UC 6.1.2:~VytvoøenÃ/editace lékaøe}\label{par:editaceLekareUCDesc}\\
Popis: Umožòuje vytváøet resp. editovat nové resp. existujÃcà lékaøe.\\
OprávnìnÃ: PøÃstup je poskytnut uživateli disponujÃcÃmu oprávnìnÃm Spravovat èÃselnÃky.
\needspace{1\baselineskip}Scénáø:
\begin{enumerate}
\item Zobrazenà formuláøe pro editaci lékaøe.
\item V pøÃpadì existujÃcÃho lékaøe jsou pole formuláøe vyplnìna údaji o~lékaøi.
\item VyplnìnÃ/zmìna údajù o~lékaøi.
\item Zobrazenà seznamu ústavù.
\item Výbìr ústavu pro lékaøe.
\item Kliknutà na tlaèÃtko Uložit.
\item Kontrola zadaných dat.
\item Uloženà informacà o lékaøi.
\item Zobrazenà seznamu lékaøù.
\end{enumerate}
\needspace{1\baselineskip}
VyjÃmky:
\begin{itemize}
\item V pøÃpadì chybnì vyplnìných údajù (napø. nevyplnìnà povinné položky) je zobrazen stejný formuláø s~chybovou zprávou.
\end{itemize}
problem is that the bold text UC 6.1.2:~VytvoøenÃ/editace lékaøe and Scénáø: are intended. They should be aligned the same way as texts Popis: and Vyjimky
do you know where is the problem?
i've attached pdf file with the text
thx blaf
- Attachments
-
- dipl.pdf
- (47.03 KiB) Downloaded 343 times
text division
Use a \noindent command to prevent undesired indentations.
By the way, the \bf command is obsolete, you can use \textbf{...} as I suggested, ot the global switch \bfseries. Further information can be found in l2tabu.
\noindent\textbf{UC 6.1.2:~VytvoøenÃ/editace lékaøe}\label{par:editaceLekareUCDesc}
By the way, the \bf command is obsolete, you can use \textbf{...} as I suggested, ot the global switch \bfseries. Further information can be found in l2tabu.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: text division
now it works as I want, thx
I already have one other question
I have table and I'd like to merge several cells in one column
so it should look like:
--------------------------
|sdfsd|asdasdasdasda|
|sdfsd|-----------------|
|sdfsd|asdasdasdasda|
--------------------------
can i do that?
blaf
I already have one other question
I have table and I'd like to merge several cells in one column
so it should look like:
--------------------------
|sdfsd|asdasdasdasda|
|sdfsd|-----------------|
|sdfsd|asdasdasdasda|
--------------------------
can i do that?
blaf
- Stefan Kottwitz
- Site Admin
- Posts: 10214
- Joined: Mon Mar 10, 2008 9:44 pm
text division
On the other hand, to produce an entry that spans over saveral rows, you can use the \multirow command provided by the multirow package.
A little example of \multicolumn and \multirow:
A little example of \multicolumn and \multirow:
\documentclass{report} \usepackage{multirow} \begin{document} \begin{tabular}{|c|c|} \hline \multicolumn{2}{|c|}{Entry spanning several columns}\\ \hline column 1a & column 2a \\ column 1a & column 2a \\ \hline \end{tabular} \vspace{1cm} \begin{tabular}{|c|c|} \hline \multirow{3}{*}{Entry spanning several rows} & column 1b \\ & column 2b \\ & column 3b \\ \hline \end{tabular} \end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Who is online
Users browsing this forum: No registered users and 3 guests