Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How would I enter this text on an 8.5x11 worksheet with 1.25inch margins all around so wraps around and does not extend onto the margins? Using normalsize text.

SolverAdd CellRef:=Worksheets("Worksheet_Alpha_Gamma_TestResult").Range("$H$43:$H$46")Relation:=5, FormulaText:="binary
share|improve this question

1 Answer 1

You could use listings:

enter image description here

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage[margin=1.25in,letterpaper]{geometry}% http://ctan.org/pkg/geometry
\usepackage{listings}% http://ctan.org/pkg/listings
\begin{document}
\lipsum[1]
\begin{lstlisting}[breaklines,basicstyle=\ttfamily]
SolverAdd CellRef:=Worksheets("Worksheet_Alpha_Gamma_TestResult").Range("$H$43:$H$46")Relation:=5, FormulaText:="binary
\end{lstlisting}
\lipsum[2]
\end{document}

breaklines=true allows for line-breaking within the lstlistings environment. I used basicstyle=\ttfamily, although that is not necessary.

lipsum provided some dummy text, while geometry was used to obtain the layout requirements.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.