User forums > Using Code::Blocks
user/developer document
ollydbg:
--- Quote from: Alpha on April 20, 2012, 02:26:20 am ---I avoided using an actual line break, because that would make it more difficult to copy-paste a command that a reader might want to try.
It would be possible to simply escape everything and use normal word wrap, for example:
--- Code: ---"path\_to\_7z\textbackslash{}7z" a -t\textdollar{}if(zip == \textdollar{}inputstr\{7z or zip?\})\{zip -mm=Deflate -mmt=on -mx9 -mfb=128 -mpass=10\}\{7z -m0=LZMA -mx9 -md=64m -mfb=64 -ms=on\} -sccUTF-8 "-w\textdollar{}(PROJECTDIR).." "\textdollar{}(PROJECTDIR)..\textbackslash{}\textdollar{}(PROJECT\_NAME)" "\textdollar{}(PROJECTDIR)*"
--- End code ---
... except that I cannot figure out how to get the font to match (using \cmdline{... my command ...} makes it close, but not the same).
--- End quote ---
Can you give us another patch, I'm not fully understand your idea, but with patches, I can just test and see what changes in PDF. :)
PS: It looks like the "\cmd" is a user defined environment I'm not familiar with.
PS2: I see some thing like:
--- Code: ---\usepackage{listings}
\lstset{language=, breaklines=true, basicstyle=\small,}
\begin{lstlisting}
void check_neighbours (unsigned char **image_twod, int **objects, int current, int width, int height, int *corrections, int x, int y)
\end{lstlisting}
--- End code ---
See: http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
Or maybe fancyvrb package (an advanced verbatim package)
Alpha:
--- Quote from: ollydbg on April 20, 2012, 05:01:38 am ---Can you give us another patch, I'm not fully understand your idea, but with patches, I can just test and see what changes in PDF. :)
--- End quote ---
This patch shows several options to fix the problem, but none of them are quite correct.
--- Code: ---Index: userguide/tools_plus_en.tex
===================================================================
--- userguide/tools_plus_en.tex (revision 7934)
+++ userguide/tools_plus_en.tex (working copy)
@@ -179,13 +179,14 @@
\begin{itemize}
\item 7z or zip - Tools Menu
\begin{cmd}
-"path_to_7z\7z" a -t$if(zip == $inputstr{7z or zip?}){zip -mm=Deflate -mmt=on -mx9 -mfb=128 -mpass=10}{7z -m0=LZMA -mx9 -md=64m -mfb=64 -ms=on} -sccUTF-8 "-w$(PROJECTDIR).." "$(PROJECTDIR)..\$(PROJECT_NAME)" "$(PROJECTDIR)*"
+"path_to_7z\7z" a -t$if(zip == $inputstr{7z or zip?}){zip -mm=Deflate -mmt=on
+-mx9 -mfb=128 -mpass=10}{7z -m0=LZMA -mx9 -md=64m -mfb=64 -ms=on} -sccUTF-8
+"-w$(PROJECTDIR).." "$(PROJECTDIR)..\$(PROJECT_NAME)" "$(PROJECTDIR)*"
\end{cmd}
\item tar.gz or tar.bz2 - Tools Menu
-\begin{cmd}
-cmd /c ""path_to_7z\7z" a -ttar -mx0 -sccUTF-8 "-w$(PROJECTDIR).." "$(PROJECTDIR)..\$(PROJECT_NAME)" "$(PROJECTDIR)*" && "path_to_7z\7z" a -t$if(gz == $inputstr{gz or bz2?}){gzip -mx9 -mfb=128 -mpass=10 -sccUTF-8 "-w$(PROJECTDIR).." "$(PROJECTDIR)..\$(PROJECT_NAME).tar.gz}{bzip2 -mmt=on -mx9 -md=900k -mpass=7 -sccUTF-8 "-w$(PROJECTDIR).." "$(PROJECTDIR)..\$(PROJECT_NAME).tar.bz2}" "$(PROJECTDIR)..\$(PROJECT_NAME).tar" && cmd /c del "$(PROJECTDIR)..\$(PROJECT_NAME).tar""
-\end{cmd}
+cmd /c ""path\_to\_7z\textbackslash{}7z" a -ttar -mx0 -sccUTF-8 "-w\textdollar{}(PROJECTDIR).." "\textdollar{}(PROJECTDIR)..\textbackslash{}\textdollar{}(PROJECT\_NAME)" "\textdollar{}(PROJECTDIR)*" \&\& "path\_to\_7z\textbackslash{}7z" a -t\textdollar{}if(gz == \textdollar{}inputstr\{gz or bz2?\})\{gzip -mx9 -mfb=128 -mpass=10 -sccUTF-8 "-w\textdollar{}(PROJECTDIR).." "\textdollar{}(PROJECTDIR)..\textbackslash{}\textdollar{}(PROJECT\_NAME).tar.gz\}\{bzip2 -mmt=on -mx9 -md=900k -mpass=7 -sccUTF-8 "-w\textdollar{}(PROJECTDIR).." "\textdollar{}(PROJECTDIR)..\textbackslash{}\textdollar{}(PROJECT\_NAME).tar.bz2\}" "\textdollar{}(PROJECTDIR)..\textbackslash{}\textdollar{}(PROJECT\_NAME).tar" \&\& cmd /c del "\textdollar{}(PROJECTDIR)..\textbackslash{}\textdollar{}(PROJECT\_NAME).tar""
+
\hint{The Windows command line interpreter has been invoked directly here (\cmdline{cmd /c}), allowing for multiple commands to be chained in a single line. However, this causes the command to fail to execute in the Code::Blocks Console.}
\end{itemize}
@@ -193,9 +194,8 @@
\item Linux
\begin{itemize}
\item 7z or zip - Tools Menu
-\begin{cmd}
-7z a -t$if(zip == $inputstr{7z or zip?}){zip -mm=Deflate -mmt=on -mx9 -mfb=128 -mpass=10}{7z -m0=LZMA -mx9 -md=64m -mfb=64 -ms=on} -sccUTF-8 "-w$(PROJECTDIR).." "$(PROJECTDIR)../$(PROJECT_NAME)" "$(PROJECTDIR)*"
-\end{cmd}
+
+\cmdline{7z a -t\textdollar{}if(zip == \textdollar{}inputstr\{7z or zip?\})\{zip -mm=Deflate -mmt=on -mx9 -mfb=128 -mpass=10\}\{7z -m0=LZMA -mx9 -md=64m -mfb=64 -ms=on\} -sccUTF-8 "-w\textdollar{}(PROJECTDIR).." "\textdollar{}(PROJECTDIR)../\textdollar{}(PROJECT\_NAME)" "\textdollar{}(PROJECTDIR)*"}
\item tar.gz or tar.bz2 - Tools Menu
\begin{cmd}
tar -cf "$(PROJECTDIR)../$(PROJECT_NAME).tar.$if(gz == $inputstr{gz or bz2?}){gz" -I 'gzip}{bz2" -I 'bzip2} -9' "$(PROJECTDIR)*"
--- End code ---
--- Quote from: ollydbg on April 20, 2012, 05:01:38 am ---See: http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
Or maybe fancyvrb package (an advanced verbatim package)
--- End quote ---
I will look into those, but I am still quite new to LaTeX, so no promises.
ollydbg:
--- Quote from: ollydbg on April 20, 2012, 03:51:05 am ---
--- Quote from: ollydbg on April 18, 2012, 09:38:14 am ---I'm OK with your patch.
Will commit if no objections for few days.
--- End quote ---
I do not have the SVN access to modify the document part. Sorry.
BTW: I think TOC should be added, OK?
--- Code: ---Index: F:/cb_doc/userguide/main_codeblocks_en.tex
===================================================================
--- F:/cb_doc/userguide/main_codeblocks_en.tex (revision 7935)
+++ F:/cb_doc/userguide/main_codeblocks_en.tex (working copy)
@@ -30,6 +30,7 @@
\begin{document}
\include{mystyles/cb_titlepage}
+\tableofcontents{}
\include{basics_en}
\include{plugins_en}
\include{more_plugins_en}
--- End code ---
--- End quote ---
FYI: I have committed this patch.
ollydbg:
I see a feature(forward and backward search) of Texworks, when I build the PDF document, I can click on the PDF(opened in Texworks), and select "Jump to source", then it will take me to the latex source associated with the current PDF view. Also when I click on some tex source, and click the context menu "Jump to PDF", it will take me to PDF, quick nice.
BTW: I'm using Miktex 2.9 portable edition.
Navigation
[0] Message Index
[*] Previous page
Go to full version