I want to set label height according to text. currently it is showing only one line text. I have set constraint leading training and top but its not working.
123101
Consider I have the following text in a UILabel (a long line of dynamic text):     Since the alien army vastly outnumbers the team, players must use the post-apocalyptic world to their advantage, such as seeking cover behind dumpsters, pillars, cars, rubble, and other objects.    I want to resize the UILabel's height so that the text can fit in. I'm using following properties of UILabel to make the text within to wrap.  myUILabel.lineBreakMode = UILineBreakModeWordWrap; myUILabel.numberOfLines = 0;   Please let me know if I'm not heading in the right direction. Thanks.
23161
If I use this code provided by a question formulate of Sebastian .  \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{lipsum}  \newtcolorbox[auto counter]{problem}[2][]{% breakable, blankest, enhanced, attach boxed title to top left={yshift=-\tcboxedtitleheight}, left=\tcboxedtitlewidth+1mm, top=0pt, colback=white, fonttitle=\bfseries\sffamily, coltitle={cyan!60!black}, colbacktitle=white, colframe=white, title=\thetcbcounter,  overlay unbroken and first={% \node[fill=gray!30, inner sep=1pt, minimum width=\tcboxedtitlewidth,  outer sep=0pt, text=cyan!60!black, anchor=north] at(title.south)  {\foreach \i in {1,...,#2}{\if#2gt1{\,}\fi$\bullet$}};},#1}  \begin{document}  \lipsum[1]  \begin{problem}{1} \lipsum[2] \end{problem}  \begin{problem}{4} \lipsum[3] \end{problem}  \begin{problem}{2} \lipsum[4] \end{problem}  \end{document}   How could we create solutions environment, so we have at the end of the book solution of the exercises where each one have reference to chapter, page, number of exercise with the corresponding level of difficulty?
19033
If I just try to set the figure's size to 0.9\textwidth my figure will just end up on the right column, sized to be two-columns wide.  Has anyone done this before?
110261
Although I have researched on input form label alignment, I need solid suggestion on when to use form label alignment top and when to use left and why?  For example in the below form username and password is left align.     Here user name and password is top align.
92321
is exactly what I'm looking for. I want my description environment to produce this:  Label is long   text  lab2            blalballalaa label3          possible second rule label four      hello world   Someone offered this:  \newenvironment{mydescription}[1]                                                   {\begin{list}{}%    {\renewcommand\makelabel[1]{##1:\hfill}%    \settowidth\labelwidth{\makelabel{#1}}%    \setlength\leftmargin{\labelwidth}    \addtolength\leftmargin{\labelsep}}}   {\end{list}}   Which works great (the parameter is the longest label), except I think the enumitem should be able to do this. Unfortunately, the documentation for it is extremely confusing to me. Could someone show me how to achieve the same result with enumitem?
44362
I want to typeset source code with tcolorbox package. How is possible in this package not to create static boxes but rather boxes that adjust according to the width of the code I write both vertically and horizontally? Also I want if a line is too long to break into a new line. Can I do that?
115185
This seems like it should be really easy but I can't seem to find it anywhere...  I'd like to be able to fine-tune the positioning of a node label.  I'm aware of the \node[label=above/below/etc:{label}] (x) {}; syntax, but that doesn't seem to give you many options on where the label goes. I'd like to be able to place the label slightly closer or farther away, or maybe in a direction other than the 8 presets available.  \tikz[label distance=x] isn't a good solution because I need it to be node-specific.
7112
How can I ger a line break after the label of a description environment item? I'd like to keep the indentation and the bold face for the item label, but I'd like to have the body of the item in a separate paragraph, because it starts with an itemize environment and indenting that looks really strange.  Adding \\ does not work (error message “no line to end here”), neither does a blank line or \par (no effect). Even \,\par has no effect.  Example:  \documentclass{article} \begin{document}  \begin{description} \item[Animals:]   \begin{itemize}   \item Dog   \item Cat   \item Fish   \end{itemize} \item[Colors:]   \begin{itemize}   \item Red   \item Green   \item Blue   \end{itemize} \end{description} \end{document}   It renders like this:
93785
Is it possible to select only one contour line for labelling?   I have numerous labels for each line and I'll prefer to label only the main ones, such as 1000 m and 1500 m
72669
I try to adapt this solution  to my needs.  But I have a width problem 1\tabcolsep is too short, but anything longer is too long, should be 2\tabcolsep.    \documentclass[10pt]{article} \usepackage[T1]{fontenc}  \usepackage{array} \usepackage{tabularx} \usepackage{ragged2e}  \newcolumntype{C}[1]{&gt;{\Centering}p{#1}} \usepackage{tikz}  \newcommand\Tdiag[4]{%     \multicolumn{1}{|p{#2}|}{\hskip-\tabcolsep     \begin{tikzpicture}[%                 baseline={(0,-.25\baselineskip)},                 every node/.style={outer sep=0pt,inner sep=#1}]     \node[minimum width={#2+1\tabcolsep-\pgflinewidth},         minimum height=2\baselineskip-\pgflinewidth+\extrarowheight,         use as bounding box] (box) {};     \draw[line cap=round] (box.north west) -- (box.south east);     \node[anchor=south west,text width=.75*#2,align=left] at (box.south west) {#3};     \node[anchor=north east,text width=.75*#2,align=right] at (box.north east) {#4}; \end{tikzpicture}\hskip-\tabcolsep}}  \begin{document}  \begin{tabular}{|C{1.2cm}*{3}{|c}|}\hline \Tdiag{.2em}{1.2cm}{\^Age}{Sexe}&amp; Féminin &amp; Masculin &amp; Totaux  \\\hline 15 ans&amp;&amp;1&amp;\\\hline 16 ans &amp; 16 &amp; &amp;  \\\hline 17 ans &amp; 3 &amp; &amp;  \\\hline Totaux &amp; &amp; &amp; 36  \\\hline \end{tabular}   \end{document}
84984
How to lock the position and size of a text-frame in InDesign CS6?  I would like to lock those properties in each page in Indesign. Sometimes the designers get wrong and drag and drop the text frame without noticing.  Then we have to remove the page and create again. If this is not done when I update the master will not update the size and position of the text frame
64719
How to make a breakable tcolorbox which spans the total text height? I tried this:   \documentclass{article}  \usepackage[breakable]{tcolorbox} \usepackage[top=2cm,bottom=2cm,hmargin=2.2cm]{geometry}  \usepackage{lipsum}  \begin{document}  \begin{tcolorbox}[breakable,height fill] \lipsum[1-10] \end{tcolorbox}  \end{document}   The problem is that the tcolorbox on the second page doesn't have \textheight (i.e. the box should like a border around the page):
99473
As the title says. I use, among other things, the following in my lstset:  framerule=1pt, frame=tblr   Some places a page break happens in the middle of my \lstlisting. Fine. But sometimes the whole code of the listing appears on one page, but the bottom frame appears on the top of the next page!    I know that I can float a particular listing, but I have a long document with many listings, and I don't want to float all of them; Most of them also need to be exactly where they are declared. That they are broken over a page doesn't bother me that much.  Is there something that can stop this from happening, without me needing to adjust each individual listing?   had the same problem, but fixed it by removing spaces in front of keywords in a custom language definition. I too have a custom language definition, but his solution doesn't help me. I managed to recreate the situation without a custom language.  Edit and MWE  I managed to reproduce it in a minimal working example. 's a pastebin, if that's helpfull.  \documentclass[UKenglish,a4paper,11pt]{report} \usepackage{babel}  %% Adjustments \addtolength{\topmargin}{-1\baselineskip} \addtolength{\textheight}{4\baselineskip} \pretolerance = 2000 \tolerance = 5000   \hbadness = \tolerance  %% Smaller font \usepackage{mathptmx}  %% LISTINGS \usepackage[final]{listings} \lstset{     xleftmargin=1.5em,     framexleftmargin=1em,     framextopmargin=0.5ex, %%  THE FRAME:     framerule=1pt,     frame=tblr }  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \usepackage{lipsum}     % for demo \begin{document} \subsubsection{Lorem}   % some fiddling to get the "wrong spacing just right": \lipsum[1-3] \subsubsection{Ipsum}  \lipsum[1] and then some text  \begin{lstlisting} Here is a listing with three lines of code; The bottom border is placed on the next page! \end{lstlisting}  Can you believe it..?! \end{document}   This MWE is rather long. My document inputs most of the listings stuff from files written by others, so I'm not sure what all of it does. If anyone sees some lines that they are sure is irrelevant, feel free to take it out of the MWE.  "Fun fact"  An equally silly situation occurs if you remove \usepackage{mathptmx}: The whole code listing will then appear on the new page, except for the top frame which is left on the bottom of the first page!
81946
I'm working with overleaf and trying to add texts in these red marked positions. For example, I want to add 4,5 and 6 respectively. I've tried with \put(0,0), but it always disables the \resizebox attribute and makes the image out of proportion, also the text doesn't get placed in the position at all. What changes can I make in the code mention below to add 4,5 and 6 in these three positions? Picture can be found in . \begin{figure}[!h]     \centering     \resizebox{1\linewidth}{!}{%     \includegraphics{picture.png}     }     \caption{Flowchart of Heuristic adjustment 1.}     \label{fig:heuristic_1_FC} \end{figure}
87889
When compiling with the parameter label as in the MWE, allowframebreaks doesn't work. Why not?  Is there any difference between setting a frame title as a frame argument and by using \frametitle?  \documentclass{beamer} \usetheme{Warsaw} \usepackage{blindtext} \begin{document}  \begin{frame}[allowframebreaks,label=frame1]{Title} %\frametitle{Title} \framesubtitle{Sub-title} \blindtext Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........ Text........  Text........ Text........ Text........ Text........ Text........  \end{frame}  \end{document}
39576
How do I temporarily increase line spacing? I have some text on my title page:  \begin{center} { \Large \textbf{The Great Thesis About Some Very Great Things Indeed With a Pretty Long Title That Will Probably Be Split Between at Least Two Lines Or So} } \end{center}   I'm finding that the line spacing here is too small, but it's fine elsewhere in the document. How can I make the spacing bigger for just this piece of text?
78073
I need to put some text at the same height in my page, and I'm trying to do it with a minipage, but I'm not able to do it since they get centre-aligned.    This is the LaTeX for the figure I've uploaded:  \begin{minipage}[]{0.5\textwidth}     \begin{flushleft}         {\large \textit{Author}:\vspace*{0.5cm} \\          Me}     \end{flushleft} \end{minipage}% % \begin{minipage}[]{0.5\textwidth}     \begin{flushright}         {\large \textit{Supervisor}:\vspace*{0.5cm} \\          Him}\\         \vspace*{0.5cm}         {\large \textit{Advisor}:\vspace*{0.5cm} \\          Other Guy}     \end{flushright}     \end{minipage}%   Can you please explain me what I'm doing wrong?