How do I customize Circuit_macros in listings? The Next CEO of Stack Overflowadvanced string highlighting in listingsColored strings by listings packageHow do I customize a LuaLaTeX cmap?How can I highlight an interactive GAP session just like so?Issues using listings packageFailure After Using Latexdiff Script: latexdiff marking up lstlisting environmentHow can I avoid the use of default styles when no listings language is set?Highlighting hex in listingsmultiple classes not working with otherkeywords in listings packagelstnewenvironment/lstset : using colors conditionally emph/emphstyle - SAS: (in=_x) versus if x in (1,2)Color delimiters in listings differently from content
It is correct to match light sources with the same color temperature?
Free fall ellipse or parabola?
Asymptote: 3d graph over a disc
How can the PCs determine if an item is a phylactery?
Do scriptures give a method to recognize a truly self-realized person/jivanmukta?
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Computationally populating tables with probability data
What would be the main consequences for a country leaving the WTO?
Is it correct to say moon starry nights?
Audio Conversion With ADS1243
Does the Idaho Potato Commission associate potato skins with healthy eating?
Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?
IC has pull-down resistors on SMBus lines?
Strange use of "whether ... than ..." in official text
What is the process for purifying your home if you believe it may have been previously used for pagan worship?
What day is it again?
Why did early computer designers eschew integers?
Can I board the first leg of the flight without having final country's visa?
Is French Guiana a (hard) EU border?
In the "Harry Potter and the Order of the Phoenix" video game, what potion is used to sabotage Umbridge's speakers?
Is it professional to write unrelated content in an almost-empty email?
Is fine stranded wire ok for main supply line?
Won the lottery - how do I keep the money?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
How do I customize Circuit_macros in listings?
The Next CEO of Stack Overflowadvanced string highlighting in listingsColored strings by listings packageHow do I customize a LuaLaTeX cmap?How can I highlight an interactive GAP session just like so?Issues using listings packageFailure After Using Latexdiff Script: latexdiff marking up lstlisting environmentHow can I avoid the use of default styles when no listings language is set?Highlighting hex in listingsmultiple classes not working with otherkeywords in listings packagelstnewenvironment/lstset : using colors conditionally emph/emphstyle - SAS: (in=_x) versus if x in (1,2)Color delimiters in listings differently from content
MWE;
documentclassarticle
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
,colorblack,1%
.colorblack.1%
(colorCharacter(1%
)colorCharacter)1%
,
morekeywords=In1,In2,In3,
keywordstyle=colorblack,
morekeywords=[2]scale,above,with,at,Here,line,to,end,start,from,ljust,
keywordstyle=[2]bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[4]corner,Out,In1,In2,In3,In4,
keywordstyle=[4]colorblack,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
comment=[l][colorgray]#,
string=[b]",
stringstyle=colorred,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
And output (Of course there are errors. This was what I could do.)
But original output
What I want to do;
1) codes with digits such as In1
, In2
should be black.
2) at the end of the :
or characters starting ;
and ending :
must be purple. Such as ;DA:
, X1:
written in source code. Other DA
, X1
should be black.
3) When I copy and paste the output into the notebook, there is a space between characters. So when I paste it into its own program it gives an error.
Are these possible?
Related to: advanced string highlighting in listings
macros color listings languages
bumped to the homepage by Community♦ 14 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
MWE;
documentclassarticle
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
,colorblack,1%
.colorblack.1%
(colorCharacter(1%
)colorCharacter)1%
,
morekeywords=In1,In2,In3,
keywordstyle=colorblack,
morekeywords=[2]scale,above,with,at,Here,line,to,end,start,from,ljust,
keywordstyle=[2]bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[4]corner,Out,In1,In2,In3,In4,
keywordstyle=[4]colorblack,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
comment=[l][colorgray]#,
string=[b]",
stringstyle=colorred,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
And output (Of course there are errors. This was what I could do.)
But original output
What I want to do;
1) codes with digits such as In1
, In2
should be black.
2) at the end of the :
or characters starting ;
and ending :
must be purple. Such as ;DA:
, X1:
written in source code. Other DA
, X1
should be black.
3) When I copy and paste the output into the notebook, there is a space between characters. So when I paste it into its own program it gives an error.
Are these possible?
Related to: advanced string highlighting in listings
macros color listings languages
bumped to the homepage by Community♦ 14 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Your questions seem to be responded explicitly in your MWE. Precisely, 1) your code is already doing so:morecomment=[l][colorgray]#,
. 2) You can do the same case for)
as you have defined for"
inmorestring=[b]"
. I don't have a solution for your third question. For 4, what about defining a new array likemorekeywords
and then set a colour for?
– Sina Ahmadi
Feb 21 at 1:56
I will check...
– Özgür
Feb 23 at 1:26
add a comment |
MWE;
documentclassarticle
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
,colorblack,1%
.colorblack.1%
(colorCharacter(1%
)colorCharacter)1%
,
morekeywords=In1,In2,In3,
keywordstyle=colorblack,
morekeywords=[2]scale,above,with,at,Here,line,to,end,start,from,ljust,
keywordstyle=[2]bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[4]corner,Out,In1,In2,In3,In4,
keywordstyle=[4]colorblack,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
comment=[l][colorgray]#,
string=[b]",
stringstyle=colorred,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
And output (Of course there are errors. This was what I could do.)
But original output
What I want to do;
1) codes with digits such as In1
, In2
should be black.
2) at the end of the :
or characters starting ;
and ending :
must be purple. Such as ;DA:
, X1:
written in source code. Other DA
, X1
should be black.
3) When I copy and paste the output into the notebook, there is a space between characters. So when I paste it into its own program it gives an error.
Are these possible?
Related to: advanced string highlighting in listings
macros color listings languages
MWE;
documentclassarticle
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
,colorblack,1%
.colorblack.1%
(colorCharacter(1%
)colorCharacter)1%
,
morekeywords=In1,In2,In3,
keywordstyle=colorblack,
morekeywords=[2]scale,above,with,at,Here,line,to,end,start,from,ljust,
keywordstyle=[2]bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[4]corner,Out,In1,In2,In3,In4,
keywordstyle=[4]colorblack,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
comment=[l][colorgray]#,
string=[b]",
stringstyle=colorred,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
And output (Of course there are errors. This was what I could do.)
But original output
What I want to do;
1) codes with digits such as In1
, In2
should be black.
2) at the end of the :
or characters starting ;
and ending :
must be purple. Such as ;DA:
, X1:
written in source code. Other DA
, X1
should be black.
3) When I copy and paste the output into the notebook, there is a space between characters. So when I paste it into its own program it gives an error.
Are these possible?
Related to: advanced string highlighting in listings
macros color listings languages
macros color listings languages
edited Feb 23 at 2:07
Özgür
asked Feb 21 at 1:40
ÖzgürÖzgür
1,4611020
1,4611020
bumped to the homepage by Community♦ 14 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 14 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Your questions seem to be responded explicitly in your MWE. Precisely, 1) your code is already doing so:morecomment=[l][colorgray]#,
. 2) You can do the same case for)
as you have defined for"
inmorestring=[b]"
. I don't have a solution for your third question. For 4, what about defining a new array likemorekeywords
and then set a colour for?
– Sina Ahmadi
Feb 21 at 1:56
I will check...
– Özgür
Feb 23 at 1:26
add a comment |
Your questions seem to be responded explicitly in your MWE. Precisely, 1) your code is already doing so:morecomment=[l][colorgray]#,
. 2) You can do the same case for)
as you have defined for"
inmorestring=[b]"
. I don't have a solution for your third question. For 4, what about defining a new array likemorekeywords
and then set a colour for?
– Sina Ahmadi
Feb 21 at 1:56
I will check...
– Özgür
Feb 23 at 1:26
Your questions seem to be responded explicitly in your MWE. Precisely, 1) your code is already doing so:
morecomment=[l][colorgray]#,
. 2) You can do the same case for )
as you have defined for "
in morestring=[b]"
. I don't have a solution for your third question. For 4, what about defining a new array like morekeywords
and then set a colour for?– Sina Ahmadi
Feb 21 at 1:56
Your questions seem to be responded explicitly in your MWE. Precisely, 1) your code is already doing so:
morecomment=[l][colorgray]#,
. 2) You can do the same case for )
as you have defined for "
in morestring=[b]"
. I don't have a solution for your third question. For 4, what about defining a new array like morekeywords
and then set a colour for?– Sina Ahmadi
Feb 21 at 1:56
I will check...
– Özgür
Feb 23 at 1:26
I will check...
– Özgür
Feb 23 at 1:26
add a comment |
1 Answer
1
active
oldest
votes
documentclass[a4paper,11pt]article
%documentclass[a4paper,11pt]standalone% for demontration only!
usepackage[top=0.75in, bottom=0.75in, left=0.75in, right=0.75in]geometry
%usepackageshowframe% for demontration only!
pagestyleempty
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*,colorblack,1%
0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
.colorblack.1%
(colorCharacter(1%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
%
*colorblack*2%
O:colorCharacterO:2%
A.colorblackA.2%
B.colorblackB.2%
C.colorblackC.2%
A:colorCharacterA:2%
B:colorCharacterB:2%
C:colorCharacterC:2%
DA:colorCharacterDA:3%
DB:colorCharacterDB:3%
DC:colorCharacterDC:3%
LA.colorblackLA.3%
LB.colorblackLB.3%
LC.colorblackLC.3%
LA:colorCharacterLA:3%
LB:colorCharacterLB:3%
LC:colorCharacterLC:3%
X1colorblackX12%
X1:colorCharacterX1:3%
X2colorblackX2:2%
X2:colorCharacterX2:3%
X3colorblackX3:2%
X3:colorCharacterX3:3%
X4colorblackX4:2%
X4:colorCharacterX4:3%
"A"bfcolorred"A"3%
"B"bfcolorred"B"3%
"C"bfcolorred"C"3%
"X"colorred"X"3%
In1colorblackIn13%
In2colorblackIn23%
In3colorblackIn33%
In4colorblackIn43%
,
emph=scale,above,with,at,Here,line,to,end,start,from,ljust,
emphstyle=bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
morecomment=[l][colorgray]#,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
add a comment |
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475923%2fhow-do-i-customize-circuit-macros-in-listings%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
documentclass[a4paper,11pt]article
%documentclass[a4paper,11pt]standalone% for demontration only!
usepackage[top=0.75in, bottom=0.75in, left=0.75in, right=0.75in]geometry
%usepackageshowframe% for demontration only!
pagestyleempty
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*,colorblack,1%
0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
.colorblack.1%
(colorCharacter(1%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
%
*colorblack*2%
O:colorCharacterO:2%
A.colorblackA.2%
B.colorblackB.2%
C.colorblackC.2%
A:colorCharacterA:2%
B:colorCharacterB:2%
C:colorCharacterC:2%
DA:colorCharacterDA:3%
DB:colorCharacterDB:3%
DC:colorCharacterDC:3%
LA.colorblackLA.3%
LB.colorblackLB.3%
LC.colorblackLC.3%
LA:colorCharacterLA:3%
LB:colorCharacterLB:3%
LC:colorCharacterLC:3%
X1colorblackX12%
X1:colorCharacterX1:3%
X2colorblackX2:2%
X2:colorCharacterX2:3%
X3colorblackX3:2%
X3:colorCharacterX3:3%
X4colorblackX4:2%
X4:colorCharacterX4:3%
"A"bfcolorred"A"3%
"B"bfcolorred"B"3%
"C"bfcolorred"C"3%
"X"colorred"X"3%
In1colorblackIn13%
In2colorblackIn23%
In3colorblackIn33%
In4colorblackIn43%
,
emph=scale,above,with,at,Here,line,to,end,start,from,ljust,
emphstyle=bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
morecomment=[l][colorgray]#,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
add a comment |
documentclass[a4paper,11pt]article
%documentclass[a4paper,11pt]standalone% for demontration only!
usepackage[top=0.75in, bottom=0.75in, left=0.75in, right=0.75in]geometry
%usepackageshowframe% for demontration only!
pagestyleempty
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*,colorblack,1%
0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
.colorblack.1%
(colorCharacter(1%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
%
*colorblack*2%
O:colorCharacterO:2%
A.colorblackA.2%
B.colorblackB.2%
C.colorblackC.2%
A:colorCharacterA:2%
B:colorCharacterB:2%
C:colorCharacterC:2%
DA:colorCharacterDA:3%
DB:colorCharacterDB:3%
DC:colorCharacterDC:3%
LA.colorblackLA.3%
LB.colorblackLB.3%
LC.colorblackLC.3%
LA:colorCharacterLA:3%
LB:colorCharacterLB:3%
LC:colorCharacterLC:3%
X1colorblackX12%
X1:colorCharacterX1:3%
X2colorblackX2:2%
X2:colorCharacterX2:3%
X3colorblackX3:2%
X3:colorCharacterX3:3%
X4colorblackX4:2%
X4:colorCharacterX4:3%
"A"bfcolorred"A"3%
"B"bfcolorred"B"3%
"C"bfcolorred"C"3%
"X"colorred"X"3%
In1colorblackIn13%
In2colorblackIn23%
In3colorblackIn33%
In4colorblackIn43%
,
emph=scale,above,with,at,Here,line,to,end,start,from,ljust,
emphstyle=bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
morecomment=[l][colorgray]#,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
add a comment |
documentclass[a4paper,11pt]article
%documentclass[a4paper,11pt]standalone% for demontration only!
usepackage[top=0.75in, bottom=0.75in, left=0.75in, right=0.75in]geometry
%usepackageshowframe% for demontration only!
pagestyleempty
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*,colorblack,1%
0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
.colorblack.1%
(colorCharacter(1%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
%
*colorblack*2%
O:colorCharacterO:2%
A.colorblackA.2%
B.colorblackB.2%
C.colorblackC.2%
A:colorCharacterA:2%
B:colorCharacterB:2%
C:colorCharacterC:2%
DA:colorCharacterDA:3%
DB:colorCharacterDB:3%
DC:colorCharacterDC:3%
LA.colorblackLA.3%
LB.colorblackLB.3%
LC.colorblackLC.3%
LA:colorCharacterLA:3%
LB:colorCharacterLB:3%
LC:colorCharacterLC:3%
X1colorblackX12%
X1:colorCharacterX1:3%
X2colorblackX2:2%
X2:colorCharacterX2:3%
X3colorblackX3:2%
X3:colorCharacterX3:3%
X4colorblackX4:2%
X4:colorCharacterX4:3%
"A"bfcolorred"A"3%
"B"bfcolorred"B"3%
"C"bfcolorred"C"3%
"X"colorred"X"3%
In1colorblackIn13%
In2colorblackIn23%
In3colorblackIn33%
In4colorblackIn43%
,
emph=scale,above,with,at,Here,line,to,end,start,from,ljust,
emphstyle=bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
morecomment=[l][colorgray]#,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
documentclass[a4paper,11pt]article
%documentclass[a4paper,11pt]standalone% for demontration only!
usepackage[top=0.75in, bottom=0.75in, left=0.75in, right=0.75in]geometry
%usepackageshowframe% for demontration only!
pagestyleempty
usepackagexcolor
usepackagelistings
definecolorOthersRGB0,110,40 % Green
definecolorCharacterRGB146,76,157 % Purple
definecolorNumberRGB176,128,0 % Brown
lstdefinestylecircuit_macros
basicstyle=scriptsizettfamilynull,
literate=*,colorblack,1%
0textcolorNumber01%
1textcolorNumber11%
2textcolorNumber21%
3textcolorNumber31%
4textcolorNumber41%
5textcolorNumber51%
6textcolorNumber61%
7textcolorNumber71%
8textcolorNumber81%
9textcolorNumber91%
(colorCharacter(1%
)colorCharacter)1%
/colorblack/1%
:colorCharacter:1%
;colorblack;1%
.colorblack.1%
(colorCharacter(1%
.0textcolorNumber.01%
.1colorNumber.11%
.2colorNumber.21%
.3colorNumber.31%
.4colorNumber.41%
.5colorNumber.51%
.6colorNumber.61%
.7colorNumber.71%
.8colorNumber.81%
.9colorNumber.91%
%
*colorblack*2%
O:colorCharacterO:2%
A.colorblackA.2%
B.colorblackB.2%
C.colorblackC.2%
A:colorCharacterA:2%
B:colorCharacterB:2%
C:colorCharacterC:2%
DA:colorCharacterDA:3%
DB:colorCharacterDB:3%
DC:colorCharacterDC:3%
LA.colorblackLA.3%
LB.colorblackLB.3%
LC.colorblackLC.3%
LA:colorCharacterLA:3%
LB:colorCharacterLB:3%
LC:colorCharacterLC:3%
X1colorblackX12%
X1:colorCharacterX1:3%
X2colorblackX2:2%
X2:colorCharacterX2:3%
X3colorblackX3:2%
X3:colorCharacterX3:3%
X4colorblackX4:2%
X4:colorCharacterX4:3%
"A"bfcolorred"A"3%
"B"bfcolorred"B"3%
"C"bfcolorred"C"3%
"X"colorred"X"3%
In1colorblackIn13%
In2colorblackIn23%
In3colorblackIn33%
In4colorblackIn43%
,
emph=scale,above,with,at,Here,line,to,end,start,from,ljust,
emphstyle=bfcolorblack,
morekeywords=[3]PS,PE,
keywordstyle=[3]colorCharacter,
morekeywords=[5]down_,up_,elen_,right_,log_init,NOT_gate,dot,AND_gate,OR_gate,
keywordstyle=[5]colorOthers,
sensitive=false,
morecomment=[l][colorgray]#,
begindocument
beginlstlisting[style=circuit_macros]
% `logic.cir'
.PS
scale=25.4
log_init
#setrgb(0,0,1) # Blue Color
#dot(,,1)
O:(0,0)
"A" at Here above;DA:dot(,,1);
line down_ elen_/2 with .start at DA.s;dot;A:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LA:line down_ to (Here.x,A.end.y);
"B" at (elen_,0) above;DB:dot(,,1);
line down_ elen_/2 with .start at DB.s;dot;B:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LB:line to (Here.x,B.end.y);
"C" at (2*elen_,0) above;DC:dot(,,1);
line down_ elen_/2 with .start at DC.s;dot;C:line down_ 3.5*elen_;line right_ elen_/2;corner;
line down_ elen_/2;NOT_gate;LC:line to (Here.x,C.end.y);
right_
X1:AND_gate(2) at (3*elen_,LC.y+15)
line from X1.In1 to (LA.x,X1.In1.y);dot
line from X1.In2 to (LB.x,X1.In2.y);dot
X2:AND_gate(2) at (X1.x,X1.y-15);
line from X2.In1 to (LB.x,X2.In1.y);dot
line from X2.In2 to (C.x,X2.In2.y);dot
X3:AND_gate(3) at (X1.x,X1.y-30);
line from X3.In1 to (A.x,X3.In1.y);dot
line from X3.In2 to (B.x,X3.In2.y);dot
line from X3.In3 to (LC.x,X3.In3.y);dot
line right_ elen_ from X2.Out;X4:OR_gate(3) with .In2 at Here;
line right_ elen_/2 from X1.Out;corner;line down_ to (Here.x,X4.In1.y);corner;line to X4.In1
line right_ elen_/2 from X3.Out;corner;line up_ to (Here.x,X4.In3.y);corner;line to X4.In3
line right_ elen_/2 from X4.Out; "X" ljust;dot(,,1);
.PE
endlstlisting
enddocument
edited Mar 2 at 5:39
answered Mar 2 at 5:34
KJOKJO
3,6701222
3,6701222
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475923%2fhow-do-i-customize-circuit-macros-in-listings%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Your questions seem to be responded explicitly in your MWE. Precisely, 1) your code is already doing so:
morecomment=[l][colorgray]#,
. 2) You can do the same case for)
as you have defined for"
inmorestring=[b]"
. I don't have a solution for your third question. For 4, what about defining a new array likemorekeywords
and then set a colour for?– Sina Ahmadi
Feb 21 at 1:56
I will check...
– Özgür
Feb 23 at 1:26